From e5c15c03557cc3e081cf46a3af6eab7e25b29df2 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 2 Jun 2026 04:05:44 +0000 Subject: [PATCH 01/16] Updated list of libraries to patch in patch-release.yml --- eng/pipelines/patch-release.yml | 58 +++++++++++++++------------------ 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/eng/pipelines/patch-release.yml b/eng/pipelines/patch-release.yml index 36c1de66addb..97681cff8fe3 100644 --- a/eng/pipelines/patch-release.yml +++ b/eng/pipelines/patch-release.yml @@ -1,45 +1,41 @@ trigger: none pr: none - parameters: - name: TestPipeline displayName: Test Run Without Version Changes type: boolean default: false - extends: template: /eng/pipelines/templates/stages/archetype-sdk-client-patch.yml parameters: TestPipeline: ${{ parameters.TestPipeline }} artifacts: - - name: azure-sdk-template - groupId: com.azure - safeName: azuresdktemplate - skipPublishDocMs: true - ServiceDirectory: template - - name: azure-sdk-template-two - groupId: com.azure - safeName: azuresdktemplatetwo - skipPublishDocMs: true - ServiceDirectory: template - - name: azure-sdk-template-three + - name: azure-messaging-eventhubs-checkpointstore-blob groupId: com.azure - safeName: azuresdktemplatethree - skipPublishDocMs: true - ServiceDirectory: template - - name: azure-sdk-template - groupId: com.azure.v2 - safeName: azuresdktemplate - skipPublishDocMs: true - ServiceDirectory: template-v2 - - name: azure-sdk-template-two - groupId: com.azure.v2 - safeName: azuresdktemplatetwo - skipPublishDocMs: true - ServiceDirectory: template-v2 - - name: azure-sdk-template-three - groupId: com.azure.v2 - safeName: azuresdktemplatethree - skipPublishDocMs: true - ServiceDirectory: template-v2 + safeName: azuremessagingeventhubscheckpointstoreblob + ServiceDirectory: eventhubs + - name: azure-resourcemanager-keyvault + groupId: com.azure.resourcemanager + safeName: azureresourcemanagerkeyvault + ServiceDirectory: keyvault/azure-resourcemanager-keyvault + - name: azure-resourcemanager-compute + groupId: com.azure.resourcemanager + safeName: azureresourcemanagercompute + ServiceDirectory: compute + - name: azure-resourcemanager-sql + groupId: com.azure.resourcemanager + safeName: azureresourcemanagersql + ServiceDirectory: sql + - name: azure-resourcemanager-appservice + groupId: com.azure.resourcemanager + safeName: azureresourcemanagerappservice + ServiceDirectory: appservice + - name: azure-resourcemanager-eventhubs + groupId: com.azure.resourcemanager + safeName: azureresourcemanagereventhubs + ServiceDirectory: eventhubs + - name: azure-resourcemanager-containerinstance + groupId: com.azure.resourcemanager + safeName: azureresourcemanagercontainerinstance + ServiceDirectory: containerinstance From 2d1fe1da209fee4a0854e2a8d61db4300d1078fe Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 2 Jun 2026 04:05:52 +0000 Subject: [PATCH 02/16] Reset sources for azure-messaging-eventhubs-checkpointstore-blob to the release version 1.21.6. --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 32 +++--- .../README.md | 6 +- .../pom.xml | 6 +- .../blob/BlobCheckpointStore.java | 24 +--- .../blob/EventProcessorWithAzureIdentity.java | 4 +- .../blob/BlobCheckpointStoreTests.java | 105 ------------------ 7 files changed, 27 insertions(+), 152 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 448a9e84123f..dde961472e47 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -158,7 +158,7 @@ com.azure:azure-messaging-eventgrid;4.31.6;4.32.0-beta.1 com.azure:azure-messaging-eventgrid-systemevents;1.0.0;1.1.0-beta.1 com.azure:azure-messaging-eventgrid-namespaces;1.1.10;1.2.0-beta.1 com.azure:azure-messaging-eventgrid-cloudnative-cloudevents;1.0.0-beta.1;1.0.0-beta.2 -com.azure:azure-messaging-eventhubs;5.21.4;5.22.0-beta.1 +com.azure:azure-messaging-eventhubs;5.21.4;5.21.4 com.azure:azure-messaging-eventhubs-checkpointstore-blob;1.21.6;1.22.0-beta.1 com.azure:azure-messaging-eventhubs-checkpointstore-jedis;1.0.0-beta.4;1.0.0-beta.5 com.azure:azure-messaging-eventhubs-stress;1.0.0-beta.1;1.0.0-beta.1 diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CHANGELOG.md b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CHANGELOG.md index d262bc36ee44..566b5a51702b 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CHANGELOG.md +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CHANGELOG.md @@ -1,30 +1,15 @@ # Release History -## 1.22.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -- Fixed `BlobCheckpointStore.updateCheckpoint` so that it falls back to the deprecated - `Checkpoint.getOffset()` (Long) value when `Checkpoint.getOffsetString()` is not populated. This restores writing of - the `offset` blob metadata for callers that still build `Checkpoint` instances using the legacy long offset, fixing - a regression introduced in 1.21.0 that broke partition switch-over and consumer-group lag monitoring. - ([#46752](https://github.com/Azure/azure-sdk-for-java/issues/46752)) - -### Other Changes - ## 1.21.6 (2026-05-05) ### Other Changes #### Dependency Updates -- Upgraded `azure-storage-blob` from `12.33.3` to version `12.33.4`. +- Upgraded `azure-storage-blob` from `12.33.2` to version `12.33.4`. - Upgraded `azure-messaging-eventhubs` from `5.21.3` to version `5.21.4`. + ## 1.21.5 (2026-03-30) ### Other Changes @@ -40,7 +25,9 @@ #### Dependency Updates -- Upgraded `azure-storage-blob` from `12.33.1` to version `12.33.2`. +- Upgraded `azure-storage-blob` from `12.33.0` to version `12.33.2`. +- Upgraded `azure-messaging-eventhubs` from `5.21.3` to version `5.22.0-beta.1`. + ## 1.21.3 (2026-01-29) @@ -48,9 +35,10 @@ #### Dependency Updates -- Upgraded `azure-storage-blob` from `12.33.0` to version `12.33.1`. +- Upgraded `azure-storage-blob` from `12.32.0` to version `12.33.0`. - Upgraded `azure-messaging-eventhubs` from `5.21.2` to version `5.21.3`. + ## 1.21.2 (2025-10-27) ### Other Changes @@ -60,6 +48,7 @@ - Upgraded `azure-messaging-eventhubs` from `5.21.1` to version `5.21.2`. - Upgraded `azure-storage-blob` from `12.31.2` to version `12.32.0`. + ## 1.21.1 (2025-09-25) ### Other Changes @@ -69,6 +58,7 @@ - Upgraded `azure-messaging-eventhubs` from `5.21.0` to version `5.21.1`. - Upgraded `azure-storage-blob` from `12.31.1` to version `12.31.2`. + ## 1.21.0 (2025-08-11) ### Other Changes @@ -183,6 +173,7 @@ - Experimental checkpointing metrics are no longer reported by this package. They've been moved to `azure-messaging-eventhubs` package. ([#38899](https://github.com/Azure/azure-sdk-for-java/pull/38899)) + ### Other Changes #### Dependency Updates @@ -253,6 +244,7 @@ - Upgraded `azure-messaging-eventhubs` from `5.18.1` to version `5.18.2`. - Upgraded `azure-storage-blob` from `12.25.1` to version `12.25.2`. + ## 1.19.1 (2024-02-16) ### Other Changes @@ -321,6 +313,7 @@ - Upgraded `azure-messaging-eventhubs` from `5.15.6` to version `5.15.7`. - Upgraded `azure-storage-blob` from `12.22.3` to version `12.23.0`. + ## 1.16.7 (2023-06-21) ### Other Changes @@ -659,3 +652,4 @@ store checkpoints and balance partition load among all instances of Event Proces - Initial offset provider for each partition is not implemented. - Interoperability with Event Processors of other language SDKs like Python is not supported. + diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md index 30056a02d99a..8625398f814a 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md @@ -60,7 +60,7 @@ add the direct dependency to your project as follows. com.azure azure-messaging-eventhubs-checkpointstore-blob - 1.21.0 + 1.21.6 ``` [//]: # ({x-version-update-end}) @@ -185,9 +185,9 @@ Guidelines](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/eventhubs/ [event_hubs_product_docs]: https://learn.microsoft.com/azure/event-hubs/ [java_8_sdk_javadocs]: https://docs.oracle.com/javase/8/docs/api/java/util/logging/package-summary.html [jdk_link]: https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable -[logging]: https://github.com/Azure/azure-sdk-for-java/blob/main/docs/logging.md +[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-in-Azure-SDK [maven]: https://maven.apache.org/ -[performance_tuning]: https://github.com/Azure/azure-sdk-for-java/blob/main/docs/performance-tuning.md +[performance_tuning]: https://github.com/Azure/azure-sdk-for-java/wiki/Performance-Tuning [samples_readme]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/README.md [sample_azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/EventProcessorWithAzureIdentity.java [sample_container_client]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobCheckpointStoreSample.java diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml index 32c2f2460a78..5b30b4a95147 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml @@ -17,7 +17,7 @@ com.azure azure-messaging-eventhubs-checkpointstore-blob - 1.22.0-beta.1 + 1.21.6 Microsoft Azure client library for storing checkpoints in Storage Blobs Library for using storing checkpoints in Storage Blobs @@ -51,12 +51,12 @@ com.azure azure-messaging-eventhubs - 5.22.0-beta.1 + 5.21.4 com.azure azure-storage-blob - 12.34.0 + 12.33.3 diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/main/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobCheckpointStore.java b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/main/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobCheckpointStore.java index 64d9d6cdd2ea..2e5818c031c9 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/main/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobCheckpointStore.java +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/main/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobCheckpointStore.java @@ -238,22 +238,14 @@ private Mono updateOwnershipETag(Response response, Parti /** * Updates the checkpoint in Storage Blobs for a partition. * - *

At least one of {@code sequenceNumber}, {@code offsetString}, or the deprecated {@code offset} must be - * populated on the supplied {@link Checkpoint}. When both {@code offsetString} and the deprecated {@code offset} - * are populated, {@code offsetString} is preferred and persisted as the offset metadata value.

- * - * @param checkpoint Checkpoint information containing the sequence number and/or offset (as {@code offsetString} - * or the deprecated {@code offset}) to be stored for this partition. - * @return A {@link Mono} that completes when the checkpoint metadata has been persisted. + * @param checkpoint Checkpoint information containing sequence number and offset to be stored for this partition. + * @return The new ETag on successful update. */ @Override public Mono updateCheckpoint(Checkpoint checkpoint) { - if (checkpoint == null - || (checkpoint.getSequenceNumber() == null - && checkpoint.getOffset() == null - && CoreUtils.isNullOrEmpty(checkpoint.getOffsetString()))) { + if (checkpoint == null || (checkpoint.getSequenceNumber() == null && checkpoint.getOffset() == null)) { throw LOGGER.logExceptionAsWarning(Exceptions.propagate(new IllegalStateException( - "At least one of sequence number, offset, or offsetString must be provided when updating a checkpoint"))); + "Both sequence number and offset cannot be null when updating a checkpoint"))); } String partitionId = checkpoint.getPartitionId(); @@ -267,14 +259,8 @@ public Mono updateCheckpoint(Checkpoint checkpoint) { String sequenceNumber = checkpoint.getSequenceNumber() == null ? null : String.valueOf(checkpoint.getSequenceNumber()); - // Prefer offsetString when populated; otherwise fall back to the deprecated offset (Long) so callers that - // still build Checkpoint instances using setOffset(Long) continue to persist the offset metadata. - String offset = CoreUtils.isNullOrEmpty(checkpoint.getOffsetString()) - ? Objects.toString(checkpoint.getOffset(), null) - : checkpoint.getOffsetString(); - metadata.put(SEQUENCE_NUMBER, sequenceNumber); - metadata.put(OFFSET, offset); + metadata.put(OFFSET, checkpoint.getOffsetString()); BlobAsyncClient blobAsyncClient = blobClients.get(blobName); return blobAsyncClient.exists().flatMap(exists -> { diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/EventProcessorWithAzureIdentity.java b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/EventProcessorWithAzureIdentity.java index 925e62550d55..4120281b297f 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/EventProcessorWithAzureIdentity.java +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples/java/com/azure/messaging/eventhubs/checkpointstore/blob/EventProcessorWithAzureIdentity.java @@ -20,7 +20,7 @@ * Demonstrates how create an EventProcessorClient using Azure Identity to authenticate with Azure Storage Blobs and * Azure Event Hubs. * - * @see Identity and + * @see Identity and * Authentication */ public class EventProcessorWithAzureIdentity { @@ -49,7 +49,7 @@ public class EventProcessorWithAzureIdentity { */ public static void main(String[] args) throws Exception { // The DefaultAzureCredential is an aggregate credential that chooses the best credentials to use based - // on the running environment. See https://github.com/Azure/azure-sdk-for-java/blob/main/docs/identity-examples.md + // on the running environment. See https://github.com/Azure/azure-sdk-for-java/wiki/Identity-and-Authentication // for more information. // Ensure the credential chosen has permissions to access both the Storage Blob container and the Event Hub. // For example, if you are using a service principal, it has permissions to both resources. Or, if this is diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/test/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobCheckpointStoreTests.java b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/test/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobCheckpointStoreTests.java index c11a264fbd5c..5d0c3cc69e55 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/test/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobCheckpointStoreTests.java +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/test/java/com/azure/messaging/eventhubs/checkpointstore/blob/BlobCheckpointStoreTests.java @@ -24,7 +24,6 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.DisabledOnJre; import org.junit.jupiter.api.condition.JRE; -import org.mockito.ArgumentCaptor; import org.mockito.ArgumentMatchers; import org.mockito.Mock; import org.mockito.Mockito; @@ -47,7 +46,6 @@ import static com.azure.messaging.eventhubs.checkpointstore.blob.BlobCheckpointStore.OWNER_ID; import static com.azure.messaging.eventhubs.checkpointstore.blob.BlobCheckpointStore.SEQUENCE_NUMBER; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyMap; @@ -263,109 +261,6 @@ public void testUpdateCheckpointInvalid() { assertThrows(IllegalStateException.class, () -> blobCheckpointStore.updateCheckpoint(new Checkpoint())); } - /** - * Tests that {@link BlobCheckpointStore#updateCheckpoint(Checkpoint)} falls back to the deprecated - * {@link Checkpoint#getOffset()} value when {@link Checkpoint#getOffsetString()} is not provided. Reproduces the - * regression reported in https://github.com/Azure/azure-sdk-for-java/issues/46752. - */ - @Test - public void testUpdateCheckpointFallsBackToOffsetWhenOffsetStringMissing() { - Map captured = captureUpdateCheckpointMetadata(new Checkpoint().setFullyQualifiedNamespace("ns") - .setEventHubName("eh") - .setConsumerGroup("cg") - .setPartitionId("0") - .setSequenceNumber(2L) - .setOffset(100L)); - - assertEquals("2", captured.get(SEQUENCE_NUMBER)); - assertEquals("100", captured.get(OFFSET)); - } - - /** - * Tests that {@link BlobCheckpointStore#updateCheckpoint(Checkpoint)} writes the {@code offsetString} value into - * blob metadata when only {@link Checkpoint#setOffsetString(String)} has been populated. - */ - @Test - public void testUpdateCheckpointUsesOffsetStringWhenProvided() { - Map captured = captureUpdateCheckpointMetadata(new Checkpoint().setFullyQualifiedNamespace("ns") - .setEventHubName("eh") - .setConsumerGroup("cg") - .setPartitionId("0") - .setSequenceNumber(2L) - .setOffsetString("offset-string-value")); - - assertEquals("2", captured.get(SEQUENCE_NUMBER)); - assertEquals("offset-string-value", captured.get(OFFSET)); - } - - /** - * Tests that when both {@code offset} and {@code offsetString} are populated, {@code offsetString} is preferred. - */ - @Test - public void testUpdateCheckpointPrefersOffsetStringOverOffset() { - Map captured = captureUpdateCheckpointMetadata(new Checkpoint().setFullyQualifiedNamespace("ns") - .setEventHubName("eh") - .setConsumerGroup("cg") - .setPartitionId("0") - .setSequenceNumber(2L) - .setOffset(100L) - .setOffsetString("offset-string-value")); - - assertEquals("offset-string-value", captured.get(OFFSET)); - } - - /** - * Tests that an {@code offsetString}-only checkpoint is accepted by the validation guard. This is a behavior - * change from the prior implementation, which only inspected {@code sequenceNumber} and the deprecated - * {@code offset} (Long) and would have rejected a checkpoint that supplied only {@code offsetString}. - */ - @Test - public void testUpdateCheckpointOffsetStringOnlyIsValid() { - Map captured = captureUpdateCheckpointMetadata(new Checkpoint().setFullyQualifiedNamespace("ns") - .setEventHubName("eh") - .setConsumerGroup("cg") - .setPartitionId("0") - .setOffsetString("offset-string-value")); - - assertNull(captured.get(SEQUENCE_NUMBER)); - assertEquals("offset-string-value", captured.get(OFFSET)); - } - - /** - * Tests that a checkpoint with only {@code sequenceNumber} populated still succeeds and writes a {@code null} - * offset metadata value, preserving prior behavior. - */ - @Test - public void testUpdateCheckpointSequenceNumberOnly() { - Map captured = captureUpdateCheckpointMetadata(new Checkpoint().setFullyQualifiedNamespace("ns") - .setEventHubName("eh") - .setConsumerGroup("cg") - .setPartitionId("0") - .setSequenceNumber(2L)); - - assertEquals("2", captured.get(SEQUENCE_NUMBER)); - assertNull(captured.get(OFFSET)); - } - - @SuppressWarnings("unchecked") - private Map captureUpdateCheckpointMetadata(Checkpoint checkpoint) { - final String legacyPrefix = getLegacyPrefix(checkpoint.getFullyQualifiedNamespace(), - checkpoint.getEventHubName(), checkpoint.getConsumerGroup()); - final String blobName = legacyPrefix + CHECKPOINT_PATH + checkpoint.getPartitionId(); - - when(blobContainerAsyncClient.getBlobAsyncClient(blobName)).thenReturn(blobAsyncClient); - when(blobAsyncClient.getBlockBlobAsyncClient()).thenReturn(blockBlobAsyncClient); - when(blobAsyncClient.exists()).thenReturn(Mono.just(true)); - when(blobAsyncClient.setMetadata(ArgumentMatchers.>any())).thenReturn(Mono.empty()); - - BlobCheckpointStore store = new BlobCheckpointStore(blobContainerAsyncClient); - StepVerifier.create(store.updateCheckpoint(checkpoint)).verifyComplete(); - - ArgumentCaptor> captor = ArgumentCaptor.forClass(Map.class); - Mockito.verify(blobAsyncClient).setMetadata(captor.capture()); - return captor.getValue(); - } - /** * Tests that will update checkpoint if one does not exist. */ From ff605de1d69f7ab1a88f406a2026e717eb9210bc Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 2 Jun 2026 04:05:53 +0000 Subject: [PATCH 03/16] Prepare azure-messaging-eventhubs-checkpointstore-blob for 1.21.7 patch release. --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 9 +++++++++ .../pom.xml | 4 ++-- .../pom.xml | 2 +- sdk/eventhubs/azure-messaging-eventhubs-stress/pom.xml | 4 ++-- .../azure-messaging-eventhubs-track2-perf/pom.xml | 4 ++-- sdk/eventhubs/azure-messaging-eventhubs/docs/pom.xml | 2 +- sdk/eventhubs/azure-messaging-eventhubs/pom.xml | 2 +- 8 files changed, 19 insertions(+), 10 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index dde961472e47..465e266010d7 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -159,7 +159,7 @@ com.azure:azure-messaging-eventgrid-systemevents;1.0.0;1.1.0-beta.1 com.azure:azure-messaging-eventgrid-namespaces;1.1.10;1.2.0-beta.1 com.azure:azure-messaging-eventgrid-cloudnative-cloudevents;1.0.0-beta.1;1.0.0-beta.2 com.azure:azure-messaging-eventhubs;5.21.4;5.21.4 -com.azure:azure-messaging-eventhubs-checkpointstore-blob;1.21.6;1.22.0-beta.1 +com.azure:azure-messaging-eventhubs-checkpointstore-blob;1.21.6;1.21.7 com.azure:azure-messaging-eventhubs-checkpointstore-jedis;1.0.0-beta.4;1.0.0-beta.5 com.azure:azure-messaging-eventhubs-stress;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-messaging-eventhubs-track2-perf;1.0.0-beta.1;1.0.0-beta.1 diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CHANGELOG.md b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CHANGELOG.md index 566b5a51702b..99dd9ac3dc93 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CHANGELOG.md +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CHANGELOG.md @@ -1,5 +1,14 @@ # Release History +## 1.21.7 (2026-06-02) + +### Other Changes + +#### Dependency Updates + +- Upgraded `azure-storage-blob` from `12.33.3` to version `12.34.0`. + + ## 1.21.6 (2026-05-05) ### Other Changes diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml index 5b30b4a95147..93521cc7fb5a 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml @@ -17,7 +17,7 @@ com.azure azure-messaging-eventhubs-checkpointstore-blob - 1.21.6 + 1.21.7 Microsoft Azure client library for storing checkpoints in Storage Blobs Library for using storing checkpoints in Storage Blobs @@ -56,7 +56,7 @@ com.azure azure-storage-blob - 12.33.3 + 12.34.0 diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-jedis/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-jedis/pom.xml index f54b9d96e53d..5af6283c4b38 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-jedis/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-jedis/pom.xml @@ -45,7 +45,7 @@ com.azure azure-messaging-eventhubs - 5.22.0-beta.1 + 5.21.4 redis.clients diff --git a/sdk/eventhubs/azure-messaging-eventhubs-stress/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs-stress/pom.xml index a05aa90aad4e..2b7c35061c11 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-stress/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs-stress/pom.xml @@ -43,12 +43,12 @@ com.azure azure-messaging-eventhubs - 5.22.0-beta.1 + 5.21.4 com.azure azure-messaging-eventhubs-checkpointstore-blob - 1.22.0-beta.1 + 1.21.7 diff --git a/sdk/eventhubs/azure-messaging-eventhubs-track2-perf/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs-track2-perf/pom.xml index 8af48c32fd23..0ff6ab382bdf 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-track2-perf/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs-track2-perf/pom.xml @@ -24,12 +24,12 @@ com.azure azure-messaging-eventhubs - 5.22.0-beta.1 + 5.21.4 com.azure azure-messaging-eventhubs-checkpointstore-blob - 1.22.0-beta.1 + 1.21.7 com.azure diff --git a/sdk/eventhubs/azure-messaging-eventhubs/docs/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs/docs/pom.xml index 77f381531eda..b8b08eb38570 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/docs/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs/docs/pom.xml @@ -20,7 +20,7 @@ com.azure azure-messaging-eventhubs-checkpointstore-blob - 1.22.0-beta.1 + 1.21.7 io.projectreactor diff --git a/sdk/eventhubs/azure-messaging-eventhubs/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs/pom.xml index a5b8b846a56a..baefd930697e 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/pom.xml +++ b/sdk/eventhubs/azure-messaging-eventhubs/pom.xml @@ -14,7 +14,7 @@ com.azure azure-messaging-eventhubs - 5.22.0-beta.1 + 5.21.4 Microsoft Azure client library for Event Hubs Libraries built on Microsoft Azure Event Hubs From 86793aa4825a38ba1bb0d46e7da50a13c358fce0 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 2 Jun 2026 04:05:55 +0000 Subject: [PATCH 04/16] Reset sources for azure-resourcemanager-keyvault to the release version 2.55.2. --- .../azure-resourcemanager-keyvault/CHANGELOG.md | 11 +---------- sdk/keyvault/azure-resourcemanager-keyvault/README.md | 2 +- sdk/keyvault/azure-resourcemanager-keyvault/pom.xml | 10 +++++----- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/CHANGELOG.md b/sdk/keyvault/azure-resourcemanager-keyvault/CHANGELOG.md index 3954295d4215..4c382b164694 100644 --- a/sdk/keyvault/azure-resourcemanager-keyvault/CHANGELOG.md +++ b/sdk/keyvault/azure-resourcemanager-keyvault/CHANGELOG.md @@ -1,15 +1,5 @@ # Release History -## 2.56.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - ## 2.55.2 (2026-05-05) ### Other Changes @@ -21,6 +11,7 @@ - Upgraded `azure-resourcemanager-resources` from `2.54.0` to version `2.54.1`. - Upgraded `azure-resourcemanager-authorization` from `2.53.7` to version `2.53.9`. + ## 2.55.1 (2026-03-30) ### Other Changes diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/README.md b/sdk/keyvault/azure-resourcemanager-keyvault/README.md index 3c700e2999e9..4024811c7d3d 100644 --- a/sdk/keyvault/azure-resourcemanager-keyvault/README.md +++ b/sdk/keyvault/azure-resourcemanager-keyvault/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-keyvault - 2.55.0 + 2.55.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/pom.xml b/sdk/keyvault/azure-resourcemanager-keyvault/pom.xml index 71fec3e9eeaa..e39235ebea11 100644 --- a/sdk/keyvault/azure-resourcemanager-keyvault/pom.xml +++ b/sdk/keyvault/azure-resourcemanager-keyvault/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-keyvault - 2.56.0-beta.1 + 2.55.2 jar Microsoft Azure SDK for Key Vault Management @@ -59,17 +59,17 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.54.1 + 2.54.0 com.azure.resourcemanager azure-resourcemanager-authorization - 2.53.9 + 2.53.8 com.azure azure-security-keyvault-keys - 4.11.0 + 4.10.6 com.azure @@ -80,7 +80,7 @@ com.azure azure-security-keyvault-secrets - 4.10.7 + 4.10.6 com.azure From a30a68e7d695e92ad7a1b1b5c6fe6bd81f005762 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 2 Jun 2026 04:05:56 +0000 Subject: [PATCH 05/16] Prepare azure-resourcemanager-keyvault for 2.55.3 patch release. --- eng/versioning/version_client.txt | 2 +- .../azure-resourcemanager-keyvault/CHANGELOG.md | 12 ++++++++++++ sdk/keyvault/azure-resourcemanager-keyvault/pom.xml | 10 +++++----- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 465e266010d7..e75774d36c50 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -288,7 +288,7 @@ com.azure.resourcemanager:azure-resourcemanager-containerservice;2.60.0;2.61.0-b com.azure.resourcemanager:azure-resourcemanager-cosmos;2.54.3;2.55.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-dns;2.53.8;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.53.8;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-keyvault;2.55.2;2.56.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-keyvault;2.55.2;2.55.3 com.azure.resourcemanager:azure-resourcemanager-monitor;2.53.8;2.54.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-msi;2.53.8;2.54.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-network;2.58.2;2.59.0-beta.1 diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/CHANGELOG.md b/sdk/keyvault/azure-resourcemanager-keyvault/CHANGELOG.md index 4c382b164694..3a2dd521b5a6 100644 --- a/sdk/keyvault/azure-resourcemanager-keyvault/CHANGELOG.md +++ b/sdk/keyvault/azure-resourcemanager-keyvault/CHANGELOG.md @@ -1,5 +1,17 @@ # Release History +## 2.55.3 (2026-06-02) + +### Other Changes + +#### Dependency Updates + +- Upgraded `azure-resourcemanager-authorization` from `2.53.8` to version `2.53.9`. +- Upgraded `azure-resourcemanager-resources` from `2.54.0` to version `2.54.1`. +- Upgraded `azure-security-keyvault-keys` from `4.10.6` to version `4.11.0`. +- Upgraded `azure-security-keyvault-secrets` from `4.10.6` to version `4.10.7`. + + ## 2.55.2 (2026-05-05) ### Other Changes diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/pom.xml b/sdk/keyvault/azure-resourcemanager-keyvault/pom.xml index e39235ebea11..adcf9de47d3e 100644 --- a/sdk/keyvault/azure-resourcemanager-keyvault/pom.xml +++ b/sdk/keyvault/azure-resourcemanager-keyvault/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-keyvault - 2.55.2 + 2.55.3 jar Microsoft Azure SDK for Key Vault Management @@ -59,17 +59,17 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.54.0 + 2.54.1 com.azure.resourcemanager azure-resourcemanager-authorization - 2.53.8 + 2.53.9 com.azure azure-security-keyvault-keys - 4.10.6 + 4.11.0 com.azure @@ -80,7 +80,7 @@ com.azure azure-security-keyvault-secrets - 4.10.6 + 4.10.7 com.azure From 42f11faad1c68891bd0672c8d803bd5d6199c493 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 2 Jun 2026 04:05:59 +0000 Subject: [PATCH 06/16] Reset sources for azure-resourcemanager-compute to the release version 2.57.1. --- .../CHANGELOG.md | 11 +-- .../azure-resourcemanager-compute/README.md | 2 +- .../azure-resourcemanager-compute/pom.xml | 16 ++-- .../fluent/DiskRestorePointsClient.java | 14 +-- .../compute/fluent/DisksClient.java | 14 +-- .../compute/fluent/LogAnalyticsClient.java | 30 +++---- .../compute/fluent/SnapshotsClient.java | 14 +-- .../VirtualMachineScaleSetVMsClient.java | 15 ++-- .../compute/fluent/VirtualMachinesClient.java | 60 ++++++------- .../DiskRestorePointsClientImpl.java | 20 ++--- .../implementation/DisksClientImpl.java | 20 ++--- .../LogAnalyticsClientImpl.java | 44 +++++----- .../implementation/SnapshotsClientImpl.java | 20 ++--- .../VirtualMachineScaleSetVMsClientImpl.java | 22 +++-- .../VirtualMachinesClientImpl.java | 88 +++++++++---------- 15 files changed, 180 insertions(+), 210 deletions(-) diff --git a/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md b/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md index f4c7528b8f20..ba2d96c1d338 100644 --- a/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md +++ b/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md @@ -1,15 +1,5 @@ # Release History -## 2.58.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - ## 2.57.1 (2026-05-05) ### Other Changes @@ -22,6 +12,7 @@ - Upgraded `azure-resourcemanager-msi` from `2.53.7` to version `2.53.8`. - Upgraded `azure-resourcemanager-authorization` from `2.53.8` to version `2.53.9`. + ## 2.57.0 (2026-04-21) ### Breaking Changes diff --git a/sdk/compute/azure-resourcemanager-compute/README.md b/sdk/compute/azure-resourcemanager-compute/README.md index 7b60e5b1ee20..eacd404a92c9 100644 --- a/sdk/compute/azure-resourcemanager-compute/README.md +++ b/sdk/compute/azure-resourcemanager-compute/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-compute - 2.57.0 + 2.57.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/compute/azure-resourcemanager-compute/pom.xml b/sdk/compute/azure-resourcemanager-compute/pom.xml index 097b7e600dfe..e5bd7fe471b6 100644 --- a/sdk/compute/azure-resourcemanager-compute/pom.xml +++ b/sdk/compute/azure-resourcemanager-compute/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-compute - 2.58.0-beta.1 + 2.57.1 jar Microsoft Azure SDK for Compute Management @@ -71,27 +71,27 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.54.1 + 2.54.0 com.azure.resourcemanager azure-resourcemanager-storage - 2.56.0 + 2.55.4 com.azure.resourcemanager azure-resourcemanager-network - 2.58.2 + 2.58.1 com.azure.resourcemanager azure-resourcemanager-msi - 2.53.8 + 2.53.7 com.azure.resourcemanager azure-resourcemanager-authorization - 2.53.9 + 2.53.8 org.slf4j @@ -120,13 +120,13 @@ com.azure.resourcemanager azure-resourcemanager-keyvault - 2.55.2 + 2.55.1 test com.azure azure-storage-blob - 12.34.0 + 12.33.3 test diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DiskRestorePointsClient.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DiskRestorePointsClient.java index dc00b8f485e9..5e0168f075a1 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DiskRestorePointsClient.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DiskRestorePointsClient.java @@ -146,7 +146,7 @@ PagedIterable listByRestorePoint(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> grantAccessWithResponseAsync(String resourceGroupName, @@ -164,7 +164,7 @@ Mono>> grantAccessWithResponseAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 disk access SAS uri. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, AccessUriInner> beginGrantAccessAsync(String resourceGroupName, @@ -182,7 +182,7 @@ PollerFlux, AccessUriInner> beginGrantAccessAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 disk access SAS uri. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AccessUriInner> beginGrantAccess(String resourceGroupName, @@ -201,7 +201,7 @@ SyncPoller, AccessUriInner> beginGrantAccess(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 disk access SAS uri. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AccessUriInner> beginGrantAccess(String resourceGroupName, @@ -219,7 +219,7 @@ SyncPoller, AccessUriInner> beginGrantAccess(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono grantAccessAsync(String resourceGroupName, String restorePointCollectionName, @@ -236,7 +236,7 @@ Mono grantAccessAsync(String resourceGroupName, String restorePo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AccessUriInner grantAccess(String resourceGroupName, String restorePointCollectionName, String vmRestorePointName, @@ -254,7 +254,7 @@ AccessUriInner grantAccess(String resourceGroupName, String restorePointCollecti * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AccessUriInner grantAccess(String resourceGroupName, String restorePointCollectionName, String vmRestorePointName, diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DisksClient.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DisksClient.java index 80e899c6bea7..70922921e35b 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DisksClient.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DisksClient.java @@ -485,7 +485,7 @@ SyncPoller, DiskInner> beginUpdate(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> grantAccessWithResponseAsync(String resourceGroupName, String diskName, @@ -501,7 +501,7 @@ Mono>> grantAccessWithResponseAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 disk access SAS uri. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, AccessUriInner> beginGrantAccessAsync(String resourceGroupName, @@ -517,7 +517,7 @@ PollerFlux, AccessUriInner> beginGrantAccessAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 disk access SAS uri. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AccessUriInner> beginGrantAccess(String resourceGroupName, String diskName, @@ -534,7 +534,7 @@ SyncPoller, AccessUriInner> beginGrantAccess(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 disk access SAS uri. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AccessUriInner> beginGrantAccess(String resourceGroupName, String diskName, @@ -550,7 +550,7 @@ SyncPoller, AccessUriInner> beginGrantAccess(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono grantAccessAsync(String resourceGroupName, String diskName, GrantAccessData grantAccessData); @@ -565,7 +565,7 @@ SyncPoller, AccessUriInner> beginGrantAccess(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AccessUriInner grantAccess(String resourceGroupName, String diskName, GrantAccessData grantAccessData); @@ -581,7 +581,7 @@ SyncPoller, AccessUriInner> beginGrantAccess(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AccessUriInner grantAccess(String resourceGroupName, String diskName, GrantAccessData grantAccessData, diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/LogAnalyticsClient.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/LogAnalyticsClient.java index e55a05b69615..5b785385f7cb 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/LogAnalyticsClient.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/LogAnalyticsClient.java @@ -31,8 +31,7 @@ public interface LogAnalyticsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> exportRequestRateByIntervalWithResponseAsync(String location, @@ -47,7 +46,7 @@ Mono>> exportRequestRateByIntervalWithResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 logAnalytics operation status response. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, LogAnalyticsOperationResultInner> @@ -62,7 +61,7 @@ Mono>> exportRequestRateByIntervalWithResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 logAnalytics operation status response. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LogAnalyticsOperationResultInner> @@ -78,7 +77,7 @@ Mono>> exportRequestRateByIntervalWithResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 logAnalytics operation status response. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LogAnalyticsOperationResultInner> @@ -93,7 +92,7 @@ Mono>> exportRequestRateByIntervalWithResponseAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono exportRequestRateByIntervalAsync(String location, @@ -108,7 +107,7 @@ Mono exportRequestRateByIntervalAsync(String l * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) LogAnalyticsOperationResultInner exportRequestRateByInterval(String location, @@ -124,7 +123,7 @@ LogAnalyticsOperationResultInner exportRequestRateByInterval(String location, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) LogAnalyticsOperationResultInner exportRequestRateByInterval(String location, RequestRateByIntervalInput parameters, @@ -138,8 +137,7 @@ LogAnalyticsOperationResultInner exportRequestRateByInterval(String location, Re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> exportThrottledRequestsWithResponseAsync(String location, @@ -153,7 +151,7 @@ Mono>> exportThrottledRequestsWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 logAnalytics operation status response. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, LogAnalyticsOperationResultInner> @@ -167,7 +165,7 @@ Mono>> exportThrottledRequestsWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 logAnalytics operation status response. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LogAnalyticsOperationResultInner> @@ -182,7 +180,7 @@ Mono>> exportThrottledRequestsWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 logAnalytics operation status response. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LogAnalyticsOperationResultInner> @@ -196,7 +194,7 @@ Mono>> exportThrottledRequestsWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono exportThrottledRequestsAsync(String location, @@ -210,7 +208,7 @@ Mono exportThrottledRequestsAsync(String locat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) LogAnalyticsOperationResultInner exportThrottledRequests(String location, ThrottledRequestsInput parameters); @@ -224,7 +222,7 @@ Mono exportThrottledRequestsAsync(String locat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) LogAnalyticsOperationResultInner exportThrottledRequests(String location, ThrottledRequestsInput parameters, diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/SnapshotsClient.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/SnapshotsClient.java index d2cdb103e49c..421468fc065c 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/SnapshotsClient.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/SnapshotsClient.java @@ -487,7 +487,7 @@ SyncPoller, SnapshotInner> beginUpdate(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> grantAccessWithResponseAsync(String resourceGroupName, String snapshotName, @@ -503,7 +503,7 @@ Mono>> grantAccessWithResponseAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 disk access SAS uri. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, AccessUriInner> beginGrantAccessAsync(String resourceGroupName, @@ -519,7 +519,7 @@ PollerFlux, AccessUriInner> beginGrantAccessAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 disk access SAS uri. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AccessUriInner> beginGrantAccess(String resourceGroupName, @@ -536,7 +536,7 @@ SyncPoller, AccessUriInner> beginGrantAccess(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 disk access SAS uri. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AccessUriInner> beginGrantAccess(String resourceGroupName, @@ -552,7 +552,7 @@ SyncPoller, AccessUriInner> beginGrantAccess(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono grantAccessAsync(String resourceGroupName, String snapshotName, @@ -568,7 +568,7 @@ Mono grantAccessAsync(String resourceGroupName, String snapshotN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AccessUriInner grantAccess(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData); @@ -584,7 +584,7 @@ Mono grantAccessAsync(String resourceGroupName, String snapshotN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AccessUriInner grantAccess(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData, diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java index cc5d3784a7ff..0725f806f23c 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java @@ -1055,8 +1055,7 @@ Response simulateEvictionWithResponse(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks along with {@link Response} on successful - * completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> attachDetachDataDisksWithResponseAsync(String resourceGroupName, @@ -1073,7 +1072,7 @@ Mono>> attachDetachDataDisksWithResponseAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 specifies the storage settings for the virtual machine disks. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, StorageProfile> beginAttachDetachDataDisksAsync(String resourceGroupName, @@ -1090,7 +1089,7 @@ PollerFlux, StorageProfile> beginAttachDetachDataDisk * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 specifies the storage settings for the virtual machine disks. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StorageProfile> beginAttachDetachDataDisks(String resourceGroupName, @@ -1108,7 +1107,7 @@ SyncPoller, StorageProfile> beginAttachDetachDataDisk * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 specifies the storage settings for the virtual machine disks. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StorageProfile> beginAttachDetachDataDisks(String resourceGroupName, @@ -1125,7 +1124,7 @@ SyncPoller, StorageProfile> beginAttachDetachDataDisk * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono attachDetachDataDisksAsync(String resourceGroupName, String vmScaleSetName, String instanceId, @@ -1142,7 +1141,7 @@ Mono attachDetachDataDisksAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) StorageProfile attachDetachDataDisks(String resourceGroupName, String vmScaleSetName, String instanceId, @@ -1160,7 +1159,7 @@ StorageProfile attachDetachDataDisks(String resourceGroupName, String vmScaleSet * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) StorageProfile attachDetachDataDisks(String resourceGroupName, String vmScaleSetName, String instanceId, diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java index 05454ef12fa2..3c55ddc20e1d 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java @@ -685,8 +685,7 @@ PagedIterable list(String statusOnly, String filter, Expand * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the properties of an AssessPatches result along with {@link Response} on successful completion - * of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> assessPatchesWithResponseAsync(String resourceGroupName, String vmName); @@ -699,7 +698,7 @@ PagedIterable list(String statusOnly, String filter, Expand * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 describes the properties of an AssessPatches result. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, VirtualMachineAssessPatchesResultInner> @@ -713,7 +712,7 @@ PagedIterable list(String statusOnly, String filter, Expand * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 describes the properties of an AssessPatches result. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualMachineAssessPatchesResultInner> @@ -728,7 +727,7 @@ PagedIterable list(String statusOnly, String filter, Expand * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 describes the properties of an AssessPatches result. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualMachineAssessPatchesResultInner> @@ -742,7 +741,7 @@ PagedIterable list(String statusOnly, String filter, Expand * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the properties of an AssessPatches result on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono assessPatchesAsync(String resourceGroupName, String vmName); @@ -755,7 +754,7 @@ PagedIterable list(String statusOnly, String filter, Expand * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the properties of an AssessPatches result. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) VirtualMachineAssessPatchesResultInner assessPatches(String resourceGroupName, String vmName); @@ -769,7 +768,7 @@ PagedIterable list(String statusOnly, String filter, Expand * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the properties of an AssessPatches result. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) VirtualMachineAssessPatchesResultInner assessPatches(String resourceGroupName, String vmName, Context context); @@ -783,8 +782,7 @@ PagedIterable list(String statusOnly, String filter, Expand * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks along with {@link Response} on successful - * completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> attachDetachDataDisksWithResponseAsync(String resourceGroupName, String vmName, @@ -799,7 +797,7 @@ Mono>> attachDetachDataDisksWithResponseAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 specifies the storage settings for the virtual machine disks. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, StorageProfile> beginAttachDetachDataDisksAsync(String resourceGroupName, @@ -814,7 +812,7 @@ PollerFlux, StorageProfile> beginAttachDetachDataDisk * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 specifies the storage settings for the virtual machine disks. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StorageProfile> beginAttachDetachDataDisks(String resourceGroupName, @@ -830,7 +828,7 @@ SyncPoller, StorageProfile> beginAttachDetachDataDisk * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 specifies the storage settings for the virtual machine disks. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StorageProfile> beginAttachDetachDataDisks(String resourceGroupName, @@ -845,7 +843,7 @@ SyncPoller, StorageProfile> beginAttachDetachDataDisk * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono attachDetachDataDisksAsync(String resourceGroupName, String vmName, @@ -860,7 +858,7 @@ Mono attachDetachDataDisksAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) StorageProfile attachDetachDataDisks(String resourceGroupName, String vmName, @@ -876,7 +874,7 @@ StorageProfile attachDetachDataDisks(String resourceGroupName, String vmName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) StorageProfile attachDetachDataDisks(String resourceGroupName, String vmName, @@ -892,8 +890,7 @@ StorageProfile attachDetachDataDisks(String resourceGroupName, String vmName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of virtual machine capture operation along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> captureWithResponseAsync(String resourceGroupName, String vmName, @@ -909,7 +906,7 @@ Mono>> captureWithResponseAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 output of virtual machine capture operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, VirtualMachineCaptureResultInner> @@ -925,7 +922,7 @@ Mono>> captureWithResponseAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 output of virtual machine capture operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualMachineCaptureResultInner> @@ -942,7 +939,7 @@ Mono>> captureWithResponseAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 output of virtual machine capture operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualMachineCaptureResultInner> beginCapture( @@ -958,7 +955,7 @@ SyncPoller, VirtualMachineCaptureRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of virtual machine capture operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono captureAsync(String resourceGroupName, String vmName, @@ -974,7 +971,7 @@ Mono captureAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of virtual machine capture operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) VirtualMachineCaptureResultInner capture(String resourceGroupName, String vmName, @@ -991,7 +988,7 @@ VirtualMachineCaptureResultInner capture(String resourceGroupName, String vmName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of virtual machine capture operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) VirtualMachineCaptureResultInner capture(String resourceGroupName, String vmName, @@ -1313,8 +1310,7 @@ void deallocate(String resourceGroupName, String vmName, Boolean hibernate, Bool * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 summary of an installation operation along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> installPatchesWithResponseAsync(String resourceGroupName, String vmName, @@ -1329,7 +1325,7 @@ Mono>> installPatchesWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 result summary of an installation operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, VirtualMachineInstallPatchesResultInner> @@ -1345,7 +1341,7 @@ Mono>> installPatchesWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 result summary of an installation operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualMachineInstallPatchesResultInner> @@ -1362,7 +1358,7 @@ Mono>> installPatchesWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 result summary of an installation operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualMachineInstallPatchesResultInner> @@ -1378,7 +1374,7 @@ Mono>> installPatchesWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 summary of an installation operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono installPatchesAsync(String resourceGroupName, String vmName, @@ -1393,7 +1389,7 @@ Mono installPatchesAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 summary of an installation operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) VirtualMachineInstallPatchesResultInner installPatches(String resourceGroupName, String vmName, @@ -1409,7 +1405,7 @@ VirtualMachineInstallPatchesResultInner installPatches(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.compute.models.ApiErrorException 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 summary of an installation operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) VirtualMachineInstallPatchesResultInner installPatches(String resourceGroupName, String vmName, diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/DiskRestorePointsClientImpl.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/DiskRestorePointsClientImpl.java index 40d43a64cc11..3d93f8a0859f 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/DiskRestorePointsClientImpl.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/DiskRestorePointsClientImpl.java @@ -457,7 +457,7 @@ public PagedIterable listByRestorePoint(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> grantAccessWithResponseAsync(String resourceGroupName, @@ -515,7 +515,7 @@ public Mono>> grantAccessWithResponseAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> grantAccessWithResponseAsync(String resourceGroupName, @@ -571,7 +571,7 @@ private Mono>> grantAccessWithResponseAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 disk access SAS uri. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, AccessUriInner> beginGrantAccessAsync(String resourceGroupName, @@ -595,7 +595,7 @@ public PollerFlux, AccessUriInner> beginGrantAccessAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 disk access SAS uri. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AccessUriInner> beginGrantAccessAsync(String resourceGroupName, @@ -619,7 +619,7 @@ private PollerFlux, AccessUriInner> beginGrantAccessA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 disk access SAS uri. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AccessUriInner> beginGrantAccess(String resourceGroupName, @@ -643,7 +643,7 @@ public SyncPoller, AccessUriInner> beginGrantAccess(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 disk access SAS uri. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AccessUriInner> beginGrantAccess(String resourceGroupName, @@ -666,7 +666,7 @@ public SyncPoller, AccessUriInner> beginGrantAccess(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono grantAccessAsync(String resourceGroupName, String restorePointCollectionName, @@ -687,7 +687,7 @@ public Mono grantAccessAsync(String resourceGroupName, String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono grantAccessAsync(String resourceGroupName, String restorePointCollectionName, @@ -707,7 +707,7 @@ private Mono grantAccessAsync(String resourceGroupName, String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessUriInner grantAccess(String resourceGroupName, String restorePointCollectionName, @@ -728,7 +728,7 @@ public AccessUriInner grantAccess(String resourceGroupName, String restorePointC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessUriInner grantAccess(String resourceGroupName, String restorePointCollectionName, diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/DisksClientImpl.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/DisksClientImpl.java index 6d719759bba9..e2d860f9f6ae 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/DisksClientImpl.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/DisksClientImpl.java @@ -1225,7 +1225,7 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> grantAccessWithResponseAsync(String resourceGroupName, String diskName, @@ -1272,7 +1272,7 @@ public Mono>> grantAccessWithResponseAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> grantAccessWithResponseAsync(String resourceGroupName, String diskName, @@ -1316,7 +1316,7 @@ private Mono>> grantAccessWithResponseAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 disk access SAS uri. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, AccessUriInner> beginGrantAccessAsync(String resourceGroupName, @@ -1338,7 +1338,7 @@ public PollerFlux, AccessUriInner> beginGrantAccessAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 disk access SAS uri. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AccessUriInner> beginGrantAccessAsync(String resourceGroupName, @@ -1360,7 +1360,7 @@ private PollerFlux, AccessUriInner> beginGrantAccessA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 disk access SAS uri. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AccessUriInner> beginGrantAccess(String resourceGroupName, @@ -1379,7 +1379,7 @@ public SyncPoller, AccessUriInner> beginGrantAccess(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 disk access SAS uri. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AccessUriInner> beginGrantAccess(String resourceGroupName, @@ -1397,7 +1397,7 @@ public SyncPoller, AccessUriInner> beginGrantAccess(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono grantAccessAsync(String resourceGroupName, String diskName, @@ -1417,7 +1417,7 @@ public Mono grantAccessAsync(String resourceGroupName, String di * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono grantAccessAsync(String resourceGroupName, String diskName, @@ -1436,7 +1436,7 @@ private Mono grantAccessAsync(String resourceGroupName, String d * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessUriInner grantAccess(String resourceGroupName, String diskName, GrantAccessData grantAccessData) { @@ -1454,7 +1454,7 @@ public AccessUriInner grantAccess(String resourceGroupName, String diskName, Gra * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessUriInner grantAccess(String resourceGroupName, String diskName, GrantAccessData grantAccessData, diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/LogAnalyticsClientImpl.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/LogAnalyticsClientImpl.java index 4428db8b3bfb..b967f3ff831c 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/LogAnalyticsClientImpl.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/LogAnalyticsClientImpl.java @@ -92,8 +92,7 @@ Mono>> exportThrottledRequests(@HostParam("endpoint") * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> exportRequestRateByIntervalWithResponseAsync(String location, @@ -133,8 +132,7 @@ public Mono>> exportRequestRateByIntervalWithResponseA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> exportRequestRateByIntervalWithResponseAsync(String location, @@ -172,7 +170,7 @@ private Mono>> exportRequestRateByIntervalWithResponse * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 logAnalytics operation status response. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, LogAnalyticsOperationResultInner> @@ -193,7 +191,7 @@ private Mono>> exportRequestRateByIntervalWithResponse * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 logAnalytics operation status response. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LogAnalyticsOperationResultInner> @@ -215,7 +213,7 @@ private Mono>> exportRequestRateByIntervalWithResponse * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 logAnalytics operation status response. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LogAnalyticsOperationResultInner> @@ -233,7 +231,7 @@ private Mono>> exportRequestRateByIntervalWithResponse * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 logAnalytics operation status response. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LogAnalyticsOperationResultInner> @@ -250,7 +248,7 @@ private Mono>> exportRequestRateByIntervalWithResponse * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono exportRequestRateByIntervalAsync(String location, @@ -269,7 +267,7 @@ public Mono exportRequestRateByIntervalAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono exportRequestRateByIntervalAsync(String location, @@ -287,7 +285,7 @@ private Mono exportRequestRateByIntervalAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public LogAnalyticsOperationResultInner exportRequestRateByInterval(String location, @@ -305,7 +303,7 @@ public LogAnalyticsOperationResultInner exportRequestRateByInterval(String locat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public LogAnalyticsOperationResultInner exportRequestRateByInterval(String location, @@ -321,8 +319,7 @@ public LogAnalyticsOperationResultInner exportRequestRateByInterval(String locat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> exportThrottledRequestsWithResponseAsync(String location, @@ -361,8 +358,7 @@ public Mono>> exportThrottledRequestsWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> exportThrottledRequestsWithResponseAsync(String location, @@ -399,7 +395,7 @@ private Mono>> exportThrottledRequestsWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 logAnalytics operation status response. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, LogAnalyticsOperationResultInner> @@ -419,7 +415,7 @@ private Mono>> exportThrottledRequestsWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 logAnalytics operation status response. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LogAnalyticsOperationResultInner> @@ -439,7 +435,7 @@ private Mono>> exportThrottledRequestsWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 logAnalytics operation status response. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LogAnalyticsOperationResultInner> @@ -456,7 +452,7 @@ private Mono>> exportThrottledRequestsWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 logAnalytics operation status response. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LogAnalyticsOperationResultInner> @@ -472,7 +468,7 @@ private Mono>> exportThrottledRequestsWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono exportThrottledRequestsAsync(String location, @@ -490,7 +486,7 @@ public Mono exportThrottledRequestsAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono exportThrottledRequestsAsync(String location, @@ -507,7 +503,7 @@ private Mono exportThrottledRequestsAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public LogAnalyticsOperationResultInner exportThrottledRequests(String location, @@ -524,7 +520,7 @@ public LogAnalyticsOperationResultInner exportThrottledRequests(String location, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logAnalytics operation status response. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public LogAnalyticsOperationResultInner exportThrottledRequests(String location, ThrottledRequestsInput parameters, diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SnapshotsClientImpl.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SnapshotsClientImpl.java index 1057459ebc3c..07b2e3c6a6ec 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SnapshotsClientImpl.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SnapshotsClientImpl.java @@ -1235,7 +1235,7 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> grantAccessWithResponseAsync(String resourceGroupName, String snapshotName, @@ -1282,7 +1282,7 @@ public Mono>> grantAccessWithResponseAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> grantAccessWithResponseAsync(String resourceGroupName, String snapshotName, @@ -1326,7 +1326,7 @@ private Mono>> grantAccessWithResponseAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 disk access SAS uri. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, AccessUriInner> beginGrantAccessAsync(String resourceGroupName, @@ -1348,7 +1348,7 @@ public PollerFlux, AccessUriInner> beginGrantAccessAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 disk access SAS uri. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AccessUriInner> beginGrantAccessAsync(String resourceGroupName, @@ -1370,7 +1370,7 @@ private PollerFlux, AccessUriInner> beginGrantAccessA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 disk access SAS uri. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AccessUriInner> beginGrantAccess(String resourceGroupName, @@ -1389,7 +1389,7 @@ public SyncPoller, AccessUriInner> beginGrantAccess(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 disk access SAS uri. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AccessUriInner> beginGrantAccess(String resourceGroupName, @@ -1407,7 +1407,7 @@ public SyncPoller, AccessUriInner> beginGrantAccess(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono grantAccessAsync(String resourceGroupName, String snapshotName, @@ -1427,7 +1427,7 @@ public Mono grantAccessAsync(String resourceGroupName, String sn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono grantAccessAsync(String resourceGroupName, String snapshotName, @@ -1446,7 +1446,7 @@ private Mono grantAccessAsync(String resourceGroupName, String s * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessUriInner grantAccess(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData) { @@ -1464,7 +1464,7 @@ public AccessUriInner grantAccess(String resourceGroupName, String snapshotName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a disk access SAS uri. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessUriInner grantAccess(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData, diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMsClientImpl.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMsClientImpl.java index 3ac28ab58d38..fc96c240bc1d 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMsClientImpl.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMsClientImpl.java @@ -2485,8 +2485,7 @@ public void simulateEviction(String resourceGroupName, String vmScaleSetName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks along with {@link Response} on successful - * completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> attachDetachDataDisksWithResponseAsync(String resourceGroupName, @@ -2536,8 +2535,7 @@ public Mono>> attachDetachDataDisksWithResponseAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks along with {@link Response} on successful - * completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> attachDetachDataDisksWithResponseAsync(String resourceGroupName, @@ -2584,7 +2582,7 @@ private Mono>> attachDetachDataDisksWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 specifies the storage settings for the virtual machine disks. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, StorageProfile> beginAttachDetachDataDisksAsync( @@ -2607,7 +2605,7 @@ public PollerFlux, StorageProfile> beginAttachDetachD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 specifies the storage settings for the virtual machine disks. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StorageProfile> beginAttachDetachDataDisksAsync( @@ -2631,7 +2629,7 @@ private PollerFlux, StorageProfile> beginAttachDetach * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 specifies the storage settings for the virtual machine disks. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StorageProfile> beginAttachDetachDataDisks(String resourceGroupName, @@ -2652,7 +2650,7 @@ public SyncPoller, StorageProfile> beginAttachDetachD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 specifies the storage settings for the virtual machine disks. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StorageProfile> beginAttachDetachDataDisks(String resourceGroupName, @@ -2672,7 +2670,7 @@ public SyncPoller, StorageProfile> beginAttachDetachD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono attachDetachDataDisksAsync(String resourceGroupName, String vmScaleSetName, @@ -2693,7 +2691,7 @@ public Mono attachDetachDataDisksAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono attachDetachDataDisksAsync(String resourceGroupName, String vmScaleSetName, @@ -2714,7 +2712,7 @@ private Mono attachDetachDataDisksAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public StorageProfile attachDetachDataDisks(String resourceGroupName, String vmScaleSetName, String instanceId, @@ -2734,7 +2732,7 @@ public StorageProfile attachDetachDataDisks(String resourceGroupName, String vmS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public StorageProfile attachDetachDataDisks(String resourceGroupName, String vmScaleSetName, String instanceId, diff --git a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java index 5c2845eb99e2..fa1ac4e8df4b 100644 --- a/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java +++ b/sdk/compute/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java @@ -1767,8 +1767,7 @@ public PagedIterable list(String statusOnly, String filter, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the properties of an AssessPatches result along with {@link Response} on successful completion - * of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> assessPatchesWithResponseAsync(String resourceGroupName, String vmName) { @@ -1804,8 +1803,7 @@ public Mono>> assessPatchesWithResponseAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the properties of an AssessPatches result along with {@link Response} on successful completion - * of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> assessPatchesWithResponseAsync(String resourceGroupName, String vmName, @@ -1840,7 +1838,7 @@ private Mono>> assessPatchesWithResponseAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 describes the properties of an AssessPatches result. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, VirtualMachineAssessPatchesResultInner> @@ -1860,7 +1858,7 @@ private Mono>> assessPatchesWithResponseAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 describes the properties of an AssessPatches result. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualMachineAssessPatchesResultInner> @@ -1880,7 +1878,7 @@ private Mono>> assessPatchesWithResponseAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 describes the properties of an AssessPatches result. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualMachineAssessPatchesResultInner> @@ -1897,7 +1895,7 @@ private Mono>> assessPatchesWithResponseAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 describes the properties of an AssessPatches result. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualMachineAssessPatchesResultInner> @@ -1913,7 +1911,7 @@ private Mono>> assessPatchesWithResponseAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the properties of an AssessPatches result on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono assessPatchesAsync(String resourceGroupName, String vmName) { @@ -1929,7 +1927,7 @@ public Mono assessPatchesAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the properties of an AssessPatches result on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono assessPatchesAsync(String resourceGroupName, String vmName, @@ -1946,7 +1944,7 @@ private Mono assessPatchesAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the properties of an AssessPatches result. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public VirtualMachineAssessPatchesResultInner assessPatches(String resourceGroupName, String vmName) { @@ -1962,7 +1960,7 @@ public VirtualMachineAssessPatchesResultInner assessPatches(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the properties of an AssessPatches result. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public VirtualMachineAssessPatchesResultInner assessPatches(String resourceGroupName, String vmName, @@ -1979,8 +1977,7 @@ public VirtualMachineAssessPatchesResultInner assessPatches(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks along with {@link Response} on successful - * completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> attachDetachDataDisksWithResponseAsync(String resourceGroupName, @@ -2024,8 +2021,7 @@ public Mono>> attachDetachDataDisksWithResponseAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks along with {@link Response} on successful - * completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> attachDetachDataDisksWithResponseAsync(String resourceGroupName, @@ -2067,7 +2063,7 @@ private Mono>> attachDetachDataDisksWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 specifies the storage settings for the virtual machine disks. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, StorageProfile> beginAttachDetachDataDisksAsync( @@ -2088,7 +2084,7 @@ public PollerFlux, StorageProfile> beginAttachDetachD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 specifies the storage settings for the virtual machine disks. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StorageProfile> beginAttachDetachDataDisksAsync( @@ -2109,7 +2105,7 @@ private PollerFlux, StorageProfile> beginAttachDetach * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 specifies the storage settings for the virtual machine disks. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StorageProfile> beginAttachDetachDataDisks(String resourceGroupName, @@ -2127,7 +2123,7 @@ public SyncPoller, StorageProfile> beginAttachDetachD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 specifies the storage settings for the virtual machine disks. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StorageProfile> beginAttachDetachDataDisks(String resourceGroupName, @@ -2144,7 +2140,7 @@ public SyncPoller, StorageProfile> beginAttachDetachD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono attachDetachDataDisksAsync(String resourceGroupName, String vmName, @@ -2163,7 +2159,7 @@ public Mono attachDetachDataDisksAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono attachDetachDataDisksAsync(String resourceGroupName, String vmName, @@ -2181,7 +2177,7 @@ private Mono attachDetachDataDisksAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public StorageProfile attachDetachDataDisks(String resourceGroupName, String vmName, @@ -2199,7 +2195,7 @@ public StorageProfile attachDetachDataDisks(String resourceGroupName, String vmN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specifies the storage settings for the virtual machine disks. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public StorageProfile attachDetachDataDisks(String resourceGroupName, String vmName, @@ -2217,8 +2213,7 @@ public StorageProfile attachDetachDataDisks(String resourceGroupName, String vmN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of virtual machine capture operation along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> captureWithResponseAsync(String resourceGroupName, String vmName, @@ -2263,8 +2258,7 @@ public Mono>> captureWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of virtual machine capture operation along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> captureWithResponseAsync(String resourceGroupName, String vmName, @@ -2307,7 +2301,7 @@ private Mono>> captureWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 output of virtual machine capture operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, VirtualMachineCaptureResultInner> @@ -2329,7 +2323,7 @@ private Mono>> captureWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 output of virtual machine capture operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualMachineCaptureResultInner> @@ -2353,7 +2347,7 @@ private Mono>> captureWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 output of virtual machine capture operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualMachineCaptureResultInner> @@ -2372,7 +2366,7 @@ private Mono>> captureWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 output of virtual machine capture operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualMachineCaptureResultInner> beginCapture( @@ -2390,7 +2384,7 @@ public SyncPoller, VirtualMachineCa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of virtual machine capture operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono captureAsync(String resourceGroupName, String vmName, @@ -2410,7 +2404,7 @@ public Mono captureAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of virtual machine capture operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono captureAsync(String resourceGroupName, String vmName, @@ -2429,7 +2423,7 @@ private Mono captureAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of virtual machine capture operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public VirtualMachineCaptureResultInner capture(String resourceGroupName, String vmName, @@ -2448,7 +2442,7 @@ public VirtualMachineCaptureResultInner capture(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of virtual machine capture operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public VirtualMachineCaptureResultInner capture(String resourceGroupName, String vmName, @@ -3088,8 +3082,7 @@ public void generalize(String resourceGroupName, String vmName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 summary of an installation operation along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> installPatchesWithResponseAsync(String resourceGroupName, String vmName, @@ -3135,8 +3128,7 @@ public Mono>> installPatchesWithResponseAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 summary of an installation operation along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> installPatchesWithResponseAsync(String resourceGroupName, String vmName, @@ -3179,7 +3171,7 @@ private Mono>> installPatchesWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 result summary of an installation operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, VirtualMachineInstallPatchesResultInner> @@ -3203,7 +3195,7 @@ private Mono>> installPatchesWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 result summary of an installation operation. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualMachineInstallPatchesResultInner> @@ -3227,7 +3219,7 @@ private Mono>> installPatchesWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 result summary of an installation operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualMachineInstallPatchesResultInner> @@ -3246,7 +3238,7 @@ private Mono>> installPatchesWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 result summary of an installation operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualMachineInstallPatchesResultInner> @@ -3264,7 +3256,7 @@ private Mono>> installPatchesWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 summary of an installation operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono installPatchesAsync(String resourceGroupName, String vmName, @@ -3283,7 +3275,7 @@ public Mono installPatchesAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 summary of an installation operation on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono installPatchesAsync(String resourceGroupName, String vmName, @@ -3301,7 +3293,7 @@ private Mono installPatchesAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 summary of an installation operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public VirtualMachineInstallPatchesResultInner installPatches(String resourceGroupName, String vmName, @@ -3319,7 +3311,7 @@ public VirtualMachineInstallPatchesResultInner installPatches(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException 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 summary of an installation operation. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public VirtualMachineInstallPatchesResultInner installPatches(String resourceGroupName, String vmName, From 0a79d2053b61e57d2acb30dc467cee6b7285f7be Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 2 Jun 2026 04:06:00 +0000 Subject: [PATCH 07/16] Prepare azure-resourcemanager-compute for 2.57.2 patch release. --- eng/versioning/version_client.txt | 2 +- .../azure-resourcemanager-compute/CHANGELOG.md | 13 +++++++++++++ .../azure-resourcemanager-compute/pom.xml | 16 ++++++++-------- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index e75774d36c50..f344737c7be4 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -281,7 +281,7 @@ com.azure.resourcemanager:azure-resourcemanager-appplatform;2.51.0;2.52.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appservice;2.55.2;2.56.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-authorization;2.53.9;2.54.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-cdn;2.53.8;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-compute;2.57.1;2.58.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-compute;2.57.1;2.57.2 com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.53.10;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.55.2;2.56.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-containerservice;2.60.0;2.61.0-beta.2 diff --git a/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md b/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md index ba2d96c1d338..5c7f1400301c 100644 --- a/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md +++ b/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md @@ -1,5 +1,18 @@ # Release History +## 2.57.2 (2026-06-02) + +### Other Changes + +#### Dependency Updates + +- Upgraded `azure-resourcemanager-msi` from `2.53.7` to version `2.53.8`. +- Upgraded `azure-resourcemanager-authorization` from `2.53.8` to version `2.53.9`. +- Upgraded `azure-resourcemanager-resources` from `2.54.0` to version `2.54.1`. +- Upgraded `azure-resourcemanager-storage` from `2.55.4` to version `2.56.0`. +- Upgraded `azure-resourcemanager-network` from `2.58.1` to version `2.58.2`. + + ## 2.57.1 (2026-05-05) ### Other Changes diff --git a/sdk/compute/azure-resourcemanager-compute/pom.xml b/sdk/compute/azure-resourcemanager-compute/pom.xml index e5bd7fe471b6..97572c121c7e 100644 --- a/sdk/compute/azure-resourcemanager-compute/pom.xml +++ b/sdk/compute/azure-resourcemanager-compute/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-compute - 2.57.1 + 2.57.2 jar Microsoft Azure SDK for Compute Management @@ -71,27 +71,27 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.54.0 + 2.54.1 com.azure.resourcemanager azure-resourcemanager-storage - 2.55.4 + 2.56.0 com.azure.resourcemanager azure-resourcemanager-network - 2.58.1 + 2.58.2 com.azure.resourcemanager azure-resourcemanager-msi - 2.53.7 + 2.53.8 com.azure.resourcemanager azure-resourcemanager-authorization - 2.53.8 + 2.53.9 org.slf4j @@ -120,13 +120,13 @@ com.azure.resourcemanager azure-resourcemanager-keyvault - 2.55.1 + 2.55.2 test com.azure azure-storage-blob - 12.33.3 + 12.34.0 test From e0a8821868a68db7af5c382fded8e8b4118a899e Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 2 Jun 2026 04:06:03 +0000 Subject: [PATCH 08/16] Reset sources for azure-resourcemanager-sql to the release version 2.53.8. --- .../azure-resourcemanager-sql/CHANGELOG.md | 21 +- sdk/sql/azure-resourcemanager-sql/README.md | 2 +- sdk/sql/azure-resourcemanager-sql/assets.json | 2 +- sdk/sql/azure-resourcemanager-sql/pom.xml | 6 +- ...ackupShortTermRetentionPoliciesClient.java | 187 +- .../sql/fluent/CapabilitiesClient.java | 2 +- .../sql/fluent/DataMaskingPoliciesClient.java | 26 +- .../sql/fluent/DataMaskingRulesClient.java | 49 +- ...rehouseUserActivitiesOperationsClient.java | 106 +- ...dvancedThreatProtectionSettingsClient.java | 121 +- .../sql/fluent/DatabaseAdvisorsClient.java | 148 +- .../DatabaseAutomaticTuningsClient.java | 26 +- .../DatabaseBlobAuditingPoliciesClient.java | 152 +- .../sql/fluent/DatabaseColumnsClient.java | 174 +- .../DatabaseEncryptionProtectorsClient.java | 246 - .../DatabaseExtensionsOperationsClient.java | 130 +- .../sql/fluent/DatabaseOperationsClient.java | 23 +- .../DatabaseRecommendedActionsClient.java | 156 +- .../sql/fluent/DatabaseSchemasClient.java | 118 +- .../DatabaseSecurityAlertPoliciesClient.java | 137 +- ...ulnerabilityAssessmentBaselinesClient.java | 230 - ...erabilityAssessmentExecuteScansClient.java | 135 - ...rabilityAssessmentRuleBaselinesClient.java | 316 - ...nerabilityAssessmentScanResultsClient.java | 151 - ...SqlVulnerabilityAssessmentScansClient.java | 145 - ...ulnerabilityAssessmentsSettingsClient.java | 135 - .../sql/fluent/DatabaseTablesClient.java | 122 +- .../sql/fluent/DatabaseUsagesClient.java | 11 +- ...rabilityAssessmentRuleBaselinesClient.java | 38 +- ...aseVulnerabilityAssessmentScansClient.java | 151 +- ...atabaseVulnerabilityAssessmentsClient.java | 136 +- .../sql/fluent/DatabasesClient.java | 598 +- .../sql/fluent/DeletedServersClient.java | 126 +- .../DistributedAvailabilityGroupsClient.java | 469 +- .../fluent/ElasticPoolOperationsClient.java | 37 +- .../sql/fluent/ElasticPoolsClient.java | 342 +- .../fluent/EncryptionProtectorsClient.java | 167 +- .../fluent/EndpointCertificatesClient.java | 91 +- ...dedDatabaseBlobAuditingPoliciesClient.java | 154 +- ...endedServerBlobAuditingPoliciesClient.java | 160 +- .../sql/fluent/FailoverGroupsClient.java | 510 +- .../sql/fluent/FirewallRulesClient.java | 237 +- .../sql/fluent/GeoBackupPoliciesClient.java | 123 +- .../sql/fluent/IPv6FirewallRulesClient.java | 121 +- .../fluent/InstanceFailoverGroupsClient.java | 183 +- .../fluent/InstancePoolOperationsClient.java | 120 - .../sql/fluent/InstancePoolsClient.java | 348 +- .../sql/fluent/JobAgentsClient.java | 314 +- .../sql/fluent/JobCredentialsClient.java | 153 +- .../sql/fluent/JobExecutionsClient.java | 438 +- .../sql/fluent/JobPrivateEndpointsClient.java | 370 - .../sql/fluent/JobStepExecutionsClient.java | 160 +- .../sql/fluent/JobStepsClient.java | 204 +- .../sql/fluent/JobTargetExecutionsClient.java | 190 +- .../sql/fluent/JobTargetGroupsClient.java | 153 +- .../sql/fluent/JobVersionsClient.java | 115 +- .../sql/fluent/JobsClient.java | 161 +- .../LedgerDigestUploadsOperationsClient.java | 151 +- .../LongTermRetentionBackupsClient.java | 2030 ++---- ...RetentionManagedInstanceBackupsClient.java | 564 +- .../LongTermRetentionPoliciesClient.java | 144 +- ...ntenanceWindowOptionsOperationsClient.java | 22 +- .../MaintenanceWindowsOperationsClient.java | 42 +- ...ackupShortTermRetentionPoliciesClient.java | 179 +- ...dvancedThreatProtectionSettingsClient.java | 212 - .../fluent/ManagedDatabaseColumnsClient.java | 178 +- .../ManagedDatabaseMoveOperationsClient.java | 143 - .../fluent/ManagedDatabaseQueriesClient.java | 26 +- ...aseRecommendedSensitivityLabelsClient.java | 14 +- .../ManagedDatabaseRestoreDetailsClient.java | 14 +- .../fluent/ManagedDatabaseSchemasClient.java | 122 +- ...edDatabaseSecurityAlertPoliciesClient.java | 137 +- .../ManagedDatabaseSecurityEventsClient.java | 22 +- ...anagedDatabaseSensitivityLabelsClient.java | 542 +- .../fluent/ManagedDatabaseTablesClient.java | 122 +- ...abaseTransparentDataEncryptionsClient.java | 141 +- ...rabilityAssessmentRuleBaselinesClient.java | 38 +- ...aseVulnerabilityAssessmentScansClient.java | 155 +- ...atabaseVulnerabilityAssessmentsClient.java | 176 +- .../sql/fluent/ManagedDatabasesClient.java | 478 +- .../ManagedInstanceAdministratorsClient.java | 145 +- ...dvancedThreatProtectionSettingsClient.java | 258 - ...tanceAzureADOnlyAuthenticationsClient.java | 151 +- .../sql/fluent/ManagedInstanceDtcsClient.java | 240 - ...gedInstanceEncryptionProtectorsClient.java | 173 +- .../sql/fluent/ManagedInstanceKeysClient.java | 202 +- ...stanceLongTermRetentionPoliciesClient.java | 242 +- .../ManagedInstanceOperationsClient.java | 118 +- ...tancePrivateEndpointConnectionsClient.java | 173 +- ...gedInstancePrivateLinkResourcesClient.java | 97 +- .../ManagedInstanceTdeCertificatesClient.java | 23 +- ...nstanceVulnerabilityAssessmentsClient.java | 155 +- .../sql/fluent/ManagedInstancesClient.java | 1143 +--- ...edLedgerDigestUploadsOperationsClient.java | 386 -- ...ackupShortTermRetentionPoliciesClient.java | 179 +- .../fluent/ManagedServerDnsAliasesClient.java | 170 +- ...agedServerSecurityAlertPoliciesClient.java | 152 +- ...SecurityPerimeterConfigurationsClient.java | 235 - .../sql/fluent/OperationsClient.java | 2 +- .../fluent/OutboundFirewallRulesClient.java | 139 +- .../PrivateEndpointConnectionsClient.java | 169 +- .../fluent/PrivateLinkResourcesClient.java | 89 +- .../RecommendedSensitivityLabelsClient.java | 14 +- .../fluent/RecoverableDatabasesClient.java | 91 +- .../RecoverableManagedDatabasesClient.java | 95 +- .../sql/fluent/ReplicationLinksClient.java | 405 +- .../RestorableDroppedDatabasesClient.java | 95 +- ...storableDroppedManagedDatabasesClient.java | 99 +- .../sql/fluent/RestorePointsClient.java | 248 +- .../sql/fluent/SensitivityLabelsClient.java | 290 +- ...dvancedThreatProtectionSettingsClient.java | 124 +- .../sql/fluent/ServerAdvisorsClient.java | 142 +- .../fluent/ServerAutomaticTuningsClient.java | 26 +- .../ServerAzureADAdministratorsClient.java | 145 +- ...erverAzureADOnlyAuthenticationsClient.java | 147 +- .../ServerBlobAuditingPoliciesClient.java | 166 +- .../ServerConfigurationOptionsClient.java | 250 - .../ServerConnectionPoliciesClient.java | 120 +- .../ServerDevOpsAuditSettingsClient.java | 168 +- .../sql/fluent/ServerDnsAliasesClient.java | 210 +- .../sql/fluent/ServerKeysClient.java | 188 +- .../sql/fluent/ServerOperationsClient.java | 11 +- .../ServerSecurityAlertPoliciesClient.java | 157 +- .../fluent/ServerTrustCertificatesClient.java | 226 +- .../sql/fluent/ServerTrustGroupsClient.java | 148 +- .../sql/fluent/ServerUsagesClient.java | 11 +- .../ServerVulnerabilityAssessmentsClient.java | 150 +- .../sql/fluent/ServersClient.java | 554 +- .../sql/fluent/SqlAgentsClient.java | 26 +- .../sql/fluent/SqlManagementClient.java | 813 +-- ...ulnerabilityAssessmentBaselinesClient.java | 152 - ...tyAssessmentBaselinesOperationsClient.java | 104 - ...erabilityAssessmentExecuteScansClient.java | 141 - ...rabilityAssessmentRuleBaselinesClient.java | 246 - ...sessmentRuleBaselinesOperationsClient.java | 95 - ...yAssessmentScanResultOperationsClient.java | 155 - ...SqlVulnerabilityAssessmentScansClient.java | 150 - .../SqlVulnerabilityAssessmentsClient.java | 76 - ...ulnerabilityAssessmentsSettingsClient.java | 192 - ...artStopManagedInstanceSchedulesClient.java | 256 - .../sql/fluent/SubscriptionUsagesClient.java | 62 +- .../fluent/SynapseLinkWorkspacesClient.java | 63 - .../sql/fluent/SyncAgentsClient.java | 218 +- .../sql/fluent/SyncGroupsClient.java | 520 +- .../sql/fluent/SyncMembersClient.java | 472 +- .../sql/fluent/TdeCertificatesClient.java | 23 +- .../sql/fluent/TimeZonesClient.java | 78 +- .../TransparentDataEncryptionsClient.java | 410 +- .../sql/fluent/UsagesClient.java | 14 +- .../sql/fluent/VirtualClustersClient.java | 420 +- .../sql/fluent/VirtualNetworkRulesClient.java | 139 +- .../sql/fluent/WorkloadClassifiersClient.java | 221 +- .../sql/fluent/WorkloadGroupsClient.java | 161 +- .../models/AdministratorProperties.java | 19 +- .../AdvancedThreatProtectionProperties.java | 2 +- .../sql/fluent/models/AdvisorInner.java | 35 +- .../sql/fluent/models/AdvisorProperties.java | 2 +- .../AutomaticTuningServerProperties.java | 2 +- .../models/AzureADOnlyAuthProperties.java | 2 +- .../BackupShortTermRetentionPolicyInner.java | 19 +- ...kupShortTermRetentionPolicyProperties.java | 8 +- ...aseLongTermRetentionPolicyProperties.java} | 84 +- .../CheckNameAvailabilityResponseInner.java | 4 +- ...rmRetentionBackupParametersProperties.java | 2 +- .../fluent/models/DataMaskingPolicyInner.java | 35 +- .../models/DataMaskingPolicyProperties.java | 2 +- .../fluent/models/DataMaskingRuleInner.java | 19 +- .../models/DataMaskingRuleProperties.java | 2 +- .../DataWarehouseUserActivitiesInner.java | 21 +- ...DataWarehouseUserActivitiesProperties.java | 4 +- ...DatabaseAdvancedThreatProtectionInner.java | 30 +- .../models/DatabaseAutomaticTuningInner.java | 19 +- .../DatabaseAutomaticTuningProperties.java | 2 +- .../DatabaseBlobAuditingPolicyInner.java | 35 +- .../DatabaseBlobAuditingPolicyProperties.java | 2 +- .../fluent/models/DatabaseColumnInner.java | 81 +- .../models/DatabaseColumnProperties.java | 52 +- .../models/DatabaseExtensionsProperties.java | 42 +- .../sql/fluent/models/DatabaseInner.java | 349 +- .../fluent/models/DatabaseOperationInner.java | 31 +- .../models/DatabaseOperationProperties.java | 24 +- .../sql/fluent/models/DatabaseProperties.java | 393 +- .../fluent/models/DatabaseSchemaInner.java | 21 +- .../DatabaseSecurityAlertPolicyInner.java | 30 +- ...lnerabilityAssessmentBaselineSetInner.java | 169 - ...bilityAssessmentBaselineSetProperties.java | 100 - ...nerabilityAssessmentRuleBaselineInner.java | 168 - ...AssessmentRuleBaselineInputProperties.java | 140 - ...ssmentRuleBaselineListInputProperties.java | 142 - ...ilityAssessmentRuleBaselineProperties.java | 100 - .../sql/fluent/models/DatabaseTableInner.java | 53 +- .../models/DatabaseTableProperties.java | 30 +- .../models/DatabaseUpdateProperties.java | 363 +- .../sql/fluent/models/DatabaseUsageInner.java | 21 +- .../models/DatabaseUsageProperties.java | 4 +- ...erabilityAssessmentAutoGeneratedInner.java | 246 + .../DatabaseVulnerabilityAssessmentInner.java | 19 +- ...baseVulnerabilityAssessmentProperties.java | 2 +- ...lityAssessmentPropertiesAutoGenerated.java | 209 + ...nerabilityAssessmentRuleBaselineInner.java | 20 +- ...ilityAssessmentRuleBaselineProperties.java | 2 +- ...abilityAssessmentScanExportProperties.java | 4 +- ...lnerabilityAssessmentScansExportInner.java | 22 +- .../sql/fluent/models/DeletedServerInner.java | 21 +- .../models/DeletedServerProperties.java | 4 +- .../DistributedAvailabilityGroupInner.java | 201 +- ...istributedAvailabilityGroupProperties.java | 291 +- ...=> DnsRefreshConfigurationProperties.java} | 26 +- .../sql/fluent/models/ElasticPoolInner.java | 141 +- .../models/ElasticPoolOperationInner.java | 21 +- .../ElasticPoolOperationProperties.java | 4 +- .../fluent/models/ElasticPoolProperties.java | 129 +- .../models/ElasticPoolUpdateProperties.java | 129 +- .../models/EncryptionProtectorInner.java | 46 +- .../models/EncryptionProtectorProperties.java | 18 +- .../models/EndpointCertificateInner.java | 39 +- .../models/EndpointCertificateProperties.java | 19 +- ...tendedDatabaseBlobAuditingPolicyInner.java | 19 +- ...dDatabaseBlobAuditingPolicyProperties.java | 2 +- ...ExtendedServerBlobAuditingPolicyInner.java | 19 +- ...dedServerBlobAuditingPolicyProperties.java | 2 +- .../sql/fluent/models/FailoverGroupInner.java | 77 +- .../models/FailoverGroupProperties.java | 32 +- .../models/FailoverGroupUpdateProperties.java | 66 +- .../sql/fluent/models/FirewallRuleInner.java | 16 +- .../fluent/models/GeoBackupPolicyInner.java | 35 +- .../models/GeoBackupPolicyProperties.java | 2 +- .../fluent/models/IPv6FirewallRuleInner.java | 20 +- .../IPv6ServerFirewallRuleProperties.java | 8 +- ...tExportExtensionsOperationResultInner.java | 21 +- ...rtExtensionsOperationResultProperties.java | 4 +- .../ImportExportOperationResultInner.java | 21 +- ...ImportExportOperationResultProperties.java | 4 +- .../models/InstanceFailoverGroupInner.java | 45 +- .../InstanceFailoverGroupProperties.java | 34 +- .../sql/fluent/models/InstancePoolInner.java | 77 +- .../models/InstancePoolOperationInner.java | 275 - .../InstancePoolOperationProperties.java | 283 - .../fluent/models/InstancePoolProperties.java | 48 +- .../sql/fluent/models/JobAgentInner.java | 73 +- .../sql/fluent/models/JobAgentProperties.java | 2 +- .../sql/fluent/models/JobCredentialInner.java | 19 +- .../models/JobCredentialProperties.java | 2 +- .../sql/fluent/models/JobExecutionInner.java | 39 +- .../fluent/models/JobExecutionProperties.java | 19 +- .../sql/fluent/models/JobInner.java | 19 +- .../models/JobPrivateEndpointInner.java | 186 - .../models/JobPrivateEndpointProperties.java | 118 - .../sql/fluent/models/JobProperties.java | 2 +- .../sql/fluent/models/JobStepInner.java | 19 +- .../sql/fluent/models/JobStepProperties.java | 12 +- .../fluent/models/JobTargetGroupInner.java | 19 +- .../models/JobTargetGroupProperties.java | 2 +- .../sql/fluent/models/JobVersionInner.java | 21 +- .../models/LedgerDigestUploadsInner.java | 19 +- .../models/LedgerDigestUploadsProperties.java | 2 +- .../models/LocationCapabilitiesInner.java | 59 +- ...atabaseTransparentDataEncryptionInner.java | 45 +- .../models/LongTermRetentionBackupInner.java | 83 +- ...rmRetentionBackupOperationResultInner.java | 21 +- .../LongTermRetentionBackupProperties.java | 112 +- ...ermRetentionOperationResultProperties.java | 4 +- .../models/LongTermRetentionPolicyInner.java | 88 +- .../LongTermRetentionPolicyProperties.java | 250 - .../models/MaintenanceWindowOptionsInner.java | 127 +- .../MaintenanceWindowOptionsProperties.java | 89 +- .../models/MaintenanceWindowsInner.java | 19 +- .../models/MaintenanceWindowsProperties.java | 2 +- ...edBackupShortTermRetentionPolicyInner.java | 19 +- ...kupShortTermRetentionPolicyProperties.java | 2 +- ...DatabaseAdvancedThreatProtectionInner.java | 192 - .../fluent/models/ManagedDatabaseInner.java | 177 +- ...nagedDatabaseMoveOperationResultInner.java | 303 - ...DatabaseMoveOperationResultProperties.java | 338 - .../models/ManagedDatabaseProperties.java | 202 +- ...nagedDatabaseRestoreDetailsProperties.java | 322 +- ...agedDatabaseRestoreDetailsResultInner.java | 175 +- ...nagedDatabaseSecurityAlertPolicyInner.java | 19 +- .../ManagedInstanceAdministratorInner.java | 19 +- ...anagedInstanceAdministratorProperties.java | 2 +- ...InstanceAdvancedThreatProtectionInner.java | 192 - ...agedInstanceAzureADOnlyAuthProperties.java | 2 +- ...nstanceAzureADOnlyAuthenticationInner.java | 19 +- .../models/ManagedInstanceDtcInner.java | 269 - .../models/ManagedInstanceDtcProperties.java | 221 - ...nagedInstanceEncryptionProtectorInner.java | 35 +- ...InstanceEncryptionProtectorProperties.java | 2 +- .../fluent/models/ManagedInstanceInner.java | 355 +- .../models/ManagedInstanceKeyInner.java | 35 +- .../models/ManagedInstanceKeyProperties.java | 2 +- ...dInstanceLongTermRetentionBackupInner.java | 31 +- ...anceLongTermRetentionBackupProperties.java | 22 +- ...dInstanceLongTermRetentionPolicyInner.java | 58 +- .../models/ManagedInstanceOperationInner.java | 21 +- .../ManagedInstanceOperationProperties.java | 4 +- ...nstancePrivateEndpointConnectionInner.java | 19 +- ...cePrivateEndpointConnectionProperties.java | 2 +- .../ManagedInstancePrivateLinkInner.java | 21 +- .../models/ManagedInstanceProperties.java | 404 +- .../models/ManagedInstanceQueryInner.java | 39 +- ...dInstanceVulnerabilityAssessmentInner.java | 19 +- ...anceVulnerabilityAssessmentProperties.java | 2 +- .../ManagedLedgerDigestUploadsInner.java | 191 - .../ManagedLedgerDigestUploadsProperties.java | 116 - .../models/ManagedServerDnsAliasInner.java | 21 +- .../ManagedServerDnsAliasProperties.java | 4 +- ...ManagedServerSecurityAlertPolicyInner.java | 46 +- ...ManagedTransparentDataEncryptionInner.java | 19 +- ...edTransparentDataEncryptionProperties.java | 2 +- ...rkSecurityPerimeterConfigurationInner.java | 206 - ...urityPerimeterConfigurationProperties.java | 174 - .../sql/fluent/models/OperationInner.java | 4 +- .../OutboundEnvironmentEndpointInner.java | 4 +- .../models/OutboundFirewallRuleInner.java | 21 +- .../OutboundFirewallRuleProperties.java | 4 +- .../PrivateEndpointConnectionInner.java | 19 +- .../PrivateEndpointConnectionProperties.java | 2 +- .../models/PrivateLinkResourceInner.java | 21 +- .../sql/fluent/models/QueryProperties.java | 19 +- .../fluent/models/QueryStatisticsInner.java | 39 +- .../models/QueryStatisticsProperties.java | 19 +- .../fluent/models/RecommendedActionInner.java | 37 +- .../models/RecommendedActionProperties.java | 8 +- ...endedSensitivityLabelUpdateProperties.java | 2 +- .../models/RecoverableDatabaseInner.java | 32 +- .../models/RecoverableDatabaseProperties.java | 31 +- .../RecoverableManagedDatabaseInner.java | 21 +- .../RecoverableManagedDatabaseProperties.java | 4 +- ...lGovernanceStatusOperationResultInner.java | 213 - ...overnanceStatusOperationResultMIInner.java | 213 - ...rnanceStatusOperationResultProperties.java | 171 - ...anceStatusOperationResultPropertiesMI.java | 171 - .../fluent/models/ReplicationLinkInner.java | 48 +- .../models/ReplicationLinkProperties.java | 38 +- .../ReplicationLinkUpdateProperties.java | 96 - .../RestorableDroppedDatabaseInner.java | 120 +- .../RestorableDroppedDatabaseProperties.java | 31 +- ...RestorableDroppedManagedDatabaseInner.java | 43 +- ...rableDroppedManagedDatabaseProperties.java | 4 +- .../sql/fluent/models/RestorePointInner.java | 37 +- .../fluent/models/RestorePointProperties.java | 4 +- .../models/SecurityAlertPolicyProperties.java | 2 +- .../SecurityAlertsPolicyProperties.java | 2 +- ...tyAlertsPolicyPropertiesAutoGenerated.java | 312 + .../sql/fluent/models/SecurityEventInner.java | 21 +- .../models/SecurityEventProperties.java | 4 +- .../fluent/models/SensitivityLabelInner.java | 59 +- .../models/SensitivityLabelProperties.java | 34 +- .../models/SensitivityLabelUpdateInner.java | 19 +- ...SensitivityLabelUpdatePropertiesInner.java | 2 +- .../ServerAdvancedThreatProtectionInner.java | 30 +- .../models/ServerAutomaticTuningInner.java | 19 +- .../ServerAzureADAdministratorInner.java | 19 +- .../ServerAzureADOnlyAuthenticationInner.java | 19 +- .../models/ServerBlobAuditingPolicyInner.java | 19 +- .../ServerBlobAuditingPolicyProperties.java | 2 +- .../ServerConfigurationOptionInner.java | 189 - .../ServerConfigurationOptionProperties.java | 114 - .../models/ServerConnectionPolicyInner.java | 37 +- .../ServerConnectionPolicyProperties.java | 2 +- .../ServerDevOpsAuditSettingsProperties.java | 31 +- .../ServerDevOpsAuditingSettingsInner.java | 53 +- .../fluent/models/ServerDnsAliasInner.java | 19 +- .../models/ServerDnsAliasProperties.java | 2 +- .../models/ServerFirewallRuleProperties.java | 2 +- .../sql/fluent/models/ServerInner.java | 141 +- .../sql/fluent/models/ServerKeyInner.java | 50 +- .../fluent/models/ServerKeyProperties.java | 27 +- .../fluent/models/ServerOperationInner.java | 21 +- .../models/ServerOperationProperties.java | 4 +- .../sql/fluent/models/ServerProperties.java | 132 +- .../ServerSecurityAlertPolicyInner.java | 30 +- .../models/ServerTrustCertificateInner.java | 19 +- .../ServerTrustCertificateProperties.java | 2 +- .../fluent/models/ServerTrustGroupInner.java | 19 +- .../models/ServerTrustGroupProperties.java | 2 +- .../sql/fluent/models/ServerUsageInner.java | 21 +- .../fluent/models/ServerUsageProperties.java | 4 +- .../ServerVulnerabilityAssessmentInner.java | 19 +- ...rverVulnerabilityAssessmentProperties.java | 2 +- .../models/SqlAgentConfigurationInner.java | 19 +- .../SqlAgentConfigurationProperties.java | 2 +- .../SqlVulnerabilityAssessmentInner.java | 182 - ...lnerabilityAssessmentPolicyProperties.java | 100 - ...ulnerabilityAssessmentScanRecordInner.java | 314 - ...abilityAssessmentScanRecordProperties.java | 362 - ...abilityAssessmentScanResultProperties.java | 215 - ...lnerabilityAssessmentScanResultsInner.java | 233 - ...StartStopManagedInstanceScheduleInner.java | 246 - ...StopManagedInstanceScheduleProperties.java | 198 - .../fluent/models/SubscriptionUsageInner.java | 21 +- .../models/SubscriptionUsageProperties.java | 4 +- .../models/SynapseLinkWorkspaceInner.java | 166 - .../SynapseLinkWorkspaceProperties.java | 90 - .../sql/fluent/models/SyncAgentInner.java | 19 +- .../models/SyncAgentKeyPropertiesInner.java | 4 +- .../models/SyncAgentLinkedDatabaseInner.java | 21 +- .../SyncAgentLinkedDatabaseProperties.java | 4 +- .../fluent/models/SyncAgentProperties.java | 2 +- .../models/SyncDatabaseIdPropertiesInner.java | 4 +- .../models/SyncFullSchemaPropertiesInner.java | 4 +- .../sql/fluent/models/SyncGroupInner.java | 73 +- .../models/SyncGroupLogPropertiesInner.java | 4 +- .../fluent/models/SyncGroupProperties.java | 4 +- .../sql/fluent/models/SyncMemberInner.java | 51 +- .../fluent/models/SyncMemberProperties.java | 4 +- .../models/TdeCertificateProperties.java | 2 +- .../sql/fluent/models/TimeZoneInner.java | 21 +- .../sql/fluent/models/TimeZoneProperties.java | 4 +- .../sql/fluent/models/TopQueriesInner.java | 19 +- .../TransparentDataEncryptionProperties.java | 34 +- ...rmRetentionBackupParametersProperties.java | 2 +- ...agedInstanceDnsServersOperationInner.java} | 57 +- .../sql/fluent/models/UsageInner.java | 4 +- .../fluent/models/VirtualClusterInner.java | 62 +- .../models/VirtualClusterProperties.java | 60 +- .../models/VirtualNetworkRuleInner.java | 19 +- .../models/VirtualNetworkRuleProperties.java | 2 +- ...ulnerabilityAssessmentScanRecordInner.java | 21 +- ...abilityAssessmentScanRecordProperties.java | 4 +- .../models/WorkloadClassifierInner.java | 19 +- .../models/WorkloadClassifierProperties.java | 2 +- .../sql/fluent/models/WorkloadGroupInner.java | 19 +- .../models/WorkloadGroupProperties.java | 2 +- .../sql/fluent/models/package-info.java | 9 +- .../sql/fluent/package-info.java | 9 +- ...pShortTermRetentionPoliciesClientImpl.java | 585 +- .../CapabilitiesClientImpl.java | 30 +- .../DataMaskingPoliciesClientImpl.java | 104 +- .../DataMaskingRulesClientImpl.java | 176 +- ...useUserActivitiesOperationsClientImpl.java | 316 +- ...cedThreatProtectionSettingsClientImpl.java | 459 +- .../DatabaseAdvisorsClientImpl.java | 353 +- .../DatabaseAutomaticTuningsClientImpl.java | 105 +- ...atabaseBlobAuditingPoliciesClientImpl.java | 453 +- .../DatabaseColumnsClientImpl.java | 623 +- ...atabaseEncryptionProtectorsClientImpl.java | 574 -- ...atabaseExtensionsOperationsClientImpl.java | 463 +- .../DatabaseOperationsClientImpl.java | 109 +- .../DatabaseRecommendedActionsClientImpl.java | 376 +- .../DatabaseSchemasClientImpl.java | 337 +- ...tabaseSecurityAlertPoliciesClientImpl.java | 476 +- ...rabilityAssessmentBaselinesClientImpl.java | 717 -- ...ilityAssessmentExecuteScansClientImpl.java | 322 - ...lityAssessmentRuleBaselinesClientImpl.java | 931 --- ...bilityAssessmentScanResultsClientImpl.java | 527 -- ...ulnerabilityAssessmentScansClientImpl.java | 510 -- ...rabilityAssessmentsSettingsClientImpl.java | 461 -- .../DatabaseTablesClientImpl.java | 353 +- .../DatabaseUsagesClientImpl.java | 64 +- ...lityAssessmentRuleBaselinesClientImpl.java | 158 +- ...ulnerabilityAssessmentScansClientImpl.java | 455 +- ...aseVulnerabilityAssessmentsClientImpl.java | 506 +- .../implementation/DatabasesClientImpl.java | 1712 ++--- .../DeletedServersClientImpl.java | 444 +- ...stributedAvailabilityGroupsClientImpl.java | 1361 ++-- .../ElasticPoolOperationsClientImpl.java | 128 +- .../ElasticPoolsClientImpl.java | 932 +-- .../EncryptionProtectorsClientImpl.java | 533 +- .../EndpointCertificatesClientImpl.java | 287 +- ...atabaseBlobAuditingPoliciesClientImpl.java | 465 +- ...dServerBlobAuditingPoliciesClientImpl.java | 536 +- .../FailoverGroupsClientImpl.java | 1360 ++-- .../FirewallRulesClientImpl.java | 626 +- .../GeoBackupPoliciesClientImpl.java | 448 +- .../IPv6FirewallRulesClientImpl.java | 466 +- .../InstanceFailoverGroupsClientImpl.java | 630 +- .../InstancePoolOperationsClientImpl.java | 430 -- .../InstancePoolsClientImpl.java | 970 +-- .../implementation/JobAgentsClientImpl.java | 862 +-- .../JobCredentialsClientImpl.java | 518 +- .../JobExecutionsClientImpl.java | 1316 ++-- .../JobPrivateEndpointsClientImpl.java | 1003 --- .../JobStepExecutionsClientImpl.java | 456 +- .../implementation/JobStepsClientImpl.java | 734 +- .../JobTargetExecutionsClientImpl.java | 572 +- .../JobTargetGroupsClientImpl.java | 518 +- .../implementation/JobVersionsClientImpl.java | 308 +- .../sql/implementation/JobsClientImpl.java | 521 +- ...dgerDigestUploadsOperationsClientImpl.java | 531 +- .../LongTermRetentionBackupsClientImpl.java | 6029 +++++------------ ...ntionManagedInstanceBackupsClientImpl.java | 2173 +++--- .../LongTermRetentionPoliciesClientImpl.java | 490 +- ...anceWindowOptionsOperationsClientImpl.java | 62 +- ...aintenanceWindowsOperationsClientImpl.java | 125 +- ...pShortTermRetentionPoliciesClientImpl.java | 590 +- ...cedThreatProtectionSettingsClientImpl.java | 666 -- .../ManagedDatabaseColumnsClientImpl.java | 625 +- ...nagedDatabaseMoveOperationsClientImpl.java | 467 -- .../ManagedDatabaseQueriesClientImpl.java | 115 +- ...ecommendedSensitivityLabelsClientImpl.java | 57 +- ...nagedDatabaseRestoreDetailsClientImpl.java | 51 +- .../ManagedDatabaseSchemasClientImpl.java | 346 +- ...tabaseSecurityAlertPoliciesClientImpl.java | 485 +- ...nagedDatabaseSecurityEventsClientImpl.java | 75 +- ...edDatabaseSensitivityLabelsClientImpl.java | 1560 +++-- .../ManagedDatabaseTablesClientImpl.java | 354 +- ...eTransparentDataEncryptionsClientImpl.java | 487 +- ...lityAssessmentRuleBaselinesClientImpl.java | 157 +- ...ulnerabilityAssessmentScansClientImpl.java | 453 +- ...aseVulnerabilityAssessmentsClientImpl.java | 580 +- .../ManagedDatabasesClientImpl.java | 1380 ++-- ...nagedInstanceAdministratorsClientImpl.java | 506 +- ...cedThreatProtectionSettingsClientImpl.java | 749 -- ...eAzureADOnlyAuthenticationsClientImpl.java | 520 +- .../ManagedInstanceDtcsClientImpl.java | 706 -- ...nstanceEncryptionProtectorsClientImpl.java | 549 +- .../ManagedInstanceKeysClientImpl.java | 589 +- ...ceLongTermRetentionPoliciesClientImpl.java | 762 +-- .../ManagedInstanceOperationsClientImpl.java | 346 +- ...ePrivateEndpointConnectionsClientImpl.java | 555 +- ...nstancePrivateLinkResourcesClientImpl.java | 283 +- ...agedInstanceTdeCertificatesClientImpl.java | 73 +- ...nceVulnerabilityAssessmentsClientImpl.java | 515 +- .../ManagedInstancesClientImpl.java | 3244 +++------ ...dgerDigestUploadsOperationsClientImpl.java | 1055 --- ...pShortTermRetentionPoliciesClientImpl.java | 611 +- .../ManagedServerDnsAliasesClientImpl.java | 587 +- ...ServerSecurityAlertPoliciesClientImpl.java | 493 +- ...rityPerimeterConfigurationsClientImpl.java | 680 -- .../implementation/OperationsClientImpl.java | 12 +- .../OutboundFirewallRulesClientImpl.java | 493 +- .../PrivateEndpointConnectionsClientImpl.java | 537 +- .../PrivateLinkResourcesClientImpl.java | 271 +- ...ecommendedSensitivityLabelsClientImpl.java | 57 +- .../RecoverableDatabasesClientImpl.java | 283 +- ...RecoverableManagedDatabasesClientImpl.java | 290 +- .../ReplicationLinksClientImpl.java | 1051 +-- .../RestorableDroppedDatabasesClientImpl.java | 292 +- ...ableDroppedManagedDatabasesClientImpl.java | 296 +- .../RestorePointsClientImpl.java | 727 +- .../SensitivityLabelsClientImpl.java | 958 ++- ...cedThreatProtectionSettingsClientImpl.java | 447 +- .../ServerAdvisorsClientImpl.java | 342 +- .../ServerAutomaticTuningsClientImpl.java | 100 +- ...ServerAzureADAdministratorsClientImpl.java | 508 +- ...rAzureADOnlyAuthenticationsClientImpl.java | 512 +- .../ServerBlobAuditingPoliciesClientImpl.java | 533 +- .../ServerConfigurationOptionsClientImpl.java | 735 -- .../ServerConnectionPoliciesClientImpl.java | 439 +- .../ServerDevOpsAuditSettingsClientImpl.java | 507 +- .../ServerDnsAliasesClientImpl.java | 626 +- .../implementation/ServerKeysClientImpl.java | 555 +- .../ServerOperationsClientImpl.java | 64 +- ...ServerSecurityAlertPoliciesClientImpl.java | 496 +- .../ServerTrustCertificatesClientImpl.java | 631 +- .../ServerTrustGroupsClientImpl.java | 559 +- .../ServerUsagesClientImpl.java | 60 +- ...verVulnerabilityAssessmentsClientImpl.java | 506 +- .../sql/implementation/ServersClientImpl.java | 1818 +++-- .../implementation/SqlAgentsClientImpl.java | 106 +- .../SqlManagementClientBuilder.java | 28 +- .../SqlManagementClientImpl.java | 1915 ++---- .../SqlServerSecurityAlertPolicyImpl.java | 8 +- ...rverSecurityAlertPolicyOperationsImpl.java | 10 +- ...rabilityAssessmentBaselinesClientImpl.java | 521 -- ...sessmentBaselinesOperationsClientImpl.java | 270 - ...ilityAssessmentExecuteScansClientImpl.java | 335 - ...lityAssessmentRuleBaselinesClientImpl.java | 761 --- ...mentRuleBaselinesOperationsClientImpl.java | 249 - ...essmentScanResultOperationsClientImpl.java | 534 -- ...ulnerabilityAssessmentScansClientImpl.java | 518 -- ...SqlVulnerabilityAssessmentsClientImpl.java | 199 - ...rabilityAssessmentsSettingsClientImpl.java | 597 -- ...topManagedInstanceSchedulesClientImpl.java | 758 --- .../SubscriptionUsagesClientImpl.java | 224 +- .../SynapseLinkWorkspacesClientImpl.java | 295 - .../implementation/SyncAgentsClientImpl.java | 690 +- .../implementation/SyncGroupsClientImpl.java | 1486 ++-- .../implementation/SyncMembersClientImpl.java | 1191 ++-- .../TdeCertificatesClientImpl.java | 72 +- .../implementation/TimeZonesClientImpl.java | 248 +- .../TransparentDataEncryptionsClientImpl.java | 986 +-- .../sql/implementation/UsagesClientImpl.java | 69 +- .../VirtualClustersClientImpl.java | 1315 ++-- .../VirtualNetworkRulesClientImpl.java | 501 +- .../WorkloadClassifiersClientImpl.java | 662 +- .../WorkloadGroupsClientImpl.java | 542 +- ...bilityAssessmentBaselineSetListResult.java | 118 - ...ilityAssessmentRuleBaselineListResult.java | 119 - .../InstancePoolOperationListResult.java | 115 - .../models/JobPrivateEndpointListResult.java | 114 - ...aseAdvancedThreatProtectionListResult.java | 117 - ...anagedDatabaseMoveOperationListResult.java | 106 - ...nceAdvancedThreatProtectionListResult.java | 117 - .../models/ManagedInstanceDtcListResult.java | 114 - .../ManagedLedgerDigestUploadsListResult.java | 116 - ...urityPerimeterConfigurationListResult.java | 116 - ...VulnerabilityAssessmentScanListResult.java | 106 - .../ServerConfigurationOptionListResult.java | 116 - .../SqlVulnerabilityAssessmentListResult.java | 116 - ...abilityAssessmentScanRecordListResult.java | 116 - ...StopManagedInstanceScheduleListResult.java | 116 - .../SynapseLinkWorkspaceListResult.java | 115 - .../models/AdministratorListResult.java | 6 +- .../sql/models/AdministratorName.java | 4 +- .../sql/models/AdministratorType.java | 4 +- .../models/AdvancedThreatProtectionName.java | 4 +- .../models/AdvancedThreatProtectionState.java | 8 +- .../sql/models/AdvisorStatus.java | 10 +- .../sql/models/AggregationFunctionType.java | 12 +- .../models/AlwaysEncryptedEnclaveType.java | 51 - .../sql/models/AuthMetadataLookupModes.java | 56 - .../sql/models/AuthenticationName.java | 4 +- .../sql/models/AutoExecuteStatus.java | 8 +- .../AutoExecuteStatusInheritedFrom.java | 12 +- .../sql/models/AutoPauseDelayTimeRange.java | 4 +- .../models/AutomaticTuningDisabledReason.java | 16 +- .../sql/models/AutomaticTuningMode.java | 10 +- .../AutomaticTuningOptionModeActual.java | 6 +- .../AutomaticTuningOptionModeDesired.java | 8 +- .../sql/models/AutomaticTuningOptions.java | 2 +- .../sql/models/AutomaticTuningServerMode.java | 8 +- .../models/AutomaticTuningServerOptions.java | 2 +- .../models/AutomaticTuningServerReason.java | 8 +- .../sql/models/AvailabilityZoneType.java | 61 - .../models/AzureADOnlyAuthListResult.java | 6 +- ...kupShortTermRetentionPolicyListResult.java | 28 +- .../sql/models/BackupStorageAccessTier.java | 51 - .../sql/models/BackupStorageRedundancy.java | 10 +- .../resourcemanager/sql/models/Baseline.java | 103 - .../sql/models/BaselineAdjustedResult.java | 137 - .../sql/models/BaselineName.java | 46 - .../sql/models/BenchmarkReference.java | 97 - .../sql/models/BlobAuditingPolicyName.java | 51 - .../sql/models/BlobAuditingPolicyState.java | 6 +- .../sql/models/CapabilityGroup.java | 17 +- .../sql/models/CapabilityStatus.java | 10 +- .../sql/models/CatalogCollationType.java | 6 +- .../sql/models/CertificateInfo.java | 100 - ...rmRetentionBackupAccessTierParameters.java | 140 - .../models/CheckNameAvailabilityReason.java | 6 +- .../models/CheckNameAvailabilityRequest.java | 15 +- .../models/ClientClassificationSource.java | 61 - .../sql/models/ColumnDataType.java | 70 +- .../CompleteDatabaseRestoreDefinition.java | 2 +- .../sql/models/ConnectionPolicyName.java | 4 +- ...CopyLongTermRetentionBackupParameters.java | 2 +- .../CreateDatabaseRestorePointDefinition.java | 2 +- .../sql/models/CreateMode.java | 22 +- .../models/CurrentSensitivityLabelSource.java | 51 - .../sql/models/DataMaskingFunction.java | 69 +- .../sql/models/DataMaskingPolicyName.java | 4 +- .../models/DataMaskingRuleListResult.java | 28 +- .../sql/models/DataMaskingRuleState.java | 53 +- .../sql/models/DataMaskingState.java | 6 +- .../models/DataSyncParticipantIdentity.java | 174 - .../DataSyncParticipantIdentityType.java | 62 - ...taSyncParticipantUserAssignedIdentity.java | 102 - ...DataWarehouseUserActivitiesListResult.java | 28 +- .../models/DataWarehouseUserActivityName.java | 4 +- ...aseAdvancedThreatProtectionListResult.java | 28 +- .../DatabaseBlobAuditingPolicyListResult.java | 28 +- .../models/DatabaseColumnListResult.java | 27 +- .../sql/models/DatabaseExtensions.java | 47 +- .../sql/models/DatabaseIdentity.java | 2 +- .../sql/models/DatabaseIdentityType.java | 6 +- .../sql/models/DatabaseKey.java | 148 - .../sql/models/DatabaseKeyType.java | 46 - .../sql/models/DatabaseLicenseType.java | 6 +- .../models/DatabaseListResult.java | 27 +- .../models/DatabaseOperationListResult.java | 28 +- .../sql/models/DatabaseReadScale.java | 6 +- .../models/DatabaseSchemaListResult.java | 27 +- .../DatabaseSecurityAlertListResult.java | 6 +- ...nerabilityAssessmentRuleBaselineInput.java | 206 - ...bilityAssessmentRuleBaselineListInput.java | 208 - .../sql/models/DatabaseState.java | 8 +- .../sql/models/DatabaseStatus.java | 50 +- .../models/DatabaseTableListResult.java | 27 +- .../sql/models/DatabaseUpdate.java | 269 +- .../models/DatabaseUsageListResult.java | 27 +- .../sql/models/DatabaseUserIdentity.java | 2 +- ...baseVulnerabilityAssessmentListResult.java | 28 +- ...lityAssessmentListResultAutoGenerated.java | 107 + ...lnerabilityAssessmentRuleBaselineItem.java | 2 +- .../resourcemanager/sql/models/DayOfWeek.java | 16 +- .../models/DeletedServerListResult.java | 27 +- .../models/DevOpsAuditingSettingsName.java | 46 - .../sql/models/DiffBackupIntervalInHours.java | 110 +- .../DistributedAvailabilityGroupDatabase.java | 433 -- .../DistributedAvailabilityGroupSetRole.java | 142 - ...utedAvailabilityGroupsFailoverRequest.java | 105 - ...stributedAvailabilityGroupsListResult.java | 6 +- ...sRefreshConfigurationPropertiesStatus.java | 11 +- .../resourcemanager/sql/models/DtcName.java | 46 - .../sql/models/EditionCapability.java | 35 +- .../models/ElasticPoolEditionCapability.java | 35 +- .../sql/models/ElasticPoolLicenseType.java | 6 +- .../models/ElasticPoolListResult.java | 27 +- .../ElasticPoolOperationListResult.java | 28 +- ...DatabaseMaxPerformanceLevelCapability.java | 19 +- ...DatabaseMinPerformanceLevelCapability.java | 19 +- .../ElasticPoolPerDatabaseSettings.java | 30 +- ...ElasticPoolPerformanceLevelCapability.java | 101 +- .../sql/models/ElasticPoolState.java | 8 +- .../sql/models/ElasticPoolUpdate.java | 92 +- .../models/EncryptionProtectorListResult.java | 28 +- .../sql/models/EncryptionProtectorName.java | 4 +- .../models/EndpointCertificateListResult.java | 28 +- .../sql/models/EndpointDependency.java | 4 +- .../sql/models/EndpointDetail.java | 4 +- .../resourcemanager/sql/models/ErrorType.java | 51 - .../sql/models/ExportDatabaseDefinition.java | 47 +- ...dDatabaseBlobAuditingPolicyListResult.java | 28 +- ...dedServerBlobAuditingPolicyListResult.java | 28 +- .../sql/models/ExternalGovernanceStatus.java | 51 - .../FailoverGroupDatabasesSecondaryType.java | 52 - .../models/FailoverGroupListResult.java | 27 +- .../models/FailoverGroupReadOnlyEndpoint.java | 30 +- .../FailoverGroupReadWriteEndpoint.java | 2 +- .../models/FailoverGroupReplicationRole.java | 6 +- .../sql/models/FailoverGroupUpdate.java | 48 +- .../sql/models/FailoverModeType.java | 52 - .../sql/models/FailoverType.java | 51 - .../sql/models/FirewallRuleList.java | 2 +- .../models/FirewallRuleListResult.java | 27 +- .../models/FreeLimitExhaustionBehavior.java | 55 - ...FreeLimitExhaustionBehaviorCapability.java | 101 - .../models/GeoBackupPolicyListResult.java | 28 +- .../sql/models/GeoBackupPolicyName.java | 4 +- .../sql/models/GeoBackupPolicyState.java | 6 +- .../sql/models/HybridSecondaryUsage.java | 52 - .../models/HybridSecondaryUsageDetected.java | 52 - .../models/IPv6FirewallRuleListResult.java | 28 +- .../sql/models/IdentityType.java | 10 +- .../sql/models/ImplementationMethod.java | 6 +- .../ImportExistingDatabaseDefinition.java | 47 +- ...rtExportExtensionsOperationListResult.java | 6 +- .../models/ImportNewDatabaseDefinition.java | 53 +- .../sql/models/InaccessibilityReason.java | 56 - .../InstanceFailoverGroupListResult.java | 28 +- ...InstanceFailoverGroupReadOnlyEndpoint.java | 2 +- ...nstanceFailoverGroupReadWriteEndpoint.java | 2 +- .../InstanceFailoverGroupReplicationRole.java | 6 +- .../models/InstancePoolEditionCapability.java | 19 +- .../models/InstancePoolFamilyCapability.java | 19 +- .../sql/models/InstancePoolLicenseType.java | 6 +- .../models/InstancePoolListResult.java | 27 +- .../sql/models/InstancePoolUpdate.java | 161 +- .../models/InstancePoolVcoresCapability.java | 19 +- .../sql/models/InstanceRole.java | 51 - .../sql/models/IsRetryable.java | 6 +- .../sql/models/JobAgentEditionCapability.java | 137 - .../sql/models/JobAgentIdentity.java | 172 - .../sql/models/JobAgentIdentityType.java | 61 - .../models/JobAgentListResult.java | 27 +- ...bAgentServiceLevelObjectiveCapability.java | 136 - .../sql/models/JobAgentState.java | 12 +- .../sql/models/JobAgentUpdate.java | 66 +- .../models/JobAgentUserAssignedIdentity.java | 100 - .../sql/models/JobAgentVersionCapability.java | 136 - .../models/JobCredentialListResult.java | 27 +- .../sql/models/JobExecutionLifecycle.java | 22 +- .../models/JobExecutionListResult.java | 27 +- .../sql/models/JobExecutionTarget.java | 4 +- .../models/JobListResult.java | 27 +- .../sql/models/JobSchedule.java | 2 +- .../sql/models/JobScheduleType.java | 6 +- .../sql/models/JobStepAction.java | 2 +- .../sql/models/JobStepActionSource.java | 4 +- .../sql/models/JobStepActionType.java | 4 +- .../sql/models/JobStepExecutionOptions.java | 2 +- .../models/JobStepListResult.java | 27 +- .../sql/models/JobStepOutput.java | 12 +- .../sql/models/JobStepOutputType.java | 4 +- .../resourcemanager/sql/models/JobTarget.java | 2 +- .../models/JobTargetGroupListResult.java | 27 +- .../models/JobTargetGroupMembershipType.java | 6 +- .../sql/models/JobTargetType.java | 12 +- .../models/JobVersionListResult.java | 27 +- .../models/LedgerDigestUploadsListResult.java | 28 +- .../sql/models/LedgerDigestUploadsName.java | 4 +- .../sql/models/LedgerDigestUploadsState.java | 6 +- .../sql/models/LicenseTypeCapability.java | 19 +- .../resourcemanager/sql/models/LinkRole.java | 51 - .../sql/models/LogSizeCapability.java | 4 +- .../sql/models/LogSizeUnit.java | 12 +- ...seTransparentDataEncryptionListResult.java | 29 +- ...verAdvancedThreatProtectionListResult.java | 6 +- ...alServerSecurityAlertPolicyListResult.java | 6 +- .../LongTermRetentionBackupListResult.java | 6 +- .../LongTermRetentionPolicyListResult.java | 28 +- .../models/LongTermRetentionPolicyName.java | 4 +- .../MaintenanceConfigurationCapability.java | 19 +- .../models/MaintenanceWindowTimeRange.java | 2 +- ...kupShortTermRetentionPolicyListResult.java | 28 +- .../sql/models/ManagedDatabaseCreateMode.java | 12 +- ...agedDatabaseExtendedAccessibilityInfo.java | 139 - .../models/ManagedDatabaseListResult.java | 28 +- .../models/ManagedDatabaseMoveDefinition.java | 2 +- ...baseRestoreDetailsBackupSetProperties.java | 169 - ...toreDetailsUnrestorableFileProperties.java | 84 - ...DatabaseSecurityAlertPolicyListResult.java | 28 +- .../ManagedDatabaseStartMoveDefinition.java | 2 +- .../sql/models/ManagedDatabaseStatus.java | 41 +- .../sql/models/ManagedDatabaseUpdate.java | 159 +- ...anagedInstanceAdministratorListResult.java | 28 +- .../ManagedInstanceAdministratorType.java | 4 +- ...agedInstanceAzureADOnlyAuthListResult.java | 8 +- .../models/ManagedInstanceDatabaseFormat.java | 56 - .../ManagedInstanceDtcSecuritySettings.java | 219 - ...ansactionManagerCommunicationSettings.java | 158 - .../ManagedInstanceEditionCapability.java | 53 +- ...InstanceEncryptionProtectorListResult.java | 28 +- .../ManagedInstanceExternalAdministrator.java | 2 +- .../ManagedInstanceFamilyCapability.java | 36 +- .../models/ManagedInstanceKeyListResult.java | 28 +- .../models/ManagedInstanceLicenseType.java | 6 +- .../models/ManagedInstanceListResult.java | 28 +- ...anceLongTermRetentionBackupListResult.java | 28 +- ...anceLongTermRetentionPolicyListResult.java | 28 +- ...edInstanceLongTermRetentionPolicyName.java | 4 +- ...nceMaintenanceConfigurationCapability.java | 19 +- .../ManagedInstanceOperationListResult.java | 28 +- ...anagedInstanceOperationParametersPair.java | 4 +- .../models/ManagedInstanceOperationSteps.java | 4 +- .../sql/models/ManagedInstancePairInfo.java | 2 +- .../models/ManagedInstancePecProperty.java | 4 +- ...cePrivateEndpointConnectionListResult.java | 29 +- ...anagedInstancePrivateEndpointProperty.java | 2 +- .../ManagedInstancePrivateLinkListResult.java | 28 +- .../ManagedInstancePrivateLinkProperties.java | 4 +- ...ateLinkServiceConnectionStateProperty.java | 2 +- ...edInstancePropertiesProvisioningState.java | 117 + .../models/ManagedInstanceProxyOverride.java | 8 +- .../ManagedInstanceQueryStatistics.java | 26 +- .../sql/models/ManagedInstanceUpdate.java | 288 +- ...dateAzureKeyVaultEncryptionKeyRequest.java | 107 - .../ManagedInstanceVcoresCapability.java | 205 +- .../ManagedInstanceVersionCapability.java | 19 +- ...anceVulnerabilityAssessmentListResult.java | 28 +- .../ManagedLedgerDigestUploadsName.java | 46 - .../ManagedLedgerDigestUploadsState.java | 51 - .../sql/models/ManagedServerCreateMode.java | 6 +- .../ManagedServerDnsAliasAcquisition.java | 2 +- .../models/ManagedServerDnsAliasCreation.java | 2 +- .../ManagedServerDnsAliasListResult.java | 28 +- ...edServerSecurityAlertPolicyListResult.java | 28 +- .../ManagedShortTermRetentionPolicyName.java | 4 +- ...edTransparentDataEncryptionListResult.java | 28 +- .../sql/models/ManagementOperationState.java | 14 +- .../sql/models/MaxLimitRangeCapability.java | 146 - .../sql/models/MaxSizeCapability.java | 4 +- .../sql/models/MaxSizeRangeCapability.java | 19 +- .../sql/models/MaxSizeUnit.java | 10 +- .../sql/models/MetricType.java | 12 +- .../sql/models/MinCapacityCapability.java | 19 +- .../sql/models/MoveOperationMode.java | 8 +- .../sql/models/NSPConfigAccessRule.java | 102 - .../models/NSPConfigAccessRuleProperties.java | 182 - .../sql/models/NSPConfigAssociation.java | 99 - ...NSPConfigNetworkSecurityPerimeterRule.java | 118 - .../sql/models/NSPConfigPerimeter.java | 116 - .../sql/models/NSPConfigProfile.java | 122 - .../sql/models/NSPProvisioningIssue.java | 102 - .../NSPProvisioningIssueProperties.java | 156 - .../resourcemanager/sql/models/Name.java | 30 +- .../sql/models/NetworkIsolationSettings.java | 2 +- .../sql/models/OperationDisplay.java | 4 +- .../models/OperationListResult.java | 6 +- .../sql/models/OperationMode.java | 8 +- .../sql/models/OperationOrigin.java | 6 +- ...OutboundEnvironmentEndpointCollection.java | 26 +- .../OutboundFirewallRuleListResult.java | 28 +- .../sql/models/PartnerInfo.java | 2 +- .../sql/models/PartnerRegionInfo.java | 2 +- .../sql/models/PauseDelayTimeUnit.java | 4 +- .../PerDatabaseAutoPauseDelayTimeRange.java | 165 - .../models/PerformanceLevelCapability.java | 4 +- .../sql/models/PerformanceLevelUnit.java | 6 +- .../resourcemanager/sql/models/Phase.java | 71 - .../sql/models/PhaseDetails.java | 99 - .../sql/models/PricingModel.java | 51 - .../sql/models/PrincipalType.java | 8 +- .../PrivateEndpointConnectionListResult.java | 28 +- ...rivateEndpointConnectionRequestStatus.java | 4 +- .../sql/models/PrivateEndpointProperty.java | 2 +- .../PrivateEndpointProvisioningState.java | 12 +- .../models/PrivateLinkResourceListResult.java | 28 +- .../models/PrivateLinkResourceProperties.java | 4 +- ...kServiceConnectionStateActionsRequire.java | 4 +- ...ateLinkServiceConnectionStateProperty.java | 2 +- ...ivateLinkServiceConnectionStateStatus.java | 10 +- .../sql/models/ProvisioningState.java | 12 +- .../models/ProxyResourceWithWritableName.java | 16 +- .../sql/models/QueryCheck.java | 117 - .../sql/models/QueryMetricInterval.java | 19 +- .../sql/models/QueryMetricProperties.java | 4 +- .../sql/models/QueryMetricUnitType.java | 10 +- .../sql/models/QueryTimeGrainType.java | 6 +- .../ReadOnlyEndpointFailoverPolicy.java | 6 +- .../sql/models/ReadScaleCapability.java | 19 +- .../ReadWriteEndpointFailoverPolicy.java | 6 +- .../models/RecommendedActionCurrentState.java | 30 +- .../models/RecommendedActionErrorInfo.java | 4 +- .../models/RecommendedActionImpactRecord.java | 4 +- .../RecommendedActionImplementationInfo.java | 4 +- .../models/RecommendedActionInitiatedBy.java | 6 +- .../models/RecommendedActionMetricInfo.java | 4 +- .../models/RecommendedActionStateInfo.java | 2 +- .../RecommendedSensitivityLabelSource.java | 51 - .../RecommendedSensitivityLabelUpdate.java | 19 +- ...RecommendedSensitivityLabelUpdateKind.java | 6 +- ...RecommendedSensitivityLabelUpdateList.java | 2 +- .../models/RecoverableDatabaseListResult.java | 28 +- .../RecoverableManagedDatabaseListResult.java | 28 +- .../sql/models/Remediation.java | 131 - .../sql/models/ReplicaConnectedState.java | 51 - .../models/ReplicaSynchronizationHealth.java | 56 - .../sql/models/ReplicaType.java | 6 +- .../models/ReplicationLinkListResult.java | 28 +- .../sql/models/ReplicationLinkType.java | 10 +- .../sql/models/ReplicationLinkUpdate.java | 179 - .../sql/models/ReplicationMode.java | 8 +- .../sql/models/ReplicationRole.java | 12 +- .../sql/models/ReplicationState.java | 10 +- .../sql/models/ResourceIdentity.java | 2 +- .../sql/models/ResourceMoveDefinition.java | 2 +- .../sql/models/ResourceWithWritableName.java | 57 +- .../RestorableDroppedDatabaseListResult.java | 28 +- ...rableDroppedManagedDatabaseListResult.java | 28 +- .../sql/models/RestoreDetailsName.java | 4 +- .../models/RestorePointListResult.java | 27 +- .../sql/models/RestorePointType.java | 6 +- .../sql/models/RoleChangeType.java | 51 - .../sql/models/RuleSeverity.java | 66 - .../sql/models/RuleStatus.java | 56 - .../resourcemanager/sql/models/RuleType.java | 61 - .../sql/models/SampleName.java | 8 +- .../sql/models/ScheduleItem.java | 197 - .../sql/models/SecondaryInstanceType.java | 51 - .../sql/models/SecondaryType.java | 13 +- .../sql/models/SecurityAlertPolicyName.java | 6 +- .../SecurityAlertPolicyNameAutoGenerated.java | 47 + .../sql/models/SecurityAlertPolicyState.java | 11 +- .../models/SecurityEventCollection.java | 25 +- ...EventSqlInjectionAdditionalProperties.java | 4 +- .../sql/models/SecurityEventType.java | 8 +- .../sql/models/SeedingModeType.java | 51 - .../models/SensitivityLabelListResult.java | 28 +- .../sql/models/SensitivityLabelRank.java | 12 +- .../sql/models/SensitivityLabelSource.java | 6 +- .../models/SensitivityLabelUpdateKind.java | 6 +- .../models/SensitivityLabelUpdateList.java | 2 +- .../ServerBlobAuditingPolicyListResult.java | 28 +- .../models/ServerConfigurationOptionName.java | 46 - .../ServerConnectionPolicyListResult.java | 28 +- .../sql/models/ServerConnectionType.java | 8 +- .../sql/models/ServerCreateMode.java | 51 - .../ServerDevOpsAuditSettingsListResult.java | 6 +- .../sql/models/ServerDnsAliasAcquisition.java | 2 +- .../models/ServerDnsAliasListResult.java | 27 +- .../models/ServerExternalAdministrator.java | 2 +- .../sql/models/ServerInfo.java | 2 +- .../models/ServerKeyListResult.java | 27 +- .../sql/models/ServerKeyType.java | 6 +- .../models/ServerListResult.java | 27 +- .../sql/models/ServerNetworkAccessFlag.java | 8 +- .../models/ServerOperationListResult.java | 28 +- .../ServerPrivateEndpointConnection.java | 4 +- .../ServerTrustCertificatesListResult.java | 6 +- .../models/ServerTrustGroupListResult.java | 28 +- ...erTrustGroupPropertiesTrustScopesItem.java | 6 +- .../sql/models/ServerUpdate.java | 98 +- .../models/ServerUsageListResult.java | 27 +- .../sql/models/ServerVersionCapability.java | 19 +- ...rverVulnerabilityAssessmentListResult.java | 28 +- .../sql/models/ServerWorkspaceFeature.java | 6 +- .../models/ServiceObjectiveCapability.java | 78 +- .../sql/models/ServicePrincipal.java | 2 +- .../sql/models/ServicePrincipalType.java | 6 +- .../sql/models/SetLegalHoldImmutability.java | 52 - .../models/ShortTermRetentionPolicyName.java | 4 +- .../azure/resourcemanager/sql/models/Sku.java | 2 +- .../SqlAgentConfigurationPropertiesState.java | 6 +- .../SqlVulnerabilityAssessmentName.java | 46 - .../SqlVulnerabilityAssessmentScanError.java | 99 - .../SqlVulnerabilityAssessmentState.java | 57 - .../sql/models/StartStopScheduleName.java | 46 - .../resourcemanager/sql/models/Status.java | 14 +- .../sql/models/StorageCapability.java | 19 +- .../StorageCapabilityStorageAccountType.java | 10 +- .../sql/models/StorageKeyType.java | 13 +- .../models/SubscriptionUsageListResult.java | 28 +- .../SynapseLinkWorkspaceInfoProperties.java | 100 - .../SyncAgentLinkedDatabaseListResult.java | 28 +- .../models/SyncAgentListResult.java | 27 +- .../sql/models/SyncAgentState.java | 8 +- .../models/SyncConflictResolutionPolicy.java | 6 +- .../models/SyncDatabaseIdListResult.java | 25 +- .../sql/models/SyncDirection.java | 8 +- .../SyncFullSchemaPropertiesListResult.java | 26 +- .../sql/models/SyncFullSchemaTable.java | 4 +- .../sql/models/SyncFullSchemaTableColumn.java | 4 +- .../models/SyncGroupListResult.java | 27 +- .../models/SyncGroupLogListResult.java | 25 +- .../sql/models/SyncGroupLogType.java | 10 +- .../sql/models/SyncGroupSchema.java | 2 +- .../sql/models/SyncGroupSchemaTable.java | 2 +- .../models/SyncGroupSchemaTableColumn.java | 2 +- .../sql/models/SyncGroupState.java | 12 +- .../sql/models/SyncGroupsType.java | 10 +- .../sql/models/SyncMemberDbType.java | 6 +- .../models/SyncMemberListResult.java | 27 +- .../sql/models/SyncMemberState.java | 38 +- .../sql/models/TableTemporalType.java | 8 +- .../sql/models/TdeCertificate.java | 19 +- .../sql/models/TimeBasedImmutability.java | 52 - .../sql/models/TimeBasedImmutabilityMode.java | 51 - .../models/TimeZoneListResult.java | 27 +- .../models/TopQueriesListResult.java | 25 +- .../models/TransparentDataEncryptionName.java | 4 +- .../TransparentDataEncryptionScanState.java | 71 - .../TransparentDataEncryptionState.java | 6 +- ...dateLongTermRetentionBackupParameters.java | 2 +- ...psertManagedServerOperationParameters.java | 52 +- ...OperationStepWithEstimatesAndDuration.java | 74 +- .../models/UsageListResult.java | 25 +- .../sql/models/UserIdentity.java | 2 +- .../resourcemanager/sql/models/VaRule.java | 218 - .../models/VirtualClusterListResult.java | 27 +- .../sql/models/VirtualClusterUpdate.java | 47 +- .../models/VirtualNetworkRuleListResult.java | 28 +- .../sql/models/VirtualNetworkRuleState.java | 14 +- .../models/VulnerabilityAssessmentName.java | 4 +- ...erabilityAssessmentPolicyBaselineName.java | 6 +- ...ityAssessmentRecurringScansProperties.java | 2 +- .../VulnerabilityAssessmentScanError.java | 4 +- ...abilityAssessmentScanRecordListResult.java | 28 +- .../VulnerabilityAssessmentScanState.java | 10 +- ...ulnerabilityAssessmentScanTriggerType.java | 6 +- ...erabilityAssessmentSystemDatabaseName.java | 51 - .../models/WorkloadClassifierListResult.java | 28 +- .../models/WorkloadGroupListResult.java | 27 +- .../sql/models/ZonePinningCapability.java | 114 - .../sql/models/package-info.java | 9 +- .../resourcemanager/sql/package-info.java | 9 +- .../src/main/java/module-info.java | 1 - .../azure-resourcemanager-sql_metadata.json | 1 - .../proxy-config.json | 2 +- ...etentionPoliciesCreateOrUpdateSamples.java | 32 - ...pShortTermRetentionPoliciesGetSamples.java | 28 - ...etentionPoliciesListByDatabaseSamples.java | 25 - ...ortTermRetentionPoliciesUpdateSamples.java | 32 - .../CapabilitiesListByLocationSamples.java | 25 - ...aMaskingPoliciesCreateOrUpdateSamples.java | 49 - .../DataMaskingPoliciesGetSamples.java | 27 - ...DataMaskingRulesCreateOrUpdateSamples.java | 104 - ...DataMaskingRulesListByDatabaseSamples.java | 27 - ...ouseUserActivitiesOperationGetSamples.java | 28 - ...ivitiesOperationListByDatabaseSamples.java | 24 - ...otectionSettingsCreateOrUpdateSamples.java | 50 - ...cedThreatProtectionSettingsGetSamples.java | 28 - ...otectionSettingsListByDatabaseSamples.java | 26 - .../generated/DatabaseAdvisorsGetSamples.java | 25 - ...DatabaseAdvisorsListByDatabaseSamples.java | 41 - .../DatabaseAdvisorsUpdateSamples.java | 28 - .../DatabaseAutomaticTuningGetSamples.java | 24 - .../DatabaseAutomaticTuningUpdateSamples.java | 68 - ...AuditingPoliciesCreateOrUpdateSamples.java | 82 - ...atabaseBlobAuditingPoliciesGetSamples.java | 27 - ...AuditingPoliciesListByDatabaseSamples.java | 25 - .../generated/DatabaseColumnsGetSamples.java | 25 - .../DatabaseColumnsListByDatabaseSamples.java | 43 - .../DatabaseColumnsListByTableSamples.java | 24 - ...EncryptionProtectorsRevalidateSamples.java | 28 - ...baseEncryptionProtectorsRevertSamples.java | 28 - ...ensionsOperationCreateOrUpdateSamples.java | 104 - ...DatabaseExtensionsOperationGetSamples.java | 25 - ...ensionsOperationListByDatabaseSamples.java | 25 - .../DatabaseOperationsCancelSamples.java | 27 - ...tabaseOperationsListByDatabaseSamples.java | 24 - .../DatabaseRecommendedActionsGetSamples.java | 25 - ...edActionsListByDatabaseAdvisorSamples.java | 25 - ...tabaseRecommendedActionsUpdateSamples.java | 32 - .../generated/DatabaseSchemasGetSamples.java | 24 - .../DatabaseSchemasListByDatabaseSamples.java | 24 - ...ityAlertPoliciesCreateOrUpdateSamples.java | 57 - ...tabaseSecurityAlertPoliciesGetSamples.java | 27 - ...ityAlertPoliciesListByDatabaseSamples.java | 24 - ...essmentBaselinesCreateOrUpdateSamples.java | 67 - ...rabilityAssessmentBaselinesGetSamples.java | 29 - ...stBySqlVulnerabilityAssessmentSamples.java | 29 - ...tyAssessmentExecuteScanExecuteSamples.java | 28 - ...entRuleBaselinesCreateOrUpdateSamples.java | 35 - ...yAssessmentRuleBaselinesDeleteSamples.java | 29 - ...lityAssessmentRuleBaselinesGetSamples.java | 29 - ...entRuleBaselinesListByBaselineSamples.java | 29 - ...abilityAssessmentScanResultGetSamples.java | 28 - ...AssessmentScanResultListByScanSamples.java | 28 - ...ulnerabilityAssessmentScansGetSamples.java | 28 - ...tBySqlVulnerabilityAssessmentsSamples.java | 28 - ...rabilityAssessmentsSettingsGetSamples.java | 28 - ...essmentsSettingsListByDatabaseSamples.java | 26 - .../generated/DatabaseTablesGetSamples.java | 24 - .../DatabaseTablesListBySchemaSamples.java | 24 - .../DatabaseUsagesListByDatabaseSamples.java | 24 - ...entRuleBaselinesCreateOrUpdateSamples.java | 39 - ...yAssessmentRuleBaselinesDeleteSamples.java | 30 - ...lityAssessmentRuleBaselinesGetSamples.java | 30 - ...erabilityAssessmentScansExportSamples.java | 28 - ...ulnerabilityAssessmentScansGetSamples.java | 28 - ...ityAssessmentScansInitiateScanSamples.java | 28 - ...yAssessmentScansListByDatabaseSamples.java | 28 - ...ilityAssessmentsCreateOrUpdateSamples.java | 83 - ...VulnerabilityAssessmentsDeleteSamples.java | 27 - ...aseVulnerabilityAssessmentsGetSamples.java | 27 - ...ilityAssessmentsListByDatabaseSamples.java | 26 - .../DatabasesCreateOrUpdateSamples.java | 514 -- .../sql/generated/DatabasesDeleteSamples.java | 24 - .../sql/generated/DatabasesExportSamples.java | 82 - .../generated/DatabasesFailoverSamples.java | 26 - .../sql/generated/DatabasesGetSamples.java | 105 - .../DatabasesImportMethodSamples.java | 84 - .../DatabasesListByElasticPoolSamples.java | 24 - .../DatabasesListByServerSamples.java | 56 - ...abasesListInaccessibleByServerSamples.java | 25 - .../sql/generated/DatabasesPauseSamples.java | 24 - .../sql/generated/DatabasesRenameSamples.java | 28 - .../sql/generated/DatabasesResumeSamples.java | 24 - .../sql/generated/DatabasesUpdateSamples.java | 146 - .../DatabasesUpgradeDataWarehouseSamples.java | 24 - .../generated/DeletedServersGetSamples.java | 24 - .../DeletedServersListByLocationSamples.java | 22 - .../generated/DeletedServersListSamples.java | 22 - .../DeletedServersRecoverSamples.java | 24 - ...ailabilityGroupsCreateOrUpdateSamples.java | 62 - ...ibutedAvailabilityGroupsDeleteSamples.java | 25 - ...utedAvailabilityGroupsFailoverSamples.java | 28 - ...stributedAvailabilityGroupsGetSamples.java | 24 - ...ailabilityGroupsListByInstanceSamples.java | 25 - ...butedAvailabilityGroupsSetRoleSamples.java | 32 - ...ibutedAvailabilityGroupsUpdateSamples.java | 30 - .../ElasticPoolOperationsCancelSamples.java | 27 - ...oolOperationsListByElasticPoolSamples.java | 24 - .../ElasticPoolsCreateOrUpdateSamples.java | 173 - .../generated/ElasticPoolsDeleteSamples.java | 24 - .../ElasticPoolsFailoverSamples.java | 24 - .../sql/generated/ElasticPoolsGetSamples.java | 87 - .../ElasticPoolsListByServerSamples.java | 24 - .../generated/ElasticPoolsUpdateSamples.java | 164 - ...yptionProtectorsCreateOrUpdateSamples.java | 69 - .../EncryptionProtectorsGetSamples.java | 43 - ...cryptionProtectorsListByServerSamples.java | 24 - ...EncryptionProtectorsRevalidateSamples.java | 27 - .../EndpointCertificatesGetSamples.java | 24 - ...ointCertificatesListByInstanceSamples.java | 24 - ...AuditingPoliciesCreateOrUpdateSamples.java | 83 - ...atabaseBlobAuditingPoliciesGetSamples.java | 28 - ...AuditingPoliciesListByDatabaseSamples.java | 25 - ...AuditingPoliciesCreateOrUpdateSamples.java | 62 - ...dServerBlobAuditingPoliciesGetSamples.java | 27 - ...obAuditingPoliciesListByServerSamples.java | 24 - .../FailoverGroupsCreateOrUpdateSamples.java | 73 - .../FailoverGroupsDeleteSamples.java | 25 - .../FailoverGroupsFailoverSamples.java | 25 - ...oupsForceFailoverAllowDataLossSamples.java | 26 - .../generated/FailoverGroupsGetSamples.java | 25 - .../FailoverGroupsListByServerSamples.java | 24 - ...TryPlannedBeforeForcedFailoverSamples.java | 26 - .../FailoverGroupsUpdateSamples.java | 57 - .../FirewallRulesCreateOrUpdateSamples.java | 46 - .../generated/FirewallRulesDeleteSamples.java | 25 - .../generated/FirewallRulesGetSamples.java | 25 - .../FirewallRulesListByServerSamples.java | 24 - .../FirewallRulesReplaceSamples.java | 33 - ...eoBackupPoliciesCreateOrUpdateSamples.java | 30 - .../GeoBackupPoliciesGetSamples.java | 27 - .../GeoBackupPoliciesListSamples.java | 25 - ...Pv6FirewallRulesCreateOrUpdateSamples.java | 48 - .../IPv6FirewallRulesDeleteSamples.java | 25 - .../IPv6FirewallRulesGetSamples.java | 25 - .../IPv6FirewallRulesListByServerSamples.java | 24 - ...ceFailoverGroupsCreateOrUpdateSamples.java | 46 - .../InstanceFailoverGroupsDeleteSamples.java | 24 - ...InstanceFailoverGroupsFailoverSamples.java | 24 - ...oupsForceFailoverAllowDataLossSamples.java | 26 - .../InstanceFailoverGroupsGetSamples.java | 24 - ...ceFailoverGroupsListByLocationSamples.java | 24 - .../InstancePoolOperationsGetSamples.java | 25 - ...olOperationsListByInstancePoolSamples.java | 40 - .../InstancePoolsCreateOrUpdateSamples.java | 70 - .../generated/InstancePoolsDeleteSamples.java | 22 - ...nstancePoolsGetByResourceGroupSamples.java | 24 - ...stancePoolsListByResourceGroupSamples.java | 22 - .../generated/InstancePoolsListSamples.java | 22 - .../generated/InstancePoolsUpdateSamples.java | 41 - .../JobAgentsCreateOrUpdateSamples.java | 86 - .../sql/generated/JobAgentsDeleteSamples.java | 22 - .../sql/generated/JobAgentsGetSamples.java | 24 - .../JobAgentsListByServerSamples.java | 22 - .../sql/generated/JobAgentsUpdateSamples.java | 79 - .../JobCredentialsCreateOrUpdateSamples.java | 28 - .../JobCredentialsDeleteSamples.java | 24 - .../generated/JobCredentialsGetSamples.java | 24 - .../JobCredentialsListByAgentSamples.java | 24 - .../generated/JobExecutionsCancelSamples.java | 27 - .../JobExecutionsCreateOrUpdateSamples.java | 27 - .../generated/JobExecutionsCreateSamples.java | 24 - .../generated/JobExecutionsGetSamples.java | 27 - .../JobExecutionsListByAgentSamples.java | 44 - .../JobExecutionsListByJobSamples.java | 25 - ...PrivateEndpointsCreateOrUpdateSamples.java | 29 - .../JobPrivateEndpointsDeleteSamples.java | 24 - .../JobPrivateEndpointsGetSamples.java | 24 - ...JobPrivateEndpointsListByAgentSamples.java | 24 - .../JobStepExecutionsGetSamples.java | 27 - ...epExecutionsListByJobExecutionSamples.java | 28 - .../JobStepsCreateOrUpdateSamples.java | 73 - .../sql/generated/JobStepsDeleteSamples.java | 24 - .../JobStepsGetByVersionSamples.java | 25 - .../sql/generated/JobStepsGetSamples.java | 24 - .../generated/JobStepsListByJobSamples.java | 24 - .../JobStepsListByVersionSamples.java | 25 - .../JobTargetExecutionsGetSamples.java | 28 - ...etExecutionsListByJobExecutionSamples.java | 28 - .../JobTargetExecutionsListByStepSamples.java | 27 - .../JobTargetGroupsCreateOrUpdateSamples.java | 67 - .../JobTargetGroupsDeleteSamples.java | 24 - .../generated/JobTargetGroupsGetSamples.java | 24 - .../JobTargetGroupsListByAgentSamples.java | 24 - .../sql/generated/JobVersionsGetSamples.java | 24 - .../JobVersionsListByJobSamples.java | 24 - .../generated/JobsCreateOrUpdateSamples.java | 51 - .../sql/generated/JobsDeleteSamples.java | 24 - .../sql/generated/JobsGetSamples.java | 24 - .../sql/generated/JobsListByAgentSamples.java | 22 - ...UploadsOperationCreateOrUpdateSamples.java | 30 - ...rDigestUploadsOperationDisableSamples.java | 28 - ...edgerDigestUploadsOperationGetSamples.java | 28 - ...UploadsOperationListByDatabaseSamples.java | 25 - ...hangeAccessTierByResourceGroupSamples.java | 31 - ...tentionBackupsChangeAccessTierSamples.java | 31 - ...tionBackupsCopyByResourceGroupSamples.java | 33 - .../LongTermRetentionBackupsCopySamples.java | 32 - ...onBackupsDeleteByResourceGroupSamples.java | 25 - ...LongTermRetentionBackupsDeleteSamples.java | 25 - ...ntionBackupsGetByResourceGroupSamples.java | 25 - .../LongTermRetentionBackupsGetSamples.java | 25 - ...RetentionBackupsListByDatabaseSamples.java | 25 - ...RetentionBackupsListByLocationSamples.java | 25 - ...upsListByResourceGroupDatabaseSamples.java | 26 - ...upsListByResourceGroupLocationSamples.java | 26 - ...ckupsListByResourceGroupServerSamples.java | 26 - ...rmRetentionBackupsListByServerSamples.java | 25 - ...sedImmutabilityByResourceGroupSamples.java | 26 - ...ckupsLockTimeBasedImmutabilitySamples.java | 26 - ...oldImmutabilityByResourceGroupSamples.java | 26 - ...upsRemoveLegalHoldImmutabilitySamples.java | 26 - ...sedImmutabilityByResourceGroupSamples.java | 26 - ...upsRemoveTimeBasedImmutabilitySamples.java | 26 - ...oldImmutabilityByResourceGroupSamples.java | 26 - ...ackupsSetLegalHoldImmutabilitySamples.java | 26 - ...onBackupsUpdateByResourceGroupSamples.java | 30 - ...LongTermRetentionBackupsUpdateSamples.java | 30 - ...ceBackupsDeleteByResourceGroupSamples.java | 25 - ...onManagedInstanceBackupsDeleteSamples.java | 25 - ...tanceBackupsGetByResourceGroupSamples.java | 25 - ...ntionManagedInstanceBackupsGetSamples.java | 26 - ...dInstanceBackupsListByDatabaseSamples.java | 25 - ...dInstanceBackupsListByInstanceSamples.java | 25 - ...dInstanceBackupsListByLocationSamples.java | 41 - ...upsListByResourceGroupDatabaseSamples.java | 27 - ...upsListByResourceGroupInstanceSamples.java | 27 - ...upsListByResourceGroupLocationSamples.java | 44 - ...etentionPoliciesCreateOrUpdateSamples.java | 37 - .../LongTermRetentionPoliciesGetSamples.java | 28 - ...etentionPoliciesListByDatabaseSamples.java | 25 - ...nanceWindowOptionsOperationGetSamples.java | 26 - ...WindowsOperationCreateOrUpdateSamples.java | 35 - ...MaintenanceWindowsOperationGetSamples.java | 26 - ...etentionPoliciesCreateOrUpdateSamples.java | 30 - ...pShortTermRetentionPoliciesGetSamples.java | 28 - ...etentionPoliciesListByDatabaseSamples.java | 25 - ...ortTermRetentionPoliciesUpdateSamples.java | 30 - ...otectionSettingsCreateOrUpdateSamples.java | 50 - ...cedThreatProtectionSettingsGetSamples.java | 28 - ...otectionSettingsListByDatabaseSamples.java | 26 - .../ManagedDatabaseColumnsGetSamples.java | 25 - ...dDatabaseColumnsListByDatabaseSamples.java | 43 - ...agedDatabaseColumnsListByTableSamples.java | 25 - ...nagedDatabaseMoveOperationsGetSamples.java | 27 - ...seMoveOperationsListByLocationSamples.java | 60 - .../ManagedDatabaseQueriesGetSamples.java | 25 - ...agedDatabaseQueriesListByQuerySamples.java | 59 - ...mmendedSensitivityLabelsUpdateSamples.java | 44 - ...nagedDatabaseRestoreDetailsGetSamples.java | 27 - .../ManagedDatabaseSchemasGetSamples.java | 24 - ...dDatabaseSchemasListByDatabaseSamples.java | 24 - ...ityAlertPoliciesCreateOrUpdateSamples.java | 57 - ...tabaseSecurityAlertPoliciesGetSamples.java | 27 - ...ityAlertPoliciesListByDatabaseSamples.java | 25 - ...seSecurityEventsListByDatabaseSamples.java | 42 - ...ensitivityLabelsCreateOrUpdateSamples.java | 38 - ...atabaseSensitivityLabelsDeleteSamples.java | 28 - ...ityLabelsDisableRecommendationSamples.java | 28 - ...vityLabelsEnableRecommendationSamples.java | 28 - ...edDatabaseSensitivityLabelsGetSamples.java | 28 - ...ensitivityLabelsListByDatabaseSamples.java | 25 - ...ityLabelsListCurrentByDatabaseSamples.java | 26 - ...abelsListRecommendedByDatabaseSamples.java | 26 - ...atabaseSensitivityLabelsUpdateSamples.java | 53 - .../ManagedDatabaseTablesGetSamples.java | 25 - ...agedDatabaseTablesListBySchemaSamples.java | 24 - ...ntDataEncryptionCreateOrUpdateSamples.java | 32 - ...seTransparentDataEncryptionGetSamples.java | 27 - ...ntDataEncryptionListByDatabaseSamples.java | 25 - ...entRuleBaselinesCreateOrUpdateSamples.java | 39 - ...yAssessmentRuleBaselinesDeleteSamples.java | 30 - ...lityAssessmentRuleBaselinesGetSamples.java | 30 - ...erabilityAssessmentScansExportSamples.java | 28 - ...ulnerabilityAssessmentScansGetSamples.java | 28 - ...ityAssessmentScansInitiateScanSamples.java | 28 - ...yAssessmentScansListByDatabaseSamples.java | 28 - ...ilityAssessmentsCreateOrUpdateSamples.java | 58 - ...VulnerabilityAssessmentsDeleteSamples.java | 27 - ...aseVulnerabilityAssessmentsGetSamples.java | 27 - ...ilityAssessmentsListByDatabaseSamples.java | 26 - .../ManagedDatabasesCancelMoveSamples.java | 29 - .../ManagedDatabasesCompleteMoveSamples.java | 29 - ...anagedDatabasesCompleteRestoreSamples.java | 29 - ...ManagedDatabasesCreateOrUpdateSamples.java | 209 - .../ManagedDatabasesDeleteSamples.java | 24 - .../generated/ManagedDatabasesGetSamples.java | 24 - ...ManagedDatabasesListByInstanceSamples.java | 24 - ...asesListInaccessibleByInstanceSamples.java | 25 - ...luateInaccessibleDatabaseStateSamples.java | 26 - .../ManagedDatabasesStartMoveSamples.java | 50 - .../ManagedDatabasesUpdateSamples.java | 60 - ...ceAdministratorsCreateOrUpdateSamples.java | 55 - ...edInstanceAdministratorsDeleteSamples.java | 27 - ...nagedInstanceAdministratorsGetSamples.java | 27 - ...ceAdministratorsListByInstanceSamples.java | 24 - ...otectionSettingsCreateOrUpdateSamples.java | 48 - ...cedThreatProtectionSettingsGetSamples.java | 28 - ...otectionSettingsListByInstanceSamples.java | 25 - ...yAuthenticationsCreateOrUpdateSamples.java | 30 - ...ureADOnlyAuthenticationsDeleteSamples.java | 28 - ...eAzureADOnlyAuthenticationsGetSamples.java | 28 - ...yAuthenticationsListByInstanceSamples.java | 25 - ...agedInstanceDtcsCreateOrUpdateSamples.java | 59 - .../ManagedInstanceDtcsGetSamples.java | 26 - ...tanceDtcsListByManagedInstanceSamples.java | 24 - ...yptionProtectorsCreateOrUpdateSamples.java | 50 - ...nstanceEncryptionProtectorsGetSamples.java | 27 - ...yptionProtectorsListByInstanceSamples.java | 25 - ...EncryptionProtectorsRevalidateSamples.java | 27 - ...agedInstanceKeysCreateOrUpdateSamples.java | 31 - .../ManagedInstanceKeysDeleteSamples.java | 25 - .../ManagedInstanceKeysGetSamples.java | 25 - ...agedInstanceKeysListByInstanceSamples.java | 24 - ...etentionPoliciesCreateOrUpdateSamples.java | 37 - ...ongTermRetentionPoliciesDeleteSamples.java | 28 - ...ceLongTermRetentionPoliciesGetSamples.java | 28 - ...etentionPoliciesListByDatabaseSamples.java | 25 - ...anagedInstanceOperationsCancelSamples.java | 26 - .../ManagedInstanceOperationsGetSamples.java | 26 - ...perationsListByManagedInstanceSamples.java | 25 - ...pointConnectionsCreateOrUpdateSamples.java | 32 - ...ivateEndpointConnectionsDeleteSamples.java | 25 - ...ePrivateEndpointConnectionsGetSamples.java | 25 - ...nnectionsListByManagedInstanceSamples.java | 25 - ...nstancePrivateLinkResourcesGetSamples.java | 24 - ...ResourcesListByManagedInstanceSamples.java | 24 - ...dInstanceTdeCertificatesCreateSamples.java | 27 - ...ilityAssessmentsCreateOrUpdateSamples.java | 83 - ...VulnerabilityAssessmentsDeleteSamples.java | 28 - ...nceVulnerabilityAssessmentsGetSamples.java | 28 - ...ilityAssessmentsListByInstanceSamples.java | 26 - ...ManagedInstancesCreateOrUpdateSamples.java | 107 - .../ManagedInstancesDeleteSamples.java | 24 - .../ManagedInstancesFailoverSamples.java | 26 - ...gedInstancesGetByResourceGroupSamples.java | 54 - ...gedInstancesListByInstancePoolSamples.java | 39 - ...InstancesListByManagedInstanceSamples.java | 61 - ...edInstancesListByResourceGroupSamples.java | 39 - ...kDependenciesByManagedInstanceSamples.java | 26 - .../ManagedInstancesListSamples.java | 35 - ...luateInaccessibleDatabaseStateSamples.java | 25 - .../ManagedInstancesRefreshStatusSamples.java | 25 - .../ManagedInstancesStartSamples.java | 22 - .../ManagedInstancesStopSamples.java | 22 - .../ManagedInstancesUpdateSamples.java | 100 - ...dateAzureKeyVaultEncryptionKeySamples.java | 28 - ...UploadsOperationCreateOrUpdateSamples.java | 31 - ...rDigestUploadsOperationDisableSamples.java | 28 - ...edgerDigestUploadsOperationGetSamples.java | 28 - ...UploadsOperationListByDatabaseSamples.java | 25 - ...etentionPoliciesCreateOrUpdateSamples.java | 31 - ...pShortTermRetentionPoliciesGetSamples.java | 28 - ...istByRestorableDroppedDatabaseSamples.java | 26 - ...ortTermRetentionPoliciesUpdateSamples.java | 31 - ...ManagedServerDnsAliasesAcquireSamples.java | 29 - ...ServerDnsAliasesCreateOrUpdateSamples.java | 27 - .../ManagedServerDnsAliasesDeleteSamples.java | 24 - .../ManagedServerDnsAliasesGetSamples.java | 24 - ...nsAliasesListByManagedInstanceSamples.java | 24 - ...ityAlertPoliciesCreateOrUpdateSamples.java | 55 - ...ServerSecurityAlertPoliciesGetSamples.java | 27 - ...ityAlertPoliciesListByInstanceSamples.java | 25 - ...rityPerimeterConfigurationsGetSamples.java | 25 - ...eterConfigurationsListByServerSamples.java | 24 - ...rimeterConfigurationsReconcileSamples.java | 25 - .../sql/generated/OperationsListSamples.java | 23 - ...undFirewallRulesCreateOrUpdateSamples.java | 26 - .../OutboundFirewallRulesDeleteSamples.java | 26 - .../OutboundFirewallRulesGetSamples.java | 25 - ...boundFirewallRulesListByServerSamples.java | 25 - ...pointConnectionsCreateOrUpdateSamples.java | 34 - ...ivateEndpointConnectionsDeleteSamples.java | 25 - .../PrivateEndpointConnectionsGetSamples.java | 25 - ...ndpointConnectionsListByServerSamples.java | 25 - .../PrivateLinkResourcesGetSamples.java | 24 - ...ivateLinkResourcesListByServerSamples.java | 24 - ...mmendedSensitivityLabelsUpdateSamples.java | 44 - .../RecoverableDatabasesGetSamples.java | 41 - ...coverableDatabasesListByServerSamples.java | 25 - ...RecoverableManagedDatabasesGetSamples.java | 25 - ...ManagedDatabasesListByInstanceSamples.java | 25 - ...ReplicationLinksCreateOrUpdateSamples.java | 28 - .../ReplicationLinksDeleteSamples.java | 25 - ...tionLinksFailoverAllowDataLossSamples.java | 25 - .../ReplicationLinksFailoverSamples.java | 25 - .../generated/ReplicationLinksGetSamples.java | 25 - ...ReplicationLinksListByDatabaseSamples.java | 24 - .../ReplicationLinksListByServerSamples.java | 24 - .../ReplicationLinksUpdateSamples.java | 29 - .../RestorableDroppedDatabasesGetSamples.java | 41 - ...leDroppedDatabasesListByServerSamples.java | 24 - ...ableDroppedManagedDatabasesGetSamples.java | 24 - ...ManagedDatabasesListByInstanceSamples.java | 25 - .../generated/RestorePointsCreateSamples.java | 29 - .../generated/RestorePointsDeleteSamples.java | 25 - .../generated/RestorePointsGetSamples.java | 40 - .../RestorePointsListByDatabaseSamples.java | 39 - ...ensitivityLabelsCreateOrUpdateSamples.java | 38 - .../SensitivityLabelsDeleteSamples.java | 28 - ...ityLabelsDisableRecommendationSamples.java | 28 - ...vityLabelsEnableRecommendationSamples.java | 28 - .../SensitivityLabelsGetSamples.java | 27 - ...ensitivityLabelsListByDatabaseSamples.java | 25 - ...ityLabelsListCurrentByDatabaseSamples.java | 26 - ...abelsListRecommendedByDatabaseSamples.java | 26 - .../SensitivityLabelsUpdateSamples.java | 56 - ...otectionSettingsCreateOrUpdateSamples.java | 48 - ...cedThreatProtectionSettingsGetSamples.java | 28 - ...ProtectionSettingsListByServerSamples.java | 25 - .../generated/ServerAdvisorsGetSamples.java | 24 - .../ServerAdvisorsListByServerSamples.java | 40 - .../ServerAdvisorsUpdateSamples.java | 28 - .../ServerAutomaticTuningGetSamples.java | 24 - .../ServerAutomaticTuningUpdateSamples.java | 69 - ...ADAdministratorsCreateOrUpdateSamples.java | 35 - ...verAzureADAdministratorsDeleteSamples.java | 27 - ...ServerAzureADAdministratorsGetSamples.java | 27 - ...reADAdministratorsListByServerSamples.java | 25 - ...yAuthenticationsCreateOrUpdateSamples.java | 30 - ...ureADOnlyAuthenticationsDeleteSamples.java | 28 - ...rAzureADOnlyAuthenticationsGetSamples.java | 28 - ...nlyAuthenticationsListByServerSamples.java | 25 - ...AuditingPoliciesCreateOrUpdateSamples.java | 61 - .../ServerBlobAuditingPoliciesGetSamples.java | 27 - ...obAuditingPoliciesListByServerSamples.java | 24 - ...igurationOptionsCreateOrUpdateSamples.java | 30 - .../ServerConfigurationOptionsGetSamples.java | 28 - ...onOptionsListByManagedInstanceSamples.java | 25 - ...nnectionPoliciesCreateOrUpdateSamples.java | 30 - .../ServerConnectionPoliciesGetSamples.java | 27 - ...ConnectionPoliciesListByServerSamples.java | 24 - ...OpsAuditSettingsCreateOrUpdateSamples.java | 55 - .../ServerDevOpsAuditSettingsGetSamples.java | 27 - ...evOpsAuditSettingsListByServerSamples.java | 24 - .../ServerDnsAliasesAcquireSamples.java | 29 - ...ServerDnsAliasesCreateOrUpdateSamples.java | 24 - .../ServerDnsAliasesDeleteSamples.java | 24 - .../generated/ServerDnsAliasesGetSamples.java | 24 - .../ServerDnsAliasesListByServerSamples.java | 24 - .../ServerKeysCreateOrUpdateSamples.java | 49 - .../generated/ServerKeysDeleteSamples.java | 25 - .../sql/generated/ServerKeysGetSamples.java | 40 - .../ServerKeysListByServerSamples.java | 24 - .../ServerOperationsListByServerSamples.java | 24 - ...ityAlertPoliciesCreateOrUpdateSamples.java | 55 - ...ServerSecurityAlertPoliciesGetSamples.java | 27 - ...urityAlertPoliciesListByServerSamples.java | 24 - ...rustCertificatesCreateOrUpdateSamples.java | 28 - .../ServerTrustCertificatesDeleteSamples.java | 24 - .../ServerTrustCertificatesGetSamples.java | 24 - ...rustCertificatesListByInstanceSamples.java | 25 - ...erverTrustGroupsCreateOrUpdateSamples.java | 36 - .../ServerTrustGroupsDeleteSamples.java | 24 - .../ServerTrustGroupsGetSamples.java | 24 - ...erverTrustGroupsListByInstanceSamples.java | 24 - ...erverTrustGroupsListByLocationSamples.java | 24 - .../ServerUsagesListByServerSamples.java | 24 - ...ilityAssessmentsCreateOrUpdateSamples.java | 81 - ...VulnerabilityAssessmentsDeleteSamples.java | 27 - ...verVulnerabilityAssessmentsGetSamples.java | 27 - ...abilityAssessmentsListByServerSamples.java | 26 - .../ServersCheckNameAvailabilitySamples.java | 57 - .../ServersCreateOrUpdateSamples.java | 45 - .../sql/generated/ServersDeleteSamples.java | 24 - .../ServersGetByResourceGroupSamples.java | 41 - .../ServersImportDatabaseSamples.java | 85 - .../ServersListByResourceGroupSamples.java | 39 - .../sql/generated/ServersListSamples.java | 35 - .../ServersRefreshStatusSamples.java | 25 - .../sql/generated/ServersUpdateSamples.java | 34 - .../SqlAgentCreateOrUpdateSamples.java | 29 - .../sql/generated/SqlAgentGetSamples.java | 25 - ...erabilityAssessmentBaselineGetSamples.java | 31 - ...stBySqlVulnerabilityAssessmentSamples.java | 30 - ...selinesOperationCreateOrUpdateSamples.java | 70 - ...tyAssessmentExecuteScanExecuteSamples.java | 30 - ...mentRuleBaselineCreateOrUpdateSamples.java | 37 - ...ilityAssessmentRuleBaselineGetSamples.java | 31 - ...mentRuleBaselineListByBaselineSamples.java | 31 - ...ntRuleBaselinesOperationDeleteSamples.java | 31 - ...sessmentScanResultOperationGetSamples.java | 30 - ...tScanResultOperationListByScanSamples.java | 29 - ...ulnerabilityAssessmentScansGetSamples.java | 30 - ...tBySqlVulnerabilityAssessmentsSamples.java | 30 - ...VulnerabilityAssessmentsDeleteSamples.java | 27 - ...essmentsSettingsCreateOrUpdateSamples.java | 31 - ...rabilityAssessmentsSettingsGetSamples.java | 27 - ...ssessmentsSettingsListByServerSamples.java | 25 - ...nstanceSchedulesCreateOrUpdateSamples.java | 70 - ...ManagedInstanceSchedulesDeleteSamples.java | 28 - ...topManagedInstanceSchedulesGetSamples.java | 28 - ...nstanceSchedulesListByInstanceSamples.java | 25 - .../SubscriptionUsagesGetSamples.java | 25 - ...bscriptionUsagesListByLocationSamples.java | 23 - ...seLinkWorkspacesListByDatabaseSamples.java | 25 - .../SyncAgentsCreateOrUpdateSamples.java | 46 - .../generated/SyncAgentsDeleteSamples.java | 25 - .../SyncAgentsGenerateKeySamples.java | 25 - .../sql/generated/SyncAgentsGetSamples.java | 25 - .../SyncAgentsListByServerSamples.java | 24 - .../SyncAgentsListLinkedDatabasesSamples.java | 25 - .../SyncGroupsCancelSyncSamples.java | 25 - .../SyncGroupsCreateOrUpdateSamples.java | 98 - .../generated/SyncGroupsDeleteSamples.java | 25 - .../sql/generated/SyncGroupsGetSamples.java | 40 - .../SyncGroupsListByDatabaseSamples.java | 25 - .../SyncGroupsListHubSchemasSamples.java | 25 - .../generated/SyncGroupsListLogsSamples.java | 28 - .../SyncGroupsListSyncDatabaseIdsSamples.java | 22 - .../SyncGroupsRefreshHubSchemaSamples.java | 25 - .../SyncGroupsTriggerSyncSamples.java | 25 - .../generated/SyncGroupsUpdateSamples.java | 106 - .../SyncMembersCreateOrUpdateSamples.java | 108 - .../generated/SyncMembersDeleteSamples.java | 25 - .../sql/generated/SyncMembersGetSamples.java | 40 - .../SyncMembersListBySyncGroupSamples.java | 25 - .../SyncMembersListMemberSchemasSamples.java | 25 - ...SyncMembersRefreshMemberSchemaSamples.java | 25 - .../generated/SyncMembersUpdateSamples.java | 116 - .../TdeCertificatesCreateSamples.java | 27 - .../sql/generated/TimeZonesGetSamples.java | 24 - .../TimeZonesListByLocationSamples.java | 22 - ...tDataEncryptionsCreateOrUpdateSamples.java | 33 - .../TransparentDataEncryptionsGetSamples.java | 27 - ...tDataEncryptionsListByDatabaseSamples.java | 25 - ...ansparentDataEncryptionsResumeSamples.java | 28 - ...nsparentDataEncryptionsSuspendSamples.java | 28 - .../UsagesListByInstancePoolSamples.java | 39 - .../VirtualClustersCreateOrUpdateSamples.java | 42 - .../VirtualClustersDeleteSamples.java | 24 - ...tualClustersGetByResourceGroupSamples.java | 25 - ...ualClustersListByResourceGroupSamples.java | 22 - .../generated/VirtualClustersListSamples.java | 22 - ...irtualClustersUpdateDnsServersSamples.java | 26 - .../VirtualClustersUpdateSamples.java | 42 - ...tualNetworkRulesCreateOrUpdateSamples.java | 30 - .../VirtualNetworkRulesDeleteSamples.java | 24 - .../VirtualNetworkRulesGetSamples.java | 24 - ...irtualNetworkRulesListByServerSamples.java | 24 - ...kloadClassifiersCreateOrUpdateSamples.java | 52 - .../WorkloadClassifiersDeleteSamples.java | 25 - .../WorkloadClassifiersGetSamples.java | 26 - ...ClassifiersListByWorkloadGroupSamples.java | 26 - .../WorkloadGroupsCreateOrUpdateSamples.java | 53 - .../WorkloadGroupsDeleteSamples.java | 25 - .../generated/WorkloadGroupsGetSamples.java | 25 - .../WorkloadGroupsListByDatabaseSamples.java | 25 - .../tsp-location.yaml | 4 - 1587 files changed, 50544 insertions(+), 121114 deletions(-) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseEncryptionProtectorsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentBaselinesClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentExecuteScansClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentScanResultsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentScansClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentsSettingsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolOperationsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobPrivateEndpointsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseAdvancedThreatProtectionSettingsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseMoveOperationsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdvancedThreatProtectionSettingsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceDtcsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedLedgerDigestUploadsOperationsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/NetworkSecurityPerimeterConfigurationsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerConfigurationOptionsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentBaselinesClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentBaselinesOperationsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentExecuteScansClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentRuleBaselinesClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentRuleBaselinesOperationsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentScanResultOperationsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentScansClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentsSettingsClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/StartStopManagedInstanceSchedulesClient.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SynapseLinkWorkspacesClient.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/{ManagedInstanceLongTermRetentionPolicyProperties.java => BaseLongTermRetentionPolicyProperties.java} (54%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentBaselineSetInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentBaselineSetProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties.java create mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentAutoGeneratedInner.java create mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentPropertiesAutoGenerated.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/{VirtualClusterDnsServersProperties.java => DnsRefreshConfigurationProperties.java} (65%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolOperationInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolOperationProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobPrivateEndpointInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobPrivateEndpointProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionPolicyProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseAdvancedThreatProtectionInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseMoveOperationResultInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseMoveOperationResultProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdvancedThreatProtectionInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceDtcInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceDtcProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedLedgerDigestUploadsInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedLedgerDigestUploadsProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/NetworkSecurityPerimeterConfigurationInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultMIInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultPropertiesMI.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkUpdateProperties.java create mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityAlertsPolicyPropertiesAutoGenerated.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConfigurationOptionInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConfigurationOptionProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentPolicyProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanRecordInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanRecordProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanResultProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanResultsInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/StartStopManagedInstanceScheduleInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/StartStopManagedInstanceScheduleProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SynapseLinkWorkspaceInner.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SynapseLinkWorkspaceProperties.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/{UpdateVirtualClusterDnsServersOperationInner.java => UpdateManagedInstanceDnsServersOperationInner.java} (58%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseEncryptionProtectorsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentBaselinesClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentExecuteScansClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentRuleBaselinesClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentScanResultsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentScansClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentsSettingsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstancePoolOperationsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobPrivateEndpointsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseAdvancedThreatProtectionSettingsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseMoveOperationsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAdvancedThreatProtectionSettingsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceDtcsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedLedgerDigestUploadsOperationsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerConfigurationOptionsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentBaselinesClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentBaselinesOperationsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentExecuteScansClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentRuleBaselinesClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentRuleBaselinesOperationsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentScanResultOperationsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentScansClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentsSettingsClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/StartStopManagedInstanceSchedulesClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SynapseLinkWorkspacesClientImpl.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSqlVulnerabilityAssessmentBaselineSetListResult.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/InstancePoolOperationListResult.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobPrivateEndpointListResult.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseAdvancedThreatProtectionListResult.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseMoveOperationListResult.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceAdvancedThreatProtectionListResult.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceDtcListResult.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedLedgerDigestUploadsListResult.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/NetworkSecurityPerimeterConfigurationListResult.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SQLVulnerabilityAssessmentScanListResult.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerConfigurationOptionListResult.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SqlVulnerabilityAssessmentListResult.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SqlVulnerabilityAssessmentScanRecordListResult.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/StartStopManagedInstanceScheduleListResult.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SynapseLinkWorkspaceListResult.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/AdministratorListResult.java (95%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AlwaysEncryptedEnclaveType.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AuthMetadataLookupModes.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AvailabilityZoneType.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/AzureADOnlyAuthListResult.java (95%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/BackupShortTermRetentionPolicyListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BackupStorageAccessTier.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Baseline.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BaselineAdjustedResult.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BaselineName.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BenchmarkReference.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BlobAuditingPolicyName.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CertificateInfo.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ChangeLongTermRetentionBackupAccessTierParameters.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ClientClassificationSource.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CurrentSensitivityLabelSource.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/DataMaskingRuleListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataSyncParticipantIdentity.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataSyncParticipantIdentityType.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataSyncParticipantUserAssignedIdentity.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/DataWarehouseUserActivitiesListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/DatabaseAdvancedThreatProtectionListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/DatabaseBlobAuditingPolicyListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/DatabaseColumnListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseKey.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseKeyType.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/DatabaseListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/DatabaseOperationListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/DatabaseSchemaListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/DatabaseSecurityAlertListResult.java (95%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineInput.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/DatabaseTableListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/DatabaseUsageListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/DatabaseVulnerabilityAssessmentListResult.java (72%) create mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentListResultAutoGenerated.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/DeletedServerListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DevOpsAuditingSettingsName.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupDatabase.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupSetRole.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupsFailoverRequest.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/DistributedAvailabilityGroupsListResult.java (95%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DtcName.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ElasticPoolListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ElasticPoolOperationListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/EncryptionProtectorListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/EndpointCertificateListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ErrorType.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ExtendedDatabaseBlobAuditingPolicyListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ExtendedServerBlobAuditingPolicyListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExternalGovernanceStatus.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupDatabasesSecondaryType.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/FailoverGroupListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverModeType.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverType.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/FirewallRuleListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FreeLimitExhaustionBehavior.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FreeLimitExhaustionBehaviorCapability.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/GeoBackupPolicyListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/HybridSecondaryUsage.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/HybridSecondaryUsageDetected.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/IPv6FirewallRuleListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ImportExportExtensionsOperationListResult.java (95%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InaccessibilityReason.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/InstanceFailoverGroupListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/InstancePoolListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceRole.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentEditionCapability.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentIdentity.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentIdentityType.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/JobAgentListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentServiceLevelObjectiveCapability.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentUserAssignedIdentity.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentVersionCapability.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/JobCredentialListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/JobExecutionListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/JobListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/JobStepListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/JobTargetGroupListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/JobVersionListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/LedgerDigestUploadsListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LinkRole.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/LogicalDatabaseTransparentDataEncryptionListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/LogicalServerAdvancedThreatProtectionListResult.java (94%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/LogicalServerSecurityAlertPolicyListResult.java (94%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/LongTermRetentionBackupListResult.java (95%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/LongTermRetentionPolicyListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedBackupShortTermRetentionPolicyListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseExtendedAccessibilityInfo.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedDatabaseListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseRestoreDetailsBackupSetProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseRestoreDetailsUnrestorableFileProperties.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedDatabaseSecurityAlertPolicyListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedInstanceAdministratorListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedInstanceAzureADOnlyAuthListResult.java (93%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceDatabaseFormat.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceDtcSecuritySettings.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceDtcTransactionManagerCommunicationSettings.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedInstanceEncryptionProtectorListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedInstanceKeyListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedInstanceListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedInstanceLongTermRetentionBackupListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedInstanceLongTermRetentionPolicyListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedInstanceOperationListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedInstancePrivateEndpointConnectionListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedInstancePrivateLinkListResult.java (72%) create mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePropertiesProvisioningState.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedInstanceQueryStatistics.java (73%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedInstanceVulnerabilityAssessmentListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedLedgerDigestUploadsName.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedLedgerDigestUploadsState.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedServerDnsAliasListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedServerSecurityAlertPolicyListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ManagedTransparentDataEncryptionListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxLimitRangeCapability.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigAccessRule.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigAccessRuleProperties.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigAssociation.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigNetworkSecurityPerimeterRule.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigPerimeter.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigProfile.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPProvisioningIssue.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPProvisioningIssueProperties.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/OperationListResult.java (94%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/OutboundEnvironmentEndpointCollection.java (74%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/OutboundFirewallRuleListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PerDatabaseAutoPauseDelayTimeRange.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Phase.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PhaseDetails.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PricingModel.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/PrivateEndpointConnectionListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/PrivateLinkResourceListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryCheck.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelSource.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/RecoverableDatabaseListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/RecoverableManagedDatabaseListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Remediation.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicaConnectedState.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicaSynchronizationHealth.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ReplicationLinkListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkUpdate.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/RestorableDroppedDatabaseListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/RestorableDroppedManagedDatabaseListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/RestorePointListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RoleChangeType.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RuleSeverity.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RuleStatus.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RuleType.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ScheduleItem.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecondaryInstanceType.java create mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyNameAutoGenerated.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/SecurityEventCollection.java (73%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SeedingModeType.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/SensitivityLabelListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ServerBlobAuditingPolicyListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConfigurationOptionName.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ServerConnectionPolicyListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerCreateMode.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ServerDevOpsAuditSettingsListResult.java (95%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ServerDnsAliasListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ServerKeyListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ServerListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ServerOperationListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ServerTrustCertificatesListResult.java (95%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ServerTrustGroupListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ServerUsageListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/ServerVulnerabilityAssessmentListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SetLegalHoldImmutability.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlVulnerabilityAssessmentName.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlVulnerabilityAssessmentScanError.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlVulnerabilityAssessmentState.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StartStopScheduleName.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/SubscriptionUsageListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SynapseLinkWorkspaceInfoProperties.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/SyncAgentLinkedDatabaseListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/SyncAgentListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/SyncDatabaseIdListResult.java (73%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/SyncFullSchemaPropertiesListResult.java (73%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/SyncGroupListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/SyncGroupLogListResult.java (73%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/SyncMemberListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TimeBasedImmutability.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TimeBasedImmutabilityMode.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/TimeZoneListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/TopQueriesListResult.java (73%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionScanState.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/UsageListResult.java (73%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VaRule.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/VirtualClusterListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/VirtualNetworkRuleListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/VulnerabilityAssessmentScanRecordListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentSystemDatabaseName.java rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/WorkloadClassifierListResult.java (72%) rename sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/{implementation => }/models/WorkloadGroupListResult.java (72%) delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ZonePinningCapability.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/main/resources/META-INF/azure-resourcemanager-sql_metadata.json delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/CapabilitiesListByLocationSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingPoliciesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingRulesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingRulesListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataWarehouseUserActivitiesOperationGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataWarehouseUserActivitiesOperationListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAutomaticTuningGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAutomaticTuningUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsListByTableSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseEncryptionProtectorsRevalidateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseEncryptionProtectorsRevertSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseOperationsCancelSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseOperationsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsListByDatabaseAdvisorSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSchemasGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSchemasListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentBaselinesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentExecuteScanExecuteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentRuleBaselinesDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentScanResultGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentScanResultListByScanSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentScansGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentsSettingsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseTablesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseTablesListBySchemaSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseUsagesListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansExportSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansInitiateScanSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesExportSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesFailoverSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesImportMethodSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListByElasticPoolSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListInaccessibleByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesPauseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesRenameSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesResumeSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesUpgradeDataWarehouseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersListByLocationSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersListSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersRecoverSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsFailoverSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsListByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsSetRoleSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolOperationsCancelSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolOperationsListByElasticPoolSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsFailoverSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsRevalidateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EndpointCertificatesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EndpointCertificatesListByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsFailoverSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsForceFailoverAllowDataLossSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsTryPlannedBeforeForcedFailoverSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesReplaceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesListSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsFailoverSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsForceFailoverAllowDataLossSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsListByLocationSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolOperationsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolOperationsListByInstancePoolSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsGetByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsListByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsListSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsListByAgentSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCancelSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCreateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsListByAgentSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsListByJobSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobPrivateEndpointsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobPrivateEndpointsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobPrivateEndpointsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobPrivateEndpointsListByAgentSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepExecutionsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepExecutionsListByJobExecutionSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsGetByVersionSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsListByJobSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsListByVersionSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsListByJobExecutionSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsListByStepSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsListByAgentSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobVersionsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobVersionsListByJobSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobsListByAgentSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationDisableSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsChangeAccessTierByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsChangeAccessTierSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsCopyByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsCopySamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsDeleteByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsGetByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByLocationSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupLocationSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsLockTimeBasedImmutabilityByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsLockTimeBasedImmutabilitySamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsRemoveLegalHoldImmutabilityByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsRemoveLegalHoldImmutabilitySamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsRemoveTimeBasedImmutabilityByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsRemoveTimeBasedImmutabilitySamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsSetLegalHoldImmutabilityByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsSetLegalHoldImmutabilitySamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsUpdateByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsGetByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByLocationSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowOptionsOperationGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowsOperationCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowsOperationGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseAdvancedThreatProtectionSettingsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsListByTableSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseMoveOperationsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseMoveOperationsListByLocationSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseQueriesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseQueriesListByQuerySamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseRecommendedSensitivityLabelsUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseRestoreDetailsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSchemasGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSchemasListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityEventsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsDisableRecommendationSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsEnableRecommendationSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListCurrentByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTablesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTablesListBySchemaSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansExportSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansInitiateScanSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCancelMoveSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCompleteMoveSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCompleteRestoreSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesListByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesListInaccessibleByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesReevaluateInaccessibleDatabaseStateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesStartMoveSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsListByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdvancedThreatProtectionSettingsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsListByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceDtcsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceDtcsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceDtcsListByManagedInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsListByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsRevalidateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysListByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsCancelSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsListByManagedInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsListByManagedInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateLinkResourcesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateLinkResourcesListByManagedInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceTdeCertificatesCreateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsListByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesFailoverSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesGetByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByInstancePoolSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByManagedInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesReevaluateInaccessibleDatabaseStateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesRefreshStatusSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesStartSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesStopSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesValidateAzureKeyVaultEncryptionKeySamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedLedgerDigestUploadsOperationCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedLedgerDigestUploadsOperationDisableSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedLedgerDigestUploadsOperationGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedLedgerDigestUploadsOperationListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesAcquireSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesListByManagedInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesListByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/NetworkSecurityPerimeterConfigurationsListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OperationsListSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateLinkResourcesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateLinkResourcesListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecommendedSensitivityLabelsUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableDatabasesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableDatabasesListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableManagedDatabasesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableManagedDatabasesListByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksFailoverAllowDataLossSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksFailoverSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedDatabasesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedDatabasesListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedManagedDatabasesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedManagedDatabasesListByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsCreateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsDisableRecommendationSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsEnableRecommendationSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListCurrentByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListRecommendedByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAutomaticTuningGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAutomaticTuningUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConfigurationOptionsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConfigurationOptionsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConfigurationOptionsListByManagedInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesAcquireSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerOperationsListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesListByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsListByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsListByLocationSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerUsagesListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersCheckNameAvailabilitySamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersGetByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersImportDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersListByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersListSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersRefreshStatusSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlAgentCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlAgentGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentBaselineGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentBaselinesOperationCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentExecuteScanExecuteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentRuleBaselineGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentRuleBaselineListByBaselineSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentRuleBaselinesOperationDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentScanResultOperationGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentScanResultOperationListByScanSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentScansGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentsSettingsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentsSettingsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentsSettingsListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/StartStopManagedInstanceSchedulesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/StartStopManagedInstanceSchedulesDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/StartStopManagedInstanceSchedulesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/StartStopManagedInstanceSchedulesListByInstanceSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SubscriptionUsagesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SubscriptionUsagesListByLocationSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SynapseLinkWorkspacesListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsGenerateKeySamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsListLinkedDatabasesSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsCancelSyncSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListHubSchemasSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListLogsSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListSyncDatabaseIdsSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsRefreshHubSchemaSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsTriggerSyncSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersListBySyncGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersListMemberSchemasSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersRefreshMemberSchemaSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TdeCertificatesCreateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TimeZonesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TimeZonesListByLocationSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsResumeSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsSuspendSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/UsagesListByInstancePoolSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersGetByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersListByResourceGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersListSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersUpdateDnsServersSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesListByServerSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersListByWorkloadGroupSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsCreateOrUpdateSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsDeleteSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsGetSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsListByDatabaseSamples.java delete mode 100644 sdk/sql/azure-resourcemanager-sql/tsp-location.yaml diff --git a/sdk/sql/azure-resourcemanager-sql/CHANGELOG.md b/sdk/sql/azure-resourcemanager-sql/CHANGELOG.md index 3f8b4a7113bd..71453dab0ecd 100644 --- a/sdk/sql/azure-resourcemanager-sql/CHANGELOG.md +++ b/sdk/sql/azure-resourcemanager-sql/CHANGELOG.md @@ -1,15 +1,5 @@ # Release History -## 2.54.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - ## 2.53.8 (2026-05-05) ### Other Changes @@ -19,6 +9,7 @@ - Upgraded `azure-resourcemanager-storage` from `2.55.3` to version `2.55.5`. - Upgraded `azure-resourcemanager-resources` from `2.54.0` to version `2.54.1`. + ## 2.53.7 (2026-03-30) ### Other Changes @@ -37,13 +28,16 @@ - Upgraded `azure-resourcemanager-storage` from `2.55.1` to version `2.55.2`. + ## 2.53.5 (2025-11-24) ### Other Changes #### Dependency Updates -- Updated core dependency from resources. +- Upgraded `azure-resourcemanager-storage` from `2.55.0` to version `2.55.1`. +- Upgraded `azure-resourcemanager-resources` from `2.53.3` to version `2.53.5`. + ## 2.53.4 (2025-10-27) @@ -51,7 +45,9 @@ #### Dependency Updates -- Updated core dependency from resources. +- Upgraded `azure-resourcemanager-storage` from `2.54.0` to version `2.55.0`. +- Upgraded `azure-resourcemanager-resources` from `2.53.2` to version `2.53.3`. + ## 2.53.3 (2025-09-24) @@ -391,6 +387,7 @@ - Renamed class `ImportExtensionRequest` to `ImportExistingDatabaseDefinition`. - Changed type of `StorageKeyType` from `enum` to `ExpandableStringEnum`. + ## 2.22.0 (2022-12-23) ### Other Changes diff --git a/sdk/sql/azure-resourcemanager-sql/README.md b/sdk/sql/azure-resourcemanager-sql/README.md index 406147b7ff16..aa7c8c55dd01 100644 --- a/sdk/sql/azure-resourcemanager-sql/README.md +++ b/sdk/sql/azure-resourcemanager-sql/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-sql - 2.53.7 + 2.53.8 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/sql/azure-resourcemanager-sql/assets.json b/sdk/sql/azure-resourcemanager-sql/assets.json index 74882f72acc8..df25c4f41ff4 100644 --- a/sdk/sql/azure-resourcemanager-sql/assets.json +++ b/sdk/sql/azure-resourcemanager-sql/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/sql/azure-resourcemanager-sql", - "Tag": "java/sql/azure-resourcemanager-sql_2dccdeacd3" + "Tag": "java/sql/azure-resourcemanager-sql_2a772db10d" } diff --git a/sdk/sql/azure-resourcemanager-sql/pom.xml b/sdk/sql/azure-resourcemanager-sql/pom.xml index 296b43d92dc2..1701123cbbbb 100644 --- a/sdk/sql/azure-resourcemanager-sql/pom.xml +++ b/sdk/sql/azure-resourcemanager-sql/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-sql - 2.54.0-beta.2 + 2.53.8 jar Microsoft Azure SDK for Sql Management @@ -63,12 +63,12 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.54.1 + 2.54.0 com.azure.resourcemanager azure-resourcemanager-storage - 2.56.0 + 2.55.4 org.junit.jupiter diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupShortTermRetentionPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupShortTermRetentionPoliciesClient.java index 74550800d630..567e489a6575 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupShortTermRetentionPoliciesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupShortTermRetentionPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -26,10 +26,60 @@ public interface BackupShortTermRetentionPoliciesClient { /** * Gets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a database's short term retention policy as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); + + /** + * Gets a database's short term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a database's short term retention policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); + + /** + * Gets a database's short term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a database's short term retention policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); + + /** + * Gets a database's short term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param policyName The policy name. Should always be "default". * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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,10 +93,11 @@ Mono> getWithResponseAsync(String /** * Gets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -59,10 +110,11 @@ Mono getAsync(String resourceGroupName, Str /** * Gets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @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. @@ -76,10 +128,11 @@ Response getWithResponse(String resourceGro /** * Gets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -92,10 +145,11 @@ BackupShortTermRetentionPolicyInner get(String resourceGroupName, String serverN /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -109,10 +163,11 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -127,10 +182,11 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -145,10 +201,11 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -164,10 +221,11 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -181,10 +239,11 @@ Mono createOrUpdateAsync(String resourceGro /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -198,10 +257,11 @@ BackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupName, Str /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -216,10 +276,11 @@ BackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupName, Str /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -233,10 +294,11 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -251,10 +313,11 @@ PollerFlux, BackupShortTermReten /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -269,10 +332,11 @@ SyncPoller, BackupShortTermReten /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -288,10 +352,11 @@ SyncPoller, BackupShortTermReten /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -305,10 +370,11 @@ Mono updateAsync(String resourceGroupName, /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -322,10 +388,11 @@ BackupShortTermRetentionPolicyInner update(String resourceGroupName, String serv /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -336,50 +403,4 @@ BackupShortTermRetentionPolicyInner update(String resourceGroupName, String serv @ServiceMethod(returns = ReturnType.SINGLE) BackupShortTermRetentionPolicyInner update(String resourceGroupName, String serverName, String databaseName, ShortTermRetentionPolicyName policyName, BackupShortTermRetentionPolicyInner parameters, Context context); - - /** - * Gets a database's short term retention policy. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's short term retention policy as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets a database's short term retention policy. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's short term retention policy as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets a database's short term retention policy. - * - * @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 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 database's short term retention policy as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/CapabilitiesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/CapabilitiesClient.java index f76a793b80fb..3adb52ec4590 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/CapabilitiesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/CapabilitiesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingPoliciesClient.java index 845a9d4cb5ea..0a9e75f8e144 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingPoliciesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -19,7 +19,8 @@ public interface DataMaskingPoliciesClient { /** * Gets the database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -35,7 +36,8 @@ Mono> getWithResponseAsync(String resourceGroup /** * Gets the database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -51,7 +53,8 @@ Mono getAsync(String resourceGroupName, String serverNam /** * Gets the database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -68,7 +71,8 @@ Response getWithResponse(String resourceGroupName, Strin /** * Gets the database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -84,7 +88,8 @@ DataMaskingPolicyInner get(String resourceGroupName, String serverName, String d /** * Creates or updates a database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -101,7 +106,8 @@ Mono> createOrUpdateWithResponseAsync(String re /** * Creates or updates a database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -118,7 +124,8 @@ Mono createOrUpdateAsync(String resourceGroupName, Strin /** * Creates or updates a database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -137,7 +144,8 @@ Response createOrUpdateWithResponse(String resourceGroup /** * Creates or updates a database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingRulesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingRulesClient.java index 5a755f9abf34..982f97fa075d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingRulesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingRulesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -21,27 +21,11 @@ public interface DataMaskingRulesClient { /** * Gets a list of database data masking rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. - * @param skip The number of elements in the collection to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 database data masking rules as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, DataMaskingPolicyName dataMaskingPolicyName, Long skip); - - /** - * Gets a list of database data masking rules. - * - * @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 dataMaskingPolicyName The name of the database for which the data masking policy applies. + * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -54,10 +38,11 @@ PagedFlux listByDatabaseAsync(String resourceGroupName, St /** * Gets a list of database data masking rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. + * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -70,11 +55,11 @@ PagedIterable listByDatabase(String resourceGroupName, Str /** * Gets a list of database data masking rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. - * @param skip The number of elements in the collection to skip. + * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. * @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. @@ -83,12 +68,13 @@ PagedIterable listByDatabase(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, - DataMaskingPolicyName dataMaskingPolicyName, Long skip, Context context); + DataMaskingPolicyName dataMaskingPolicyName, Context context); /** * Creates or updates a database data masking rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -107,7 +93,8 @@ Mono> createOrUpdateWithResponseAsync(String reso /** * Creates or updates a database data masking rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -125,7 +112,8 @@ Mono createOrUpdateAsync(String resourceGroupName, String /** * Creates or updates a database data masking rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -145,7 +133,8 @@ Response createOrUpdateWithResponse(String resourceGroupNa /** * Creates or updates a database data masking rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataWarehouseUserActivitiesOperationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataWarehouseUserActivitiesOperationsClient.java index 5ca2448e7d60..0887bb781c07 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataWarehouseUserActivitiesOperationsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DataWarehouseUserActivitiesOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -20,119 +20,123 @@ */ public interface DataWarehouseUserActivitiesOperationsClient { /** - * Gets the user activities of a data warehouse which includes running and suspended queries. + * List the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user activities of a data warehouse which includes running and suspended queries along with - * {@link Response} on successful completion of {@link Mono}. + * @return user activities of a data warehouse as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** - * Gets the user activities of a data warehouse which includes running and suspended queries. + * List the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user activities of a data warehouse which includes running and suspended queries on successful - * completion of {@link Mono}. + * @return user activities of a data warehouse as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String databaseName, - DataWarehouseUserActivityName dataWarehouseUserActivityName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); /** - * Gets the user activities of a data warehouse which includes running and suspended queries. + * List the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @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 user activities of a data warehouse which includes running and suspended queries along with - * {@link Response}. + * @return user activities of a data warehouse as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Gets the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user activities of a data warehouse which includes running and suspended queries. + * @return the user activities of a data warehouse which includes running and suspended queries along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataWarehouseUserActivitiesInner get(String resourceGroupName, String serverName, String databaseName, - DataWarehouseUserActivityName dataWarehouseUserActivityName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName); /** - * List the user activities of a data warehouse which includes running and suspended queries. + * Gets the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DataWarehouseUserActivities list operation as paginated response with - * {@link PagedFlux}. + * @return the user activities of a data warehouse which includes running and suspended queries on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + DataWarehouseUserActivityName dataWarehouseUserActivityName); /** - * List the user activities of a data warehouse which includes running and suspended queries. + * Gets the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param dataWarehouseUserActivityName The activity name of the data warehouse. + * @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 response of a DataWarehouseUserActivities list operation as paginated response with - * {@link PagedIterable}. + * @return the user activities of a data warehouse which includes running and suspended queries along with + * {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName, Context context); /** - * List the user activities of a data warehouse which includes running and suspended queries. + * Gets the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param context The context to associate with this operation. + * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DataWarehouseUserActivities list operation as paginated response with - * {@link PagedIterable}. + * @return the user activities of a data warehouse which includes running and suspended queries. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DataWarehouseUserActivitiesInner get(String resourceGroupName, String serverName, String databaseName, + DataWarehouseUserActivityName dataWarehouseUserActivityName); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvancedThreatProtectionSettingsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvancedThreatProtectionSettingsClient.java index c62ff51f3ae1..6afb3af3e168 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvancedThreatProtectionSettingsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvancedThreatProtectionSettingsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -19,10 +19,60 @@ * DatabaseAdvancedThreatProtectionSettingsClient. */ public interface DatabaseAdvancedThreatProtectionSettingsClient { + /** + * Gets a list of database's Advanced Threat Protection states. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a list of database's Advanced Threat Protection states as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); + + /** + * Gets a list of database's Advanced Threat Protection states. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a list of database's Advanced Threat Protection states as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); + + /** + * Gets a list of database's Advanced Threat Protection states. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a list of database's Advanced Threat Protection states as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); + /** * Gets a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -39,7 +89,8 @@ Mono> getWithResponseAsync(Strin /** * Gets a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -55,7 +106,8 @@ Mono getAsync(String resourceGroupName, S /** * Gets a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -72,7 +124,8 @@ Response getWithResponse(String resourceG /** * Gets a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -88,7 +141,8 @@ DatabaseAdvancedThreatProtectionInner get(String resourceGroupName, String serve /** * Creates or updates a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -107,7 +161,8 @@ Mono> createOrUpdateWithResponse /** * Creates or updates a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -125,7 +180,8 @@ Mono createOrUpdateAsync(String resourceG /** * Creates or updates a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -144,7 +200,8 @@ Response createOrUpdateWithResponse(Strin /** * Creates or updates a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. @@ -158,50 +215,4 @@ Response createOrUpdateWithResponse(Strin DatabaseAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, DatabaseAdvancedThreatProtectionInner parameters); - - /** - * Gets a list of database's Advanced Threat Protection states. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 database's Advanced Threat Protection states as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets a list of database's Advanced Threat Protection states. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 database's Advanced Threat Protection states as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets a list of database's Advanced Threat Protection states. - * - * @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 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 database's Advanced Threat Protection states as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvisorsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvisorsClient.java index cf75d68ea063..a427eb984621 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvisorsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvisorsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -17,196 +17,208 @@ */ public interface DatabaseAdvisorsClient { /** - * Gets a database advisor. + * Gets a list of database advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param advisorName The name of the Database Advisor. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database advisor along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database advisors along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, String databaseName, - String advisorName); + Mono>> listByDatabaseWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String expand); /** - * Gets a database advisor. + * Gets a list of database advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param advisorName The name of the Database Advisor. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database advisor on successful completion of {@link Mono}. + * @return a list of database advisors on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String databaseName, String advisorName); + Mono> listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName); /** - * Gets a database advisor. + * Gets a list of database advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param advisorName The name of the Database Advisor. + * @param expand The child resources to include in the response. * @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 database advisor along with {@link Response}. + * @return a list of database advisors along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - String advisorName, Context context); + Response> listByDatabaseWithResponse(String resourceGroupName, String serverName, + String databaseName, String expand, Context context); /** - * Gets a database advisor. + * Gets a list of database advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param advisorName The name of the Database Advisor. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database advisor. + * @return a list of database advisors. */ @ServiceMethod(returns = ReturnType.SINGLE) - AdvisorInner get(String resourceGroupName, String serverName, String databaseName, String advisorName); + List listByDatabase(String resourceGroupName, String serverName, String databaseName); /** - * Updates a database advisor. + * Gets a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of - * {@link Mono}. + * @return a database advisor along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String advisorName, AdvisorInner parameters); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, String databaseName, + String advisorName); /** - * Updates a database advisor. + * Gets a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor on successful completion of {@link Mono}. + * @return a database advisor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, String databaseName, String advisorName, - AdvisorInner parameters); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, String advisorName); /** - * Updates a database advisor. + * Gets a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor along with {@link Response}. + * @return a database advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String serverName, String databaseName, - String advisorName, AdvisorInner parameters, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String advisorName, Context context); /** - * Updates a database advisor. + * Gets a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor. + * @return a database advisor. */ @ServiceMethod(returns = ReturnType.SINGLE) - AdvisorInner update(String resourceGroupName, String serverName, String databaseName, String advisorName, - AdvisorInner parameters); + AdvisorInner get(String resourceGroupName, String serverName, String databaseName, String advisorName); /** - * Gets a list of database advisors. + * Updates a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param expand The child resources to include in the response. + * @param advisorName The name of the Database Advisor. + * @param parameters The requested advisor resource 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 list of database advisors along with {@link Response} on successful completion of {@link Mono}. + * @return database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> listByDatabaseWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String expand); + Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, AdvisorInner parameters); /** - * Gets a list of database advisors. + * Updates a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param advisorName The name of the Database Advisor. + * @param parameters The requested advisor resource 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 list of database advisors on successful completion of {@link Mono}. + * @return database, Server or Elastic Pool Advisor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName); + Mono updateAsync(String resourceGroupName, String serverName, String databaseName, String advisorName, + AdvisorInner parameters); /** - * Gets a list of database advisors. + * Updates a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param expand The child resources to include in the response. + * @param advisorName The name of the Database Advisor. + * @param parameters The requested advisor resource 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 list of database advisors along with {@link Response}. + * @return database, Server or Elastic Pool Advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> listByDatabaseWithResponse(String resourceGroupName, String serverName, - String databaseName, String expand, Context context); + Response updateWithResponse(String resourceGroupName, String serverName, String databaseName, + String advisorName, AdvisorInner parameters, Context context); /** - * Gets a list of database advisors. + * Updates a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param advisorName The name of the Database Advisor. + * @param parameters The requested advisor resource 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 list of database advisors. + * @return database, Server or Elastic Pool Advisor. */ @ServiceMethod(returns = ReturnType.SINGLE) - List listByDatabase(String resourceGroupName, String serverName, String databaseName); + AdvisorInner update(String resourceGroupName, String serverName, String databaseName, String advisorName, + AdvisorInner parameters); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAutomaticTuningsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAutomaticTuningsClient.java index bd811de35b3f..547412083446 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAutomaticTuningsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAutomaticTuningsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,7 +18,8 @@ public interface DatabaseAutomaticTuningsClient { /** * Gets a database's automatic tuning. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -33,7 +34,8 @@ Mono> getWithResponseAsync(String resourc /** * Gets a database's automatic tuning. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,7 +49,8 @@ Mono> getWithResponseAsync(String resourc /** * Gets a database's automatic tuning. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -63,7 +66,8 @@ Response getWithResponse(String resourceGroupName, /** * Gets a database's automatic tuning. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,7 +81,8 @@ Response getWithResponse(String resourceGroupName, /** * Update automatic tuning properties for target database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. @@ -93,7 +98,8 @@ Mono> updateWithResponseAsync(String reso /** * Update automatic tuning properties for target database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. @@ -109,7 +115,8 @@ Mono updateAsync(String resourceGroupName, String /** * Update automatic tuning properties for target database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. @@ -126,7 +133,8 @@ Response updateWithResponse(String resourceGroupNa /** * Update automatic tuning properties for target database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseBlobAuditingPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseBlobAuditingPoliciesClient.java index b8b39e604e02..3002606d784a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseBlobAuditingPoliciesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseBlobAuditingPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -11,7 +11,6 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.DatabaseBlobAuditingPolicyInner; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyName; import reactor.core.publisher.Mono; /** @@ -19,186 +18,183 @@ */ public interface DatabaseBlobAuditingPoliciesClient { /** - * Gets a database's blob auditing policy. + * Lists auditing settings of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's blob auditing policy along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database auditing settings as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, BlobAuditingPolicyName blobAuditingPolicyName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** - * Gets a database's blob auditing policy. + * Lists auditing settings of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's blob auditing policy on successful completion of {@link Mono}. + * @return a list of database auditing settings as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String databaseName, - BlobAuditingPolicyName blobAuditingPolicyName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); /** - * Gets a database's blob auditing policy. + * Lists auditing settings of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @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 database's blob auditing policy along with {@link Response}. + * @return a list of database auditing settings as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); /** * Gets a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's blob auditing policy. + * @return a database's blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseBlobAuditingPolicyInner get(String resourceGroupName, String serverName, String databaseName, - BlobAuditingPolicyName blobAuditingPolicyName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName); /** - * Creates or updates a database's blob auditing policy. + * Gets a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. - * @param parameters The database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database blob auditing policy along with {@link Response} on successful completion of {@link Mono}. + * @return a database's blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, - DatabaseBlobAuditingPolicyInner parameters); + Mono getAsync(String resourceGroupName, String serverName, String databaseName); /** - * Creates or updates a database's blob auditing policy. + * Gets a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. - * @param parameters The database blob auditing policy. + * @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 database blob auditing policy on successful completion of {@link Mono}. + * @return a database's blob auditing policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String serverName, - String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, DatabaseBlobAuditingPolicyInner parameters); + Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, Context context); /** - * Creates or updates a database's blob auditing policy. + * Gets a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. - * @param parameters The database blob auditing policy. - * @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 database blob auditing policy along with {@link Response}. + * @return a database's blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String serverName, - String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, DatabaseBlobAuditingPolicyInner parameters, - Context context); + DatabaseBlobAuditingPolicyInner get(String resourceGroupName, String serverName, String databaseName); /** * Creates or updates a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters The database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database blob auditing policy. + * @return a database blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, - BlobAuditingPolicyName blobAuditingPolicyName, DatabaseBlobAuditingPolicyInner parameters); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters); /** - * Lists auditing settings of a database. + * Creates or updates a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseBlobAuditingPolicy list operation as paginated response with {@link PagedFlux}. + * @return a database blob auditing policy on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseBlobAuditingPolicyInner parameters); /** - * Lists auditing settings of a database. + * Creates or updates a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The database blob auditing policy. + * @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 response of a DatabaseBlobAuditingPolicy list operation as paginated response with - * {@link PagedIterable}. + * @return a database blob auditing policy along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String databaseName, DatabaseBlobAuditingPolicyInner parameters, Context context); /** - * Lists auditing settings of a database. + * Creates or updates a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param context The context to associate with this operation. + * @param parameters The database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseBlobAuditingPolicy list operation as paginated response with - * {@link PagedIterable}. + * @return a database blob auditing policy. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DatabaseBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + DatabaseBlobAuditingPolicyInner parameters); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseColumnsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseColumnsClient.java index 3a5297476648..590db9b5aac5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseColumnsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseColumnsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -19,82 +19,85 @@ */ public interface DatabaseColumnsClient { /** - * Get database column. + * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. + * @param skiptoken An opaque token that identifies a starting point in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database column along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName, + List schema, List table, List column, List orderBy, String skiptoken); /** - * Get database column. + * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database column on successful completion of {@link Mono}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** - * Get database column. + * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @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 database column along with {@link Response}. + * @return a list of database columns as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName); /** - * Get database column. + * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. + * @param skiptoken An opaque token that identifies a starting point in the collection. + * @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 database column. + * @return a list of database columns as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseColumnInner get(String resourceGroupName, String serverName, String databaseName, String schemaName, - String tableName, String columnName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, + List schema, List table, List column, List orderBy, String skiptoken, + Context context); /** * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -103,7 +106,7 @@ DatabaseColumnInner get(String resourceGroupName, String serverName, String data * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseColumn list operation as paginated response with {@link PagedFlux}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByTableAsync(String resourceGroupName, String serverName, String databaseName, @@ -112,7 +115,8 @@ PagedFlux listByTableAsync(String resourceGroupName, String /** * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -120,7 +124,7 @@ PagedFlux listByTableAsync(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 response of a DatabaseColumn list operation as paginated response with {@link PagedFlux}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByTableAsync(String resourceGroupName, String serverName, String databaseName, @@ -129,7 +133,8 @@ PagedFlux listByTableAsync(String resourceGroupName, String /** * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -137,7 +142,7 @@ PagedFlux listByTableAsync(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 response of a DatabaseColumn list operation as paginated response with {@link PagedIterable}. + * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByTable(String resourceGroupName, String serverName, String databaseName, @@ -146,7 +151,8 @@ PagedIterable listByTable(String resourceGroupName, String /** * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -156,80 +162,86 @@ PagedIterable listByTable(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 response of a DatabaseColumn list operation as paginated response with {@link PagedIterable}. + * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByTable(String resourceGroupName, String serverName, String databaseName, String schemaName, String tableName, String filter, Context context); /** - * List database columns. + * Get database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schema The schema parameter. - * @param table The table parameter. - * @param column The column parameter. - * @param orderBy The orderBy parameter. - * @param skiptoken An opaque token that identifies a starting point in the collection. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseColumn list operation as paginated response with {@link PagedFlux}. + * @return database column along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName, - List schema, List table, List column, List orderBy, String skiptoken); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName); /** - * List database columns. + * Get database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseColumn list operation as paginated response with {@link PagedFlux}. + * @return database column on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName); /** - * List database columns. + * Get database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @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 response of a DatabaseColumn list operation as paginated response with {@link PagedIterable}. + * @return database column along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName, Context context); /** - * List database columns. + * Get database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schema The schema parameter. - * @param table The table parameter. - * @param column The column parameter. - * @param orderBy The orderBy parameter. - * @param skiptoken An opaque token that identifies a starting point in the collection. - * @param context The context to associate with this operation. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseColumn list operation as paginated response with {@link PagedIterable}. + * @return database column. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, - List schema, List table, List column, List orderBy, String skiptoken, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DatabaseColumnInner get(String resourceGroupName, String serverName, String databaseName, String schemaName, + String tableName, String columnName); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseEncryptionProtectorsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseEncryptionProtectorsClient.java deleted file mode 100644 index 1e63e5da37b3..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseEncryptionProtectorsClient.java +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.EncryptionProtectorName; -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 DatabaseEncryptionProtectorsClient. - */ -public interface DatabaseEncryptionProtectorsClient { - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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 Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> revalidateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, EncryptionProtectorName encryptionProtectorName); - - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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 PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginRevalidateAsync(String resourceGroupName, String serverName, - String databaseName, EncryptionProtectorName encryptionProtectorName); - - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRevalidate(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName); - - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRevalidate(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName, Context context); - - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono revalidateAsync(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName); - - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void revalidate(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName); - - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void revalidate(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName, Context context); - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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 Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> revertWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, EncryptionProtectorName encryptionProtectorName); - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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 PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginRevertAsync(String resourceGroupName, String serverName, - String databaseName, EncryptionProtectorName encryptionProtectorName); - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRevert(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName); - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRevert(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName, Context context); - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono revertAsync(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName); - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void revert(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName); - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void revert(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseExtensionsOperationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseExtensionsOperationsClient.java index 639363b69ebf..d751f04d649e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseExtensionsOperationsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseExtensionsOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,10 +23,60 @@ * An instance of this class provides access to all the operations defined in DatabaseExtensionsOperationsClient. */ public interface DatabaseExtensionsOperationsClient { + /** + * List database extension. This will return an empty list as it is not supported. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 import export operation extensions list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName); + + /** + * List database extension. This will return an empty list as it is not supported. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 import export operation extensions list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName); + + /** + * List database extension. This will return an empty list as it is not supported. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 import export operation extensions list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, Context context); + /** * Gets a database extension. This will return resource not found as it is not supported. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -42,7 +92,8 @@ Mono> getWithResponseAsync(String resourceGroupName, String serve /** * Gets a database extension. This will return resource not found as it is not supported. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -57,7 +108,8 @@ Mono> getWithResponseAsync(String resourceGroupName, String serve /** * Gets a database extension. This will return resource not found as it is not supported. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -74,7 +126,8 @@ Response getWithResponse(String resourceGroupName, String serverName, Stri /** * Gets a database extension. This will return resource not found as it is not supported. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -88,7 +141,8 @@ Response getWithResponse(String resourceGroupName, String serverName, Stri /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -106,7 +160,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -124,7 +179,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -142,7 +198,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -161,7 +218,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -178,7 +236,8 @@ Mono createOrUpdateAsync(String reso /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -195,7 +254,8 @@ ImportExportExtensionsOperationResultInner createOrUpdate(String resourceGroupNa /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -209,50 +269,4 @@ ImportExportExtensionsOperationResultInner createOrUpdate(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) ImportExportExtensionsOperationResultInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, String extensionName, DatabaseExtensions parameters, Context context); - - /** - * List database extension. This will return an empty list as it is not supported. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return import export operation extensions list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, - String serverName, String databaseName); - - /** - * List database extension. This will return an empty list as it is not supported. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return import export operation extensions list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String serverName, String databaseName); - - /** - * List database extension. This will return an empty list as it is not supported. - * - * @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 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 import export operation extensions list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String serverName, String databaseName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseOperationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseOperationsClient.java index 53b5a54cef9f..7d0422dcb774 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseOperationsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -21,7 +21,8 @@ public interface DatabaseOperationsClient { /** * Gets a list of operations performed on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -36,7 +37,8 @@ PagedFlux listByDatabaseAsync(String resourceGroupName, /** * Gets a list of operations performed on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -51,7 +53,8 @@ PagedIterable listByDatabase(String resourceGroupName, S /** * Gets a list of operations performed on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -67,7 +70,8 @@ PagedIterable listByDatabase(String resourceGroupName, S /** * Cancels the asynchronous operation on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. @@ -83,7 +87,8 @@ Mono> cancelWithResponseAsync(String resourceGroupName, String se /** * Cancels the asynchronous operation on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. @@ -98,7 +103,8 @@ Mono> cancelWithResponseAsync(String resourceGroupName, String se /** * Cancels the asynchronous operation on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. @@ -115,7 +121,8 @@ Response cancelWithResponse(String resourceGroupName, String serverName, S /** * Cancels the asynchronous operation on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseRecommendedActionsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseRecommendedActionsClient.java index 063737a99595..4ac75fb34868 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseRecommendedActionsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseRecommendedActionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -17,212 +17,224 @@ */ public interface DatabaseRecommendedActionsClient { /** - * Gets a database recommended action. + * Gets list of Database Recommended Actions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param recommendedActionName The name of Database Recommended Action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database recommended action along with {@link Response} on successful completion of {@link Mono}. + * @return list of Database Recommended Actions along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String advisorName, String recommendedActionName); + Mono>> listByDatabaseAdvisorWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String advisorName); /** - * Gets a database recommended action. + * Gets list of Database Recommended Actions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param recommendedActionName The name of Database Recommended Action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database recommended action on successful completion of {@link Mono}. + * @return list of Database Recommended Actions on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String databaseName, - String advisorName, String recommendedActionName); + Mono> listByDatabaseAdvisorAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName); /** - * Gets a database recommended action. + * Gets list of Database Recommended Actions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param recommendedActionName The name of Database Recommended Action. * @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 database recommended action along with {@link Response}. + * @return list of Database Recommended Actions along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - String advisorName, String recommendedActionName, Context context); + Response> listByDatabaseAdvisorWithResponse(String resourceGroupName, + String serverName, String databaseName, String advisorName, Context context); /** - * Gets a database recommended action. + * Gets list of Database Recommended Actions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param recommendedActionName The name of Database Recommended Action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database recommended action. + * @return list of Database Recommended Actions. */ @ServiceMethod(returns = ReturnType.SINGLE) - RecommendedActionInner get(String resourceGroupName, String serverName, String databaseName, String advisorName, - String recommendedActionName); + List listByDatabaseAdvisor(String resourceGroupName, String serverName, String databaseName, + String advisorName); /** - * Updates a database recommended action. + * Gets a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. * @param recommendedActionName The name of Database Recommended Action. - * @param parameters The requested recommended action resource 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 database, Server or Elastic Pool Recommended Action along with {@link Response} on successful completion - * of {@link Mono}. + * @return a database recommended action along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String advisorName, String recommendedActionName, RecommendedActionInner parameters); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName); /** - * Updates a database recommended action. + * Gets a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. * @param recommendedActionName The name of Database Recommended Action. - * @param parameters The requested recommended action resource 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 database, Server or Elastic Pool Recommended Action on successful completion of {@link Mono}. + * @return a database recommended action on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, String databaseName, - String advisorName, String recommendedActionName, RecommendedActionInner parameters); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String advisorName, String recommendedActionName); /** - * Updates a database recommended action. + * Gets a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. * @param recommendedActionName The name of Database Recommended Action. - * @param parameters The requested recommended action resource 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 database, Server or Elastic Pool Recommended Action along with {@link Response}. + * @return a database recommended action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String serverName, - String databaseName, String advisorName, String recommendedActionName, RecommendedActionInner parameters, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String advisorName, String recommendedActionName, Context context); /** - * Updates a database recommended action. + * Gets a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. * @param recommendedActionName The name of Database Recommended Action. - * @param parameters The requested recommended action resource 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 database, Server or Elastic Pool Recommended Action. + * @return a database recommended action. */ @ServiceMethod(returns = ReturnType.SINGLE) - RecommendedActionInner update(String resourceGroupName, String serverName, String databaseName, String advisorName, - String recommendedActionName, RecommendedActionInner parameters); + RecommendedActionInner get(String resourceGroupName, String serverName, String databaseName, String advisorName, + String recommendedActionName); /** - * Gets list of Database Recommended Actions. + * Updates a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. + * @param recommendedActionName The name of Database Recommended Action. + * @param parameters The requested recommended action resource 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 list of Database Recommended Actions along with {@link Response} on successful completion of - * {@link Mono}. + * @return database, Server or Elastic Pool Recommended Action along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> listByDatabaseAdvisorWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, String advisorName); + Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName, RecommendedActionInner parameters); /** - * Gets list of Database Recommended Actions. + * Updates a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. + * @param recommendedActionName The name of Database Recommended Action. + * @param parameters The requested recommended action resource 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 list of Database Recommended Actions on successful completion of {@link Mono}. + * @return database, Server or Elastic Pool Recommended Action on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listByDatabaseAdvisorAsync(String resourceGroupName, String serverName, - String databaseName, String advisorName); + Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String advisorName, String recommendedActionName, RecommendedActionInner parameters); /** - * Gets list of Database Recommended Actions. + * Updates a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. + * @param recommendedActionName The name of Database Recommended Action. + * @param parameters The requested recommended action resource 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 list of Database Recommended Actions along with {@link Response}. + * @return database, Server or Elastic Pool Recommended Action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> listByDatabaseAdvisorWithResponse(String resourceGroupName, - String serverName, String databaseName, String advisorName, Context context); + Response updateWithResponse(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName, RecommendedActionInner parameters, + Context context); /** - * Gets list of Database Recommended Actions. + * Updates a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. + * @param recommendedActionName The name of Database Recommended Action. + * @param parameters The requested recommended action resource 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 list of Database Recommended Actions. + * @return database, Server or Elastic Pool Recommended Action. */ @ServiceMethod(returns = ReturnType.SINGLE) - List listByDatabaseAdvisor(String resourceGroupName, String serverName, String databaseName, - String advisorName); + RecommendedActionInner update(String resourceGroupName, String serverName, String databaseName, String advisorName, + String recommendedActionName, RecommendedActionInner parameters); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSchemasClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSchemasClient.java index b4215065bae8..938cedc6a78c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSchemasClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSchemasClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,128 +18,136 @@ */ public interface DatabaseSchemasClient { /** - * Get database schema. + * List database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database schema along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database schemas as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName, + String filter); /** - * Get database schema. + * List database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database schema on successful completion of {@link Mono}. + * @return a list of database schemas as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String databaseName, - String schemaName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** - * Get database schema. + * List database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @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 database schema along with {@link Response}. + * @return a list of database schemas as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - String schemaName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName); /** - * Get database schema. + * List database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. + * @param filter An OData filter expression that filters elements in the collection. + * @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 database schema. + * @return a list of database schemas as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseSchemaInner get(String resourceGroupName, String serverName, String databaseName, String schemaName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, + String filter, Context context); /** - * List database schemas. + * Get database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param filter An OData filter expression that filters elements in the collection. + * @param schemaName The name of the schema. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseSchema list operation as paginated response with {@link PagedFlux}. + * @return database schema along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName, - String filter); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName); /** - * List database schemas. + * Get database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param schemaName The name of the schema. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseSchema list operation as paginated response with {@link PagedFlux}. + * @return database schema on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName); /** - * List database schemas. + * Get database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @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 response of a DatabaseSchema list operation as paginated response with {@link PagedIterable}. + * @return database schema along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String schemaName, Context context); /** - * List database schemas. + * Get database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param filter An OData filter expression that filters elements in the collection. - * @param context The context to associate with this operation. + * @param schemaName The name of the schema. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseSchema list operation as paginated response with {@link PagedIterable}. + * @return database schema. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, - String filter, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DatabaseSchemaInner get(String resourceGroupName, String serverName, String databaseName, String schemaName); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSecurityAlertPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSecurityAlertPoliciesClient.java index 20f16c6a14e2..e6689e715392 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSecurityAlertPoliciesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSecurityAlertPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,12 +18,62 @@ * An instance of this class provides access to all the operations defined in DatabaseSecurityAlertPoliciesClient. */ public interface DatabaseSecurityAlertPoliciesClient { + /** + * Gets a list of database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the security alert policy is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 database's security alert policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); + + /** + * Gets a list of database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the security alert policy is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 database's security alert policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); + + /** + * Gets a list of database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the security alert policy is defined. + * @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 database's security alert policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); + /** * Gets a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,9 +87,10 @@ Mono> getWithResponseAsync(String res /** * Gets a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -53,9 +104,10 @@ Mono getAsync(String resourceGroupName, String /** * Gets a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -70,9 +122,10 @@ Response getWithResponse(String resourceGroupN /** * Gets a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -86,9 +139,10 @@ DatabaseSecurityAlertPolicyInner get(String resourceGroupName, String serverName /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -104,9 +158,10 @@ Mono> createOrUpdateWithResponseAsync /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -122,9 +177,10 @@ Mono createOrUpdateAsync(String resourceGroupN /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @param context The context to associate with this operation. @@ -141,9 +197,10 @@ Response createOrUpdateWithResponse(String res /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -154,50 +211,4 @@ Response createOrUpdateWithResponse(String res @ServiceMethod(returns = ReturnType.SINGLE) DatabaseSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName, DatabaseSecurityAlertPolicyInner parameters); - - /** - * Gets a list of database's security alert policies. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 database's security alert policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets a list of database's security alert policies. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 database's security alert policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets a list of database's security alert policies. - * - * @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 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 database's security alert policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentBaselinesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentBaselinesClient.java deleted file mode 100644 index c93827cb71fa..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentBaselinesClient.java +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.DatabaseSqlVulnerabilityAssessmentBaselineSetInner; -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * DatabaseSqlVulnerabilityAssessmentBaselinesClient. - */ -public interface DatabaseSqlVulnerabilityAssessmentBaselinesClient { - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName); - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName); - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, Context context); - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseSqlVulnerabilityAssessmentBaselineSetInner get(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName); - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment baseline set along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput parameters); - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment baseline set on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput parameters); - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param parameters The requested rule baseline 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 a database sql vulnerability assessment baseline set along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput parameters, Context context); - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment baseline set. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseSqlVulnerabilityAssessmentBaselineSetInner createOrUpdate(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput parameters); - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listBySqlVulnerabilityAssessmentAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySqlVulnerabilityAssessment( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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 database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySqlVulnerabilityAssessment( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentExecuteScansClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentExecuteScansClient.java deleted file mode 100644 index 02b7afaedf5f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentExecuteScansClient.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.VulnerabilityAssessmentName; -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 - * DatabaseSqlVulnerabilityAssessmentExecuteScansClient. - */ -public interface DatabaseSqlVulnerabilityAssessmentExecuteScansClient { - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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>> executeWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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> beginExecuteAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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> beginExecute(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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> beginExecute(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); - - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 executeAsync(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 execute(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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 execute(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient.java deleted file mode 100644 index dc380295690f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient.java +++ /dev/null @@ -1,316 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInner; -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInput; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient. - */ -public interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient { - /** - * Gets a database's sql vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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 database's sql vulnerability assessment rule baseline along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, String ruleId); - - /** - * Gets a database's sql vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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 database's sql vulnerability assessment rule baseline on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - String ruleId); - - /** - * Gets a database's sql vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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 database's sql vulnerability assessment rule baseline along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, String ruleId, Context context); - - /** - * Gets a database's sql vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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 database's sql vulnerability assessment rule baseline. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseSqlVulnerabilityAssessmentRuleBaselineInner get(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - String ruleId); - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment rule baseline along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - DatabaseSqlVulnerabilityAssessmentRuleBaselineInput parameters); - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment rule baseline on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, String ruleId, DatabaseSqlVulnerabilityAssessmentRuleBaselineInput parameters); - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param parameters The requested rule baseline 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 a database sql vulnerability assessment rule baseline along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, String ruleId, DatabaseSqlVulnerabilityAssessmentRuleBaselineInput parameters, - Context context); - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment rule baseline. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseSqlVulnerabilityAssessmentRuleBaselineInner createOrUpdate(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - String ruleId, DatabaseSqlVulnerabilityAssessmentRuleBaselineInput parameters); - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId); - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId); - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - Context context); - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId); - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByBaselineAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName); - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByBaseline(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName); - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByBaseline(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentScanResultsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentScanResultsClient.java deleted file mode 100644 index 5120cb434fbf..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentScanResultsClient.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.SqlVulnerabilityAssessmentScanResultsInner; -import com.azure.resourcemanager.sql.models.SqlVulnerabilityAssessmentName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * DatabaseSqlVulnerabilityAssessmentScanResultsClient. - */ -public interface DatabaseSqlVulnerabilityAssessmentScanResultsClient { - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, String scanResultId); - - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - String scanResultId); - - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @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 vulnerability assessment scan record of a database along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - String scanResultId, Context context); - - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SqlVulnerabilityAssessmentScanResultsInner get(String resourceGroupName, String serverName, String databaseName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, String scanResultId); - - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByScanAsync(String resourceGroupName, String serverName, - String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); - - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByScan(String resourceGroupName, String serverName, - String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); - - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @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 vulnerability assessment scan record of a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByScan(String resourceGroupName, String serverName, - String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentScansClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentScansClient.java deleted file mode 100644 index a5cac7fb0cfb..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentScansClient.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.SqlVulnerabilityAssessmentScanRecordInner; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * DatabaseSqlVulnerabilityAssessmentScansClient. - */ -public interface DatabaseSqlVulnerabilityAssessmentScansClient { - /** - * Get a database vulnerability assessment scan result. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database vulnerability assessment scan result along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); - - /** - * Get a database vulnerability assessment scan result. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database vulnerability assessment scan result on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); - - /** - * Get a database vulnerability assessment scan result. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. - * @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 database vulnerability assessment scan result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context); - - /** - * Get a database vulnerability assessment scan result. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database vulnerability assessment scan result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SqlVulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); - - /** - * Lists the vulnerability assessment scans of a 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 SqlVulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listBySqlVulnerabilityAssessmentsAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Lists the vulnerability assessment scans of a 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 SqlVulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySqlVulnerabilityAssessments(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Lists the vulnerability assessment scans of a 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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 response of a SqlVulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySqlVulnerabilityAssessments(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentsSettingsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentsSettingsClient.java deleted file mode 100644 index d0d3a98f77c0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentsSettingsClient.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.SqlVulnerabilityAssessmentInner; -import com.azure.resourcemanager.sql.models.SqlVulnerabilityAssessmentName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * DatabaseSqlVulnerabilityAssessmentsSettingsClient. - */ -public interface DatabaseSqlVulnerabilityAssessmentsSettingsClient { - /** - * Gets SQL Vulnerability Assessment policy for 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sQL Vulnerability Assessment policy for database along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Gets SQL Vulnerability Assessment policy for 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sQL Vulnerability Assessment policy for database on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String databaseName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Gets SQL Vulnerability Assessment policy for 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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 sQL Vulnerability Assessment policy for database along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); - - /** - * Gets SQL Vulnerability Assessment policy for 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sQL Vulnerability Assessment policy for database. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SqlVulnerabilityAssessmentInner get(String resourceGroupName, String serverName, String databaseName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Lists SQL Vulnerability Assessment policies associated with a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 SqlVulnerabilityAssessment list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName); - - /** - * Lists SQL Vulnerability Assessment policies associated with a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 SqlVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName); - - /** - * Lists SQL Vulnerability Assessment policies associated with a 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 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 response of a SqlVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseTablesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseTablesClient.java index bafec9280d0d..4b9850ac0689 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseTablesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseTablesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,138 +18,146 @@ */ public interface DatabaseTablesClient { /** - * Get database table. + * List database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database table along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database tables as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listBySchemaAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String filter); /** - * Get database table. + * List database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database table on successful completion of {@link Mono}. + * @return a list of database tables as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listBySchemaAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName); /** - * Get database table. + * List database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @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 database table along with {@link Response}. + * @return a list of database tables as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySchema(String resourceGroupName, String serverName, String databaseName, + String schemaName); /** - * Get database table. + * List database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. + * @param filter An OData filter expression that filters elements in the collection. + * @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 database table. + * @return a list of database tables as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseTableInner get(String resourceGroupName, String serverName, String databaseName, String schemaName, - String tableName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySchema(String resourceGroupName, String serverName, String databaseName, + String schemaName, String filter, Context context); /** - * List database tables. + * Get database table. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param filter An OData filter expression that filters elements in the collection. + * @param tableName The name of the table. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseTable list operation as paginated response with {@link PagedFlux}. + * @return database table along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listBySchemaAsync(String resourceGroupName, String serverName, String databaseName, - String schemaName, String filter); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName); /** - * List database tables. + * Get database table. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. + * @param tableName The name of the table. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseTable list operation as paginated response with {@link PagedFlux}. + * @return database table on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listBySchemaAsync(String resourceGroupName, String serverName, String databaseName, - String schemaName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName); /** - * List database tables. + * Get database table. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @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 response of a DatabaseTable list operation as paginated response with {@link PagedIterable}. + * @return database table along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySchema(String resourceGroupName, String serverName, String databaseName, - String schemaName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, Context context); /** - * List database tables. + * Get database table. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param filter An OData filter expression that filters elements in the collection. - * @param context The context to associate with this operation. + * @param tableName The name of the table. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseTable list operation as paginated response with {@link PagedIterable}. + * @return database table. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySchema(String resourceGroupName, String serverName, String databaseName, - String schemaName, String filter, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DatabaseTableInner get(String resourceGroupName, String serverName, String databaseName, String schemaName, + String tableName); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseUsagesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseUsagesClient.java index 2148e9e029af..7266929d0bdd 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseUsagesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseUsagesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,7 +18,8 @@ public interface DatabaseUsagesClient { /** * Gets database usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -32,7 +33,8 @@ public interface DatabaseUsagesClient { /** * Gets database usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -46,7 +48,8 @@ public interface DatabaseUsagesClient { /** * Gets database usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentRuleBaselinesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentRuleBaselinesClient.java index cbd49fde7835..ccc33c6da6cc 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentRuleBaselinesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentRuleBaselinesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -21,7 +21,8 @@ public interface DatabaseVulnerabilityAssessmentRuleBaselinesClient { /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -42,7 +43,8 @@ Mono> getWithResponse /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -62,7 +64,8 @@ Mono getAsync(String resourceG /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -83,7 +86,8 @@ Response getWithResponse(Strin /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -103,7 +107,8 @@ DatabaseVulnerabilityAssessmentRuleBaselineInner get(String resourceGroupName, S /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -127,7 +132,8 @@ Mono> createOrUpdateW /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -149,7 +155,8 @@ Mono createOrUpdateAsync(Strin /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -172,7 +179,8 @@ Response createOrUpdateWithRes /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -194,7 +202,8 @@ DatabaseVulnerabilityAssessmentRuleBaselineInner createOrUpdate(String resourceG /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -214,7 +223,8 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String se /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -234,7 +244,8 @@ Mono deleteAsync(String resourceGroupName, String serverName, String datab /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -255,7 +266,8 @@ Response deleteWithResponse(String resourceGroupName, String serverName, S /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentScansClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentScansClient.java index d4bc0e74a248..a85dd7cf771f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentScansClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentScansClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -26,62 +26,62 @@ */ public interface DatabaseVulnerabilityAssessmentScansClient { /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database along with {@link Response} on successful completion - * of {@link Mono}. + * @return a list of vulnerability assessment scan records as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database on successful completion of {@link Mono}. + * @return a list of vulnerability assessment scan records as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @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 vulnerability assessment scan record of a database along with {@link Response}. + * @return a list of vulnerability assessment scan records as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); /** * Gets a vulnerability assessment scan record of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -89,72 +89,77 @@ Response getWithResponse(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 a vulnerability assessment scan record of a database. + * @return a vulnerability assessment scan record of a database along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - VulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); + Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** - * Lists the vulnerability assessment scans of a database. + * Gets a vulnerability assessment scan record of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedFlux}. + * @return a vulnerability assessment scan record of a database on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** - * Lists the vulnerability assessment scans of a database. + * Gets a vulnerability assessment scan record of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @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 response of a VulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedIterable}. + * @return a vulnerability assessment scan record of a database along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context); /** - * Lists the vulnerability assessment scans of a database. + * Gets a vulnerability assessment scan record of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param context The context to associate with this operation. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedIterable}. + * @return a vulnerability assessment scan record of a database. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + VulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -168,11 +173,12 @@ Mono> exportWithRespon /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -185,11 +191,12 @@ Mono exportAsync(String resourc /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -204,11 +211,12 @@ Response exportWithResponse(Str /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -221,7 +229,8 @@ DatabaseVulnerabilityAssessmentScansExportInner export(String resourceGroupName, /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -238,7 +247,8 @@ Mono>> initiateScanWithResponseAsync(String resourceGr /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -255,7 +265,8 @@ PollerFlux, Void> beginInitiateScanAsync(String resourceGroupNa /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -272,7 +283,8 @@ SyncPoller, Void> beginInitiateScan(String resourceGroupName, S /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -290,7 +302,8 @@ SyncPoller, Void> beginInitiateScan(String resourceGroupName, S /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -307,7 +320,8 @@ Mono initiateScanAsync(String resourceGroupName, String serverName, String /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -323,7 +337,8 @@ void initiateScan(String resourceGroupName, String serverName, String databaseNa /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentsClient.java index 48ab0ba3db1a..bb4960b8d3b4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,10 +18,60 @@ * An instance of this class provides access to all the operations defined in DatabaseVulnerabilityAssessmentsClient. */ public interface DatabaseVulnerabilityAssessmentsClient { + /** + * Lists the vulnerability assessment policies associated with a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment policies are defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 database's vulnerability assessments as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); + + /** + * Lists the vulnerability assessment policies associated with a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment policies are defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 database's vulnerability assessments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); + + /** + * Lists the vulnerability assessment policies associated with a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment policies are defined. + * @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 the database's vulnerability assessments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); + /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -38,7 +88,8 @@ Mono> getWithResponseAsync(String /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -54,7 +105,8 @@ Mono getAsync(String resourceGroupName, St /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -71,7 +123,8 @@ Response getWithResponse(String resourceGr /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -87,7 +140,8 @@ DatabaseVulnerabilityAssessmentInner get(String resourceGroupName, String server /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -105,7 +159,8 @@ Mono> createOrUpdateWithResponseA /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -123,7 +178,8 @@ Mono createOrUpdateAsync(String resourceGr /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -142,7 +198,8 @@ Response createOrUpdateWithResponse(String /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -160,7 +217,8 @@ DatabaseVulnerabilityAssessmentInner createOrUpdate(String resourceGroupName, St /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -176,7 +234,8 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String se /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -192,7 +251,8 @@ Mono deleteAsync(String resourceGroupName, String serverName, String datab /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -209,7 +269,8 @@ Response deleteWithResponse(String resourceGroupName, String serverName, S /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -220,53 +281,4 @@ Response deleteWithResponse(String resourceGroupName, String serverName, S @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Lists the vulnerability assessment policies associated with a 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 for which the vulnerability assessment is defined. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 DatabaseVulnerabilityAssessment list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName); - - /** - * Lists the vulnerability assessment policies associated with a 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 for which the vulnerability assessment is defined. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 DatabaseVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName); - - /** - * Lists the vulnerability assessment policies associated with a 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 for which the vulnerability assessment is defined. - * @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 response of a DatabaseVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabasesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabasesClient.java index 50a846033fce..7433e1df4c5d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabasesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DatabasesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -28,27 +28,87 @@ * An instance of this class provides access to all the operations defined in DatabasesClient. */ public interface DatabasesClient { + /** + * Gets a list of databases. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param skipToken The skipToken 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 list of databases as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName, String skipToken); + + /** + * Gets a list of databases. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Gets a list of databases. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Gets a list of databases. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param skipToken The skipToken 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 list of databases as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, String skipToken, + Context context); + /** * Gets a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param expand The child resources to include in the response. - * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, String databaseName, - String expand, String filter); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName); /** * Gets a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -62,11 +122,10 @@ Mono> getWithResponseAsync(String resourceGroupName, Str /** * Gets a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param expand The child resources to include in the response. - * @param filter An OData filter expression that filters elements in the collection. * @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. @@ -75,12 +134,13 @@ Mono> getWithResponseAsync(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - String expand, String filter, Context context); + Context context); /** * Gets a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -94,7 +154,8 @@ Response getWithResponse(String resourceGroupName, String serverN /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -110,7 +171,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -126,7 +188,8 @@ PollerFlux, DatabaseInner> beginCreateOrUpdateAsync(St /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -142,7 +205,8 @@ SyncPoller, DatabaseInner> beginCreateOrUpdate(String /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -159,7 +223,8 @@ SyncPoller, DatabaseInner> beginCreateOrUpdate(String /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -175,7 +240,8 @@ Mono createOrUpdateAsync(String resourceGroupName, String serverN /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -191,7 +257,8 @@ DatabaseInner createOrUpdate(String resourceGroupName, String serverName, String /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -206,286 +273,238 @@ DatabaseInner createOrUpdate(String resourceGroupName, String serverName, String DatabaseInner parameters, Context context); /** - * Updates an existing database. + * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 database resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, DatabaseUpdate parameters); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName); /** - * Updates an existing database. + * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 the {@link PollerFlux} for polling of a database resource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, DatabaseInner> beginUpdateAsync(String resourceGroupName, String serverName, - String databaseName, DatabaseUpdate parameters); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName); /** - * Updates an existing database. + * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 the {@link SyncPoller} for polling of a database resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DatabaseInner> beginUpdate(String resourceGroupName, String serverName, - String databaseName, DatabaseUpdate parameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName); /** - * Updates an existing database. + * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 the {@link SyncPoller} for polling of a database resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DatabaseInner> beginUpdate(String resourceGroupName, String serverName, - String databaseName, DatabaseUpdate parameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, + Context context); /** - * Updates an existing database. + * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 database resource on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, String databaseName, - DatabaseUpdate parameters); + Mono deleteAsync(String resourceGroupName, String serverName, String databaseName); /** - * Updates an existing database. + * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseInner update(String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters); + void delete(String resourceGroupName, String serverName, String databaseName); /** - * Updates an existing database. + * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseInner update(String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters, - Context context); + void delete(String resourceGroupName, String serverName, String databaseName, Context context); /** - * Deletes the database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 the {@link Response} on successful completion of {@link Mono}. + * @return a database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, - String databaseName); + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseUpdate parameters); /** - * Deletes the database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, - String databaseName); + PollerFlux, DatabaseInner> beginUpdateAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseUpdate parameters); /** - * Deletes the database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName); + SyncPoller, DatabaseInner> beginUpdate(String resourceGroupName, String serverName, + String databaseName, DatabaseUpdate parameters); /** - * Deletes the database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, - Context context); + SyncPoller, DatabaseInner> beginUpdate(String resourceGroupName, String serverName, + String databaseName, DatabaseUpdate parameters, Context context); /** - * Deletes the database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 {@link Mono} that completes when a successful response is received. + * @return a database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String serverName, String databaseName); + Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + DatabaseUpdate parameters); /** - * Deletes the database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String serverName, String databaseName); + DatabaseInner update(String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters); /** - * Deletes the database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String serverName, String databaseName, Context context); - - /** - * Gets a list of databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param top The number of elements to return from the collection. - * @param skip The number of elements in the collection to skip. - * @param filter An OData filter expression that filters elements in the collection. - * @param orderby How the results should be ordered. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName, Long top, Long skip, - String filter, String orderby); - - /** - * Gets a list of databases. - * - * @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}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Gets a list of databases. - * - * @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}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Gets a list of databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param top The number of elements to return from the collection. - * @param skip The number of elements in the collection to skip. - * @param filter An OData filter expression that filters elements in the collection. - * @param orderby How the results should be ordered. - * @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 databases as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Long top, Long skip, - String filter, String orderby, Context context); + DatabaseInner update(String resourceGroupName, String serverName, String databaseName, DatabaseUpdate parameters, + Context context); /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -502,7 +521,8 @@ Mono>> exportWithResponseAsync(String resourceGroupNam /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -518,7 +538,8 @@ PollerFlux, ImportExportOperationRe /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -534,7 +555,8 @@ SyncPoller, ImportExportOperationRe /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -552,7 +574,8 @@ SyncPoller, ImportExportOperationRe /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -568,7 +591,8 @@ Mono exportAsync(String resourceGroupName, Str /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -584,7 +608,8 @@ ImportExportOperationResultInner export(String resourceGroupName, String serverN /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -601,9 +626,10 @@ ImportExportOperationResultInner export(String resourceGroupName, String serverN /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -617,9 +643,10 @@ Mono>> failoverWithResponseAsync(String resourceGroupN /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -633,9 +660,10 @@ PollerFlux, Void> beginFailoverAsync(String resourceGroupName, /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -648,9 +676,10 @@ PollerFlux, Void> beginFailoverAsync(String resourceGroupName, /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -662,9 +691,10 @@ PollerFlux, Void> beginFailoverAsync(String resourceGroupName, /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -679,9 +709,10 @@ SyncPoller, Void> beginFailover(String resourceGroupName, Strin /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -694,9 +725,10 @@ SyncPoller, Void> beginFailover(String resourceGroupName, Strin /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -708,9 +740,10 @@ SyncPoller, Void> beginFailover(String resourceGroupName, Strin /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -721,9 +754,10 @@ SyncPoller, Void> beginFailover(String resourceGroupName, Strin /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -737,7 +771,8 @@ void failover(String resourceGroupName, String serverName, String databaseName, /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -754,7 +789,8 @@ Mono>> importMethodWithResponseAsync(String resourceGr /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -770,7 +806,8 @@ PollerFlux, ImportExportOperationRe /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -786,7 +823,8 @@ SyncPoller, ImportExportOperationRe /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -804,7 +842,8 @@ SyncPoller, ImportExportOperationRe /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -820,7 +859,8 @@ Mono importMethodAsync(String resourceGroupNam /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -836,7 +876,8 @@ ImportExportOperationResultInner importMethod(String resourceGroupName, String s /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -853,9 +894,10 @@ ImportExportOperationResultInner importMethod(String resourceGroupName, String s /** * Renames a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -869,9 +911,10 @@ Mono> renameWithResponseAsync(String resourceGroupName, String se /** * Renames a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -885,9 +928,10 @@ Mono renameAsync(String resourceGroupName, String serverName, String datab /** * Renames a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -902,9 +946,10 @@ Response renameWithResponse(String resourceGroupName, String serverName, S /** * Renames a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -916,9 +961,10 @@ Response renameWithResponse(String resourceGroupName, String serverName, S /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -931,9 +977,10 @@ Mono>> pauseWithResponseAsync(String resourceGroupName /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -946,9 +993,10 @@ PollerFlux, DatabaseInner> beginPauseAsync(String reso /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -961,9 +1009,10 @@ SyncPoller, DatabaseInner> beginPause(String resourceG /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @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. @@ -977,9 +1026,10 @@ SyncPoller, DatabaseInner> beginPause(String resourceG /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -991,9 +1041,10 @@ SyncPoller, DatabaseInner> beginPause(String resourceG /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1005,9 +1056,10 @@ SyncPoller, DatabaseInner> beginPause(String resourceG /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @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. @@ -1020,9 +1072,10 @@ SyncPoller, DatabaseInner> beginPause(String resourceG /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1035,9 +1088,10 @@ Mono>> resumeWithResponseAsync(String resourceGroupNam /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1050,9 +1104,10 @@ PollerFlux, DatabaseInner> beginResumeAsync(String res /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1065,9 +1120,10 @@ SyncPoller, DatabaseInner> beginResume(String resource /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @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. @@ -1081,9 +1137,10 @@ SyncPoller, DatabaseInner> beginResume(String resource /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1095,9 +1152,10 @@ SyncPoller, DatabaseInner> beginResume(String resource /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1109,9 +1167,10 @@ SyncPoller, DatabaseInner> beginResume(String resource /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @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. @@ -1124,9 +1183,10 @@ SyncPoller, DatabaseInner> beginResume(String resource /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1139,9 +1199,10 @@ Mono>> upgradeDataWarehouseWithResponseAsync(String re /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1154,9 +1215,10 @@ PollerFlux, Void> beginUpgradeDataWarehouseAsync(String resourc /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1169,9 +1231,10 @@ SyncPoller, Void> beginUpgradeDataWarehouse(String resourceGrou /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @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. @@ -1185,9 +1248,10 @@ SyncPoller, Void> beginUpgradeDataWarehouse(String resourceGrou /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1199,9 +1263,10 @@ SyncPoller, Void> beginUpgradeDataWarehouse(String resourceGrou /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1212,9 +1277,10 @@ SyncPoller, Void> beginUpgradeDataWarehouse(String resourceGrou /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @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. @@ -1224,87 +1290,93 @@ SyncPoller, Void> beginUpgradeDataWarehouse(String resourceGrou void upgradeDataWarehouse(String resourceGroupName, String serverName, String databaseName, Context context); /** - * Gets a list of inaccessible databases in a logical server. + * Gets a list of databases in an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 inaccessible databases in a logical server as paginated response with {@link PagedFlux}. + * @return a list of databases in an elastic pool as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listInaccessibleByServerAsync(String resourceGroupName, String serverName); + PagedFlux listByElasticPoolAsync(String resourceGroupName, String serverName, + String elasticPoolName); /** - * Gets a list of inaccessible databases in a logical server. + * Gets a list of databases in an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 inaccessible databases in a logical server as paginated response with {@link PagedIterable}. + * @return a list of databases in an elastic pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listInaccessibleByServer(String resourceGroupName, String serverName); + PagedIterable listByElasticPool(String resourceGroupName, String serverName, String elasticPoolName); /** - * Gets a list of inaccessible databases in a logical server. + * Gets a list of databases in an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. * @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 inaccessible databases in a logical server as paginated response with {@link PagedIterable}. + * @return a list of databases in an elastic pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listInaccessibleByServer(String resourceGroupName, String serverName, Context context); + PagedIterable listByElasticPool(String resourceGroupName, String serverName, String elasticPoolName, + Context context); /** - * Gets a list of databases in an elastic pool. + * Gets a list of inaccessible databases in a logical server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 in an elastic pool as paginated response with {@link PagedFlux}. + * @return a list of inaccessible databases in a logical server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByElasticPoolAsync(String resourceGroupName, String serverName, - String elasticPoolName); + PagedFlux listInaccessibleByServerAsync(String resourceGroupName, String serverName); /** - * Gets a list of databases in an elastic pool. + * Gets a list of inaccessible databases in a logical server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 in an elastic pool as paginated response with {@link PagedIterable}. + * @return a list of inaccessible databases in a logical server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByElasticPool(String resourceGroupName, String serverName, String elasticPoolName); + PagedIterable listInaccessibleByServer(String resourceGroupName, String serverName); /** - * Gets a list of databases in an elastic pool. + * Gets a list of inaccessible databases in a logical server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. * @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 databases in an elastic pool as paginated response with {@link PagedIterable}. + * @return a list of inaccessible databases in a logical server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByElasticPool(String resourceGroupName, String serverName, String elasticPoolName, - Context context); + PagedIterable listInaccessibleByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DeletedServersClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DeletedServersClient.java index 032a01962f6a..61348b806870 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DeletedServersClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DeletedServersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,44 +23,73 @@ */ public interface DeletedServersClient { /** - * Gets a deleted server. + * Gets a list of all deleted 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. + * @return a list of all deleted servers in a subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); + + /** + * Gets a list of all deleted 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. + * @return a list of all deleted servers in a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of all deleted servers in a subscription. + * + * @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 all deleted servers in a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Gets a list of deleted servers for a location. * * @param locationName The name of the region where the resource is located. - * @param deletedServerName The name of the deleted 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 deleted server along with {@link Response} on successful completion of {@link Mono}. + * @return a list of deleted servers for a location as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String locationName, String deletedServerName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByLocationAsync(String locationName); /** - * Gets a deleted server. + * Gets a list of deleted servers for a location. * * @param locationName The name of the region where the resource is located. - * @param deletedServerName The name of the deleted 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 deleted server on successful completion of {@link Mono}. + * @return a list of deleted servers for a location as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String locationName, String deletedServerName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String locationName); /** - * Gets a deleted server. + * Gets a list of deleted servers for a location. * * @param locationName The name of the region where the resource is located. - * @param deletedServerName The name of the deleted 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 deleted server along with {@link Response}. + * @return a list of deleted servers for a location as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String locationName, String deletedServerName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String locationName, Context context); /** * Gets a deleted server. @@ -70,47 +99,50 @@ public interface DeletedServersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a deleted server. + * @return a deleted server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeletedServerInner get(String locationName, String deletedServerName); + Mono> getWithResponseAsync(String locationName, String deletedServerName); /** - * Gets a list of deleted servers for a location. + * Gets a deleted server. * * @param locationName The name of the region where the resource is located. + * @param deletedServerName The name of the deleted 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 deleted servers for a location as paginated response with {@link PagedFlux}. + * @return a deleted server on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByLocationAsync(String locationName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String locationName, String deletedServerName); /** - * Gets a list of deleted servers for a location. + * Gets a deleted server. * * @param locationName The name of the region where the resource is located. + * @param deletedServerName The name of the deleted 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 deleted servers for a location as paginated response with {@link PagedIterable}. + * @return a deleted server along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String locationName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String locationName, String deletedServerName, Context context); /** - * Gets a list of deleted servers for a location. + * Gets a deleted server. * * @param locationName The name of the region where the resource is located. - * @param context The context to associate with this operation. + * @param deletedServerName The name of the deleted 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 deleted servers for a location as paginated response with {@link PagedIterable}. + * @return a deleted server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String locationName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DeletedServerInner get(String locationName, String deletedServerName); /** * Recovers a deleted server. @@ -207,36 +239,4 @@ SyncPoller, DeletedServerInner> beginRecover(Stri */ @ServiceMethod(returns = ReturnType.SINGLE) DeletedServerInner recover(String locationName, String deletedServerName, Context context); - - /** - * Gets a list of all deleted 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. - * @return a list of all deleted servers in a subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); - - /** - * Gets a list of all deleted 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. - * @return a list of all deleted servers in a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Gets a list of all deleted servers in a subscription. - * - * @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 all deleted servers in a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DistributedAvailabilityGroupsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DistributedAvailabilityGroupsClient.java index 7911027e3ea0..0418008fa43c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DistributedAvailabilityGroupsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/DistributedAvailabilityGroupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -14,8 +14,6 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.models.DistributedAvailabilityGroupInner; -import com.azure.resourcemanager.sql.models.DistributedAvailabilityGroupSetRole; -import com.azure.resourcemanager.sql.models.DistributedAvailabilityGroupsFailoverRequest; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -24,10 +22,57 @@ * An instance of this class provides access to all the operations defined in DistributedAvailabilityGroupsClient. */ public interface DistributedAvailabilityGroupsClient { + /** + * Gets a list of a distributed availability groups in instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 a distributed availability groups in instance as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName); + + /** + * Gets a list of a distributed availability groups in instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 a distributed availability groups in instance as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName); + + /** + * Gets a list of a distributed availability groups in instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 a distributed availability groups in instance as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context); + /** * Gets a distributed availability group info. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -43,7 +88,8 @@ Mono> getWithResponseAsync(String re /** * Gets a distributed availability group info. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -58,7 +104,8 @@ Mono getAsync(String resourceGroupName, Strin /** * Gets a distributed availability group info. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param context The context to associate with this operation. @@ -74,7 +121,8 @@ Response getWithResponse(String resourceGroup /** * Gets a distributed availability group info. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -89,7 +137,8 @@ DistributedAvailabilityGroupInner get(String resourceGroupName, String managedIn /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -107,7 +156,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -125,7 +175,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -143,7 +194,8 @@ SyncPoller, DistributedAvailabilit /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -162,7 +214,8 @@ SyncPoller, DistributedAvailabilit /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -179,7 +232,8 @@ Mono createOrUpdateAsync(String resourceGroup /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -195,7 +249,8 @@ DistributedAvailabilityGroupInner createOrUpdate(String resourceGroupName, Strin /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -209,132 +264,11 @@ DistributedAvailabilityGroupInner createOrUpdate(String resourceGroupName, Strin DistributedAvailabilityGroupInner createOrUpdate(String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters, Context context); - /** - * Updates a distributed availability group replication mode. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return distributed availability group between box and Sql Managed Instance along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters); - - /** - * Updates a distributed availability group replication mode. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 distributed availability group between box and Sql Managed - * Instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, DistributedAvailabilityGroupInner> beginUpdateAsync( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters); - - /** - * Updates a distributed availability group replication mode. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 distributed availability group between box and Sql Managed - * Instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DistributedAvailabilityGroupInner> beginUpdate( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters); - - /** - * Updates a distributed availability group replication mode. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. - * @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 distributed availability group between box and Sql Managed - * Instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DistributedAvailabilityGroupInner> beginUpdate( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, Context context); - - /** - * Updates a distributed availability group replication mode. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return distributed availability group between box and Sql Managed Instance on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters); - - /** - * Updates a distributed availability group replication mode. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return distributed availability group between box and Sql Managed Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DistributedAvailabilityGroupInner update(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters); - - /** - * Updates a distributed availability group replication mode. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. - * @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 distributed availability group between box and Sql Managed Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DistributedAvailabilityGroupInner update(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters, Context context); - /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -349,7 +283,8 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -364,7 +299,8 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -379,7 +315,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param context The context to associate with this operation. @@ -395,7 +332,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -410,7 +348,8 @@ Mono deleteAsync(String resourceGroupName, String managedInstanceName, /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -423,7 +362,8 @@ Mono deleteAsync(String resourceGroupName, String managedInstanceName, /** * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param context The context to associate with this operation. @@ -436,178 +376,13 @@ void delete(String resourceGroupName, String managedInstanceName, String distrib Context context); /** - * Gets a list of a distributed availability groups in instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 a distributed availability groups in instance as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName); - - /** - * Gets a list of a distributed availability groups in instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 a distributed availability groups in instance as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName); - - /** - * Gets a list of a distributed availability groups in instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 a distributed availability groups in instance as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context); - - /** - * Performs requested failover type in this distributed availability group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return distributed availability group between box and Sql Managed Instance along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> failoverWithResponseAsync(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupsFailoverRequest parameters); - - /** - * Performs requested failover type in this distributed availability group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 distributed availability group between box and Sql Managed - * Instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, DistributedAvailabilityGroupInner> beginFailoverAsync( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupsFailoverRequest parameters); - - /** - * Performs requested failover type in this distributed availability group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 distributed availability group between box and Sql Managed - * Instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DistributedAvailabilityGroupInner> beginFailover( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupsFailoverRequest parameters); - - /** - * Performs requested failover type in this distributed availability group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request parameters. - * @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 distributed availability group between box and Sql Managed - * Instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DistributedAvailabilityGroupInner> beginFailover( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupsFailoverRequest parameters, Context context); - - /** - * Performs requested failover type in this distributed availability group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return distributed availability group between box and Sql Managed Instance on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono failoverAsync(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupsFailoverRequest parameters); - - /** - * Performs requested failover type in this distributed availability group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return distributed availability group between box and Sql Managed Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DistributedAvailabilityGroupInner failover(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupsFailoverRequest parameters); - - /** - * Performs requested failover type in this distributed availability group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request parameters. - * @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 distributed availability group between box and Sql Managed Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DistributedAvailabilityGroupInner failover(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupsFailoverRequest parameters, - Context context); - - /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -615,16 +390,17 @@ DistributedAvailabilityGroupInner failover(String resourceGroupName, String mana * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> setRoleWithResponseAsync(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupSetRole parameters); + Mono>> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters); /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -632,17 +408,18 @@ Mono>> setRoleWithResponseAsync(String resourceGroupNa * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, DistributedAvailabilityGroupInner> beginSetRoleAsync( + PollerFlux, DistributedAvailabilityGroupInner> beginUpdateAsync( String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupSetRole parameters); + DistributedAvailabilityGroupInner parameters); /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -650,17 +427,18 @@ PollerFlux, DistributedAvailabilit * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DistributedAvailabilityGroupInner> beginSetRole( + SyncPoller, DistributedAvailabilityGroupInner> beginUpdate( String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupSetRole parameters); + DistributedAvailabilityGroupInner parameters); /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @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. @@ -669,17 +447,18 @@ SyncPoller, DistributedAvailabilit * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DistributedAvailabilityGroupInner> beginSetRole( + SyncPoller, DistributedAvailabilityGroupInner> beginUpdate( String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupSetRole parameters, Context context); + DistributedAvailabilityGroupInner parameters, Context context); /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -687,32 +466,34 @@ SyncPoller, DistributedAvailabilit * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono setRoleAsync(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupSetRole parameters); + Mono updateAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters); /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return distributed availability group between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - DistributedAvailabilityGroupInner setRole(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupSetRole parameters); + DistributedAvailabilityGroupInner update(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters); /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @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. @@ -720,6 +501,6 @@ DistributedAvailabilityGroupInner setRole(String resourceGroupName, String manag * @return distributed availability group between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - DistributedAvailabilityGroupInner setRole(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupSetRole parameters, Context context); + DistributedAvailabilityGroupInner update(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolOperationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolOperationsClient.java index dd86494a90b2..320c2cc6ea6a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolOperationsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -21,9 +21,10 @@ public interface ElasticPoolOperationsClient { /** * Gets a list of operations performed on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName 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. @@ -36,9 +37,10 @@ PagedFlux listByElasticPoolAsync(String resourceGroup /** * Gets a list of operations performed on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName 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. @@ -51,9 +53,10 @@ PagedIterable listByElasticPool(String resourceGroupN /** * Gets a list of operations performed on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName 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. @@ -67,9 +70,10 @@ PagedIterable listByElasticPool(String resourceGroupN /** * Cancels the asynchronous operation on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -83,9 +87,10 @@ Mono> cancelWithResponseAsync(String resourceGroupName, String se /** * Cancels the asynchronous operation on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -98,9 +103,10 @@ Mono> cancelWithResponseAsync(String resourceGroupName, String se /** * Cancels the asynchronous operation on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -115,9 +121,10 @@ Response cancelWithResponse(String resourceGroupName, String serverName, S /** * Cancels the asynchronous operation on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolsClient.java index d376d4cb9c66..91f59bf1e19b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,10 +23,71 @@ * An instance of this class provides access to all the operations defined in ElasticPoolsClient. */ public interface ElasticPoolsClient { + /** + * Gets all elastic pools in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param skip The number of elements in the collection to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 elastic pools in a server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName, Long skip); + + /** + * Gets all elastic pools in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 elastic pools in a server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Gets all elastic pools in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 elastic pools in a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Gets all elastic pools in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param skip The number of elements in the collection to skip. + * @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 all elastic pools in a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Long skip, + Context context); + /** * Gets an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -41,7 +102,8 @@ Mono> getWithResponseAsync(String resourceGroupName, /** * Gets an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -55,7 +117,8 @@ Mono> getWithResponseAsync(String resourceGroupName, /** * Gets an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -71,7 +134,8 @@ Response getWithResponse(String resourceGroupName, String serv /** * Gets an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -85,7 +149,8 @@ Response getWithResponse(String resourceGroupName, String serv /** * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -101,7 +166,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -117,7 +183,8 @@ PollerFlux, ElasticPoolInner> beginCreateOrUpdateAs /** * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -133,7 +200,8 @@ SyncPoller, ElasticPoolInner> beginCreateOrUpdate(S /** * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -150,7 +218,8 @@ SyncPoller, ElasticPoolInner> beginCreateOrUpdate(S /** * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -166,7 +235,8 @@ Mono createOrUpdateAsync(String resourceGroupName, String serv /** * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -182,7 +252,8 @@ ElasticPoolInner createOrUpdate(String resourceGroupName, String serverName, Str /** * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool parameters. @@ -197,282 +268,241 @@ ElasticPoolInner createOrUpdate(String resourceGroupName, String serverName, Str ElasticPoolInner parameters, Context context); /** - * Updates an elastic pool. + * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String elasticPoolName, ElasticPoolUpdate parameters); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName); /** - * Updates an elastic pool. + * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an elastic pool. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ElasticPoolInner> beginUpdateAsync(String resourceGroupName, - String serverName, String elasticPoolName, ElasticPoolUpdate parameters); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String elasticPoolName); /** - * Updates an elastic pool. + * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an elastic pool. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ElasticPoolInner> beginUpdate(String resourceGroupName, String serverName, - String elasticPoolName, ElasticPoolUpdate parameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String elasticPoolName); /** - * Updates an elastic pool. + * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. * @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 an elastic pool. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ElasticPoolInner> beginUpdate(String resourceGroupName, String serverName, - String elasticPoolName, ElasticPoolUpdate parameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String elasticPoolName, + Context context); /** - * Updates an elastic pool. + * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an elastic pool on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, String elasticPoolName, - ElasticPoolUpdate parameters); + Mono deleteAsync(String resourceGroupName, String serverName, String elasticPoolName); /** - * Updates an elastic pool. + * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an elastic pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - ElasticPoolInner update(String resourceGroupName, String serverName, String elasticPoolName, - ElasticPoolUpdate parameters); + void delete(String resourceGroupName, String serverName, String elasticPoolName); /** - * Updates an elastic pool. + * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. * @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 an elastic pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - ElasticPoolInner update(String resourceGroupName, String serverName, String elasticPoolName, - ElasticPoolUpdate parameters, Context context); + void delete(String resourceGroupName, String serverName, String elasticPoolName, Context context); /** - * Deletes an elastic pool. + * Updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an elastic pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, - String elasticPoolName); + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolUpdate parameters); /** - * Deletes an elastic pool. + * Updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, - String elasticPoolName); + PollerFlux, ElasticPoolInner> beginUpdateAsync(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolUpdate parameters); /** - * Deletes an elastic pool. + * Updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String elasticPoolName); + SyncPoller, ElasticPoolInner> beginUpdate(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolUpdate parameters); /** - * Deletes an elastic pool. + * Updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update parameters. * @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 the {@link SyncPoller} for polling of an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String elasticPoolName, - Context context); + SyncPoller, ElasticPoolInner> beginUpdate(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolUpdate parameters, Context context); /** - * Deletes an elastic pool. + * Updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an elastic pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String serverName, String elasticPoolName); + Mono updateAsync(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolUpdate parameters); /** - * Deletes an elastic pool. + * Updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an elastic pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String serverName, String elasticPoolName); + ElasticPoolInner update(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolUpdate parameters); /** - * Deletes an elastic pool. + * Updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update parameters. * @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 an elastic pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String serverName, String elasticPoolName, Context context); - - /** - * Gets all elastic pools in a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param skip The number of elements in the collection to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 elastic pools in a server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName, Long skip); - - /** - * Gets all elastic pools 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 all elastic pools in a server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Gets all elastic pools 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 all elastic pools in a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Gets all elastic pools in a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param skip The number of elements in the collection to skip. - * @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 all elastic pools in a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Long skip, - Context context); + ElasticPoolInner update(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolUpdate parameters, Context context); /** * Failovers an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -485,9 +515,10 @@ Mono>> failoverWithResponseAsync(String resourceGroupN /** * Failovers an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -500,9 +531,10 @@ PollerFlux, Void> beginFailoverAsync(String resourceGroupName, /** * Failovers an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -515,9 +547,10 @@ SyncPoller, Void> beginFailover(String resourceGroupName, Strin /** * Failovers an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The name of the elastic pool to failover. * @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. @@ -531,9 +564,10 @@ SyncPoller, Void> beginFailover(String resourceGroupName, Strin /** * Failovers an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -545,9 +579,10 @@ SyncPoller, Void> beginFailover(String resourceGroupName, Strin /** * Failovers an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -558,9 +593,10 @@ SyncPoller, Void> beginFailover(String resourceGroupName, Strin /** * Failovers an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The name of the elastic pool to failover. * @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. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EncryptionProtectorsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EncryptionProtectorsClient.java index 8d5679a14b26..69084f1992fd 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EncryptionProtectorsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EncryptionProtectorsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,10 +23,54 @@ * An instance of this class provides access to all the operations defined in EncryptionProtectorsClient. */ public interface EncryptionProtectorsClient { + /** + * Gets a list of server encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 encryption protectors as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Gets a list of server encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 encryption protectors as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Gets a list of server encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 encryption protectors as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + /** * Gets a server encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -41,7 +85,8 @@ Mono> getWithResponseAsync(String resourceGro /** * Gets a server encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -56,7 +101,8 @@ Mono getAsync(String resourceGroupName, String serverN /** * Gets a server encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @param context The context to associate with this operation. @@ -72,7 +118,8 @@ Response getWithResponse(String resourceGroupName, Str /** * Gets a server encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,9 +134,10 @@ EncryptionProtectorInner get(String resourceGroupName, String serverName, /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -103,9 +151,10 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -120,9 +169,10 @@ PollerFlux, EncryptionProtectorInner> begin /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -137,9 +187,10 @@ SyncPoller, EncryptionProtectorInner> begin /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -155,9 +206,10 @@ SyncPoller, EncryptionProtectorInner> begin /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -171,9 +223,10 @@ Mono createOrUpdateAsync(String resourceGroupName, Str /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -187,9 +240,10 @@ EncryptionProtectorInner createOrUpdate(String resourceGroupName, String serverN /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -201,52 +255,13 @@ EncryptionProtectorInner createOrUpdate(String resourceGroupName, String serverN EncryptionProtectorInner createOrUpdate(String resourceGroupName, String serverName, EncryptionProtectorName encryptionProtectorName, EncryptionProtectorInner parameters, Context context); - /** - * Gets a list of server encryption protectors. - * - * @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 encryption protectors as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Gets a list of server encryption protectors. - * - * @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 encryption protectors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Gets a list of server encryption protectors. - * - * @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 encryption protectors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); - /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -259,9 +274,10 @@ Mono>> revalidateWithResponseAsync(String resourceGrou /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -274,9 +290,10 @@ PollerFlux, Void> beginRevalidateAsync(String resourceGroupName /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -289,9 +306,10 @@ SyncPoller, Void> beginRevalidate(String resourceGroupName, Str /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -305,9 +323,10 @@ SyncPoller, Void> beginRevalidate(String resourceGroupName, Str /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -320,9 +339,10 @@ Mono revalidateAsync(String resourceGroupName, String serverName, /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -333,9 +353,10 @@ Mono revalidateAsync(String resourceGroupName, String serverName, /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EndpointCertificatesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EndpointCertificatesClient.java index 027a097d48b2..62801850cab2 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EndpointCertificatesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/EndpointCertificatesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,103 +18,110 @@ */ public interface EndpointCertificatesClient { /** - * Gets a certificate used on the endpoint with the given id. + * List certificates used on endpoints on the target instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a certificate used on the endpoint with the given id along with {@link Response} on successful completion - * of {@link Mono}. + * @return a list of endpoint certificates on the target instance as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, - String endpointType); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName); /** - * Gets a certificate used on the endpoint with the given id. + * List certificates used on endpoints on the target instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a certificate used on the endpoint with the given id on successful completion of {@link Mono}. + * @return a list of endpoint certificates on the target instance as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, String endpointType); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, String managedInstanceName); /** - * Gets a certificate used on the endpoint with the given id. + * List certificates used on endpoints on the target instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @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 certificate used on the endpoint with the given id along with {@link Response}. + * @return a list of endpoint certificates on the target instance as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String managedInstanceName, - String endpointType, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + Context context); /** * Gets a certificate used on the endpoint with the given id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a certificate used on the endpoint with the given id. + * @return a certificate used on the endpoint with the given id along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EndpointCertificateInner get(String resourceGroupName, String managedInstanceName, String endpointType); + Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, + String endpointType); /** - * List certificates used on endpoints on the target instance. + * Gets a certificate used on the endpoint with the given id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 EndpointCertificate list operation as paginated response with {@link PagedFlux}. + * @return a certificate used on the endpoint with the given id on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String managedInstanceName, String endpointType); /** - * List certificates used on endpoints on the target instance. + * Gets a certificate used on the endpoint with the given id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param endpointType Type of the endpoint whose certificate the customer is looking for. + * @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 response of a EndpointCertificate list operation as paginated response with {@link PagedIterable}. + * @return a certificate used on the endpoint with the given id along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, String managedInstanceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String endpointType, Context context); /** - * List certificates used on endpoints on the target instance. + * Gets a certificate used on the endpoint with the given id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param context The context to associate with this operation. + * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 EndpointCertificate list operation as paginated response with {@link PagedIterable}. + * @return a certificate used on the endpoint with the given id. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointCertificateInner get(String resourceGroupName, String managedInstanceName, String endpointType); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedDatabaseBlobAuditingPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedDatabaseBlobAuditingPoliciesClient.java index 3274b7393e5d..0105f3acf600 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedDatabaseBlobAuditingPoliciesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedDatabaseBlobAuditingPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -11,7 +11,6 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ExtendedDatabaseBlobAuditingPolicyInner; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyName; import reactor.core.publisher.Mono; /** @@ -19,13 +18,62 @@ * ExtendedDatabaseBlobAuditingPoliciesClient. */ public interface ExtendedDatabaseBlobAuditingPoliciesClient { + /** + * Lists extended auditing settings of a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a list of database extended auditing settings as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); + + /** + * Lists extended auditing settings of a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a list of database extended auditing settings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); + + /** + * Lists extended auditing settings of a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a list of database extended auditing settings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); + /** * Gets an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -34,15 +82,15 @@ public interface ExtendedDatabaseBlobAuditingPoliciesClient { */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, BlobAuditingPolicyName blobAuditingPolicyName); + String serverName, String databaseName); /** * Gets an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -50,15 +98,15 @@ Mono> getWithResponseAsync(Str */ @ServiceMethod(returns = ReturnType.SINGLE) Mono getAsync(String resourceGroupName, String serverName, - String databaseName, BlobAuditingPolicyName blobAuditingPolicyName); + String databaseName); /** * Gets an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @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. @@ -67,31 +115,30 @@ Mono getAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, Context context); + String databaseName, Context context); /** * Gets an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an extended database's blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExtendedDatabaseBlobAuditingPolicyInner get(String resourceGroupName, String serverName, String databaseName, - BlobAuditingPolicyName blobAuditingPolicyName); + ExtendedDatabaseBlobAuditingPolicyInner get(String resourceGroupName, String serverName, String databaseName); /** * Creates or updates an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters The extended database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -101,16 +148,15 @@ ExtendedDatabaseBlobAuditingPolicyInner get(String resourceGroupName, String ser */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, - ExtendedDatabaseBlobAuditingPolicyInner parameters); + String serverName, String databaseName, ExtendedDatabaseBlobAuditingPolicyInner parameters); /** * Creates or updates an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters The extended database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -119,16 +165,15 @@ Mono> createOrUpdateWithRespon */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createOrUpdateAsync(String resourceGroupName, String serverName, - String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, - ExtendedDatabaseBlobAuditingPolicyInner parameters); + String databaseName, ExtendedDatabaseBlobAuditingPolicyInner parameters); /** * Creates or updates an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters The extended database blob auditing policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -138,16 +183,15 @@ Mono createOrUpdateAsync(String resourc */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse(String resourceGroupName, - String serverName, String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, - ExtendedDatabaseBlobAuditingPolicyInner parameters, Context context); + String serverName, String databaseName, ExtendedDatabaseBlobAuditingPolicyInner parameters, Context context); /** * Creates or updates an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters The extended database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -156,55 +200,5 @@ Response createOrUpdateWithResponse(Str */ @ServiceMethod(returns = ReturnType.SINGLE) ExtendedDatabaseBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, - String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, - ExtendedDatabaseBlobAuditingPolicyInner parameters); - - /** - * Lists extended auditing settings of a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 ExtendedDatabaseBlobAuditingPolicy list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName); - - /** - * Lists extended auditing settings of a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 ExtendedDatabaseBlobAuditingPolicy list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName); - - /** - * Lists extended auditing settings of a 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 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 response of a ExtendedDatabaseBlobAuditingPolicy list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context); + String databaseName, ExtendedDatabaseBlobAuditingPolicyInner parameters); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedServerBlobAuditingPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedServerBlobAuditingPoliciesClient.java index 2092ec443091..5933e2671ac9 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedServerBlobAuditingPoliciesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedServerBlobAuditingPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -14,7 +14,6 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.models.ExtendedServerBlobAuditingPolicyInner; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyName; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -23,12 +22,56 @@ * An instance of this class provides access to all the operations defined in ExtendedServerBlobAuditingPoliciesClient. */ public interface ExtendedServerBlobAuditingPoliciesClient { + /** + * Lists extended auditing settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 extended auditing settings as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Lists extended auditing settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 extended auditing settings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Lists extended auditing settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 extended auditing settings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); + /** * Gets an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -37,29 +80,28 @@ public interface ExtendedServerBlobAuditingPoliciesClient { */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getWithResponseAsync(String resourceGroupName, - String serverName, BlobAuditingPolicyName blobAuditingPolicyName); + String serverName); /** * Gets an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an extended server's blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName); + Mono getAsync(String resourceGroupName, String serverName); /** * Gets an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @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. @@ -68,29 +110,28 @@ Mono getAsync(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, Context context); + Context context); /** * Gets an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an extended server's blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExtendedServerBlobAuditingPolicyInner get(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName); + ExtendedServerBlobAuditingPolicyInner get(String resourceGroupName, String serverName); /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -100,14 +141,14 @@ ExtendedServerBlobAuditingPolicyInner get(String resourceGroupName, String serve */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ExtendedServerBlobAuditingPolicyInner parameters); + ExtendedServerBlobAuditingPolicyInner parameters); /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -117,14 +158,14 @@ Mono>> createOrUpdateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ExtendedServerBlobAuditingPolicyInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ExtendedServerBlobAuditingPolicyInner parameters); + ExtendedServerBlobAuditingPolicyInner parameters); /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -133,15 +174,15 @@ Mono>> createOrUpdateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ExtendedServerBlobAuditingPolicyInner> - beginCreateOrUpdate(String resourceGroupName, String serverName, BlobAuditingPolicyName blobAuditingPolicyName, + beginCreateOrUpdate(String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters); /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -151,15 +192,15 @@ Mono>> createOrUpdateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ExtendedServerBlobAuditingPolicyInner> - beginCreateOrUpdate(String resourceGroupName, String serverName, BlobAuditingPolicyName blobAuditingPolicyName, + beginCreateOrUpdate(String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters, Context context); /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -168,14 +209,14 @@ Mono>> createOrUpdateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createOrUpdateAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ExtendedServerBlobAuditingPolicyInner parameters); + ExtendedServerBlobAuditingPolicyInner parameters); /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -184,14 +225,14 @@ Mono createOrUpdateAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) ExtendedServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ExtendedServerBlobAuditingPolicyInner parameters); + ExtendedServerBlobAuditingPolicyInner parameters); /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -201,50 +242,5 @@ ExtendedServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) ExtendedServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ExtendedServerBlobAuditingPolicyInner parameters, - Context context); - - /** - * Lists extended auditing settings 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 the response of a ExtendedServerBlobAuditingPolicy list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Lists extended auditing settings 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 the response of a ExtendedServerBlobAuditingPolicy list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Lists extended auditing settings 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 the response of a ExtendedServerBlobAuditingPolicy list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); + ExtendedServerBlobAuditingPolicyInner parameters, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FailoverGroupsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FailoverGroupsClient.java index 655fe8344154..59a4de51f6cb 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FailoverGroupsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FailoverGroupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,11 +23,55 @@ * An instance of this class provides access to all the operations defined in FailoverGroupsClient. */ public interface FailoverGroupsClient { + /** + * Lists the failover groups in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 failover groups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Lists the failover groups in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 failover groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Lists the failover groups in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @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 failover groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -41,8 +85,9 @@ Mono> getWithResponseAsync(String resourceGroupName /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -55,8 +100,9 @@ Mono> getWithResponseAsync(String resourceGroupName /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -71,8 +117,9 @@ Response getWithResponse(String resourceGroupName, String se /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -85,8 +132,9 @@ Response getWithResponse(String resourceGroupName, String se /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,8 +149,9 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -117,8 +166,9 @@ PollerFlux, FailoverGroupInner> beginCreateOrUpda /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -133,8 +183,9 @@ SyncPoller, FailoverGroupInner> beginCreateOrUpda /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @param context The context to associate with this operation. @@ -150,8 +201,9 @@ SyncPoller, FailoverGroupInner> beginCreateOrUpda /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -166,8 +218,9 @@ Mono createOrUpdateAsync(String resourceGroupName, String se /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -182,8 +235,9 @@ FailoverGroupInner createOrUpdate(String resourceGroupName, String serverName, S /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @param context The context to associate with this operation. @@ -197,266 +251,241 @@ FailoverGroupInner createOrUpdate(String resourceGroupName, String serverName, S FailoverGroupInner parameters, Context context); /** - * Updates a failover group. + * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. - * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a failover group along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String failoverGroupName, FailoverGroupUpdate parameters); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName); /** - * Updates a failover group. + * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. - * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 failover group. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, FailoverGroupInner> beginUpdateAsync(String resourceGroupName, - String serverName, String failoverGroupName, FailoverGroupUpdate parameters); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String failoverGroupName); /** - * Updates a failover group. + * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. - * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 failover group. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FailoverGroupInner> beginUpdate(String resourceGroupName, - String serverName, String failoverGroupName, FailoverGroupUpdate parameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String failoverGroupName); /** - * Updates a failover group. + * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. - * @param parameters The failover group parameters. * @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 failover group. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FailoverGroupInner> beginUpdate(String resourceGroupName, - String serverName, String failoverGroupName, FailoverGroupUpdate parameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String failoverGroupName, Context context); /** - * Updates a failover group. + * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. - * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a failover group on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, String failoverGroupName, - FailoverGroupUpdate parameters); + Mono deleteAsync(String resourceGroupName, String serverName, String failoverGroupName); /** - * Updates a failover group. + * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. - * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - FailoverGroupInner update(String resourceGroupName, String serverName, String failoverGroupName, - FailoverGroupUpdate parameters); + void delete(String resourceGroupName, String serverName, String failoverGroupName); /** - * Updates a failover group. + * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. - * @param parameters The failover group parameters. * @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 failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - FailoverGroupInner update(String resourceGroupName, String serverName, String failoverGroupName, - FailoverGroupUpdate parameters, Context context); + void delete(String resourceGroupName, String serverName, String failoverGroupName, Context context); /** - * Deletes a failover group. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, - String failoverGroupName); + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName, FailoverGroupUpdate parameters); /** - * Deletes a failover group. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, - String failoverGroupName); + PollerFlux, FailoverGroupInner> beginUpdateAsync(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupUpdate parameters); /** - * Deletes a failover group. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, - String failoverGroupName); + SyncPoller, FailoverGroupInner> beginUpdate(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupUpdate parameters); /** - * Deletes a failover group. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. * @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 the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, - String failoverGroupName, Context context); + SyncPoller, FailoverGroupInner> beginUpdate(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupUpdate parameters, Context context); /** - * Deletes a failover group. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String serverName, String failoverGroupName); + Mono updateAsync(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupUpdate parameters); /** - * Deletes a failover group. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String serverName, String failoverGroupName); + FailoverGroupInner update(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupUpdate parameters); /** - * Deletes a failover group. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. * @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 failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String serverName, String failoverGroupName, Context context); - - /** - * Lists the failover groups 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 the response of a FailoverGroup list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Lists the failover groups 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 the response of a FailoverGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Lists the failover groups in 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 the response of a FailoverGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + FailoverGroupInner update(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupUpdate parameters, Context context); /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -470,8 +499,9 @@ Mono>> failoverWithResponseAsync(String resourceGroupN /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -485,8 +515,9 @@ PollerFlux, FailoverGroupInner> beginFailoverAsyn /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -500,8 +531,9 @@ SyncPoller, FailoverGroupInner> beginFailover(Str /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -516,8 +548,9 @@ SyncPoller, FailoverGroupInner> beginFailover(Str /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -530,8 +563,9 @@ SyncPoller, FailoverGroupInner> beginFailover(Str /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -544,8 +578,9 @@ SyncPoller, FailoverGroupInner> beginFailover(Str /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -559,8 +594,9 @@ SyncPoller, FailoverGroupInner> beginFailover(Str /** * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -574,8 +610,9 @@ Mono>> forceFailoverAllowDataLossWithResponseAsync(Str /** * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -589,8 +626,9 @@ Mono>> forceFailoverAllowDataLossWithResponseAsync(Str /** * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -604,8 +642,9 @@ Mono>> forceFailoverAllowDataLossWithResponseAsync(Str /** * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -620,8 +659,9 @@ SyncPoller, FailoverGroupInner> beginForceFailove /** * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -635,8 +675,9 @@ Mono forceFailoverAllowDataLossAsync(String resourceGroupNam /** * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -650,8 +691,9 @@ FailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, String s /** * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -662,118 +704,4 @@ FailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, String s @ServiceMethod(returns = ReturnType.SINGLE) FailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, String serverName, String failoverGroupName, Context context); - - /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a failover group along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> tryPlannedBeforeForcedFailoverWithResponseAsync(String resourceGroupName, - String serverName, String failoverGroupName); - - /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 failover group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, FailoverGroupInner> - beginTryPlannedBeforeForcedFailoverAsync(String resourceGroupName, String serverName, String failoverGroupName); - - /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 failover group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FailoverGroupInner> - beginTryPlannedBeforeForcedFailover(String resourceGroupName, String serverName, String failoverGroupName); - - /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @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 failover group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FailoverGroupInner> beginTryPlannedBeforeForcedFailover( - String resourceGroupName, String serverName, String failoverGroupName, Context context); - - /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a failover group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono tryPlannedBeforeForcedFailoverAsync(String resourceGroupName, String serverName, - String failoverGroupName); - - /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a failover group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FailoverGroupInner tryPlannedBeforeForcedFailover(String resourceGroupName, String serverName, - String failoverGroupName); - - /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @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 failover group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FailoverGroupInner tryPlannedBeforeForcedFailover(String resourceGroupName, String serverName, - String failoverGroupName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FirewallRulesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FirewallRulesClient.java index fc63ff74cf70..cc514a14d630 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FirewallRulesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/FirewallRulesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -19,282 +19,301 @@ */ public interface FirewallRulesClient { /** - * Gets a firewall rule. + * Gets a list of firewall rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The 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 a firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return a list of firewall rules as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String firewallRuleName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * Gets a firewall rule. + * Gets a list of firewall rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The 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 a firewall rule on successful completion of {@link Mono}. + * @return a list of firewall rules as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String firewallRuleName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets a firewall rule. + * Gets a list of firewall rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The 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 a firewall rule along with {@link Response}. + * @return a list of firewall rules as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String firewallRuleName, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** - * Gets a firewall rule. + * Replaces all firewall rules on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The name of the firewall rule. + * @param parameters The parameters 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 firewall rule. + * @return a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName); + Mono> replaceWithResponseAsync(String resourceGroupName, String serverName, + FirewallRuleList parameters); /** - * Creates or updates a firewall rule. + * Replaces all firewall rules on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The name of the firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param parameters The parameters 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 server firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return a server firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - String firewallRuleName, FirewallRuleInner parameters); + Mono replaceAsync(String resourceGroupName, String serverName, FirewallRuleList parameters); /** - * Creates or updates a firewall rule. + * Replaces all firewall rules on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The name of the firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param parameters The parameters 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 server firewall rule on successful completion of {@link Mono}. + * @return a server firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String serverName, String firewallRuleName, - FirewallRuleInner parameters); + Response replaceWithResponse(String resourceGroupName, String serverName, + FirewallRuleList parameters, Context context); /** - * Creates or updates a firewall rule. + * Replaces all firewall rules on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The name of the firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. - * @param context The context to associate with this operation. + * @param parameters The parameters 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 server firewall rule along with {@link Response}. + * @return a server firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String serverName, - String firewallRuleName, FirewallRuleInner parameters, Context context); + FirewallRuleInner replace(String resourceGroupName, String serverName, FirewallRuleList parameters); /** - * Creates or updates a firewall rule. + * Gets a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. - * @param parameters The required parameters 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 a server firewall rule. + * @return a firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, - FirewallRuleInner parameters); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName); /** - * Deletes a firewall rule. + * Gets a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The 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 the {@link Response} on successful completion of {@link Mono}. + * @return a firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, String firewallRuleName); + Mono getAsync(String resourceGroupName, String serverName, String firewallRuleName); /** - * Deletes a firewall rule. + * Gets a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The 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 A {@link Mono} that completes when a successful response is received. + * @return a firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String serverName, String firewallRuleName); + Response getWithResponse(String resourceGroupName, String serverName, String firewallRuleName, + Context context); /** - * Deletes a firewall rule. + * Gets a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The 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 the {@link Response}. + * @return a firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String serverName, String firewallRuleName, - Context context); + FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName); /** - * Deletes a firewall rule. + * Creates or updates a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. + * @param parameters The required parameters 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 a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String serverName, String firewallRuleName); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName, FirewallRuleInner parameters); /** - * Gets a list of firewall rules. + * Creates or updates a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param firewallRuleName The name of the firewall rule. + * @param parameters The required parameters 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 a list of firewall rules as paginated response with {@link PagedFlux}. + * @return a server firewall rule on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String serverName, String firewallRuleName, + FirewallRuleInner parameters); /** - * Gets a list of firewall rules. + * Creates or updates a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param firewallRuleName The name of the firewall rule. + * @param parameters The required parameters 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 a list of firewall rules as paginated response with {@link PagedIterable}. + * @return a server firewall rule along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String firewallRuleName, FirewallRuleInner parameters, Context context); /** - * Gets a list of firewall rules. + * Creates or updates a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param firewallRuleName The name of the firewall rule. + * @param parameters The required parameters 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 a list of firewall rules as paginated response with {@link PagedIterable}. + * @return a server firewall rule. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, + FirewallRuleInner parameters); /** - * Replaces all firewall rules on the server. + * Deletes a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The parameters parameter. + * @param firewallRuleName The 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 a server firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> replaceWithResponseAsync(String resourceGroupName, String serverName, - FirewallRuleList parameters); + Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, String firewallRuleName); /** - * Replaces all firewall rules on the server. + * Deletes a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The parameters parameter. + * @param firewallRuleName The 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 a server firewall rule on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono replaceAsync(String resourceGroupName, String serverName, FirewallRuleList parameters); + Mono deleteAsync(String resourceGroupName, String serverName, String firewallRuleName); /** - * Replaces all firewall rules on the server. + * Deletes a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The parameters parameter. + * @param firewallRuleName The 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 a server firewall rule along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response replaceWithResponse(String resourceGroupName, String serverName, - FirewallRuleList parameters, Context context); + Response deleteWithResponse(String resourceGroupName, String serverName, String firewallRuleName, + Context context); /** - * Replaces all firewall rules on the server. + * Deletes a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The parameters parameter. + * @param firewallRuleName The 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 a server firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - FirewallRuleInner replace(String resourceGroupName, String serverName, FirewallRuleList parameters); + void delete(String resourceGroupName, String serverName, String firewallRuleName); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/GeoBackupPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/GeoBackupPoliciesClient.java index 4b7be8d1ecd3..f7b6ee8b981f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/GeoBackupPoliciesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/GeoBackupPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,10 +18,61 @@ * An instance of this class provides access to all the operations defined in GeoBackupPoliciesClient. */ public interface GeoBackupPoliciesClient { + /** + * Gets a list of Geo backup policies for the given database resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a list of Geo backup policies for the given database resource as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String serverName, String databaseName); + + /** + * Gets a list of Geo backup policies for the given database resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a list of Geo backup policies for the given database resource as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String serverName, String databaseName); + + /** + * Gets a list of Geo backup policies for the given database resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a list of Geo backup policies for the given database resource as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String serverName, String databaseName, + Context context); + /** * Gets a Geo backup policy for the given database resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -38,7 +89,8 @@ Mono> getWithResponseAsync(String resourceGroupNa /** * Gets a Geo backup policy for the given database resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -54,7 +106,8 @@ Mono getAsync(String resourceGroupName, String serverName, /** * Gets a Geo backup policy for the given database resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -71,7 +124,8 @@ Response getWithResponse(String resourceGroupName, String /** * Gets a Geo backup policy for the given database resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -87,7 +141,8 @@ GeoBackupPolicyInner get(String resourceGroupName, String serverName, String dat /** * Create or update a database default Geo backup policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -104,7 +159,8 @@ Mono> createOrUpdateWithResponseAsync(String reso /** * Create or update a database default Geo backup policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -121,7 +177,8 @@ Mono createOrUpdateAsync(String resourceGroupName, String /** * Create or update a database default Geo backup policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -139,7 +196,8 @@ Response createOrUpdateWithResponse(String resourceGroupNa /** * Create or update a database default Geo backup policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. @@ -152,51 +210,4 @@ Response createOrUpdateWithResponse(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) GeoBackupPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, GeoBackupPolicyName geoBackupPolicyName, GeoBackupPolicyInner parameters); - - /** - * Gets a list of Geo backup policies for the given database resource. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 Geo backup policies for the given database resource as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String serverName, String databaseName); - - /** - * Gets a list of Geo backup policies for the given database resource. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 Geo backup policies for the given database resource as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String serverName, String databaseName); - - /** - * Gets a list of Geo backup policies for the given database resource. - * - * @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 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 Geo backup policies for the given database resource as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String serverName, String databaseName, - Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/IPv6FirewallRulesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/IPv6FirewallRulesClient.java index 0bd414dbfb65..42ece2341717 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/IPv6FirewallRulesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/IPv6FirewallRulesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -17,10 +17,54 @@ * An instance of this class provides access to all the operations defined in IPv6FirewallRulesClient. */ public interface IPv6FirewallRulesClient { + /** + * Gets a list of IPv6 firewall rules. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 IPv6 firewall rules as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Gets a list of IPv6 firewall rules. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 IPv6 firewall rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Gets a list of IPv6 firewall rules. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 IPv6 firewall rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + /** * Gets an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -35,7 +79,8 @@ Mono> getWithResponseAsync(String resourceGroupN /** * Gets an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -49,7 +94,8 @@ Mono> getWithResponseAsync(String resourceGroupN /** * Gets an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -65,7 +111,8 @@ Response getWithResponse(String resourceGroupName, String /** * Gets an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,7 +126,8 @@ Response getWithResponse(String resourceGroupName, String /** * Creates or updates an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -95,7 +143,8 @@ Mono> createOrUpdateWithResponseAsync(String res /** * Creates or updates an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -111,7 +160,8 @@ Mono createOrUpdateAsync(String resourceGroupName, String /** * Creates or updates an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -128,7 +178,8 @@ Response createOrUpdateWithResponse(String resourceGroupN /** * Creates or updates an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -144,7 +195,8 @@ IPv6FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName /** * Deletes an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -158,7 +210,8 @@ IPv6FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName /** * Deletes an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -172,7 +225,8 @@ IPv6FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName /** * Deletes an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -188,7 +242,8 @@ Response deleteWithResponse(String resourceGroupName, String serverName, S /** * Deletes an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -197,44 +252,4 @@ Response deleteWithResponse(String resourceGroupName, String serverName, S */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String firewallRuleName); - - /** - * Gets a list of IPv6 firewall rules. - * - * @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 IPv6 firewall rules as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Gets a list of IPv6 firewall rules. - * - * @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 IPv6 firewall rules as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Gets a list of IPv6 firewall rules. - * - * @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 IPv6 firewall rules as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstanceFailoverGroupsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstanceFailoverGroupsClient.java index 2717ed15c74d..3e3d4ecde138 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstanceFailoverGroupsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstanceFailoverGroupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -22,10 +22,55 @@ * An instance of this class provides access to all the operations defined in InstanceFailoverGroupsClient. */ public interface InstanceFailoverGroupsClient { + /** + * Lists the failover groups in a location. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 instance failover groups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByLocationAsync(String resourceGroupName, String locationName); + + /** + * Lists the failover groups in a location. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 instance failover groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String resourceGroupName, String locationName); + + /** + * Lists the failover groups in a location. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @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 instance failover groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String resourceGroupName, String locationName, + Context context); + /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -40,7 +85,8 @@ Mono> getWithResponseAsync(String resourceG /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -54,7 +100,8 @@ Mono> getWithResponseAsync(String resourceG /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -70,7 +117,8 @@ Response getWithResponse(String resourceGroupName, S /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -84,7 +132,8 @@ Response getWithResponse(String resourceGroupName, S /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -100,7 +149,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -116,7 +166,8 @@ PollerFlux, InstanceFailoverGroupInner> b /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -132,7 +183,8 @@ SyncPoller, InstanceFailoverGroupInner> b /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -150,7 +202,8 @@ SyncPoller, InstanceFailoverGroupInner> b /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -166,7 +219,8 @@ Mono createOrUpdateAsync(String resourceGroupName, S /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -182,7 +236,8 @@ InstanceFailoverGroupInner createOrUpdate(String resourceGroupName, String locat /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -199,7 +254,8 @@ InstanceFailoverGroupInner createOrUpdate(String resourceGroupName, String locat /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -214,7 +270,8 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -229,7 +286,8 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -244,7 +302,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -260,7 +319,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -274,7 +334,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -287,7 +348,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -298,51 +360,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String locationName, String failoverGroupName, Context context); - /** - * Lists the failover groups in a location. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 InstanceFailoverGroup list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByLocationAsync(String resourceGroupName, String locationName); - - /** - * Lists the failover groups in a location. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 InstanceFailoverGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String resourceGroupName, String locationName); - - /** - * Lists the failover groups in a location. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @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 response of a InstanceFailoverGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String resourceGroupName, String locationName, - Context context); - /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -357,7 +379,8 @@ Mono>> failoverWithResponseAsync(String resourceGroupN /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -372,7 +395,8 @@ Mono>> failoverWithResponseAsync(String resourceGroupN /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -387,7 +411,8 @@ Mono>> failoverWithResponseAsync(String resourceGroupN /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -403,7 +428,8 @@ Mono>> failoverWithResponseAsync(String resourceGroupN /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -418,7 +444,8 @@ Mono failoverAsync(String resourceGroupName, String /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -432,7 +459,8 @@ Mono failoverAsync(String resourceGroupName, String /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -449,7 +477,8 @@ InstanceFailoverGroupInner failover(String resourceGroupName, String locationNam * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -465,7 +494,8 @@ Mono>> forceFailoverAllowDataLossWithResponseAsync(Str * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -481,7 +511,8 @@ Mono>> forceFailoverAllowDataLossWithResponseAsync(Str * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -497,7 +528,8 @@ Mono>> forceFailoverAllowDataLossWithResponseAsync(Str * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -514,7 +546,8 @@ SyncPoller, InstanceFailoverGroupInner> b * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -530,7 +563,8 @@ Mono forceFailoverAllowDataLossAsync(String resource * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -546,7 +580,8 @@ InstanceFailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolOperationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolOperationsClient.java deleted file mode 100644 index ca51210a050a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolOperationsClient.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.InstancePoolOperationInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in InstancePoolOperationsClient. - */ -public interface InstancePoolOperationsClient { - /** - * Gets a management operation on a instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param operationId The operationId 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 management operation on a instance pool along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String instancePoolName, - String operationId); - - /** - * Gets a management operation on a instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param operationId The operationId 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 management operation on a instance pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String instancePoolName, String operationId); - - /** - * Gets a management operation on a instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param operationId The operationId 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 management operation on a instance pool along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String instancePoolName, - String operationId, Context context); - - /** - * Gets a management operation on a instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param operationId The operationId 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 management operation on a instance pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - InstancePoolOperationInner get(String resourceGroupName, String instancePoolName, String operationId); - - /** - * Gets a list of operations performed on the instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 operations performed on the instance pool as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName); - - /** - * Gets a list of operations performed on the instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 operations performed on the instance pool as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstancePool(String resourceGroupName, String instancePoolName); - - /** - * Gets a list of operations performed on the instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @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 operations performed on the instance pool as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstancePool(String resourceGroupName, String instancePoolName, - Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolsClient.java index a54e614b3d45..bf5474d6cd37 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -28,171 +28,142 @@ public interface InstancePoolsClient extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { /** - * Gets an instance pool. + * Gets a list of all instance pools in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance pool along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all instance pools in the subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String instancePoolName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); /** - * Gets an instance pool. + * Gets a list of all instance pools in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance pool on successful completion of {@link Mono}. + * @return a list of all instance pools in the subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String instancePoolName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * Gets an instance pool. + * Gets a list of all instance pools in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. * @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 an instance pool along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String instancePoolName, - Context context); - - /** - * Gets an instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance pool. + * @return a list of all instance pools in the subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - InstancePoolInner getByResourceGroup(String resourceGroupName, String instancePoolName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); /** - * Creates or updates an instance pool. + * Gets a list of instance pools in the resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL instance pool along with {@link Response} on successful completion of {@link Mono}. + * @return a list of instance pools in the resource group as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String instancePoolName, - InstancePoolInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); /** - * Creates or updates an instance pool. + * Gets a list of instance pools in the resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an Azure SQL instance pool. + * @return a list of instance pools in the resource group as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, InstancePoolInner> beginCreateOrUpdateAsync(String resourceGroupName, - String instancePoolName, InstancePoolInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Creates or updates an instance pool. + * Gets a list of instance pools in the resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 an Azure SQL instance pool. + * @return a list of instance pools in the resource group as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InstancePoolInner> beginCreateOrUpdate(String resourceGroupName, - String instancePoolName, InstancePoolInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Creates or updates an instance pool. + * Gets an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource 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 the {@link SyncPoller} for polling of an Azure SQL instance pool. + * @return an instance pool along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InstancePoolInner> beginCreateOrUpdate(String resourceGroupName, - String instancePoolName, InstancePoolInner parameters, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String instancePoolName); /** - * Creates or updates an instance pool. + * Gets an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource 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 an Azure SQL instance pool on successful completion of {@link Mono}. + * @return an instance pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String instancePoolName, - InstancePoolInner parameters); + Mono getByResourceGroupAsync(String resourceGroupName, String instancePoolName); /** - * Creates or updates an instance pool. + * Gets an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource 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 an Azure SQL instance pool. + * @return an instance pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - InstancePoolInner createOrUpdate(String resourceGroupName, String instancePoolName, InstancePoolInner parameters); + Response getByResourceGroupWithResponse(String resourceGroupName, String instancePoolName, + Context context); /** - * Creates or updates an instance pool. + * Gets an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource 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 an Azure SQL instance pool. + * @return an instance pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - InstancePoolInner createOrUpdate(String resourceGroupName, String instancePoolName, InstancePoolInner parameters, - Context context); + InstancePoolInner getByResourceGroup(String resourceGroupName, String instancePoolName); /** - * Updates an instance pool. + * Creates or updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -200,14 +171,15 @@ InstancePoolInner createOrUpdate(String resourceGroupName, String instancePoolNa * @return an Azure SQL instance pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String instancePoolName, - InstancePoolUpdate parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String instancePoolName, + InstancePoolInner parameters); /** - * Updates an instance pool. + * Creates or updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -215,14 +187,15 @@ Mono>> updateWithResponseAsync(String resourceGroupNam * @return the {@link PollerFlux} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, InstancePoolInner> beginUpdateAsync(String resourceGroupName, - String instancePoolName, InstancePoolUpdate parameters); + PollerFlux, InstancePoolInner> beginCreateOrUpdateAsync(String resourceGroupName, + String instancePoolName, InstancePoolInner parameters); /** - * Updates an instance pool. + * Creates or updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -230,14 +203,15 @@ PollerFlux, InstancePoolInner> beginUpdateAsync(St * @return the {@link SyncPoller} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InstancePoolInner> beginUpdate(String resourceGroupName, - String instancePoolName, InstancePoolUpdate parameters); + SyncPoller, InstancePoolInner> beginCreateOrUpdate(String resourceGroupName, + String instancePoolName, InstancePoolInner parameters); /** - * Updates an instance pool. + * Creates or updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -246,14 +220,15 @@ SyncPoller, InstancePoolInner> beginUpdate(String * @return the {@link SyncPoller} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InstancePoolInner> beginUpdate(String resourceGroupName, - String instancePoolName, InstancePoolUpdate parameters, Context context); + SyncPoller, InstancePoolInner> beginCreateOrUpdate(String resourceGroupName, + String instancePoolName, InstancePoolInner parameters, Context context); /** - * Updates an instance pool. + * Creates or updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -261,14 +236,15 @@ SyncPoller, InstancePoolInner> beginUpdate(String * @return an Azure SQL instance pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String instancePoolName, - InstancePoolUpdate parameters); + Mono createOrUpdateAsync(String resourceGroupName, String instancePoolName, + InstancePoolInner parameters); /** - * Updates an instance pool. + * Creates or updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -276,13 +252,14 @@ Mono updateAsync(String resourceGroupName, String instancePoo * @return an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - InstancePoolInner update(String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters); + InstancePoolInner createOrUpdate(String resourceGroupName, String instancePoolName, InstancePoolInner parameters); /** - * Updates an instance pool. + * Creates or updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -291,14 +268,15 @@ Mono updateAsync(String resourceGroupName, String instancePoo * @return an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - InstancePoolInner update(String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters, + InstancePoolInner createOrUpdate(String resourceGroupName, String instancePoolName, InstancePoolInner parameters, Context context); /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -310,8 +288,9 @@ InstancePoolInner update(String resourceGroupName, String instancePoolName, Inst /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -323,8 +302,9 @@ InstancePoolInner update(String resourceGroupName, String instancePoolName, Inst /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -336,8 +316,9 @@ InstancePoolInner update(String resourceGroupName, String instancePoolName, Inst /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @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. @@ -350,8 +331,9 @@ InstancePoolInner update(String resourceGroupName, String instancePoolName, Inst /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -363,8 +345,9 @@ InstancePoolInner update(String resourceGroupName, String instancePoolName, Inst /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -375,8 +358,9 @@ InstancePoolInner update(String resourceGroupName, String instancePoolName, Inst /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @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. @@ -386,71 +370,115 @@ InstancePoolInner update(String resourceGroupName, String instancePoolName, Inst void delete(String resourceGroupName, String instancePoolName, Context context); /** - * Gets a list of instance pools in the resource group. + * Updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 list of instance pools in the resource group as paginated response with {@link PagedFlux}. + * @return an Azure SQL instance pool along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String instancePoolName, + InstancePoolUpdate parameters); /** - * Gets a list of instance pools in the resource group. + * Updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 list of instance pools in the resource group as paginated response with {@link PagedIterable}. + * @return the {@link PollerFlux} for polling of an Azure SQL instance pool. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, InstancePoolInner> beginUpdateAsync(String resourceGroupName, + String instancePoolName, InstancePoolUpdate parameters); /** - * Gets a list of instance pools in the resource group. + * Updates an instance pool. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 the {@link SyncPoller} for polling of an Azure SQL instance pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InstancePoolInner> beginUpdate(String resourceGroupName, + String instancePoolName, InstancePoolUpdate parameters); + + /** + * Updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 list of instance pools in the resource group as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of an Azure SQL instance pool. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InstancePoolInner> beginUpdate(String resourceGroupName, + String instancePoolName, InstancePoolUpdate parameters, Context context); /** - * Gets a list of all instance pools in the subscription. + * Updates an instance pool. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 list of all instance pools in the subscription as paginated response with {@link PagedFlux}. + * @return an Azure SQL instance pool on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String instancePoolName, + InstancePoolUpdate parameters); /** - * Gets a list of all instance pools in the subscription. + * Updates an instance pool. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 list of all instance pools in the subscription as paginated response with {@link PagedIterable}. + * @return an Azure SQL instance pool. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + @ServiceMethod(returns = ReturnType.SINGLE) + InstancePoolInner update(String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters); /** - * Gets a list of all instance pools in the subscription. + * Updates an instance pool. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 list of all instance pools in the subscription as paginated response with {@link PagedIterable}. + * @return an Azure SQL instance pool. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + InstancePoolInner update(String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters, + Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobAgentsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobAgentsClient.java index 63c112a5c119..3bbb173095c9 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobAgentsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobAgentsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,10 +23,54 @@ * An instance of this class provides access to all the operations defined in JobAgentsClient. */ public interface JobAgentsClient { + /** + * Gets a list of job agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 job agents in a server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Gets a list of job agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 job agents in a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Gets a list of job agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 job agents in a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + /** * Gets a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -41,7 +85,8 @@ Mono> getWithResponseAsync(String resourceGroupName, Str /** * Gets a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -55,7 +100,8 @@ Mono> getWithResponseAsync(String resourceGroupName, Str /** * Gets a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @param context The context to associate with this operation. @@ -71,7 +117,8 @@ Response getWithResponse(String resourceGroupName, String serverN /** * Gets a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -85,9 +132,10 @@ Response getWithResponse(String resourceGroupName, String serverN /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -101,9 +149,10 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -117,9 +166,10 @@ PollerFlux, JobAgentInner> beginCreateOrUpdateAsync(St /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -133,9 +183,10 @@ SyncPoller, JobAgentInner> beginCreateOrUpdate(String /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -150,9 +201,10 @@ SyncPoller, JobAgentInner> beginCreateOrUpdate(String /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -166,9 +218,10 @@ Mono createOrUpdateAsync(String resourceGroupName, String serverN /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -182,9 +235,10 @@ JobAgentInner createOrUpdate(String resourceGroupName, String serverName, String /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -197,256 +251,230 @@ JobAgentInner createOrUpdate(String resourceGroupName, String serverName, String JobAgentInner parameters, Context context); /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL job agent along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, JobAgentUpdate parameters); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName); /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an Azure SQL job agent. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, JobAgentInner> beginUpdateAsync(String resourceGroupName, String serverName, - String jobAgentName, JobAgentUpdate parameters); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String jobAgentName); /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an Azure SQL job agent. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobAgentInner> beginUpdate(String resourceGroupName, String serverName, - String jobAgentName, JobAgentUpdate parameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String jobAgentName); /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @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 an Azure SQL job agent. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobAgentInner> beginUpdate(String resourceGroupName, String serverName, - String jobAgentName, JobAgentUpdate parameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String jobAgentName, + Context context); /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL job agent on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, String jobAgentName, - JobAgentUpdate parameters); + Mono deleteAsync(String resourceGroupName, String serverName, String jobAgentName); /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobAgentInner update(String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters); + void delete(String resourceGroupName, String serverName, String jobAgentName); /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @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 an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobAgentInner update(String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters, - Context context); + void delete(String resourceGroupName, String serverName, String jobAgentName, Context context); /** - * Deletes a job agent. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an Azure SQL job agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName); + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, JobAgentUpdate parameters); /** - * Deletes a job agent. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, - String jobAgentName); + PollerFlux, JobAgentInner> beginUpdateAsync(String resourceGroupName, String serverName, + String jobAgentName, JobAgentUpdate parameters); /** - * Deletes a job agent. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String jobAgentName); + SyncPoller, JobAgentInner> beginUpdate(String resourceGroupName, String serverName, + String jobAgentName, JobAgentUpdate parameters); /** - * Deletes a job agent. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @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 the {@link SyncPoller} for polling of an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String jobAgentName, - Context context); + SyncPoller, JobAgentInner> beginUpdate(String resourceGroupName, String serverName, + String jobAgentName, JobAgentUpdate parameters, Context context); /** - * Deletes a job agent. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an Azure SQL job agent on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String serverName, String jobAgentName); + Mono updateAsync(String resourceGroupName, String serverName, String jobAgentName, + JobAgentUpdate parameters); /** - * Deletes a job agent. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String serverName, String jobAgentName); + JobAgentInner update(String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters); /** - * Deletes a job agent. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @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 an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String serverName, String jobAgentName, Context context); - - /** - * Gets a list of job agents 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 job agents in a server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Gets a list of job agents 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 job agents in a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Gets a list of job agents in 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 job agents in a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + JobAgentInner update(String resourceGroupName, String serverName, String jobAgentName, JobAgentUpdate parameters, + Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobCredentialsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobCredentialsClient.java index aca764c00761..bb523a8f7935 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobCredentialsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobCredentialsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -17,12 +17,60 @@ * An instance of this class provides access to all the operations defined in JobCredentialsClient. */ public interface JobCredentialsClient { + /** + * Gets a list of jobs credentials. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 jobs credentials as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName); + + /** + * Gets a list of jobs credentials. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 jobs credentials as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName); + + /** + * Gets a list of jobs credentials. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @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 jobs credentials as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName, + Context context); + /** * Gets a jobs credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,9 +84,10 @@ Mono> getWithResponseAsync(String resourceGroupName /** * Gets a jobs credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -52,9 +101,10 @@ Mono getAsync(String resourceGroupName, String serverName, S /** * Gets a jobs credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -69,9 +119,10 @@ Response getWithResponse(String resourceGroupName, String se /** * Gets a jobs credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -84,9 +135,10 @@ Response getWithResponse(String resourceGroupName, String se /** * Creates or updates a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @param parameters The requested job credential state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -102,9 +154,10 @@ Mono> createOrUpdateWithResponseAsync(String resour /** * Creates or updates a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @param parameters The requested job credential state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -120,9 +173,10 @@ Mono createOrUpdateAsync(String resourceGroupName, String se /** * Creates or updates a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @param parameters The requested job credential state. * @param context The context to associate with this operation. @@ -138,9 +192,10 @@ Response createOrUpdateWithResponse(String resourceGroupName /** * Creates or updates a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @param parameters The requested job credential state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -155,9 +210,10 @@ JobCredentialInner createOrUpdate(String resourceGroupName, String serverName, S /** * Deletes a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -171,9 +227,10 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String se /** * Deletes a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -186,9 +243,10 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String se /** * Deletes a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -203,9 +261,10 @@ Response deleteWithResponse(String resourceGroupName, String serverName, S /** * Deletes a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -213,48 +272,4 @@ Response deleteWithResponse(String resourceGroupName, String serverName, S */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String jobAgentName, String credentialName); - - /** - * Gets a list of jobs credentials. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 jobs credentials as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName); - - /** - * Gets a list of jobs credentials. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 jobs credentials as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName); - - /** - * Gets a list of jobs credentials. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 jobs credentials as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName, - Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobExecutionsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobExecutionsClient.java index ae0c17e18ed1..1d7377503890 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobExecutionsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobExecutionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -24,10 +24,175 @@ * An instance of this class provides access to all the operations defined in JobExecutionsClient. */ public interface JobExecutionsClient { + /** + * Lists all executions in a job agent. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param createTimeMin If specified, only job executions created at or after the specified time are included. + * @param createTimeMax If specified, only job executions created before the specified time are included. + * @param endTimeMin If specified, only job executions completed at or after the specified time are included. + * @param endTimeMax If specified, only job executions completed before the specified time are included. + * @param isActive If specified, only active or only completed job executions are included. + * @param skip The number of elements in the collection to skip. + * @param top The number of elements to return from the collection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 job executions as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName, + OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top); + + /** + * Lists all executions in a job agent. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 job executions as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName); + + /** + * Lists all executions in a job agent. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 job executions as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName); + + /** + * Lists all executions in a job agent. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param createTimeMin If specified, only job executions created at or after the specified time are included. + * @param createTimeMax If specified, only job executions created before the specified time are included. + * @param endTimeMin If specified, only job executions completed at or after the specified time are included. + * @param endTimeMax If specified, only job executions completed before the specified time are included. + * @param isActive If specified, only active or only completed job executions are included. + * @param skip The number of elements in the collection to skip. + * @param top The number of elements to return from the collection. + * @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 job executions as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName, + OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context); + + /** + * Lists a job's executions. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param createTimeMin If specified, only job executions created at or after the specified time are included. + * @param createTimeMax If specified, only job executions created before the specified time are included. + * @param endTimeMin If specified, only job executions completed at or after the specified time are included. + * @param endTimeMax If specified, only job executions completed before the specified time are included. + * @param isActive If specified, only active or only completed job executions are included. + * @param skip The number of elements in the collection to skip. + * @param top The number of elements to return from the collection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 job executions as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top); + + /** + * Lists a job's executions. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 job executions as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName); + + /** + * Lists a job's executions. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 job executions as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName); + + /** + * Lists a job's executions. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param createTimeMin If specified, only job executions created at or after the specified time are included. + * @param createTimeMax If specified, only job executions created before the specified time are included. + * @param endTimeMin If specified, only job executions completed at or after the specified time are included. + * @param endTimeMax If specified, only job executions completed before the specified time are included. + * @param isActive If specified, only active or only completed job executions are included. + * @param skip The number of elements in the collection to skip. + * @param top The number of elements to return from the collection. + * @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 job executions as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context); + /** * Gets a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -44,7 +209,8 @@ Mono> getWithResponseAsync(String resourceGroupName, /** * Gets a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -61,7 +227,8 @@ Mono getAsync(String resourceGroupName, String serverName, St /** * Gets a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -79,7 +246,8 @@ Response getWithResponse(String resourceGroupName, String ser /** * Gets a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -96,11 +264,12 @@ JobExecutionInner get(String resourceGroupName, String serverName, String jobAge /** * Creates or updates a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -113,11 +282,12 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -130,11 +300,12 @@ PollerFlux, JobExecutionInner> beginCreateOrUpdate /** * Creates or updates a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -147,11 +318,12 @@ SyncPoller, JobExecutionInner> beginCreateOrUpdate /** * Creates or updates a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. * @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. @@ -165,11 +337,12 @@ SyncPoller, JobExecutionInner> beginCreateOrUpdate /** * Creates or updates a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 +355,12 @@ Mono createOrUpdateAsync(String resourceGroupName, String ser /** * Creates or updates a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 +373,12 @@ JobExecutionInner createOrUpdate(String resourceGroupName, String serverName, St /** * Creates or updates a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. * @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. @@ -217,11 +392,12 @@ JobExecutionInner createOrUpdate(String resourceGroupName, String serverName, St /** * Requests cancellation of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param jobExecutionId The id of the job execution to cancel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -234,11 +410,12 @@ Mono> cancelWithResponseAsync(String resourceGroupName, String se /** * Requests cancellation of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param jobExecutionId The id of the job execution to cancel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -251,11 +428,12 @@ Mono cancelAsync(String resourceGroupName, String serverName, String jobAg /** * Requests cancellation of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param jobExecutionId The id of the job execution to cancel. * @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. @@ -269,11 +447,12 @@ Response cancelWithResponse(String resourceGroupName, String serverName, S /** * Requests cancellation of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param jobExecutionId The id of the job execution to cancel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -281,168 +460,13 @@ Response cancelWithResponse(String resourceGroupName, String serverName, S @ServiceMethod(returns = ReturnType.SINGLE) void cancel(String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); - /** - * Lists a job's executions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param createTimeMin If specified, only job executions created at or after the specified time are included. - * @param createTimeMax If specified, only job executions created before the specified time are included. - * @param endTimeMin If specified, only job executions completed at or after the specified time are included. - * @param endTimeMax If specified, only job executions completed before the specified time are included. - * @param isActive If specified, only active or only completed job executions are included. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 JobExecution list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top); - - /** - * Lists a job's executions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 JobExecution list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName); - - /** - * Lists a job's executions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 JobExecution list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, - String jobName); - - /** - * Lists a job's executions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param createTimeMin If specified, only job executions created at or after the specified time are included. - * @param createTimeMax If specified, only job executions created before the specified time are included. - * @param endTimeMin If specified, only job executions completed at or after the specified time are included. - * @param endTimeMax If specified, only job executions completed before the specified time are included. - * @param isActive If specified, only active or only completed job executions are included. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @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 response of a JobExecution list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, - String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context); - - /** - * Lists all executions in a job agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param createTimeMin If specified, only job executions created at or after the specified time are included. - * @param createTimeMax If specified, only job executions created before the specified time are included. - * @param endTimeMin If specified, only job executions completed at or after the specified time are included. - * @param endTimeMax If specified, only job executions completed before the specified time are included. - * @param isActive If specified, only active or only completed job executions are included. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 JobExecution list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName, - OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top); - - /** - * Lists all executions in a job agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 JobExecution list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName); - - /** - * Lists all executions in a job agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 JobExecution list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName); - - /** - * Lists all executions in a job agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param createTimeMin If specified, only job executions created at or after the specified time are included. - * @param createTimeMax If specified, only job executions created before the specified time are included. - * @param endTimeMin If specified, only job executions completed at or after the specified time are included. - * @param endTimeMax If specified, only job executions completed before the specified time are included. - * @param isActive If specified, only active or only completed job executions are included. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @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 response of a JobExecution list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName, - OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context); - /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -456,9 +480,10 @@ Mono>> createWithResponseAsync(String resourceGroupNam /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -472,9 +497,10 @@ PollerFlux, JobExecutionInner> beginCreateAsync(St /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -488,9 +514,10 @@ SyncPoller, JobExecutionInner> beginCreate(String /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -505,9 +532,10 @@ SyncPoller, JobExecutionInner> beginCreate(String /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -521,9 +549,10 @@ Mono createAsync(String resourceGroupName, String serverName, /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -536,9 +565,10 @@ Mono createAsync(String resourceGroupName, String serverName, /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobPrivateEndpointsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobPrivateEndpointsClient.java deleted file mode 100644 index 55b78c63c0af..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobPrivateEndpointsClient.java +++ /dev/null @@ -1,370 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.JobPrivateEndpointInner; -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 JobPrivateEndpointsClient. - */ -public interface JobPrivateEndpointsClient { - /** - * Gets a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String privateEndpointName); - - /** - * Gets a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, - String privateEndpointName); - - /** - * Gets a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @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 private endpoint along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, - String privateEndpointName, Context context); - - /** - * Gets a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobPrivateEndpointInner get(String resourceGroupName, String serverName, String jobAgentName, - String privateEndpointName); - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 job agent private endpoint along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String privateEndpointName, JobPrivateEndpointInner parameters); - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 the {@link PollerFlux} for polling of a job agent private endpoint. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, JobPrivateEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, String privateEndpointName, - JobPrivateEndpointInner parameters); - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 the {@link SyncPoller} for polling of a job agent private endpoint. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobPrivateEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, String privateEndpointName, - JobPrivateEndpointInner parameters); - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 the {@link SyncPoller} for polling of a job agent private endpoint. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobPrivateEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, String privateEndpointName, - JobPrivateEndpointInner parameters, Context context); - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 job agent private endpoint on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, - String privateEndpointName, JobPrivateEndpointInner parameters); - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 job agent private endpoint. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobPrivateEndpointInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, - String privateEndpointName, JobPrivateEndpointInner parameters); - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 job agent private endpoint. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobPrivateEndpointInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, - String privateEndpointName, JobPrivateEndpointInner parameters, Context context); - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 jobAgentName, String privateEndpointName); - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 jobAgentName, String privateEndpointName); - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 jobAgentName, - String privateEndpointName); - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @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 jobAgentName, - String privateEndpointName, Context context); - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 jobAgentName, - String privateEndpointName); - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 jobAgentName, String privateEndpointName); - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @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 jobAgentName, String privateEndpointName, - Context context); - - /** - * Gets a list of job agent private endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 job agent private endpoints as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByAgentAsync(String resourceGroupName, String serverName, - String jobAgentName); - - /** - * Gets a list of job agent private endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 job agent private endpoints as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAgent(String resourceGroupName, String serverName, - String jobAgentName); - - /** - * Gets a list of job agent private endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 job agent private endpoints as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName, - Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepExecutionsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepExecutionsClient.java index b62a815c65ff..4c0c44bde3be 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepExecutionsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepExecutionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -20,86 +20,77 @@ */ public interface JobStepExecutionsClient { /** - * Gets a step execution of a job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. - * @param stepName The name of the step. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a step execution of a job execution along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, UUID jobExecutionId, String stepName); - - /** - * Gets a step execution of a job execution. + * Lists the step executions of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. - * @param stepName The name of the step. + * @param jobExecutionId The id of the job execution. + * @param createTimeMin If specified, only job executions created at or after the specified time are included. + * @param createTimeMax If specified, only job executions created before the specified time are included. + * @param endTimeMin If specified, only job executions completed at or after the specified time are included. + * @param endTimeMax If specified, only job executions completed before the specified time are included. + * @param isActive If specified, only active or only completed job executions are included. + * @param skip The number of elements in the collection to skip. + * @param top The number of elements to return from the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a step execution of a job execution on successful completion of {@link Mono}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, - UUID jobExecutionId, String stepName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, + Long top); /** - * Gets a step execution of a job execution. + * Lists the step executions of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. - * @param stepName The name of the step. - * @param context The context to associate with this operation. + * @param jobExecutionId The id of the job execution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a step execution of a job execution along with {@link Response}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, - String jobName, UUID jobExecutionId, String stepName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId); /** - * Gets a step execution of a job execution. + * Lists the step executions of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. - * @param stepName The name of the step. + * @param jobExecutionId The id of the job execution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a step execution of a job execution. + * @return a list of job executions as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobExecutionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, - UUID jobExecutionId, String stepName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByJobExecution(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId); /** * Lists the step executions of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. * @param endTimeMin If specified, only job executions completed at or after the specified time are included. @@ -107,75 +98,92 @@ JobExecutionInner get(String resourceGroupName, String serverName, String jobAge * @param isActive If specified, only active or only completed job executions are included. * @param skip The number of elements in the collection to skip. * @param top The number of elements to return from the collection. + * @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 response of a JobExecution list operation as paginated response with {@link PagedFlux}. + * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, + PagedIterable listByJobExecution(String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, - Long top); + Long top, Context context); /** - * Lists the step executions of a job execution. + * Gets a step execution of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param jobExecutionId The unique id of the job execution. + * @param stepName The name of the step. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 JobExecution list operation as paginated response with {@link PagedFlux}. + * @return a step execution of a job execution along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, UUID jobExecutionId); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, String stepName); /** - * Lists the step executions of a job execution. + * Gets a step execution of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param jobExecutionId The unique id of the job execution. + * @param stepName The name of the step. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 JobExecution list operation as paginated response with {@link PagedIterable}. + * @return a step execution of a job execution on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJobExecution(String resourceGroupName, String serverName, - String jobAgentName, String jobName, UUID jobExecutionId); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId, String stepName); /** - * Lists the step executions of a job execution. + * Gets a step execution of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param jobExecutionId The unique id of the job execution. - * @param createTimeMin If specified, only job executions created at or after the specified time are included. - * @param createTimeMax If specified, only job executions created before the specified time are included. - * @param endTimeMin If specified, only job executions completed at or after the specified time are included. - * @param endTimeMax If specified, only job executions completed before the specified time are included. - * @param isActive If specified, only active or only completed job executions are included. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. + * @param stepName The name of the step. * @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 response of a JobExecution list operation as paginated response with {@link PagedIterable}. + * @return a step execution of a job execution along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJobExecution(String resourceGroupName, String serverName, - String jobAgentName, String jobName, UUID jobExecutionId, OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, - Long top, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName, Context context); + + /** + * Gets a step execution of a job execution. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution. + * @param stepName The name of the step. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a step execution of a job execution. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JobExecutionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId, String stepName); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepsClient.java index af9c3fbcb030..4a17d8ce9f9d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobStepsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -17,10 +17,63 @@ * An instance of this class provides access to all the operations defined in JobStepsClient. */ public interface JobStepsClient { + /** + * Gets all job steps for a job's current version. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 job steps for a job's current version as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName); + + /** + * Gets all job steps for a job's current version. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 job steps for a job's current version as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName); + + /** + * Gets all job steps for a job's current version. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @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 all job steps for a job's current version as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName, Context context); + /** * Gets a job step in a job's current version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -38,7 +91,8 @@ Mono> getWithResponseAsync(String resourceGroupName, Stri /** * Gets a job step in a job's current version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -55,7 +109,8 @@ Mono getAsync(String resourceGroupName, String serverName, String /** * Gets a job step in a job's current version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -73,7 +128,8 @@ Response getWithResponse(String resourceGroupName, String serverNa /** * Gets a job step in a job's current version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -89,7 +145,8 @@ Response getWithResponse(String resourceGroupName, String serverNa /** * Creates or updates a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -107,7 +164,8 @@ Mono> createOrUpdateWithResponseAsync(String resourceGrou /** * Creates or updates a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -125,7 +183,8 @@ Mono createOrUpdateAsync(String resourceGroupName, String serverNa /** * Creates or updates a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -144,7 +203,8 @@ Response createOrUpdateWithResponse(String resourceGroupName, Stri /** * Creates or updates a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -162,11 +222,12 @@ JobStepInner createOrUpdate(String resourceGroupName, String serverName, String /** * Deletes a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. - * @param stepName The name of the job step. + * @param stepName The name of the job step to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -179,11 +240,12 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String se /** * Deletes a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. - * @param stepName The name of the job step. + * @param stepName The name of the job step to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -196,11 +258,12 @@ Mono deleteAsync(String resourceGroupName, String serverName, String jobAg /** * Deletes a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. - * @param stepName The name of the job step. + * @param stepName The name of the job step to delete. * @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. @@ -214,11 +277,12 @@ Response deleteWithResponse(String resourceGroupName, String serverName, S /** * Deletes a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. - * @param stepName The name of the job step. + * @param stepName The name of the job step to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -227,58 +291,65 @@ Response deleteWithResponse(String resourceGroupName, String serverName, S void delete(String resourceGroupName, String serverName, String jobAgentName, String jobName, String stepName); /** - * Gets all job steps for a job's current version. + * Gets all job steps in the specified job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. + * @param jobVersion The version of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 job steps for a job's current version as paginated response with {@link PagedFlux}. + * @return all job steps in the specified job version as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName); + PagedFlux listByVersionAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion); /** - * Gets all job steps for a job's current version. + * Gets all job steps in the specified job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. + * @param jobVersion The version of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 job steps for a job's current version as paginated response with {@link PagedIterable}. + * @return all job steps in the specified job version as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, - String jobName); + PagedIterable listByVersion(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion); /** - * Gets all job steps for a job's current version. + * Gets all job steps in the specified job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. + * @param jobVersion The version of the job to get. * @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 all job steps for a job's current version as paginated response with {@link PagedIterable}. + * @return all job steps in the specified job version as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, - String jobName, Context context); + PagedIterable listByVersion(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion, Context context); /** * Gets the specified version of a job step. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -296,7 +367,8 @@ Mono> getByVersionWithResponseAsync(String resourceGroupN /** * Gets the specified version of a job step. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -314,7 +386,8 @@ Mono getByVersionAsync(String resourceGroupName, String serverName /** * Gets the specified version of a job step. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -333,7 +406,8 @@ Response getByVersionWithResponse(String resourceGroupName, String /** * Gets the specified version of a job step. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -347,56 +421,4 @@ Response getByVersionWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) JobStepInner getByVersion(String resourceGroupName, String serverName, String jobAgentName, String jobName, int jobVersion, String stepName); - - /** - * Gets all job steps in the specified job version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 job steps in the specified job version as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByVersionAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName, int jobVersion); - - /** - * Gets all job steps in the specified job version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 job steps in the specified job version as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByVersion(String resourceGroupName, String serverName, String jobAgentName, - String jobName, int jobVersion); - - /** - * Gets all job steps in the specified job version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. - * @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 all job steps in the specified job version as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByVersion(String resourceGroupName, String serverName, String jobAgentName, - String jobName, int jobVersion, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetExecutionsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetExecutionsClient.java index 25781bb5f4c1..5db89980a2ac 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetExecutionsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetExecutionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -20,90 +20,80 @@ */ public interface JobTargetExecutionsClient { /** - * Gets a target execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. - * @param stepName The name of the step. - * @param targetId The target 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 target execution along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, UUID jobExecutionId, String stepName, UUID targetId); - - /** - * Gets a target execution. + * Lists the target executions of a job step execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param stepName The name of the step. - * @param targetId The target id. + * @param createTimeMin If specified, only job executions created at or after the specified time are included. + * @param createTimeMax If specified, only job executions created before the specified time are included. + * @param endTimeMin If specified, only job executions completed at or after the specified time are included. + * @param endTimeMax If specified, only job executions completed before the specified time are included. + * @param isActive If specified, only active or only completed job executions are included. + * @param skip The number of elements in the collection to skip. + * @param top The number of elements to return from the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a target execution on successful completion of {@link Mono}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, - UUID jobExecutionId, String stepName, UUID targetId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByStepAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName, OffsetDateTime createTimeMin, + OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, + Long top); /** - * Gets a target execution. + * Lists the target executions of a job step execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param stepName The name of the step. - * @param targetId The target 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 target execution along with {@link Response}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, - String jobName, UUID jobExecutionId, String stepName, UUID targetId, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByStepAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName); /** - * Gets a target execution. + * Lists the target executions of a job step execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param stepName The name of the step. - * @param targetId The target 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 target execution. + * @return a list of job executions as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobExecutionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, - UUID jobExecutionId, String stepName, UUID targetId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByStep(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName); /** * Lists the target executions of a job step execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param stepName The name of the step. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. @@ -112,88 +102,107 @@ JobExecutionInner get(String resourceGroupName, String serverName, String jobAge * @param isActive If specified, only active or only completed job executions are included. * @param skip The number of elements in the collection to skip. * @param top The number of elements to return from the collection. + * @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 response of a JobExecution list operation as paginated response with {@link PagedFlux}. + * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByStepAsync(String resourceGroupName, String serverName, String jobAgentName, + PagedIterable listByStep(String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId, String stepName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, - Long top); + Long top, Context context); /** - * Lists the target executions of a job step execution. + * Gets a target execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param jobExecutionId The unique id of the job execution. * @param stepName The name of the step. + * @param targetId The target 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 response of a JobExecution list operation as paginated response with {@link PagedFlux}. + * @return a target execution along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByStepAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName, UUID jobExecutionId, String stepName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, String stepName, UUID targetId); /** - * Lists the target executions of a job step execution. + * Gets a target execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param jobExecutionId The unique id of the job execution. * @param stepName The name of the step. + * @param targetId The target 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 response of a JobExecution list operation as paginated response with {@link PagedIterable}. + * @return a target execution on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByStep(String resourceGroupName, String serverName, String jobAgentName, - String jobName, UUID jobExecutionId, String stepName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId, String stepName, UUID targetId); /** - * Lists the target executions of a job step execution. + * Gets a target execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param jobExecutionId The unique id of the job execution. * @param stepName The name of the step. - * @param createTimeMin If specified, only job executions created at or after the specified time are included. - * @param createTimeMax If specified, only job executions created before the specified time are included. - * @param endTimeMin If specified, only job executions completed at or after the specified time are included. - * @param endTimeMax If specified, only job executions completed before the specified time are included. - * @param isActive If specified, only active or only completed job executions are included. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. + * @param targetId The target 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 response of a JobExecution list operation as paginated response with {@link PagedIterable}. + * @return a target execution along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByStep(String resourceGroupName, String serverName, String jobAgentName, - String jobName, UUID jobExecutionId, String stepName, OffsetDateTime createTimeMin, - OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, - Long top, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName, UUID targetId, Context context); + + /** + * Gets a target execution. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution. + * @param stepName The name of the step. + * @param targetId The target 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 target execution. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JobExecutionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId, String stepName, UUID targetId); /** * Lists target executions for all steps of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. * @param jobExecutionId The id of the job execution. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. @@ -205,7 +214,7 @@ PagedIterable listByStep(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 the response of a JobExecution list operation as paginated response with {@link PagedFlux}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, @@ -216,15 +225,16 @@ PagedFlux listByJobExecutionAsync(String resourceGroupName, S /** * Lists target executions for all steps of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. * @param jobExecutionId The id of the job execution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 JobExecution list operation as paginated response with {@link PagedFlux}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, @@ -233,15 +243,16 @@ PagedFlux listByJobExecutionAsync(String resourceGroupName, S /** * Lists target executions for all steps of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. * @param jobExecutionId The id of the job execution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 JobExecution list operation as paginated response with {@link PagedIterable}. + * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByJobExecution(String resourceGroupName, String serverName, @@ -250,10 +261,11 @@ PagedIterable listByJobExecution(String resourceGroupName, St /** * Lists target executions for all steps of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. * @param jobExecutionId The id of the job execution. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. @@ -266,7 +278,7 @@ PagedIterable listByJobExecution(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 the response of a JobExecution list operation as paginated response with {@link PagedIterable}. + * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByJobExecution(String resourceGroupName, String serverName, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetGroupsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetGroupsClient.java index 6449ea400a78..e9ca1a3c1da5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetGroupsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetGroupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -17,12 +17,60 @@ * An instance of this class provides access to all the operations defined in JobTargetGroupsClient. */ public interface JobTargetGroupsClient { + /** + * Gets all target groups in an agent. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 target groups in an agent as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName); + + /** + * Gets all target groups in an agent. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 target groups in an agent as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName); + + /** + * Gets all target groups in an agent. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @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 all target groups in an agent as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName, + Context context); + /** * Gets a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,9 +84,10 @@ Mono> getWithResponseAsync(String resourceGroupNam /** * Gets a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -52,9 +101,10 @@ Mono getAsync(String resourceGroupName, String serverName, /** * Gets a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -69,9 +119,10 @@ Response getWithResponse(String resourceGroupName, String s /** * Gets a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -84,9 +135,10 @@ Response getWithResponse(String resourceGroupName, String s /** * Creates or updates a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @param parameters The requested state of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,9 +153,10 @@ Mono> createOrUpdateWithResponseAsync(String resou /** * Creates or updates a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @param parameters The requested state of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -118,9 +171,10 @@ Mono createOrUpdateAsync(String resourceGroupName, String s /** * Creates or updates a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @param parameters The requested state of the target group. * @param context The context to associate with this operation. @@ -136,9 +190,10 @@ Response createOrUpdateWithResponse(String resourceGroupNam /** * Creates or updates a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @param parameters The requested state of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -153,9 +208,10 @@ JobTargetGroupInner createOrUpdate(String resourceGroupName, String serverName, /** * Deletes a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -169,9 +225,10 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String se /** * Deletes a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -184,9 +241,10 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String se /** * Deletes a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -201,9 +259,10 @@ Response deleteWithResponse(String resourceGroupName, String serverName, S /** * Deletes a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -211,48 +270,4 @@ Response deleteWithResponse(String resourceGroupName, String serverName, S */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String jobAgentName, String targetGroupName); - - /** - * Gets all target groups in an agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 target groups in an agent as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName); - - /** - * Gets all target groups in an agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 target groups in an agent as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName); - - /** - * Gets all target groups in an agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 all target groups in an agent as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName, - Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobVersionsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobVersionsClient.java index 0cfdb0f005e3..36aa7e8b048a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobVersionsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobVersionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,61 +18,62 @@ */ public interface JobVersionsClient { /** - * Gets a job version. + * Gets all versions of a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. + * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a job version along with {@link Response} on successful completion of {@link Mono}. + * @return all versions of a job as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, int jobVersion); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName); /** - * Gets a job version. + * Gets all versions of a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. + * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a job version on successful completion of {@link Mono}. + * @return all versions of a job as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, - int jobVersion); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName); /** - * Gets a job version. + * Gets all versions of a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. + * @param jobName The name of the job to get. * @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 job version along with {@link Response}. + * @return all versions of a job as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, - String jobName, int jobVersion, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName, Context context); /** * Gets a job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -80,58 +81,64 @@ Response getWithResponse(String resourceGroupName, String serve * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a job version. + * @return a job version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobVersionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, - int jobVersion); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, int jobVersion); /** - * Gets all versions of a job. + * Gets a job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobVersion The version of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 versions of a job as paginated response with {@link PagedFlux}. + * @return a job version on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, + int jobVersion); /** - * Gets all versions of a job. + * Gets a job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobVersion The version of the job to get. + * @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 all versions of a job as paginated response with {@link PagedIterable}. + * @return a job version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, - String jobName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion, Context context); /** - * Gets all versions of a job. + * Gets a job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. - * @param context The context to associate with this operation. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobVersion The version of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 versions of a job as paginated response with {@link PagedIterable}. + * @return a job version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, - String jobName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + JobVersionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, + int jobVersion); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobsClient.java index 7a9d11b4fb18..43d4743598ce 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -17,12 +17,60 @@ * An instance of this class provides access to all the operations defined in JobsClient. */ public interface JobsClient { + /** + * Gets a list of jobs. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 jobs as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName); + + /** + * Gets a list of jobs. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 jobs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName); + + /** + * Gets a list of jobs. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @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 jobs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName, + Context context); + /** * Gets a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,9 +84,10 @@ Mono> getWithResponseAsync(String resourceGroupName, String s /** * Gets a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -51,9 +100,10 @@ Mono> getWithResponseAsync(String resourceGroupName, String s /** * Gets a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -68,9 +118,10 @@ Response getWithResponse(String resourceGroupName, String serverName, /** * Gets a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -83,9 +134,10 @@ Response getWithResponse(String resourceGroupName, String serverName, /** * Creates or updates a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param parameters The requested job state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -100,9 +152,10 @@ Mono> createOrUpdateWithResponseAsync(String resourceGroupNam /** * Creates or updates a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param parameters The requested job state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -117,9 +170,10 @@ Mono createOrUpdateAsync(String resourceGroupName, String serverName, /** * Creates or updates a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param parameters The requested job state. * @param context The context to associate with this operation. @@ -135,9 +189,10 @@ Response createOrUpdateWithResponse(String resourceGroupName, String s /** * Creates or updates a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param parameters The requested job state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -152,10 +207,11 @@ JobInner createOrUpdate(String resourceGroupName, String serverName, String jobA /** * Deletes a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -168,10 +224,11 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String se /** * Deletes a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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,10 +240,11 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String se /** * Deletes a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to delete. * @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. @@ -200,58 +258,15 @@ Response deleteWithResponse(String resourceGroupName, String serverName, S /** * Deletes a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 jobAgentName, String jobName); - - /** - * Gets a list of jobs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 jobs as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName); - - /** - * Gets a list of jobs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 jobs as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName); - - /** - * Gets a list of jobs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 jobs as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName, - Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LedgerDigestUploadsOperationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LedgerDigestUploadsOperationsClient.java index a923310790bc..beab10c03b80 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LedgerDigestUploadsOperationsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LedgerDigestUploadsOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,10 +23,60 @@ * An instance of this class provides access to all the operations defined in LedgerDigestUploadsOperationsClient. */ public interface LedgerDigestUploadsOperationsClient { + /** + * Gets all ledger digest upload settings on a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 all ledger digest upload settings on a database as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); + + /** + * Gets all ledger digest upload settings on a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 all ledger digest upload settings on a database as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); + + /** + * Gets all ledger digest upload settings on a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 all ledger digest upload settings on a database as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); + /** * Gets the current ledger digest upload configuration for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -43,7 +93,8 @@ Mono> getWithResponseAsync(String resourceGro /** * Gets the current ledger digest upload configuration for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -59,7 +110,8 @@ Mono getAsync(String resourceGroupName, String serverN /** * Gets the current ledger digest upload configuration for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -76,7 +128,8 @@ Response getWithResponse(String resourceGroupName, Str /** * Gets the current ledger digest upload configuration for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -92,7 +145,8 @@ LedgerDigestUploadsInner get(String resourceGroupName, String serverName, String /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -110,7 +164,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -128,7 +183,8 @@ PollerFlux, LedgerDigestUploadsInner> begin /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -146,7 +202,8 @@ SyncPoller, LedgerDigestUploadsInner> begin /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -165,7 +222,8 @@ SyncPoller, LedgerDigestUploadsInner> begin /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -182,7 +240,8 @@ Mono createOrUpdateAsync(String resourceGroupName, Str /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -199,7 +258,8 @@ LedgerDigestUploadsInner createOrUpdate(String resourceGroupName, String serverN /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -214,56 +274,11 @@ LedgerDigestUploadsInner createOrUpdate(String resourceGroupName, String serverN LedgerDigestUploadsInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, LedgerDigestUploadsName ledgerDigestUploads, LedgerDigestUploadsInner parameters, Context context); - /** - * Gets all ledger digest upload settings on a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 ledger digest upload settings on a database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets all ledger digest upload settings on a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 ledger digest upload settings on a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets all ledger digest upload settings on a 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 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 all ledger digest upload settings on a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context); - /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -280,7 +295,8 @@ Mono>> disableWithResponseAsync(String resourceGroupNa /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -296,7 +312,8 @@ PollerFlux, LedgerDigestUploadsInner> begin /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -312,7 +329,8 @@ SyncPoller, LedgerDigestUploadsInner> begin /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -329,7 +347,8 @@ SyncPoller, LedgerDigestUploadsInner> begin /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -345,7 +364,8 @@ Mono disableAsync(String resourceGroupName, String ser /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -361,7 +381,8 @@ LedgerDigestUploadsInner disable(String resourceGroupName, String serverName, St /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionBackupsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionBackupsClient.java index 5f6ec0135908..6d4bb0bc9528 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionBackupsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionBackupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -15,7 +15,6 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.models.LongTermRetentionBackupInner; import com.azure.resourcemanager.sql.fluent.models.LongTermRetentionBackupOperationResultInner; -import com.azure.resourcemanager.sql.models.ChangeLongTermRetentionBackupAccessTierParameters; import com.azure.resourcemanager.sql.models.CopyLongTermRetentionBackupParameters; import com.azure.resourcemanager.sql.models.DatabaseState; import com.azure.resourcemanager.sql.models.UpdateLongTermRetentionBackupParameters; @@ -28,181 +27,165 @@ */ public interface LongTermRetentionBackupsClient { /** - * Gets a long term retention backup. + * Lists the long term retention backups for a given location. * * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByLocationAsync(String locationName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState); /** - * Gets a long term retention backup. + * Lists the long term retention backups for a given location. * * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup on successful completion of {@link Mono}. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByLocationAsync(String locationName); /** - * Gets a long term retention backup. + * Lists the long term retention backups for a given location. * * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup along with {@link Response}. + * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String locationName); /** - * Gets a long term retention backup. + * Lists the long term retention backups for a given location. * * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @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 long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner get(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String locationName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState, Context context); /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given server. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String locationName, String longTermRetentionServerName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given server. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String locationName, String longTermRetentionServerName); /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given server. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String locationName, String longTermRetentionServerName); /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given server. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String locationName, String longTermRetentionServerName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); /** - * Deletes a long term retention backup. + * Lists all long term retention backups for a database. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** - * Deletes a long term retention backup. + * Lists all long term retention backups for a database. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName); /** - * Deletes a long term retention backup. + * Lists all long term retention backups for a database. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName); /** * Lists all long term retention backups for a database. @@ -212,191 +195,193 @@ void delete(String locationName, String longTermRetentionServerName, String long * @param longTermRetentionDatabaseName The name of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @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 backups as paginated response with {@link PagedFlux}. + * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); + PagedIterable listByDatabase(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, + Context context); /** - * Lists all long term retention backups for a database. + * Gets a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 backups as paginated response with {@link PagedFlux}. + * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); /** - * Lists all long term retention backups for a database. + * Gets a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 backups as paginated response with {@link PagedIterable}. + * @return a long term retention backup on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName); /** - * Lists all long term retention backups for a database. + * Gets a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @param backupName The backup name. * @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 backups as paginated response with {@link PagedIterable}. + * @return a long term retention backup along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, Context context); /** - * Change a long term retention backup access tier. + * Gets a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a long term retention backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> changeAccessTierWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters); + LongTermRetentionBackupInner get(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName); + + /** + * Deletes a long term retention backup. + * + * @param locationName The location of the database. + * @param longTermRetentionServerName The name of the server. + * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName); /** - * Change a long term retention backup access tier. + * Deletes a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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 a long term retention backup. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, LongTermRetentionBackupInner> beginChangeAccessTierAsync( - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, ChangeLongTermRetentionBackupAccessTierParameters parameters); + PollerFlux, Void> beginDeleteAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName); /** - * Change a long term retention backup access tier. + * Deletes a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> beginChangeAccessTier( - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, ChangeLongTermRetentionBackupAccessTierParameters parameters); + SyncPoller, Void> beginDelete(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName); /** - * Change a long term retention backup access tier. + * Deletes a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> beginChangeAccessTier( - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, ChangeLongTermRetentionBackupAccessTierParameters parameters, Context context); + SyncPoller, Void> beginDelete(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, Context context); /** - * Change a long term retention backup access tier. + * Deletes a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono changeAccessTierAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters); + Mono deleteAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName); /** - * Change a long term retention backup access tier. + * Deletes a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner changeAccessTier(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters); + void delete(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName); /** - * Change a long term retention backup access tier. + * Deletes a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner changeAccessTier(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters, Context context); + void delete(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, Context context); /** * Copy an existing long term retention backup. @@ -525,310 +510,367 @@ LongTermRetentionBackupOperationResultInner copy(String locationName, String lon Context context); /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a LongTermRetentionBackup operation result resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> lockTimeBasedImmutabilityWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); + Mono>> updateWithResponseAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters); /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 the {@link PollerFlux} for polling of a long term retention backup. + * @return the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, LongTermRetentionBackupInner> - beginLockTimeBasedImmutabilityAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName); + PollerFlux, LongTermRetentionBackupOperationResultInner> + beginUpdateAsync(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters); /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 the {@link SyncPoller} for polling of a long term retention backup. + * @return the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> beginLockTimeBasedImmutability( - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName); + SyncPoller, LongTermRetentionBackupOperationResultInner> + beginUpdate(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters); /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 the {@link SyncPoller} for polling of a long term retention backup. + * @return the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> beginLockTimeBasedImmutability( - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context); + SyncPoller, LongTermRetentionBackupOperationResultInner> + beginUpdate(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context); /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 long term retention backup on successful completion of {@link Mono}. + * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono lockTimeBasedImmutabilityAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); + Mono updateAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + UpdateLongTermRetentionBackupParameters parameters); /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 long term retention backup. + * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner lockTimeBasedImmutability(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName); + LongTermRetentionBackupOperationResultInner update(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters); /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 long term retention backup. + * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner lockTimeBasedImmutability(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context); + LongTermRetentionBackupOperationResultInner update(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters, + Context context); + + /** + * Lists the long term retention backups for a given location. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The location of the database. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 backups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, + String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** - * Remove legal hold immutability of an existing long term retention backup. + * Lists the long term retention backups for a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> removeLegalHoldImmutabilityWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, + String locationName); /** - * Remove legal hold immutability of an existing long term retention backup. + * Lists the long term retention backups for a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, LongTermRetentionBackupInner> - beginRemoveLegalHoldImmutabilityAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroupLocation(String resourceGroupName, + String locationName); + + /** + * Lists the long term retention backups for a given location. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The location of the database. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @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 backups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroupLocation(String resourceGroupName, + String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); /** - * Remove legal hold immutability of an existing long term retention backup. + * Lists the long term retention backups for a given server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> beginRemoveLegalHoldImmutability( - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupServerAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState); /** - * Remove legal hold immutability of an existing long term retention backup. + * Lists the long term retention backups for a given server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> beginRemoveLegalHoldImmutability( - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupServerAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName); /** - * Remove legal hold immutability of an existing long term retention backup. + * Lists the long term retention backups for a given server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup on successful completion of {@link Mono}. + * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono removeLegalHoldImmutabilityAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroupServer(String resourceGroupName, String locationName, + String longTermRetentionServerName); /** - * Remove legal hold immutability of an existing long term retention backup. + * Lists the long term retention backups for a given server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @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 long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner removeLegalHoldImmutability(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroupServer(String resourceGroupName, String locationName, + String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, + Context context); /** - * Remove legal hold immutability of an existing long term retention backup. + * Lists all long term retention backups for a database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param context The context to associate with this operation. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner removeLegalHoldImmutability(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** - * Remove time based immutability of an existing long term retention backup. + * Lists all long term retention backups for a database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> removeTimeBasedImmutabilityWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName); /** - * Remove time based immutability of an existing long term retention backup. + * Lists all long term retention backups for a database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, LongTermRetentionBackupInner> - beginRemoveTimeBasedImmutabilityAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroupDatabase(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName); /** - * Remove time based immutability of an existing long term retention backup. + * Lists all long term retention backups for a database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @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 long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> beginRemoveTimeBasedImmutability( + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroupDatabase(String resourceGroupName, String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName); + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); /** - * Remove time based immutability of an existing long term retention backup. + * Gets a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @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 long term retention backup. + * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> beginRemoveTimeBasedImmutability( + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context); + String backupName); /** - * Remove time based immutability of an existing long term retention backup. + * Gets a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -839,45 +881,51 @@ SyncPoller, LongTermRetentionBackupInne * @return a long term retention backup on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono removeTimeBasedImmutabilityAsync(String locationName, + Mono getByResourceGroupAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); /** - * Remove time based immutability of an existing long term retention backup. + * Gets a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @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 long term retention backup. + * @return a long term retention backup along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner removeTimeBasedImmutability(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName); + Response getByResourceGroupWithResponse(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context); /** - * Remove time based immutability of an existing long term retention backup. + * Gets a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @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 long term retention backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner removeTimeBasedImmutability(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context); + LongTermRetentionBackupInner getByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); /** - * Set legal hold immutability of an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -885,15 +933,18 @@ LongTermRetentionBackupInner removeTimeBasedImmutability(String locationName, 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 a long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> setLegalHoldImmutabilityWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); + Mono>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName); /** - * Set legal hold immutability of an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -901,16 +952,17 @@ Mono>> setLegalHoldImmutabilityWithResponseAsync(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 the {@link PollerFlux} for polling of a long term retention backup. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, LongTermRetentionBackupInner> - beginSetLegalHoldImmutabilityAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName); + PollerFlux, Void> beginDeleteByResourceGroupAsync(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); /** - * Set legal hold immutability of an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -918,16 +970,17 @@ Mono>> setLegalHoldImmutabilityWithResponseAsync(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 the {@link SyncPoller} for polling of a long term retention backup. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> beginSetLegalHoldImmutability( - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName); + SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); /** - * Set legal hold immutability of an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -936,16 +989,17 @@ SyncPoller, LongTermRetentionBackupInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 long term retention backup. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> beginSetLegalHoldImmutability( - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context); + SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context); /** - * Set legal hold immutability of an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -953,15 +1007,17 @@ SyncPoller, LongTermRetentionBackupInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono setLegalHoldImmutabilityAsync(String locationName, + Mono deleteByResourceGroupAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); /** - * Set legal hold immutability of an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -969,15 +1025,16 @@ Mono setLegalHoldImmutabilityAsync(String 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 a long term retention backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner setLegalHoldImmutability(String locationName, String longTermRetentionServerName, + void deleteByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); /** - * Set legal hold immutability of an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -986,20 +1043,21 @@ LongTermRetentionBackupInner setLegalHoldImmutability(String locationName, 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 a long term retention backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner setLegalHoldImmutability(String locationName, String longTermRetentionServerName, + void deleteByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context); /** - * Updates an existing long term retention backup. + * Copy an existing long term retention backup to a different server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The requested backup resource state. + * @param parameters The parameters needed for long term retention copy 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. @@ -1007,17 +1065,20 @@ LongTermRetentionBackupInner setLegalHoldImmutability(String locationName, Strin * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters); + Mono>> copyByResourceGroupWithResponseAsync(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + CopyLongTermRetentionBackupParameters parameters); /** - * Updates an existing long term retention backup. + * Copy an existing long term retention backup to a different server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The requested backup resource state. + * @param parameters The parameters needed for long term retention copy 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. @@ -1025,17 +1086,19 @@ Mono>> updateWithResponseAsync(String locationName, St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, LongTermRetentionBackupOperationResultInner> - beginUpdateAsync(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, UpdateLongTermRetentionBackupParameters parameters); + beginCopyByResourceGroupAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters); /** - * Updates an existing long term retention backup. + * Copy an existing long term retention backup to a different server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The requested backup resource state. + * @param parameters The parameters needed for long term retention copy 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. @@ -1043,17 +1106,19 @@ Mono>> updateWithResponseAsync(String locationName, St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LongTermRetentionBackupOperationResultInner> - beginUpdate(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, UpdateLongTermRetentionBackupParameters parameters); + beginCopyByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters); /** - * Updates an existing long term retention backup. + * Copy an existing long term retention backup to a different server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The requested backup resource state. + * @param parameters The parameters needed for long term retention copy 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. @@ -1062,1115 +1127,76 @@ Mono>> updateWithResponseAsync(String locationName, St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LongTermRetentionBackupOperationResultInner> - beginUpdate(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context); - - /** - * Updates an existing long term retention backup. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The requested backup resource 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 LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - UpdateLongTermRetentionBackupParameters parameters); - - /** - * Updates an existing long term retention backup. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The requested backup resource 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 LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupOperationResultInner update(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters); - - /** - * Updates an existing long term retention backup. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The requested backup resource 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 LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupOperationResultInner update(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters, - Context context); - - /** - * Gets a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName); - - /** - * Gets a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); - - /** - * Gets a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context); - - /** - * Gets a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner getByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); - - /** - * Deletes a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName); - - /** - * Deletes a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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> beginDeleteByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); - - /** - * Deletes a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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> beginDeleteByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); - - /** - * Deletes a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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> beginDeleteByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context); - - /** - * Deletes a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 deleteByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); - - /** - * Deletes a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 deleteByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName); - - /** - * Deletes a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 deleteByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context); - - /** - * Lists all long term retention backups for a database based on a particular resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState); - - /** - * Lists all long term retention backups for a database based on a particular resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the 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 a list of long term retention backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName); - - /** - * Lists all long term retention backups for a database based on a particular resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the 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 a list of long term retention backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupDatabase(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName); - - /** - * Lists all long term retention backups for a database based on a particular resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupDatabase(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> changeAccessTierByResourceGroupWithResponseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, ChangeLongTermRetentionBackupAccessTierParameters parameters); - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 a long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, LongTermRetentionBackupInner> - beginChangeAccessTierByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters); - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> - beginChangeAccessTierByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters); - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> - beginChangeAccessTierByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters, Context context); - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono changeAccessTierByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, ChangeLongTermRetentionBackupAccessTierParameters parameters); - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner changeAccessTierByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters); - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner changeAccessTierByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters, Context context); - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> copyByResourceGroupWithResponseAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - CopyLongTermRetentionBackupParameters parameters); - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 a LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, LongTermRetentionBackupOperationResultInner> - beginCopyByResourceGroupAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters); - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 a LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupOperationResultInner> - beginCopyByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters); - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 a LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupOperationResultInner> - beginCopyByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters, - Context context); - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono copyByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, CopyLongTermRetentionBackupParameters parameters); - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupOperationResultInner copyByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - CopyLongTermRetentionBackupParameters parameters); - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupOperationResultInner copyByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - CopyLongTermRetentionBackupParameters parameters, Context context); - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> lockTimeBasedImmutabilityByResourceGroupWithResponseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName); - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, LongTermRetentionBackupInner> - beginLockTimeBasedImmutabilityByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> - beginLockTimeBasedImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> - beginLockTimeBasedImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - Context context); - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono lockTimeBasedImmutabilityByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName); - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner lockTimeBasedImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner lockTimeBasedImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context); - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> removeLegalHoldImmutabilityByResourceGroupWithResponseAsync( - String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName); - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, LongTermRetentionBackupInner> - beginRemoveLegalHoldImmutabilityByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> - beginRemoveLegalHoldImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> - beginRemoveLegalHoldImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - Context context); - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono removeLegalHoldImmutabilityByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName); - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner removeLegalHoldImmutabilityByResourceGroup(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName); - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner removeLegalHoldImmutabilityByResourceGroup(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context); - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> removeTimeBasedImmutabilityByResourceGroupWithResponseAsync( - String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName); - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, LongTermRetentionBackupInner> - beginRemoveTimeBasedImmutabilityByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> - beginRemoveTimeBasedImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> - beginRemoveTimeBasedImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - Context context); - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono removeTimeBasedImmutabilityByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName); - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner removeTimeBasedImmutabilityByResourceGroup(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName); - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner removeTimeBasedImmutabilityByResourceGroup(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context); - - /** - * Set legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> setLegalHoldImmutabilityByResourceGroupWithResponseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName); - - /** - * Set legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, LongTermRetentionBackupInner> - beginSetLegalHoldImmutabilityByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); - - /** - * Set legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> - beginSetLegalHoldImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); - - /** - * Set legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LongTermRetentionBackupInner> - beginSetLegalHoldImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + beginCopyByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters, Context context); /** - * Set legal hold immutability of an existing long term retention backup. + * Copy an existing long term retention backup to a different server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The parameters needed for long term retention copy 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 long term retention backup on successful completion of {@link Mono}. + * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono setLegalHoldImmutabilityByResourceGroupAsync(String resourceGroupName, + Mono copyByResourceGroupAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName); + String backupName, CopyLongTermRetentionBackupParameters parameters); /** - * Set legal hold immutability of an existing long term retention backup. + * Copy an existing long term retention backup to a different server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The parameters needed for long term retention copy 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 long term retention backup. + * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner setLegalHoldImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName); + LongTermRetentionBackupOperationResultInner copyByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + CopyLongTermRetentionBackupParameters parameters); /** - * Set legal hold immutability of an existing long term retention backup. + * Copy an existing long term retention backup to a different server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The parameters needed for long term retention copy 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 long term retention backup. + * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - LongTermRetentionBackupInner setLegalHoldImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context); + LongTermRetentionBackupOperationResultInner copyByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + CopyLongTermRetentionBackupParameters parameters, Context context); /** * Updates an existing long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2190,7 +1216,8 @@ Mono>> updateByResourceGroupWithResponseAsync(String r /** * Updates an existing long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2210,7 +1237,8 @@ Mono>> updateByResourceGroupWithResponseAsync(String r /** * Updates an existing long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2230,7 +1258,8 @@ Mono>> updateByResourceGroupWithResponseAsync(String r /** * Updates an existing long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2251,7 +1280,8 @@ Mono>> updateByResourceGroupWithResponseAsync(String r /** * Updates an existing long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2270,7 +1300,8 @@ Mono updateByResourceGroupAsync(Str /** * Updates an existing long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2289,7 +1320,8 @@ LongTermRetentionBackupOperationResultInner updateByResourceGroup(String resourc /** * Updates an existing long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2305,246 +1337,4 @@ LongTermRetentionBackupOperationResultInner updateByResourceGroup(String resourc LongTermRetentionBackupOperationResultInner updateByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context); - - /** - * Lists the long term retention backups for a given location. - * - * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByLocationAsync(String locationName, Boolean onlyLatestPerDatabase, - DatabaseState databaseState); - - /** - * Lists the long term retention backups for a given location. - * - * @param locationName The location of the 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 a list of long term retention backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByLocationAsync(String locationName); - - /** - * Lists the long term retention backups for a given location. - * - * @param locationName The location of the 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 a list of long term retention backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String locationName); - - /** - * Lists the long term retention backups for a given location. - * - * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String locationName, Boolean onlyLatestPerDatabase, - DatabaseState databaseState, Context context); - - /** - * Lists the long term retention backups for a given server. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String locationName, String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState); - - /** - * Lists the long term retention backups for a given server. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName 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 backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String locationName, String longTermRetentionServerName); - - /** - * Lists the long term retention backups for a given server. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName 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 backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String locationName, String longTermRetentionServerName); - - /** - * Lists the long term retention backups for a given server. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String locationName, String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); - - /** - * Lists the long term retention backups for a given location based on resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); - - /** - * Lists the long term retention backups for a given location based on resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the 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 a list of long term retention backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, - String locationName); - - /** - * Lists the long term retention backups for a given location based on resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the 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 a list of long term retention backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupLocation(String resourceGroupName, - String locationName); - - /** - * Lists the long term retention backups for a given location based on resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupLocation(String resourceGroupName, - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); - - /** - * Lists the long term retention backups for a given server based on resource groups. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupServerAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, Boolean onlyLatestPerDatabase, - DatabaseState databaseState); - - /** - * Lists the long term retention backups for a given server based on resource groups. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName 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 backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupServerAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName); - - /** - * Lists the long term retention backups for a given server based on resource groups. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName 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 backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupServer(String resourceGroupName, String locationName, - String longTermRetentionServerName); - - /** - * Lists the long term retention backups for a given server based on resource groups. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupServer(String resourceGroupName, String locationName, - String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, - Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionManagedInstanceBackupsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionManagedInstanceBackupsClient.java index 99696b9ebbb7..be32d4328413 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionManagedInstanceBackupsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionManagedInstanceBackupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -25,199 +25,67 @@ */ public interface LongTermRetentionManagedInstanceBackupsClient { /** - * Gets a long term retention backup for a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup for a managed database along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String locationName, String managedInstanceName, String databaseName, - String backupName); - - /** - * Gets a long term retention backup for a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup for a managed database on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, - String locationName, String managedInstanceName, String databaseName, String backupName); - - /** - * Gets a long term retention backup for a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. - * @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 long term retention backup for a managed database along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String locationName, String managedInstanceName, String databaseName, String backupName, Context context); - - /** - * Gets a long term retention backup for a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup for a managed database. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceLongTermRetentionBackupInner getByResourceGroup(String resourceGroupName, String locationName, - String managedInstanceName, String databaseName, String backupName); - - /** - * Deletes a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, - String locationName, String managedInstanceName, String databaseName, String backupName); - - /** - * Deletes a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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> beginDeleteByResourceGroupAsync(String resourceGroupName, String locationName, - String managedInstanceName, String databaseName, String backupName); - - /** - * Deletes a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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> beginDeleteByResourceGroup(String resourceGroupName, String locationName, - String managedInstanceName, String databaseName, String backupName); - - /** - * Deletes a long term retention backup. + * Lists the long term retention backups for managed databases in a given location. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. - * @param context The context to associate with this operation. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, - String managedInstanceName, String databaseName, String backupName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByLocationAsync(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** - * Deletes a long term retention backup. + * Lists the long term retention backups for managed databases in a given location. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteByResourceGroupAsync(String resourceGroupName, String locationName, String managedInstanceName, - String databaseName, String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByLocationAsync(String locationName); /** - * Deletes a long term retention backup. + * Lists the long term retention backups for managed databases in a given location. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteByResourceGroup(String resourceGroupName, String locationName, String managedInstanceName, - String databaseName, String backupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String locationName); /** - * Deletes a long term retention backup. + * Lists the long term retention backups for managed databases in a given location. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteByResourceGroup(String resourceGroupName, String locationName, String managedInstanceName, - String databaseName, String backupName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); /** * Lists all long term retention backups for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -226,52 +94,48 @@ void deleteByResourceGroup(String resourceGroupName, String locationName, 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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, - String locationName, String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, - DatabaseState databaseState); + PagedFlux listByDatabaseAsync(String locationName, + String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** * Lists all long term retention backups for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed 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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, - String locationName, String managedInstanceName, String databaseName); + PagedFlux listByDatabaseAsync(String locationName, + String managedInstanceName, String databaseName); /** * Lists all long term retention backups for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed 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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupDatabase(String resourceGroupName, - String locationName, String managedInstanceName, String databaseName); + PagedIterable listByDatabase(String locationName, + String managedInstanceName, String databaseName); /** * Lists all long term retention backups for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -281,13 +145,13 @@ PagedIterable listByResourceGroupDa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupDatabase(String resourceGroupName, - String locationName, String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, - DatabaseState databaseState, Context context); + PagedIterable listByDatabase(String locationName, + String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, + Context context); /** * Gets a long term retention backup for a managed database. @@ -466,283 +330,424 @@ void delete(String locationName, String managedInstanceName, String databaseName Context context); /** - * Lists all long term retention backups for a managed database. + * Lists the long term retention backups for a given managed instance. * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String locationName, - String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); + PagedFlux listByInstanceAsync(String locationName, + String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** - * Lists all long term retention backups for a managed database. + * Lists the long term retention backups for a given managed instance. * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed 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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String locationName, - String managedInstanceName, String databaseName); + PagedFlux listByInstanceAsync(String locationName, + String managedInstanceName); /** - * Lists all long term retention backups for a managed database. + * Lists the long term retention backups for a given managed instance. * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed 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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String locationName, - String managedInstanceName, String databaseName); + PagedIterable listByInstance(String locationName, + String managedInstanceName); /** - * Lists all long term retention backups for a managed database. + * Lists the long term retention backups for a given managed instance. * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String locationName, - String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, - Context context); + PagedIterable listByInstance(String locationName, + String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); /** * Lists the long term retention backups for managed databases in a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByLocationAsync(String locationName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState, Long skip, Long top, String filter); + PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, + String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); /** * Lists the long term retention backups for managed databases in a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the 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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByLocationAsync(String locationName); + PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, + String locationName); /** * Lists the long term retention backups for managed databases in a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the 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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String locationName); + PagedIterable listByResourceGroupLocation(String resourceGroupName, + String locationName); /** * Lists the long term retention backups for managed databases in a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @param filter An OData filter expression that filters elements in the collection. * @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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String locationName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState, Long skip, Long top, String filter, - Context context); + PagedIterable listByResourceGroupLocation(String resourceGroupName, + String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); /** - * Lists the long term retention backups for a given managed instance. + * Lists all long term retention backups for a managed database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String locationName, - String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState); + PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState); /** - * Lists the long term retention backups for a given managed instance. + * Lists all long term retention backups for a managed database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed 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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String locationName, - String managedInstanceName); + PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName); /** - * Lists the long term retention backups for a given managed instance. + * Lists all long term retention backups for a managed database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed 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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String locationName, - String managedInstanceName); + PagedIterable listByResourceGroupDatabase(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName); /** - * Lists the long term retention backups for a given managed instance. + * Lists all long term retention backups for a managed database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String locationName, - String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context); + PagedIterable listByResourceGroupDatabase(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState, Context context); /** - * Lists the long term retention backups for managed databases in a given location. + * Gets a long term retention backup for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @param filter An OData filter expression that filters elements in the collection. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedFlux}. + * @return a long term retention backup for a managed database along with {@link Response} on successful completion + * of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Long skip, Long top, - String filter); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, + String backupName); /** - * Lists the long term retention backups for managed databases in a given location. + * Gets a long term retention backup for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedFlux}. + * @return a long term retention backup for a managed database on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, - String locationName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getByResourceGroupAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, String backupName); /** - * Lists the long term retention backups for managed databases in a given location. + * Gets a long term retention backup for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. + * @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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedIterable}. + * @return a long term retention backup for a managed database along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupLocation(String resourceGroupName, - String locationName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, String backupName, Context context); /** - * Lists the long term retention backups for managed databases in a given location. + * Gets a long term retention backup for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @param filter An OData filter expression that filters elements in the collection. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a long term retention backup for a managed database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedInstanceLongTermRetentionBackupInner getByResourceGroup(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName); + + /** + * Deletes a long term retention backup. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, String backupName); + + /** + * Deletes a long term retention backup. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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> beginDeleteByResourceGroupAsync(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName); + + /** + * Deletes a long term retention backup. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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> beginDeleteByResourceGroup(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName); + + /** + * Deletes a long term retention backup. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. * @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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroupLocation(String resourceGroupName, - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Long skip, Long top, - String filter, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName, Context context); + + /** + * Deletes a long term retention backup. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 deleteByResourceGroupAsync(String resourceGroupName, String locationName, String managedInstanceName, + String databaseName, String backupName); + + /** + * Deletes a long term retention backup. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 deleteByResourceGroup(String resourceGroupName, String locationName, String managedInstanceName, + String databaseName, String backupName); + + /** + * Deletes a long term retention backup. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. + * @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 deleteByResourceGroup(String resourceGroupName, String locationName, String managedInstanceName, + String databaseName, String backupName, Context context); /** * Lists the long term retention backups for a given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -750,7 +755,7 @@ PagedIterable listByResourceGroupLo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -760,13 +765,14 @@ PagedFlux listByResourceGroupInstan /** * Lists the long term retention backups for a given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -776,13 +782,14 @@ PagedFlux listByResourceGroupInstan /** * Lists the long term retention backups for a given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -792,7 +799,8 @@ PagedIterable listByResourceGroupIn /** * Lists the long term retention backups for a given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -801,7 +809,7 @@ PagedIterable listByResourceGroupIn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionPoliciesClient.java index 46d76502fd8d..6d4e60ed8ddb 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionPoliciesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -26,7 +26,57 @@ public interface LongTermRetentionPoliciesClient { /** * Gets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); + + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); + + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context); + + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -43,7 +93,8 @@ Mono> getWithResponseAsync(String resourc /** * Gets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -59,7 +110,8 @@ Mono getAsync(String resourceGroupName, String ser /** * Gets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -76,7 +128,8 @@ Response getWithResponse(String resourceGroupName, /** * Gets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -90,9 +143,10 @@ LongTermRetentionPolicyInner get(String resourceGroupName, String serverName, St LongTermRetentionPolicyName policyName); /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -107,9 +161,10 @@ Mono>> createOrUpdateWithResponseAsync(String resource String databaseName, LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters); /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -125,9 +180,10 @@ PollerFlux, LongTermRetentionPolicyInne LongTermRetentionPolicyInner parameters); /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -143,9 +199,10 @@ SyncPoller, LongTermRetentionPolicyInne LongTermRetentionPolicyInner parameters); /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -162,9 +219,10 @@ SyncPoller, LongTermRetentionPolicyInne LongTermRetentionPolicyInner parameters, Context context); /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -179,9 +237,10 @@ Mono createOrUpdateAsync(String resourceGroupName, String databaseName, LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters); /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -196,9 +255,10 @@ LongTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String ser LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters); /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -212,50 +272,4 @@ LongTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String ser @ServiceMethod(returns = ReturnType.SINGLE) LongTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, LongTermRetentionPolicyName policyName, LongTermRetentionPolicyInner parameters, Context context); - - /** - * Gets a database's long term retention policy. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's long term retention policy as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets a database's long term retention policy. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's long term retention policy as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets a database's long term retention policy. - * - * @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 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 database's long term retention policy as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowOptionsOperationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowOptionsOperationsClient.java index ebaf343dc5eb..d9190b7ba63d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowOptionsOperationsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowOptionsOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,9 +18,10 @@ public interface MaintenanceWindowOptionsOperationsClient { /** * Gets a list of available maintenance windows. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -35,9 +36,10 @@ Mono> getWithResponseAsync(String resour /** * Gets a list of available maintenance windows. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -51,9 +53,10 @@ Mono getAsync(String resourceGroupName, String se /** * Gets a list of available maintenance windows. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -68,9 +71,10 @@ Response getWithResponse(String resourceGroupName /** * Gets a list of available maintenance windows. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowsOperationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowsOperationsClient.java index 3f0669c00ab5..3ce570cc436e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowsOperationsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowsOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,9 +18,10 @@ public interface MaintenanceWindowsOperationsClient { /** * Gets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -35,9 +36,10 @@ Mono> getWithResponseAsync(String resourceGrou /** * Gets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -51,9 +53,10 @@ Mono getAsync(String resourceGroupName, String serverNa /** * Gets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -68,9 +71,10 @@ Response getWithResponse(String resourceGroupName, Stri /** * Gets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -84,9 +88,10 @@ MaintenanceWindowsInner get(String resourceGroupName, String serverName, String /** * Sets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,9 +106,10 @@ Mono> createOrUpdateWithResponseAsync(String resourceGroupName, S /** * Sets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -118,9 +124,10 @@ Mono createOrUpdateAsync(String resourceGroupName, String serverName, Stri /** * Sets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @param parameters The parameters parameter. * @param context The context to associate with this operation. @@ -136,9 +143,10 @@ Response createOrUpdateWithResponse(String resourceGroupName, String serve /** * Sets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedBackupShortTermRetentionPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedBackupShortTermRetentionPoliciesClient.java index dcd4aca96ec4..b18140970563 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedBackupShortTermRetentionPoliciesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedBackupShortTermRetentionPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -24,10 +24,60 @@ * ManagedBackupShortTermRetentionPoliciesClient. */ public interface ManagedBackupShortTermRetentionPoliciesClient { + /** + * Gets a managed database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a managed database's short term retention policy list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName); + + /** + * Gets a managed database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a managed database's short term retention policy list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName); + + /** + * Gets a managed database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a managed database's short term retention policy list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context); + /** * Gets a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -44,7 +94,8 @@ Mono> getWithResponseAsync( /** * Gets a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -60,7 +111,8 @@ Mono getAsync(String resourceGroupNa /** * Gets a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -78,7 +130,8 @@ Response getWithResponse(String reso /** * Gets a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -94,10 +147,11 @@ ManagedBackupShortTermRetentionPolicyInner get(String resourceGroupName, String /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -112,10 +166,11 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -130,10 +185,11 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -148,10 +204,11 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -168,10 +225,11 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -186,10 +244,11 @@ Mono createOrUpdateAsync(String reso /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -204,10 +263,11 @@ ManagedBackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupNa /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -223,10 +283,11 @@ ManagedBackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupNa /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -241,10 +302,11 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -259,10 +321,11 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -277,10 +340,11 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -297,10 +361,11 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -315,10 +380,11 @@ Mono updateAsync(String resourceGrou /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -333,10 +399,11 @@ ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupName, Stri /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -348,50 +415,4 @@ ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupName, Stri ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupName, String managedInstanceName, String databaseName, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters, Context context); - - /** - * Gets a managed database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database's short term retention policy list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName); - - /** - * Gets a managed database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database's short term retention policy list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName); - - /** - * Gets a managed database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database's short term retention policy list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseAdvancedThreatProtectionSettingsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseAdvancedThreatProtectionSettingsClient.java deleted file mode 100644 index 9687ba67fd7d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseAdvancedThreatProtectionSettingsClient.java +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.ManagedDatabaseAdvancedThreatProtectionInner; -import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * ManagedDatabaseAdvancedThreatProtectionSettingsClient. - */ -public interface ManagedDatabaseAdvancedThreatProtectionSettingsClient { - /** - * Gets a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced 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 managed database's Advanced Threat Protection state along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName); - - /** - * Gets a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced 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 managed database's Advanced Threat Protection state on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, - String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName); - - /** - * Gets a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced 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 managed database's Advanced Threat Protection state along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, - String managedInstanceName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, - Context context); - - /** - * Gets a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced 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 managed database's Advanced Threat Protection state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedDatabaseAdvancedThreatProtectionInner get(String resourceGroupName, String managedInstanceName, - String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName); - - /** - * Creates or updates a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed database Advanced 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 managed database Advanced Threat Protection along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedDatabaseAdvancedThreatProtectionInner parameters); - - /** - * Creates or updates a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed database Advanced 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 managed database Advanced Threat Protection on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, - String managedInstanceName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedDatabaseAdvancedThreatProtectionInner parameters); - - /** - * Creates or updates a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed database Advanced 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 managed database Advanced Threat Protection along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, - String managedInstanceName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedDatabaseAdvancedThreatProtectionInner parameters, Context context); - - /** - * Creates or updates a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed database Advanced 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 managed database Advanced Threat Protection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedDatabaseAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, String managedInstanceName, - String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedDatabaseAdvancedThreatProtectionInner parameters); - - /** - * Gets a list of managed database's Advanced Threat Protection states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's Advanced Threat Protection states as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName); - - /** - * Gets a list of managed database's Advanced Threat Protection states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's Advanced Threat Protection states as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName); - - /** - * Gets a list of managed database's Advanced Threat Protection states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's Advanced Threat Protection states as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseColumnsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseColumnsClient.java index a00b6a2497b4..30e290f0521d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseColumnsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseColumnsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -19,82 +19,87 @@ */ public interface ManagedDatabaseColumnsClient { /** - * Get managed database column. + * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. + * @param skiptoken An opaque token that identifies a starting point in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed database column along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, List schema, List table, List column, List orderBy, + String skiptoken); /** - * Get managed database column. + * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed database column on successful completion of {@link Mono}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName); /** - * Get managed database column. + * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @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 managed database column along with {@link Response}. + * @return a list of database columns as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName); /** - * Get managed database column. + * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. + * @param skiptoken An opaque token that identifies a starting point in the collection. + * @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 managed database column. + * @return a list of database columns as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseColumnInner get(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName, List schema, List table, List column, List orderBy, + String skiptoken, Context context); /** * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -103,7 +108,7 @@ DatabaseColumnInner get(String resourceGroupName, String managedInstanceName, 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 the response of a DatabaseColumn list operation as paginated response with {@link PagedFlux}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByTableAsync(String resourceGroupName, String managedInstanceName, @@ -112,7 +117,8 @@ PagedFlux listByTableAsync(String resourceGroupName, String /** * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -120,7 +126,7 @@ PagedFlux listByTableAsync(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 response of a DatabaseColumn list operation as paginated response with {@link PagedFlux}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByTableAsync(String resourceGroupName, String managedInstanceName, @@ -129,7 +135,8 @@ PagedFlux listByTableAsync(String resourceGroupName, String /** * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -137,7 +144,7 @@ PagedFlux listByTableAsync(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 response of a DatabaseColumn list operation as paginated response with {@link PagedIterable}. + * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByTable(String resourceGroupName, String managedInstanceName, @@ -146,7 +153,8 @@ PagedIterable listByTable(String resourceGroupName, String /** * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -156,82 +164,86 @@ PagedIterable listByTable(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 response of a DatabaseColumn list operation as paginated response with {@link PagedIterable}. + * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByTable(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName, String filter, Context context); /** - * List managed database columns. + * Get managed database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schema The schema parameter. - * @param table The table parameter. - * @param column The column parameter. - * @param orderBy The orderBy parameter. - * @param skiptoken An opaque token that identifies a starting point in the collection. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseColumn list operation as paginated response with {@link PagedFlux}. + * @return managed database column along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, List schema, List table, List column, List orderBy, - String skiptoken); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName); /** - * List managed database columns. + * Get managed database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseColumn list operation as paginated response with {@link PagedFlux}. + * @return managed database column on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, - String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName); /** - * List managed database columns. + * Get managed database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @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 response of a DatabaseColumn list operation as paginated response with {@link PagedIterable}. + * @return managed database column along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, - String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, Context context); /** - * List managed database columns. + * Get managed database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schema The schema parameter. - * @param table The table parameter. - * @param column The column parameter. - * @param orderBy The orderBy parameter. - * @param skiptoken An opaque token that identifies a starting point in the collection. - * @param context The context to associate with this operation. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseColumn list operation as paginated response with {@link PagedIterable}. + * @return managed database column. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, - String databaseName, List schema, List table, List column, List orderBy, - String skiptoken, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DatabaseColumnInner get(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseMoveOperationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseMoveOperationsClient.java deleted file mode 100644 index 921cce22c7fd..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseMoveOperationsClient.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.ManagedDatabaseMoveOperationResultInner; -import java.util.UUID; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ManagedDatabaseMoveOperationsClient. - */ -public interface ManagedDatabaseMoveOperationsClient { - /** - * Gets a managed database move operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @param operationId The ID of the managed database move 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 managed database move operation along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String locationName, UUID operationId); - - /** - * Gets a managed database move operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @param operationId The ID of the managed database move 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 managed database move operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String locationName, - UUID operationId); - - /** - * Gets a managed database move operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @param operationId The ID of the managed database move 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 a managed database move operation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String locationName, - UUID operationId, Context context); - - /** - * Gets a managed database move operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @param operationId The ID of the managed database move 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 managed database move operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedDatabaseMoveOperationResultInner get(String resourceGroupName, String locationName, UUID operationId); - - /** - * Lists managed database move operations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @param onlyLatestPerDatabase Whether or not to only get the latest operation for each database. Has higher - * priority than $filter. - * @param filter An OData filter expression that filters elements in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 managed database move operations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByLocationAsync(String resourceGroupName, - String locationName, Boolean onlyLatestPerDatabase, String filter); - - /** - * Lists managed database move operations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 managed database move operations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByLocationAsync(String resourceGroupName, - String locationName); - - /** - * Lists managed database move operations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 managed database move operations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String resourceGroupName, - String locationName); - - /** - * Lists managed database move operations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @param onlyLatestPerDatabase Whether or not to only get the latest operation for each database. Has higher - * priority than $filter. - * @param filter An OData filter expression that filters elements in the collection. - * @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 managed database move operations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String resourceGroupName, String locationName, - Boolean onlyLatestPerDatabase, String filter, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseQueriesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseQueriesClient.java index 2733f3426e35..e13668cf1e95 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseQueriesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseQueriesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -22,7 +22,8 @@ public interface ManagedDatabaseQueriesClient { /** * Get query by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -38,7 +39,8 @@ Mono> getWithResponseAsync(String resourceGr /** * Get query by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -54,7 +56,8 @@ Mono getAsync(String resourceGroupName, String manage /** * Get query by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -71,7 +74,8 @@ Response getWithResponse(String resourceGroupName, St /** * Get query by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -87,7 +91,8 @@ ManagedInstanceQueryInner get(String resourceGroupName, String managedInstanceNa /** * Get query execution statistics by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -106,7 +111,8 @@ PagedFlux listByQueryAsync(String resourceGroupName, Strin /** * Get query execution statistics by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -122,7 +128,8 @@ PagedFlux listByQueryAsync(String resourceGroupName, Strin /** * Get query execution statistics by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -138,7 +145,8 @@ PagedIterable listByQuery(String resourceGroupName, String /** * Get query execution statistics by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRecommendedSensitivityLabelsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRecommendedSensitivityLabelsClient.java index 8aad7267a18c..77efc6da9942 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRecommendedSensitivityLabelsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRecommendedSensitivityLabelsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -19,7 +19,8 @@ public interface ManagedDatabaseRecommendedSensitivityLabelsClient { /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -35,7 +36,8 @@ Mono> updateWithResponseAsync(String resourceGroupName, String ma /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -51,7 +53,8 @@ Mono updateAsync(String resourceGroupName, String managedInstanceName, Str /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -68,7 +71,8 @@ Response updateWithResponse(String resourceGroupName, String managedInstan /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The parameters parameter. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRestoreDetailsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRestoreDetailsClient.java index 9e5efa16bad1..a0f9883f87d3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRestoreDetailsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRestoreDetailsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -19,7 +19,8 @@ public interface ManagedDatabaseRestoreDetailsClient { /** * Gets managed database restore details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. @@ -35,7 +36,8 @@ Mono> getWithResponseAsync(St /** * Gets managed database restore details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. @@ -51,7 +53,8 @@ Mono getAsync(String resourceGroupName /** * Gets managed database restore details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. @@ -68,7 +71,8 @@ Response getWithResponse(String resour /** * Gets managed database restore details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSchemasClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSchemasClient.java index 1199162eaea9..c44f2ff44e7c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSchemasClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSchemasClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,130 +18,138 @@ */ public interface ManagedDatabaseSchemasClient { /** - * Get managed database schema. + * List managed database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed database schema along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database schemas as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String filter); /** - * Get managed database schema. + * List managed database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed database schema on successful completion of {@link Mono}. + * @return a list of database schemas as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName); /** - * Get managed database schema. + * List managed database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @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 managed database schema along with {@link Response}. + * @return a list of database schemas as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName); /** - * Get managed database schema. + * List managed database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. + * @param filter An OData filter expression that filters elements in the collection. + * @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 managed database schema. + * @return a list of database schemas as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseSchemaInner get(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName, String filter, Context context); /** - * List managed database schemas. + * Get managed database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param filter An OData filter expression that filters elements in the collection. + * @param schemaName The name of the schema. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseSchema list operation as paginated response with {@link PagedFlux}. + * @return managed database schema along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String filter); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName); /** - * List managed database schemas. + * Get managed database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param schemaName The name of the schema. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseSchema list operation as paginated response with {@link PagedFlux}. + * @return managed database schema on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, - String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName); /** - * List managed database schemas. + * Get managed database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @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 response of a DatabaseSchema list operation as paginated response with {@link PagedIterable}. + * @return managed database schema along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, - String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, Context context); /** - * List managed database schemas. + * Get managed database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param filter An OData filter expression that filters elements in the collection. - * @param context The context to associate with this operation. + * @param schemaName The name of the schema. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseSchema list operation as paginated response with {@link PagedIterable}. + * @return managed database schema. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, - String databaseName, String filter, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DatabaseSchemaInner get(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityAlertPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityAlertPoliciesClient.java index 55fbe4b59487..8816ca410159 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityAlertPoliciesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityAlertPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -19,12 +19,62 @@ * ManagedDatabaseSecurityAlertPoliciesClient. */ public interface ManagedDatabaseSecurityAlertPoliciesClient { + /** + * Gets a list of managed database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policies are defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 managed database's security alert policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName); + + /** + * Gets a list of managed database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policies are defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 managed database's security alert policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName); + + /** + * Gets a list of managed database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policies are defined. + * @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 managed database's security alert policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context); + /** * Gets a managed database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -39,9 +89,10 @@ Mono> getWithResponseAsync(Str /** * Gets a managed database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -55,9 +106,10 @@ Mono getAsync(String resourceGroupName, /** * Gets a managed database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -73,9 +125,10 @@ Response getWithResponse(String resourc /** * Gets a managed database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -89,9 +142,10 @@ ManagedDatabaseSecurityAlertPolicyInner get(String resourceGroupName, String man /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -108,9 +162,10 @@ Mono> createOrUpdateWithRespon /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -126,9 +181,10 @@ Mono createOrUpdateAsync(String resourc /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @param context The context to associate with this operation. @@ -145,9 +201,10 @@ Response createOrUpdateWithResponse(Str /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -159,50 +216,4 @@ Response createOrUpdateWithResponse(Str ManagedDatabaseSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, SecurityAlertPolicyName securityAlertPolicyName, ManagedDatabaseSecurityAlertPolicyInner parameters); - - /** - * Gets a list of managed database's security alert policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's security alert policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName); - - /** - * Gets a list of managed database's security alert policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's security alert policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName); - - /** - * Gets a list of managed database's security alert policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's security alert policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityEventsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityEventsClient.java index 92a250f026b7..b8790340f30b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityEventsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityEventsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,9 +18,10 @@ public interface ManagedDatabaseSecurityEventsClient { /** * Gets a list of security events. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security events are retrieved. * @param filter An OData filter expression that filters elements in the collection. * @param skip The number of elements in the collection to skip. * @param top The number of elements to return from the collection. @@ -37,9 +38,10 @@ PagedFlux listByDatabaseAsync(String resourceGroupName, Stri /** * Gets a list of security events. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security events are retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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,9 +54,10 @@ PagedFlux listByDatabaseAsync(String resourceGroupName, Stri /** * Gets a list of security events. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security events are retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -67,9 +70,10 @@ PagedIterable listByDatabase(String resourceGroupName, Strin /** * Gets a list of security events. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security events are retrieved. * @param filter An OData filter expression that filters elements in the collection. * @param skip The number of elements in the collection to skip. * @param top The number of elements to return from the collection. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSensitivityLabelsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSensitivityLabelsClient.java index 8cec030b828d..9d6bb1b6c00d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSensitivityLabelsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSensitivityLabelsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -11,8 +11,6 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelInner; -import com.azure.resourcemanager.sql.models.CurrentSensitivityLabelSource; -import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelSource; import com.azure.resourcemanager.sql.models.SensitivityLabelSource; import com.azure.resourcemanager.sql.models.SensitivityLabelUpdateList; import reactor.core.publisher.Mono; @@ -22,252 +20,221 @@ */ public interface ManagedDatabaseSensitivityLabelsClient { /** - * Gets the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param skipToken The skipToken parameter. + * @param count The count parameter. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity label of a given column along with {@link Response} on successful completion of - * {@link Mono}. + * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, - SensitivityLabelSource sensitivityLabelSource); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String skipToken, Boolean count, String filter); /** - * Gets the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity label of a given column on successful completion of {@link Mono}. + * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName); /** - * Gets the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. - * @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 sensitivity label of a given column along with {@link Response}. + * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, - SensitivityLabelSource sensitivityLabelSource, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listCurrentByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName); /** - * Gets the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param skipToken The skipToken parameter. + * @param count The count parameter. + * @param filter An OData filter expression that filters elements in the collection. + * @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 sensitivity label of a given column. + * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - SensitivityLabelInner get(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listCurrentByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName, String skipToken, Boolean count, String filter, Context context); /** - * Creates or updates the sensitivity label of a given column. + * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. - * @param parameters The column sensitivity label resource. + * @param parameters The parameters 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 sensitivity label along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource, SensitivityLabelInner parameters); + Mono> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, SensitivityLabelUpdateList parameters); /** - * Creates or updates the sensitivity label of a given column. + * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. - * @param parameters The column sensitivity label resource. + * @param parameters The parameters 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 sensitivity label on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource, SensitivityLabelInner parameters); + Mono updateAsync(String resourceGroupName, String managedInstanceName, String databaseName, + SensitivityLabelUpdateList parameters); /** - * Creates or updates the sensitivity label of a given column. + * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. - * @param parameters The column sensitivity label resource. + * @param parameters The parameters 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 sensitivity label along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource, SensitivityLabelInner parameters, Context context); + Response updateWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, + SensitivityLabelUpdateList parameters, Context context); /** - * Creates or updates the sensitivity label of a given column. + * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. - * @param parameters The column sensitivity label resource. + * @param parameters The parameters 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 sensitivity label. */ @ServiceMethod(returns = ReturnType.SINGLE) - SensitivityLabelInner createOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName, CurrentSensitivityLabelSource sensitivityLabelSource, - SensitivityLabelInner parameters); + void update(String resourceGroupName, String managedInstanceName, String databaseName, + SensitivityLabelUpdateList parameters); /** - * Deletes the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param skipToken The skipToken parameter. + * @param includeDisabledRecommendations Specifies whether to include disabled recommendations or not. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean includeDisabledRecommendations, + String filter); /** - * Deletes the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, - String tableName, String columnName, CurrentSensitivityLabelSource sensitivityLabelSource); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName); /** - * Deletes the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. - * @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 the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName, CurrentSensitivityLabelSource sensitivityLabelSource, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listRecommendedByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName); /** - * Deletes the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param skipToken The skipToken parameter. + * @param includeDisabledRecommendations Specifies whether to include disabled recommendations or not. + * @param filter An OData filter expression that filters elements in the collection. + * @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 sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, - String tableName, String columnName, CurrentSensitivityLabelSource sensitivityLabelSource); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listRecommendedByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName, String skipToken, Boolean includeDisabledRecommendations, String filter, Context context); /** - * Disables sensitivity recommendations on a given column. + * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -277,17 +244,19 @@ void delete(String resourceGroupName, String managedInstanceName, String databas * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 sensitivity label of a given column along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> disableRecommendationWithResponseAsync(String resourceGroupName, String managedInstanceName, + Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource); + SensitivityLabelSource sensitivityLabelSource); /** - * Disables sensitivity recommendations on a given column. + * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -297,17 +266,17 @@ Mono> disableRecommendationWithResponseAsync(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 {@link Mono} that completes when a successful response is received. + * @return the sensitivity label of a given column on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono disableRecommendationAsync(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource); + Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource); /** - * Disables sensitivity recommendations on a given column. + * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -318,17 +287,18 @@ Mono disableRecommendationAsync(String resourceGroupName, String managedIn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 the sensitivity label of a given column along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response disableRecommendationWithResponse(String resourceGroupName, String managedInstanceName, + Response getWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource, Context context); + SensitivityLabelSource sensitivityLabelSource, Context context); /** - * Disables sensitivity recommendations on a given column. + * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -338,198 +308,219 @@ Response disableRecommendationWithResponse(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 the sensitivity label of a given column. */ @ServiceMethod(returns = ReturnType.SINGLE) - void disableRecommendation(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource); + SensitivityLabelInner get(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource); /** - * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). + * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param parameters The column sensitivity label 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 Response} on successful completion of {@link Mono}. + * @return a sensitivity label along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> enableRecommendationWithResponseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, + SensitivityLabelInner parameters); /** - * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). + * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param parameters The column sensitivity label 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 {@link Mono} that completes when a successful response is received. + * @return a sensitivity label on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono enableRecommendationAsync(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource); + Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters); /** - * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). + * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param parameters The column sensitivity label 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 the {@link Response}. + * @return a sensitivity label along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response enableRecommendationWithResponse(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters, + Context context); /** - * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). + * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param parameters The column sensitivity label 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 sensitivity label. */ @ServiceMethod(returns = ReturnType.SINGLE) - void enableRecommendation(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource); + SensitivityLabelInner createOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName, SensitivityLabelInner parameters); /** - * Gets the sensitivity labels of a given database. + * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param skipToken The skipToken parameter. - * @param count The count parameter. - * @param filter An OData filter expression that filters elements in the collection. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String skipToken, Boolean count, String filter); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName); /** - * Gets the sensitivity labels of a given database. + * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, String managedInstanceName, - String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, + String tableName, String columnName); /** - * Gets the sensitivity labels of a given database. + * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @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 sensitivity labels of a given database as paginated response with {@link PagedIterable}. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listCurrentByDatabase(String resourceGroupName, String managedInstanceName, - String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName, Context context); /** - * Gets the sensitivity labels of a given database. + * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param skipToken The skipToken parameter. - * @param count The count parameter. - * @param filter An OData filter expression that filters elements in the collection. - * @param context The context to associate with this operation. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listCurrentByDatabase(String resourceGroupName, String managedInstanceName, - String databaseName, String skipToken, Boolean count, String filter, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, + String tableName, String columnName); /** - * Update sensitivity labels of a given database using an operations batch. + * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The parameters parameter. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, SensitivityLabelUpdateList parameters); + Mono> disableRecommendationWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName); /** - * Update sensitivity labels of a given database using an operations batch. + * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The parameters parameter. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 updateAsync(String resourceGroupName, String managedInstanceName, String databaseName, - SensitivityLabelUpdateList parameters); + Mono disableRecommendationAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName); /** - * Update sensitivity labels of a given database using an operations batch. + * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The parameters parameter. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @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. @@ -537,96 +528,108 @@ Mono updateAsync(String resourceGroupName, String managedInstanceName, Str * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, - SensitivityLabelUpdateList parameters, Context context); + Response disableRecommendationWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, Context context); /** - * Update sensitivity labels of a given database using an operations batch. + * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The parameters parameter. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 update(String resourceGroupName, String managedInstanceName, String databaseName, - SensitivityLabelUpdateList parameters); + void disableRecommendation(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName); /** - * Gets the sensitivity labels of a given database. + * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param skipToken The skipToken parameter. - * @param includeDisabledRecommendations Specifies whether to include disabled recommendations or not. - * @param filter An OData filter expression that filters elements in the collection. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String skipToken, Boolean includeDisabledRecommendations, - String filter); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> enableRecommendationWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName); /** - * Gets the sensitivity labels of a given database. + * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono enableRecommendationAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName); /** - * Gets the sensitivity labels of a given database. + * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @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 sensitivity labels of a given database as paginated response with {@link PagedIterable}. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRecommendedByDatabase(String resourceGroupName, String managedInstanceName, - String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response enableRecommendationWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, Context context); /** - * Gets the sensitivity labels of a given database. + * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param skipToken The skipToken parameter. - * @param includeDisabledRecommendations Specifies whether to include disabled recommendations or not. - * @param filter An OData filter expression that filters elements in the collection. - * @param context The context to associate with this operation. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRecommendedByDatabase(String resourceGroupName, String managedInstanceName, - String databaseName, String skipToken, Boolean includeDisabledRecommendations, String filter, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void enableRecommendation(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName); /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -642,7 +645,8 @@ PagedFlux listByDatabaseAsync(String resourceGroupName, S /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -657,7 +661,8 @@ PagedFlux listByDatabaseAsync(String resourceGroupName, S /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -672,7 +677,8 @@ PagedIterable listByDatabase(String resourceGroupName, St /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTablesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTablesClient.java index f8940d756517..46e6b116c67f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTablesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTablesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,138 +18,146 @@ */ public interface ManagedDatabaseTablesClient { /** - * Get managed database table. + * List managed database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed database table along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database tables as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listBySchemaAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String filter); /** - * Get managed database table. + * List managed database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed database table on successful completion of {@link Mono}. + * @return a list of database tables as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listBySchemaAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName); /** - * Get managed database table. + * List managed database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @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 managed database table along with {@link Response}. + * @return a list of database tables as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySchema(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName); /** - * Get managed database table. + * List managed database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. + * @param filter An OData filter expression that filters elements in the collection. + * @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 managed database table. + * @return a list of database tables as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseTableInner get(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, - String tableName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySchema(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String filter, Context context); /** - * List managed database tables. + * Get managed database table. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param filter An OData filter expression that filters elements in the collection. + * @param tableName The name of the table. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseTable list operation as paginated response with {@link PagedFlux}. + * @return managed database table along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listBySchemaAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String filter); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName); /** - * List managed database tables. + * Get managed database table. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. + * @param tableName The name of the table. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseTable list operation as paginated response with {@link PagedFlux}. + * @return managed database table on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listBySchemaAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName); /** - * List managed database tables. + * Get managed database table. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @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 response of a DatabaseTable list operation as paginated response with {@link PagedIterable}. + * @return managed database table along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySchema(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, Context context); /** - * List managed database tables. + * Get managed database table. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param filter An OData filter expression that filters elements in the collection. - * @param context The context to associate with this operation. + * @param tableName The name of the table. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 DatabaseTable list operation as paginated response with {@link PagedIterable}. + * @return managed database table. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySchema(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String filter, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DatabaseTableInner get(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, + String tableName); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTransparentDataEncryptionsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTransparentDataEncryptionsClient.java index eb361060cc61..d88d3dca21bb 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTransparentDataEncryptionsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTransparentDataEncryptionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -19,12 +19,64 @@ * ManagedDatabaseTransparentDataEncryptionsClient. */ public interface ManagedDatabaseTransparentDataEncryptionsClient { + /** + * Gets a list of managed database's transparent data encryptions. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 managed database's transparent data encryptions as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName); + + /** + * Gets a list of managed database's transparent data encryptions. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 managed database's transparent data encryptions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName); + + /** + * Gets a list of managed database's transparent data encryptions. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. + * @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 managed database's transparent data encryptions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context); + /** * Gets a managed database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -39,9 +91,10 @@ Mono> getWithResponseAsync(Strin /** * Gets a managed database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -55,9 +108,10 @@ Mono getAsync(String resourceGroupName, S /** * Gets a managed database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,9 +126,10 @@ Response getWithResponse(String resourceG /** * Gets a managed database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -88,9 +143,10 @@ ManagedTransparentDataEncryptionInner get(String resourceGroupName, String manag /** * Updates a database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -107,9 +163,10 @@ Mono> createOrUpdateWithResponse /** * Updates a database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -125,9 +182,10 @@ Mono createOrUpdateAsync(String resourceG /** * Updates a database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. * @param parameters The database transparent data encryption. * @param context The context to associate with this operation. @@ -144,9 +202,10 @@ Response createOrUpdateWithResponse(Strin /** * Updates a database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -157,52 +216,4 @@ Response createOrUpdateWithResponse(Strin @ServiceMethod(returns = ReturnType.SINGLE) ManagedTransparentDataEncryptionInner createOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, ManagedTransparentDataEncryptionInner parameters); - - /** - * Gets a list of managed database's transparent data encryptions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's transparent data encryptions as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName); - - /** - * Gets a list of managed database's transparent data encryptions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's transparent data encryptions as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName); - - /** - * Gets a list of managed database's transparent data encryptions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's transparent data encryptions as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.java index 7e1bd1ddeaf1..716613463978 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -21,7 +21,8 @@ public interface ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient { /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -42,7 +43,8 @@ Mono> getWithResponse /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -62,7 +64,8 @@ Mono getAsync(String resourceG /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -83,7 +86,8 @@ Response getWithResponse(Strin /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -103,7 +107,8 @@ DatabaseVulnerabilityAssessmentRuleBaselineInner get(String resourceGroupName, S /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -127,7 +132,8 @@ Mono> createOrUpdateW /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -149,7 +155,8 @@ Mono createOrUpdateAsync(Strin /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -172,7 +179,8 @@ Response createOrUpdateWithRes /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -194,7 +202,8 @@ DatabaseVulnerabilityAssessmentRuleBaselineInner createOrUpdate(String resourceG /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -214,7 +223,8 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String ma /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -234,7 +244,8 @@ Mono deleteAsync(String resourceGroupName, String managedInstanceName, Str /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -255,7 +266,8 @@ Response deleteWithResponse(String resourceGroupName, String managedInstan /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentScansClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentScansClient.java index a00f127cfa07..12c0f076fff7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentScansClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentScansClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -26,64 +26,63 @@ */ public interface ManagedDatabaseVulnerabilityAssessmentScansClient { /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database along with {@link Response} on successful completion - * of {@link Mono}. + * @return a list of vulnerability assessment scan records as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database on successful completion of {@link Mono}. + * @return a list of vulnerability assessment scan records as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @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 vulnerability assessment scan record of a database along with {@link Response}. + * @return a list of vulnerability assessment scan records as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, Context context); + Context context); /** * Gets a vulnerability assessment scan record of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -91,73 +90,79 @@ Response getWithResponse(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 a vulnerability assessment scan record of a database. + * @return a vulnerability assessment scan record of a database along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - VulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String managedInstanceName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String scanId); /** - * Lists the vulnerability assessment scans of a database. + * Gets a vulnerability assessment scan record of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedFlux}. + * @return a vulnerability assessment scan record of a database on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** - * Lists the vulnerability assessment scans of a database. + * Gets a vulnerability assessment scan record of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @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 response of a VulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedIterable}. + * @return a vulnerability assessment scan record of a database along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String scanId, Context context); /** - * Lists the vulnerability assessment scans of a database. + * Gets a vulnerability assessment scan record of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param context The context to associate with this operation. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 VulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedIterable}. + * @return a vulnerability assessment scan record of a database. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + VulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId); /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -172,11 +177,12 @@ Mono> exportWithRespon /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -190,11 +196,12 @@ Mono exportAsync(String resourc /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -209,11 +216,12 @@ Response exportWithResponse(Str /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -226,7 +234,8 @@ DatabaseVulnerabilityAssessmentScansExportInner export(String resourceGroupName, /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -243,7 +252,8 @@ Mono>> initiateScanWithResponseAsync(String resourceGr /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -260,7 +270,8 @@ PollerFlux, Void> beginInitiateScanAsync(String resourceGroupNa /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -277,7 +288,8 @@ SyncPoller, Void> beginInitiateScan(String resourceGroupName, S /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -295,7 +307,8 @@ SyncPoller, Void> beginInitiateScan(String resourceGroupName, S /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -312,7 +325,8 @@ Mono initiateScanAsync(String resourceGroupName, String managedInstanceNam /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -328,7 +342,8 @@ void initiateScan(String resourceGroupName, String managedInstanceName, String d /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentsClient.java index e87df718d93b..c53ea267cb05 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -10,7 +10,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.sql.fluent.models.DatabaseVulnerabilityAssessmentInner; +import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentAutoGeneratedInner; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import reactor.core.publisher.Mono; @@ -19,10 +19,60 @@ * ManagedDatabaseVulnerabilityAssessmentsClient. */ public interface ManagedDatabaseVulnerabilityAssessmentsClient { + /** + * Lists the vulnerability assessments of a managed database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 database's vulnerability assessments as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName); + + /** + * Lists the vulnerability assessments of a managed database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 database's vulnerability assessments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName); + + /** + * Lists the vulnerability assessments of a managed database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @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 the database's vulnerability assessments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context); + /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -33,13 +83,14 @@ public interface ManagedDatabaseVulnerabilityAssessmentsClient { * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, + Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -49,13 +100,14 @@ Mono> getWithResponseAsync(String * @return the database's vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); + Mono getAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -66,13 +118,15 @@ Mono getAsync(String resourceGroupName, St * @return the database's vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String managedInstanceName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); + Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + Context context); /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -82,13 +136,14 @@ Response getWithResponse(String resourceGr * @return the database's vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseVulnerabilityAssessmentInner get(String resourceGroupName, String managedInstanceName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName); + DatabaseVulnerabilityAssessmentAutoGeneratedInner get(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -99,14 +154,16 @@ DatabaseVulnerabilityAssessmentInner get(String resourceGroupName, String manage * @return a database vulnerability assessment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters); + Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, + DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters); /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -117,14 +174,15 @@ Mono> createOrUpdateWithResponseA * @return a database vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters); /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -136,14 +194,15 @@ Mono createOrUpdateAsync(String resourceGr * @return a database vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, + Response createOrUpdateWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters, Context context); + DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters, Context context); /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -154,14 +213,15 @@ Response createOrUpdateWithResponse(String * @return a database vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseVulnerabilityAssessmentInner createOrUpdate(String resourceGroupName, String managedInstanceName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters); + DatabaseVulnerabilityAssessmentAutoGeneratedInner createOrUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters); /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -177,7 +237,8 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String ma /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -193,7 +254,8 @@ Mono deleteAsync(String resourceGroupName, String managedInstanceName, Str /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -210,7 +272,8 @@ Response deleteWithResponse(String resourceGroupName, String managedInstan /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -221,53 +284,4 @@ Response deleteWithResponse(String resourceGroupName, String managedInstan @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Lists the vulnerability assessments of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database for which the vulnerability assessment is defined. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 DatabaseVulnerabilityAssessment list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName); - - /** - * Lists the vulnerability assessments of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database for which the vulnerability assessment is defined. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 DatabaseVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName); - - /** - * Lists the vulnerability assessments of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database for which the vulnerability assessment is defined. - * @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 response of a DatabaseVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabasesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabasesClient.java index d95003597dea..40744a6a9560 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabasesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabasesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -26,10 +26,55 @@ * An instance of this class provides access to all the operations defined in ManagedDatabasesClient. */ public interface ManagedDatabasesClient { + /** + * Gets a list of managed databases. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 managed databases as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName); + + /** + * Gets a list of managed databases. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 managed databases as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, String managedInstanceName); + + /** + * Gets a list of managed databases. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 managed databases as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + Context context); + /** * Gets a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -44,7 +89,8 @@ Mono> getWithResponseAsync(String resourceGroupNa /** * Gets a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -58,7 +104,8 @@ Mono> getWithResponseAsync(String resourceGroupNa /** * Gets a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -74,7 +121,8 @@ Response getWithResponse(String resourceGroupName, String /** * Gets a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -88,7 +136,8 @@ Response getWithResponse(String resourceGroupName, String /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -104,7 +153,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -120,7 +170,8 @@ PollerFlux, ManagedDatabaseInner> beginCreateOr /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -136,7 +187,8 @@ SyncPoller, ManagedDatabaseInner> beginCreateOr /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -153,7 +205,8 @@ SyncPoller, ManagedDatabaseInner> beginCreateOr /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -169,7 +222,8 @@ Mono createOrUpdateAsync(String resourceGroupName, String /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -185,7 +239,8 @@ ManagedDatabaseInner createOrUpdate(String resourceGroupName, String managedInst /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -200,266 +255,240 @@ ManagedDatabaseInner createOrUpdate(String resourceGroupName, String managedInst ManagedDatabaseInner parameters, Context context); /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 managed database resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedDatabaseUpdate parameters); + Mono>> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName); /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 the {@link PollerFlux} for polling of a managed database resource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedDatabaseInner> beginUpdateAsync(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String databaseName); /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 the {@link SyncPoller} for polling of a managed database resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedDatabaseInner> beginUpdate(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String databaseName); /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 the {@link SyncPoller} for polling of a managed database resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedDatabaseInner> beginUpdate(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String databaseName, Context context); /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 managed database resource on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String managedInstanceName, String databaseName, - ManagedDatabaseUpdate parameters); + Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName); /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedDatabaseInner update(String resourceGroupName, String managedInstanceName, String databaseName, - ManagedDatabaseUpdate parameters); + void delete(String resourceGroupName, String managedInstanceName, String databaseName); /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedDatabaseInner update(String resourceGroupName, String managedInstanceName, String databaseName, - ManagedDatabaseUpdate parameters, Context context); + void delete(String resourceGroupName, String managedInstanceName, String databaseName, Context context); /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 the {@link Response} on successful completion of {@link Mono}. + * @return a managed database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, - String databaseName); + Mono>> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseUpdate parameters); /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of a managed database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, - String databaseName); + PollerFlux, ManagedDatabaseInner> beginUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters); /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of a managed database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, - String databaseName); + SyncPoller, ManagedDatabaseInner> beginUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters); /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of a managed database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, - String databaseName, Context context); + SyncPoller, ManagedDatabaseInner> beginUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters, Context context); /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 {@link Mono} that completes when a successful response is received. + * @return a managed database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName); + Mono updateAsync(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseUpdate parameters); /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String managedInstanceName, String databaseName); + ManagedDatabaseInner update(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseUpdate parameters); /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String managedInstanceName, String databaseName, Context context); - - /** - * Gets a list of managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managed databases as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName); - - /** - * Gets a list of managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managed databases as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, String managedInstanceName); - - /** - * Gets a list of managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed databases as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, - Context context); + ManagedDatabaseInner update(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseUpdate parameters, Context context); /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -475,7 +504,8 @@ Mono>> cancelMoveWithResponseAsync(String resourceGrou /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -491,7 +521,8 @@ PollerFlux, Void> beginCancelMoveAsync(String resourceGroupName /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -507,7 +538,8 @@ SyncPoller, Void> beginCancelMove(String resourceGroupName, Str /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -524,7 +556,8 @@ SyncPoller, Void> beginCancelMove(String resourceGroupName, Str /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -540,7 +573,8 @@ Mono cancelMoveAsync(String resourceGroupName, String managedInstanceName, /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -555,7 +589,8 @@ void cancelMove(String resourceGroupName, String managedInstanceName, String dat /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -571,7 +606,8 @@ void cancelMove(String resourceGroupName, String managedInstanceName, String dat /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -587,7 +623,8 @@ Mono>> completeMoveWithResponseAsync(String resourceGr /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -603,7 +640,8 @@ PollerFlux, Void> beginCompleteMoveAsync(String resourceGroupNa /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -619,7 +657,8 @@ SyncPoller, Void> beginCompleteMove(String resourceGroupName, S /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -636,7 +675,8 @@ SyncPoller, Void> beginCompleteMove(String resourceGroupName, S /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -652,7 +692,8 @@ Mono completeMoveAsync(String resourceGroupName, String managedInstanceNam /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -667,7 +708,8 @@ void completeMove(String resourceGroupName, String managedInstanceName, String d /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -683,7 +725,8 @@ void completeMove(String resourceGroupName, String managedInstanceName, String d /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -699,7 +742,8 @@ Mono>> completeRestoreWithResponseAsync(String resourc /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -715,7 +759,8 @@ PollerFlux, Void> beginCompleteRestoreAsync(String resourceGrou /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -731,7 +776,8 @@ SyncPoller, Void> beginCompleteRestore(String resourceGroupName /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -748,7 +794,8 @@ SyncPoller, Void> beginCompleteRestore(String resourceGroupName /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -764,7 +811,8 @@ Mono completeRestoreAsync(String resourceGroupName, String managedInstance /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -779,7 +827,8 @@ void completeRestore(String resourceGroupName, String managedInstanceName, Strin /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -792,117 +841,11 @@ void completeRestore(String resourceGroupName, String managedInstanceName, Strin void completeRestore(String resourceGroupName, String managedInstanceName, String databaseName, CompleteDatabaseRestoreDefinition parameters, Context context); - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> reevaluateInaccessibleDatabaseStateWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName); - - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedDatabaseInner> beginReevaluateInaccessibleDatabaseStateAsync( - String resourceGroupName, String managedInstanceName, String databaseName); - - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedDatabaseInner> beginReevaluateInaccessibleDatabaseState( - String resourceGroupName, String managedInstanceName, String databaseName); - - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedDatabaseInner> beginReevaluateInaccessibleDatabaseState( - String resourceGroupName, String managedInstanceName, String databaseName, Context context); - - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono reevaluateInaccessibleDatabaseStateAsync(String resourceGroupName, - String managedInstanceName, String databaseName); - - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedDatabaseInner reevaluateInaccessibleDatabaseState(String resourceGroupName, String managedInstanceName, - String databaseName); - - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedDatabaseInner reevaluateInaccessibleDatabaseState(String resourceGroupName, String managedInstanceName, - String databaseName, Context context); - /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -918,7 +861,8 @@ Mono>> startMoveWithResponseAsync(String resourceGroup /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -934,7 +878,8 @@ PollerFlux, Void> beginStartMoveAsync(String resourceGroupName, /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -950,7 +895,8 @@ SyncPoller, Void> beginStartMove(String resourceGroupName, Stri /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -967,7 +913,8 @@ SyncPoller, Void> beginStartMove(String resourceGroupName, Stri /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -983,7 +930,8 @@ Mono startMoveAsync(String resourceGroupName, String managedInstanceName, /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -998,7 +946,8 @@ void startMove(String resourceGroupName, String managedInstanceName, String data /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -1014,7 +963,8 @@ void startMove(String resourceGroupName, String managedInstanceName, String data /** * Gets a list of inaccessible managed databases in a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1029,7 +979,8 @@ PagedFlux listInaccessibleByInstanceAsync(String resourceG /** * Gets a list of inaccessible managed databases in a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1044,7 +995,8 @@ PagedIterable listInaccessibleByInstance(String resourceGr /** * Gets a list of inaccessible managed databases in a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdministratorsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdministratorsClient.java index 8694eed0cebe..9c594868489f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdministratorsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdministratorsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,10 +23,57 @@ * An instance of this class provides access to all the operations defined in ManagedInstanceAdministratorsClient. */ public interface ManagedInstanceAdministratorsClient { + /** + * Gets a list of managed instance administrators. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 managed instance administrators as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName); + + /** + * Gets a list of managed instance administrators. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 managed instance administrators as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName); + + /** + * Gets a list of managed instance administrators. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 managed instance administrators as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context); + /** * Gets a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -41,7 +88,8 @@ Mono> getWithResponseAsync(String re /** * Gets a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -56,7 +104,8 @@ Mono getAsync(String resourceGroupName, Strin /** * Gets a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -72,7 +121,8 @@ Response getWithResponse(String resourceGroup /** * Gets a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,7 +137,8 @@ ManagedInstanceAdministratorInner get(String resourceGroupName, String managedIn /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -104,7 +155,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -121,7 +173,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -138,7 +191,8 @@ SyncPoller, ManagedInstanceAdminis /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -156,7 +210,8 @@ SyncPoller, ManagedInstanceAdminis /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -172,7 +227,8 @@ Mono createOrUpdateAsync(String resourceGroup /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -188,7 +244,8 @@ ManagedInstanceAdministratorInner createOrUpdate(String resourceGroupName, Strin /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -205,7 +262,8 @@ ManagedInstanceAdministratorInner createOrUpdate(String resourceGroupName, Strin /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -220,7 +278,8 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -235,7 +294,8 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -250,7 +310,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -266,7 +327,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -280,7 +342,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -293,7 +356,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -304,47 +368,4 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String managedInstanceName, AdministratorName administratorName, Context context); - - /** - * Gets a list of managed instance administrators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managed instance administrators as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName); - - /** - * Gets a list of managed instance administrators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managed instance administrators as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName); - - /** - * Gets a list of managed instance administrators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed instance administrators as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdvancedThreatProtectionSettingsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdvancedThreatProtectionSettingsClient.java deleted file mode 100644 index d5885e9003d4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdvancedThreatProtectionSettingsClient.java +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.ManagedInstanceAdvancedThreatProtectionInner; -import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; -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 - * ManagedInstanceAdvancedThreatProtectionSettingsClient. - */ -public interface ManagedInstanceAdvancedThreatProtectionSettingsClient { - /** - * Get a managed instance's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced 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 managed instance's Advanced Threat Protection state along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, AdvancedThreatProtectionName advancedThreatProtectionName); - - /** - * Get a managed instance's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced 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 managed instance's Advanced Threat Protection state on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, - AdvancedThreatProtectionName advancedThreatProtectionName); - - /** - * Get a managed instance's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced 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 managed instance's Advanced Threat Protection state along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, - String managedInstanceName, AdvancedThreatProtectionName advancedThreatProtectionName, Context context); - - /** - * Get a managed instance's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced 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 managed instance's Advanced Threat Protection state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceAdvancedThreatProtectionInner get(String resourceGroupName, String managedInstanceName, - AdvancedThreatProtectionName advancedThreatProtectionName); - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 managed instance Advanced Threat Protection along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner parameters); - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 the {@link PollerFlux} for polling of a managed instance Advanced Threat Protection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedInstanceAdvancedThreatProtectionInner> - beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner parameters); - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 the {@link SyncPoller} for polling of a managed instance Advanced Threat Protection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedInstanceAdvancedThreatProtectionInner> - beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner parameters); - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 the {@link SyncPoller} for polling of a managed instance Advanced Threat Protection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedInstanceAdvancedThreatProtectionInner> - beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner parameters, Context context); - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 managed instance Advanced Threat Protection on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, - String managedInstanceName, AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner parameters); - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 managed instance Advanced Threat Protection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, String managedInstanceName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner parameters); - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 managed instance Advanced Threat Protection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, String managedInstanceName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner parameters, Context context); - - /** - * Get the managed instance's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 instance's Advanced Threat Protection settings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName); - - /** - * Get the managed instance's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 instance's Advanced Threat Protection settings as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName); - - /** - * Get the managed instance's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 instance's Advanced Threat Protection settings as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAzureADOnlyAuthenticationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAzureADOnlyAuthenticationsClient.java index ca7fa5bccbc7..6ff1f40c1bca 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAzureADOnlyAuthenticationsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAzureADOnlyAuthenticationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -24,10 +24,60 @@ * ManagedInstanceAzureADOnlyAuthenticationsClient. */ public interface ManagedInstanceAzureADOnlyAuthenticationsClient { + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Azure Active Directory only authentications as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName); + + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Azure Active Directory only authentications as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName); + + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 Azure Active Directory only authentications as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context); + /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -43,7 +93,8 @@ Mono> getWithResponseAsy /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -58,7 +109,8 @@ Mono getAsync(String resourceGrou /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -74,7 +126,8 @@ Response getWithResponse(String r /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -90,7 +143,8 @@ ManagedInstanceAzureADOnlyAuthenticationInner get(String resourceGroupName, Stri * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -110,7 +164,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -129,7 +184,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -148,7 +204,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -168,7 +225,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -187,7 +245,8 @@ Mono createOrUpdateAsync(String r * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -205,7 +264,8 @@ ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate(String resourceGrou * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -224,7 +284,8 @@ ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate(String resourceGrou /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -239,7 +300,8 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -254,7 +316,8 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -269,7 +332,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -285,7 +349,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -299,7 +364,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -312,7 +378,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -323,50 +390,4 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String managedInstanceName, AuthenticationName authenticationName, Context context); - - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 Azure Active Directory only authentications as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName); - - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 Azure Active Directory only authentications as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName); - - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 Azure Active Directory only authentications as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceDtcsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceDtcsClient.java deleted file mode 100644 index 8f79b1303c91..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceDtcsClient.java +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.ManagedInstanceDtcInner; -import com.azure.resourcemanager.sql.models.DtcName; -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 ManagedInstanceDtcsClient. - */ -public interface ManagedInstanceDtcsClient { - /** - * Gets managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed instance DTC settings along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, - DtcName dtcName); - - /** - * Gets managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed instance DTC settings on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, DtcName dtcName); - - /** - * Gets managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @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 managed instance DTC settings along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String managedInstanceName, - DtcName dtcName, Context context); - - /** - * Gets managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed instance DTC settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceDtcInner get(String resourceGroupName, String managedInstanceName, DtcName dtcName); - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 sQL Managed Instance DTC along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, DtcName dtcName, ManagedInstanceDtcInner parameters); - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 {@link PollerFlux} for polling of sQL Managed Instance DTC. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedInstanceDtcInner> beginCreateOrUpdateAsync( - String resourceGroupName, String managedInstanceName, DtcName dtcName, ManagedInstanceDtcInner parameters); - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 {@link SyncPoller} for polling of sQL Managed Instance DTC. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedInstanceDtcInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, DtcName dtcName, ManagedInstanceDtcInner parameters); - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 {@link SyncPoller} for polling of sQL Managed Instance DTC. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedInstanceDtcInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, DtcName dtcName, ManagedInstanceDtcInner parameters, - Context context); - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 sQL Managed Instance DTC on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, - DtcName dtcName, ManagedInstanceDtcInner parameters); - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 sQL Managed Instance DTC. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceDtcInner createOrUpdate(String resourceGroupName, String managedInstanceName, DtcName dtcName, - ManagedInstanceDtcInner parameters); - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 sQL Managed Instance DTC. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceDtcInner createOrUpdate(String resourceGroupName, String managedInstanceName, DtcName dtcName, - ManagedInstanceDtcInner parameters, Context context); - - /** - * Gets a list of managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managed instance DTC settings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName); - - /** - * Gets a list of managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managed instance DTC settings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance(String resourceGroupName, String managedInstanceName); - - /** - * Gets a list of managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed instance DTC settings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance(String resourceGroupName, String managedInstanceName, - Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceEncryptionProtectorsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceEncryptionProtectorsClient.java index 943f6396498f..e39e43e5a08e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceEncryptionProtectorsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceEncryptionProtectorsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,10 +23,57 @@ * An instance of this class provides access to all the operations defined in ManagedInstanceEncryptionProtectorsClient. */ public interface ManagedInstanceEncryptionProtectorsClient { + /** + * Gets a list of managed instance encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 managed instance encryption protectors as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName); + + /** + * Gets a list of managed instance encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 managed instance encryption protectors as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName); + + /** + * Gets a list of managed instance encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 managed instance encryption protectors as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context); + /** * Gets a managed instance encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -42,7 +89,8 @@ Mono> getWithResponseAsync(Str /** * Gets a managed instance encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,7 +105,8 @@ Mono getAsync(String resourceGroupName, /** * Gets a managed instance encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @param context The context to associate with this operation. @@ -73,7 +122,8 @@ Response getWithResponse(String resourc /** * Gets a managed instance encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -88,9 +138,10 @@ ManagedInstanceEncryptionProtectorInner get(String resourceGroupName, String man /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -106,9 +157,10 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -123,9 +175,10 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -140,9 +193,10 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -159,9 +213,10 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -176,9 +231,10 @@ Mono createOrUpdateAsync(String resourc /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -192,9 +248,10 @@ ManagedInstanceEncryptionProtectorInner createOrUpdate(String resourceGroupName, /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -207,55 +264,13 @@ ManagedInstanceEncryptionProtectorInner createOrUpdate(String resourceGroupName, EncryptionProtectorName encryptionProtectorName, ManagedInstanceEncryptionProtectorInner parameters, Context context); - /** - * Gets a list of managed instance encryption protectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managed instance encryption protectors as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName); - - /** - * Gets a list of managed instance encryption protectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managed instance encryption protectors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName); - - /** - * Gets a list of managed instance encryption protectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed instance encryption protectors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context); - /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -268,9 +283,10 @@ Mono>> revalidateWithResponseAsync(String resourceGrou /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -283,9 +299,10 @@ PollerFlux, Void> beginRevalidateAsync(String resourceGroupName /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -298,9 +315,10 @@ SyncPoller, Void> beginRevalidate(String resourceGroupName, Str /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -314,9 +332,10 @@ SyncPoller, Void> beginRevalidate(String resourceGroupName, Str /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -329,9 +348,10 @@ Mono revalidateAsync(String resourceGroupName, String managedInstanceName, /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -343,9 +363,10 @@ void revalidate(String resourceGroupName, String managedInstanceName, /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceKeysClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceKeysClient.java index 035f117637b0..6a0816d1433c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceKeysClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceKeysClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -22,10 +22,72 @@ * An instance of this class provides access to all the operations defined in ManagedInstanceKeysClient. */ public interface ManagedInstanceKeysClient { + /** + * Gets a list of managed instance keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param filter An OData filter expression that filters elements in the collection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 managed instance keys as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName, + String filter); + + /** + * Gets a list of managed instance keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 managed instance keys as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName); + + /** + * Gets a list of managed instance keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 managed instance keys as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, String managedInstanceName); + + /** + * Gets a list of managed instance keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param filter An OData filter expression that filters elements in the collection. + * @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 managed instance keys as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + String filter, Context context); + /** * Gets a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -40,7 +102,8 @@ Mono> getWithResponseAsync(String resourceGrou /** * Gets a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -54,7 +117,8 @@ Mono> getWithResponseAsync(String resourceGrou /** * Gets a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @param context The context to associate with this operation. @@ -70,7 +134,8 @@ Response getWithResponse(String resourceGroupName, Stri /** * Gets a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -84,9 +149,10 @@ Response getWithResponse(String resourceGroupName, Stri /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -100,9 +166,10 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -116,9 +183,10 @@ PollerFlux, ManagedInstanceKeyInner> beginCr /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -132,9 +200,10 @@ SyncPoller, ManagedInstanceKeyInner> beginCr /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -150,9 +219,10 @@ SyncPoller, ManagedInstanceKeyInner> beginCr /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -166,9 +236,10 @@ Mono createOrUpdateAsync(String resourceGroupName, Stri /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -182,9 +253,10 @@ ManagedInstanceKeyInner createOrUpdate(String resourceGroupName, String managedI /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -199,9 +271,10 @@ ManagedInstanceKeyInner createOrUpdate(String resourceGroupName, String managedI /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -214,9 +287,10 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -229,9 +303,10 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -244,9 +319,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @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. @@ -260,9 +336,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -274,9 +351,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -287,9 +365,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @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. @@ -297,61 +376,4 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String managedInstanceName, String keyName, Context context); - - /** - * Gets a list of managed instance keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param filter An OData filter expression that filters elements in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managed instance keys as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName, - String filter); - - /** - * Gets a list of managed instance keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managed instance keys as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName); - - /** - * Gets a list of managed instance keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managed instance keys as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, String managedInstanceName); - - /** - * Gets a list of managed instance keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param filter An OData filter expression that filters elements in the collection. - * @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 managed instance keys as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, - String filter, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceLongTermRetentionPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceLongTermRetentionPoliciesClient.java index 7b5fb965e914..4ca75ce478c4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceLongTermRetentionPoliciesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceLongTermRetentionPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -24,10 +24,60 @@ * ManagedInstanceLongTermRetentionPoliciesClient. */ public interface ManagedInstanceLongTermRetentionPoliciesClient { + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName); + + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName); + + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context); + /** * Gets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -44,7 +94,8 @@ Mono> getWithResponseAsync /** * Gets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -60,7 +111,8 @@ Mono getAsync(String resourceGroupN /** * Gets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -78,7 +130,8 @@ Response getWithResponse(String res /** * Gets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -94,7 +147,8 @@ ManagedInstanceLongTermRetentionPolicyInner get(String resourceGroupName, String /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -112,7 +166,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -131,7 +186,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -150,7 +206,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -170,7 +227,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -188,7 +246,8 @@ Mono createOrUpdateAsync(String res /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -206,7 +265,8 @@ ManagedInstanceLongTermRetentionPolicyInner createOrUpdate(String resourceGroupN /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -221,162 +281,4 @@ ManagedInstanceLongTermRetentionPolicyInner createOrUpdate(String resourceGroupN ManagedInstanceLongTermRetentionPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, ManagedInstanceLongTermRetentionPolicyInner parameters, Context context); - - /** - * Deletes a managed database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName); - - /** - * Deletes a managed database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 long term retention policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName); - - /** - * Deletes a managed database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 long term retention policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName); - - /** - * Deletes a managed database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. - * @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 long term retention policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, Context context); - - /** - * Deletes a managed database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName); - - /** - * Deletes a managed database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 managedInstanceName, String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName); - - /** - * Deletes a managed database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. - * @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 managedInstanceName, String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName, Context context); - - /** - * Gets a database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName); - - /** - * Gets a database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName); - - /** - * Gets a database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceOperationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceOperationsClient.java index 44efa7fc6c2f..df99233099db 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceOperationsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -11,6 +11,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceOperationInner; +import java.util.UUID; import reactor.core.publisher.Mono; /** @@ -18,113 +19,121 @@ */ public interface ManagedInstanceOperationsClient { /** - * Gets a management operation on a managed instance. + * Gets a list of operations performed on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param operationId The operationId 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 management operation on a managed instance along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of operations performed on the managed instance as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String operationId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName); /** - * Gets a management operation on a managed instance. + * Gets a list of operations performed on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param operationId The operationId 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 management operation on a managed instance on successful completion of {@link Mono}. + * @return a list of operations performed on the managed instance as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, - String operationId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName); /** - * Gets a management operation on a managed instance. + * Gets a list of operations performed on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param operationId The operationId 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 management operation on a managed instance along with {@link Response}. + * @return a list of operations performed on the managed instance as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String managedInstanceName, - String operationId, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName, Context context); /** * Gets a management operation on a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId 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 management operation on a managed instance. + * @return a management operation on a managed instance along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceOperationInner get(String resourceGroupName, String managedInstanceName, String operationId); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, UUID operationId); /** - * Gets a list of operations performed on the managed instance. + * Gets a management operation on a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param operationId The operationId 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 list of operations performed on the managed instance as paginated response with {@link PagedFlux}. + * @return a management operation on a managed instance on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedInstanceAsync(String resourceGroupName, - String managedInstanceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String managedInstanceName, + UUID operationId); /** - * Gets a list of operations performed on the managed instance. + * Gets a management operation on a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param operationId The operationId 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 list of operations performed on the managed instance as paginated response with {@link PagedIterable}. + * @return a management operation on a managed instance along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String managedInstanceName, + UUID operationId, Context context); /** - * Gets a list of operations performed on the managed instance. + * Gets a management operation on a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param context The context to associate with this operation. + * @param operationId The operationId 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 list of operations performed on the managed instance as paginated response with {@link PagedIterable}. + * @return a management operation on a managed instance. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedInstanceOperationInner get(String resourceGroupName, String managedInstanceName, UUID operationId); /** * Cancels the asynchronous operation on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,12 +143,13 @@ PagedIterable listByManagedInstance(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> cancelWithResponseAsync(String resourceGroupName, String managedInstanceName, - String operationId); + UUID operationId); /** * Cancels the asynchronous operation on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -148,12 +158,13 @@ Mono> cancelWithResponseAsync(String resourceGroupName, String ma * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono cancelAsync(String resourceGroupName, String managedInstanceName, String operationId); + Mono cancelAsync(String resourceGroupName, String managedInstanceName, UUID operationId); /** * Cancels the asynchronous operation on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -163,13 +174,14 @@ Mono> cancelWithResponseAsync(String resourceGroupName, String ma * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response cancelWithResponse(String resourceGroupName, String managedInstanceName, String operationId, + Response cancelWithResponse(String resourceGroupName, String managedInstanceName, UUID operationId, Context context); /** * Cancels the asynchronous operation on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -177,5 +189,5 @@ Response cancelWithResponse(String resourceGroupName, String managedInstan * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void cancel(String resourceGroupName, String managedInstanceName, String operationId); + void cancel(String resourceGroupName, String managedInstanceName, UUID operationId); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateEndpointConnectionsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateEndpointConnectionsClient.java index 6cec145d2ee7..506cc3d1c6b8 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateEndpointConnectionsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateEndpointConnectionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,10 +23,57 @@ * ManagedInstancePrivateEndpointConnectionsClient. */ public interface ManagedInstancePrivateEndpointConnectionsClient { + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName); + + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName); + + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 all private endpoint connections on a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName, Context context); + /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -41,7 +88,8 @@ Mono> getWithResponseAsy /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -56,7 +104,8 @@ Mono getAsync(String resourceGrou /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. @@ -72,7 +121,8 @@ Response getWithResponse(String r /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,9 +137,10 @@ ManagedInstancePrivateEndpointConnectionInner get(String resourceGroupName, Stri /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -104,9 +155,10 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -121,9 +173,10 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -138,9 +191,10 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -156,9 +210,10 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -173,9 +228,10 @@ Mono createOrUpdateAsync(String r /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -189,9 +245,10 @@ ManagedInstancePrivateEndpointConnectionInner createOrUpdate(String resourceGrou /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -207,9 +264,10 @@ ManagedInstancePrivateEndpointConnectionInner createOrUpdate(String resourceGrou /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -222,9 +280,10 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -237,9 +296,10 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -252,9 +312,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -268,9 +329,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -282,9 +344,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -295,9 +358,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -306,47 +370,4 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String managedInstanceName, String privateEndpointConnectionName, Context context); - - /** - * Gets all private endpoint connections on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedInstanceAsync(String resourceGroupName, - String managedInstanceName); - - /** - * Gets all private endpoint connections on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName); - - /** - * Gets all private endpoint connections on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 all private endpoint connections on a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateLinkResourcesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateLinkResourcesClient.java index 782f20d6c7e7..0dec5eaf7b5c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateLinkResourcesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateLinkResourcesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,106 +18,113 @@ */ public interface ManagedInstancePrivateLinkResourcesClient { /** - * Gets a private link resource for SQL server. + * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param groupName The name of the private link 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 private link resource for SQL server along with {@link Response} on successful completion of - * {@link Mono}. + * @return the private link resources for SQL server as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String groupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName); /** - * Gets a private link resource for SQL server. + * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param groupName The name of the private link 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 private link resource for SQL server on successful completion of {@link Mono}. + * @return the private link resources for SQL server as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, - String groupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName); /** - * Gets a private link resource for SQL server. + * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param groupName The name of the private link 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 a private link resource for SQL server along with {@link Response}. + * @return the private link resources for SQL server as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String managedInstanceName, - String groupName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName, Context context); /** * Gets a private link resource for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param groupName The name of the private link 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 private link resource for SQL server. + * @return a private link resource for SQL server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstancePrivateLinkInner get(String resourceGroupName, String managedInstanceName, String groupName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String groupName); /** - * Gets the private link resources for SQL server. + * Gets a private link resource for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param groupName The name of the private link 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 private link resources for SQL server as paginated response with {@link PagedFlux}. + * @return a private link resource for SQL server on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedInstanceAsync(String resourceGroupName, - String managedInstanceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String managedInstanceName, + String groupName); /** - * Gets the private link resources for SQL server. + * Gets a private link resource for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param groupName The name of the private link 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 the private link resources for SQL server as paginated response with {@link PagedIterable}. + * @return a private link resource for SQL server along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String groupName, Context context); /** - * Gets the private link resources for SQL server. + * Gets a private link resource for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param context The context to associate with this operation. + * @param groupName The name of the private link 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 private link resources for SQL server as paginated response with {@link PagedIterable}. + * @return a private link resource for SQL server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedInstancePrivateLinkInner get(String resourceGroupName, String managedInstanceName, String groupName); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceTdeCertificatesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceTdeCertificatesClient.java index d2ae8e2c4683..4c6d27c66831 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceTdeCertificatesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceTdeCertificatesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,7 +23,8 @@ public interface ManagedInstanceTdeCertificatesClient { /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,7 +39,8 @@ Mono>> createWithResponseAsync(String resourceGroupNam /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -53,7 +55,8 @@ PollerFlux, Void> beginCreateAsync(String resourceGroupName, St /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -68,7 +71,8 @@ SyncPoller, Void> beginCreate(String resourceGroupName, String /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -84,7 +88,8 @@ SyncPoller, Void> beginCreate(String resourceGroupName, String /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -98,7 +103,8 @@ SyncPoller, Void> beginCreate(String resourceGroupName, String /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -111,7 +117,8 @@ SyncPoller, Void> beginCreate(String resourceGroupName, String /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceVulnerabilityAssessmentsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceVulnerabilityAssessmentsClient.java index b3bb4c599d4a..70f242337e2e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceVulnerabilityAssessmentsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceVulnerabilityAssessmentsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -19,11 +19,60 @@ * ManagedInstanceVulnerabilityAssessmentsClient. */ public interface ManagedInstanceVulnerabilityAssessmentsClient { + /** + * Gets the managed instance's vulnerability assessment policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 instance's vulnerability assessment policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName); + + /** + * Gets the managed instance's vulnerability assessment policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 instance's vulnerability assessment policies as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName); + + /** + * Gets the managed instance's vulnerability assessment policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. + * @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 instance's vulnerability assessment policies as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context); + /** * Gets the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,8 +87,9 @@ Mono> getWithResponseAsync /** * Gets the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -53,8 +103,9 @@ Mono getAsync(String resourceGroupN /** * Gets the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -69,8 +120,9 @@ Response getWithResponse(String res /** * Gets the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -86,8 +138,9 @@ ManagedInstanceVulnerabilityAssessmentInner get(String resourceGroupName, String * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -106,8 +159,9 @@ Mono> createOrUpdateWithRe * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -125,8 +179,9 @@ Mono createOrUpdateAsync(String res * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @param context The context to associate with this operation. @@ -145,8 +200,9 @@ Response createOrUpdateWithResponse * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -162,8 +218,9 @@ ManagedInstanceVulnerabilityAssessmentInner createOrUpdate(String resourceGroupN /** * Removes the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -177,8 +234,9 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String ma /** * Removes the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -192,8 +250,9 @@ Mono deleteAsync(String resourceGroupName, String managedInstanceName, /** * Removes the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -208,8 +267,9 @@ Response deleteWithResponse(String resourceGroupName, String managedInstan /** * Removes the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -218,49 +278,4 @@ Response deleteWithResponse(String resourceGroupName, String managedInstan @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String managedInstanceName, VulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Gets the managed instance's vulnerability assessment policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 instance's vulnerability assessment policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName); - - /** - * Gets the managed instance's vulnerability assessment policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 instance's vulnerability assessment policies as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName); - - /** - * Gets the managed instance's vulnerability assessment policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 instance's vulnerability assessment policies as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancesClient.java index 857fea1c4c79..8419d4c2fa00 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,11 +18,9 @@ import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceInner; import com.azure.resourcemanager.sql.fluent.models.OutboundEnvironmentEndpointInner; -import com.azure.resourcemanager.sql.fluent.models.RefreshExternalGovernanceStatusOperationResultMIInner; import com.azure.resourcemanager.sql.fluent.models.TopQueriesInner; import com.azure.resourcemanager.sql.models.AggregationFunctionType; import com.azure.resourcemanager.sql.models.ManagedInstanceUpdate; -import com.azure.resourcemanager.sql.models.ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest; import com.azure.resourcemanager.sql.models.MetricType; import com.azure.resourcemanager.sql.models.QueryTimeGrainType; import com.azure.resourcemanager.sql.models.ReplicaType; @@ -35,419 +33,6 @@ */ public interface ManagedInstancesClient extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { - /** - * Gets a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param expand The child resources to include in the response. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed instance along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String managedInstanceName, String expand); - - /** - * Gets a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed instance on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String managedInstanceName); - - /** - * Gets a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param expand The child resources to include in the response. - * @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 managed instance along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String managedInstanceName, - String expand, Context context); - - /** - * Gets a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceInner getByResourceGroup(String resourceGroupName, String managedInstanceName); - - /** - * Creates or updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, ManagedInstanceInner parameters); - - /** - * Creates or updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 the {@link PollerFlux} for polling of an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedInstanceInner> - beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters); - - /** - * Creates or updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 the {@link SyncPoller} for polling of an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedInstanceInner> beginCreateOrUpdate(String resourceGroupName, - String managedInstanceName, ManagedInstanceInner parameters); - - /** - * Creates or updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 the {@link SyncPoller} for polling of an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedInstanceInner> beginCreateOrUpdate(String resourceGroupName, - String managedInstanceName, ManagedInstanceInner parameters, Context context); - - /** - * Creates or updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, - ManagedInstanceInner parameters); - - /** - * Creates or updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceInner createOrUpdate(String resourceGroupName, String managedInstanceName, - ManagedInstanceInner parameters); - - /** - * Creates or updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceInner createOrUpdate(String resourceGroupName, String managedInstanceName, - ManagedInstanceInner parameters, Context context); - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, - ManagedInstanceUpdate parameters); - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 the {@link PollerFlux} for polling of an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedInstanceInner> beginUpdateAsync(String resourceGroupName, - String managedInstanceName, ManagedInstanceUpdate parameters); - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 the {@link SyncPoller} for polling of an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedInstanceInner> beginUpdate(String resourceGroupName, - String managedInstanceName, ManagedInstanceUpdate parameters); - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 the {@link SyncPoller} for polling of an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedInstanceInner> beginUpdate(String resourceGroupName, - String managedInstanceName, ManagedInstanceUpdate parameters, Context context); - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String managedInstanceName, - ManagedInstanceUpdate parameters); - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceInner update(String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters); - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceInner update(String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters, - Context context); - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managedInstanceName); - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managedInstanceName); - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managedInstanceName); - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managedInstanceName, - Context context); - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managedInstanceName); - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 managedInstanceName); - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managedInstanceName, Context context); - - /** - * Gets a list of managed instances in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param expand The child resources to include in the response. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managed instances in a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand); - - /** - * Gets a list of managed instances 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. - * @throws com.azure.core.management.exception.ManagementException 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 managed instances in a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - - /** - * Gets a list of managed instances 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. - * @throws com.azure.core.management.exception.ManagementException 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 managed instances in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Gets a list of managed instances in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param expand The child resources to include in the response. - * @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 managed instances in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String expand, Context context); - /** * Gets a list of all managed instances in the subscription. * @@ -494,514 +79,450 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String PagedIterable list(String expand, Context context); /** - * Failovers a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param replicaType The type of replica to be failed over. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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>> failoverWithResponseAsync(String resourceGroupName, String managedInstanceName, - ReplicaType replicaType); - - /** - * Failovers a managed instance. + * Gets a list of all managed instances in an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param replicaType The type of replica to be failed over. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The instance pool name. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 list of all managed instances in an instance pool as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String managedInstanceName, - ReplicaType replicaType); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName, + String expand); /** - * Failovers a managed instance. + * Gets a list of all managed instances in an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The instance pool name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 list of all managed instances in an instance pool as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String managedInstanceName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName); /** - * Failovers a managed instance. + * Gets a list of all managed instances in an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The instance pool name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 list of all managed instances in an instance pool as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginFailover(String resourceGroupName, String managedInstanceName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstancePool(String resourceGroupName, String instancePoolName); /** - * Failovers a managed instance. + * Gets a list of all managed instances in an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param replicaType The type of replica to be failed over. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The instance pool name. + * @param expand The child resources to include in the response. * @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> beginFailover(String resourceGroupName, String managedInstanceName, - ReplicaType replicaType, Context context); - - /** - * Failovers a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param replicaType The type of replica to be failed over. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 failoverAsync(String resourceGroupName, String managedInstanceName, ReplicaType replicaType); - - /** - * Failovers a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 failoverAsync(String resourceGroupName, String managedInstanceName); - - /** - * Failovers a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 all managed instances in an instance pool as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void failover(String resourceGroupName, String managedInstanceName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstancePool(String resourceGroupName, String instancePoolName, + String expand, Context context); /** - * Failovers a managed instance. + * Gets a list of managed instances in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param replicaType The type of replica to be failed over. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 managed instances in a resource group as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void failover(String resourceGroupName, String managedInstanceName, ReplicaType replicaType, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand); /** - * Gets the collection of outbound network dependencies for the given managed instance. + * Gets a list of managed instances in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the collection of outbound network dependencies for the given managed instance as paginated response with - * {@link PagedFlux}. + * @return a list of managed instances in a resource group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux - listOutboundNetworkDependenciesByManagedInstanceAsync(String resourceGroupName, String managedInstanceName); + PagedFlux listByResourceGroupAsync(String resourceGroupName); /** - * Gets the collection of outbound network dependencies for the given managed instance. + * Gets a list of managed instances in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the collection of outbound network dependencies for the given managed instance as paginated response with - * {@link PagedIterable}. + * @return a list of managed instances in a resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable - listOutboundNetworkDependenciesByManagedInstance(String resourceGroupName, String managedInstanceName); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets the collection of outbound network dependencies for the given managed instance. + * Gets a list of managed instances in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param expand The child resources to include in the response. * @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 collection of outbound network dependencies for the given managed instance as paginated response with - * {@link PagedIterable}. + * @return a list of managed instances in a resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listOutboundNetworkDependenciesByManagedInstance( - String resourceGroupName, String managedInstanceName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String expand, Context context); /** - * Reevaluates the inaccessibility state of all managed databases. + * Gets a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> reevaluateInaccessibleDatabaseStateWithResponseAsync(String resourceGroupName, - String managedInstanceName); - - /** - * Reevaluates the inaccessibility state of all managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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> beginReevaluateInaccessibleDatabaseStateAsync(String resourceGroupName, - String managedInstanceName); - - /** - * Reevaluates the inaccessibility state of all managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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> beginReevaluateInaccessibleDatabaseState(String resourceGroupName, - String managedInstanceName); - - /** - * Reevaluates the inaccessibility state of all managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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> beginReevaluateInaccessibleDatabaseState(String resourceGroupName, - String managedInstanceName, Context context); + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String managedInstanceName, String expand); /** - * Reevaluates the inaccessibility state of all managed databases. + * Gets a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 managed instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono reevaluateInaccessibleDatabaseStateAsync(String resourceGroupName, String managedInstanceName); + Mono getByResourceGroupAsync(String resourceGroupName, String managedInstanceName); /** - * Reevaluates the inaccessibility state of all managed databases. + * Gets a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param expand The child resources to include in the response. + * @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 managed instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void reevaluateInaccessibleDatabaseState(String resourceGroupName, String managedInstanceName); + Response getByResourceGroupWithResponse(String resourceGroupName, String managedInstanceName, + String expand, Context context); /** - * Reevaluates the inaccessibility state of all managed databases. + * Gets a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @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 managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - void reevaluateInaccessibleDatabaseState(String resourceGroupName, String managedInstanceName, Context context); + ManagedInstanceInner getByResourceGroup(String resourceGroupName, String managedInstanceName); /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 an RefreshExternalGovernanceStatus operation result resource along with {@link Response} on successful - * completion of {@link Mono}. + * @return an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> refreshStatusWithResponseAsync(String resourceGroupName, - String managedInstanceName); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, ManagedInstanceInner parameters); /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 the {@link PollerFlux} for polling of an RefreshExternalGovernanceStatus operation result resource. + * @return the {@link PollerFlux} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, RefreshExternalGovernanceStatusOperationResultMIInner> - beginRefreshStatusAsync(String resourceGroupName, String managedInstanceName); + PollerFlux, ManagedInstanceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters); /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 the {@link SyncPoller} for polling of an RefreshExternalGovernanceStatus operation result resource. + * @return the {@link SyncPoller} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RefreshExternalGovernanceStatusOperationResultMIInner> - beginRefreshStatus(String resourceGroupName, String managedInstanceName); + SyncPoller, ManagedInstanceInner> beginCreateOrUpdate(String resourceGroupName, + String managedInstanceName, ManagedInstanceInner parameters); /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 the {@link SyncPoller} for polling of an RefreshExternalGovernanceStatus operation result resource. + * @return the {@link SyncPoller} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RefreshExternalGovernanceStatusOperationResultMIInner> - beginRefreshStatus(String resourceGroupName, String managedInstanceName, Context context); + SyncPoller, ManagedInstanceInner> beginCreateOrUpdate(String resourceGroupName, + String managedInstanceName, ManagedInstanceInner parameters, Context context); /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 an RefreshExternalGovernanceStatus operation result resource on successful completion of {@link Mono}. + * @return an Azure SQL managed instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono refreshStatusAsync(String resourceGroupName, - String managedInstanceName); + Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + ManagedInstanceInner parameters); /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 an RefreshExternalGovernanceStatus operation result resource. + * @return an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - RefreshExternalGovernanceStatusOperationResultMIInner refreshStatus(String resourceGroupName, - String managedInstanceName); + ManagedInstanceInner createOrUpdate(String resourceGroupName, String managedInstanceName, + ManagedInstanceInner parameters); /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 an RefreshExternalGovernanceStatus operation result resource. + * @return an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - RefreshExternalGovernanceStatusOperationResultMIInner refreshStatus(String resourceGroupName, - String managedInstanceName, Context context); + ManagedInstanceInner createOrUpdate(String resourceGroupName, String managedInstanceName, + ManagedInstanceInner parameters, Context context); /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> startWithResponseAsync(String resourceGroupName, String managedInstanceName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName); /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an Azure SQL managed instance. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedInstanceInner> beginStartAsync(String resourceGroupName, - String managedInstanceName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName); /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an Azure SQL managed instance. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedInstanceInner> beginStart(String resourceGroupName, - String managedInstanceName); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName); /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @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 an Azure SQL managed instance. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedInstanceInner> beginStart(String resourceGroupName, - String managedInstanceName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + Context context); /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL managed instance on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono startAsync(String resourceGroupName, String managedInstanceName); + Mono deleteAsync(String resourceGroupName, String managedInstanceName); /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceInner start(String resourceGroupName, String managedInstanceName); + void delete(String resourceGroupName, String managedInstanceName); /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @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 an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceInner start(String resourceGroupName, String managedInstanceName, Context context); + void delete(String resourceGroupName, String managedInstanceName, Context context); /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> stopWithResponseAsync(String resourceGroupName, String managedInstanceName); + Mono>> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + ManagedInstanceUpdate parameters); /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 the {@link PollerFlux} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedInstanceInner> beginStopAsync(String resourceGroupName, - String managedInstanceName); + PollerFlux, ManagedInstanceInner> beginUpdateAsync(String resourceGroupName, + String managedInstanceName, ManagedInstanceUpdate parameters); /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 the {@link SyncPoller} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedInstanceInner> beginStop(String resourceGroupName, - String managedInstanceName); + SyncPoller, ManagedInstanceInner> beginUpdate(String resourceGroupName, + String managedInstanceName, ManagedInstanceUpdate parameters); /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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. @@ -1009,40 +530,47 @@ SyncPoller, ManagedInstanceInner> beginStop(Str * @return the {@link SyncPoller} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedInstanceInner> beginStop(String resourceGroupName, - String managedInstanceName, Context context); + SyncPoller, ManagedInstanceInner> beginUpdate(String resourceGroupName, + String managedInstanceName, ManagedInstanceUpdate parameters, Context context); /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 an Azure SQL managed instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono stopAsync(String resourceGroupName, String managedInstanceName); + Mono updateAsync(String resourceGroupName, String managedInstanceName, + ManagedInstanceUpdate parameters); /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceInner stop(String resourceGroupName, String managedInstanceName); + ManagedInstanceInner update(String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters); /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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. @@ -1050,241 +578,266 @@ SyncPoller, ManagedInstanceInner> beginStop(Str * @return an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedInstanceInner stop(String resourceGroupName, String managedInstanceName, Context context); + ManagedInstanceInner update(String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters, + Context context); /** - * Get top resource consuming queries of a managed instance. + * Failovers a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param numberOfQueries How many 'top queries' to return. Default is 5. - * @param databases Comma separated list of databases to be included into search. All DB's are included if this - * parameter is not specified. - * @param startTime Start time for observed period. - * @param endTime End time for observed period. - * @param interval The time step to be used to summarize the metric values. Default value is PT1H. - * @param aggregationFunction Aggregation function to be used, default value is 'sum'. - * @param observationMetric Metric to be used for ranking top queries. Default is 'cpu'. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. + * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return top resource consuming queries of a managed instance as paginated response with {@link PagedFlux}. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName, - Integer numberOfQueries, String databases, String startTime, String endTime, QueryTimeGrainType interval, - AggregationFunctionType aggregationFunction, MetricType observationMetric); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> failoverWithResponseAsync(String resourceGroupName, String managedInstanceName, + ReplicaType replicaType); /** - * Get top resource consuming queries of a managed instance. + * Failovers a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. + * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return top resource consuming queries of a managed instance as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String managedInstanceName, + ReplicaType replicaType); /** - * Get top resource consuming queries of a managed instance. + * Failovers a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return top resource consuming queries of a managed instance as paginated response with {@link PagedIterable}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance(String resourceGroupName, String managedInstanceName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String managedInstanceName); /** - * Get top resource consuming queries of a managed instance. + * Failovers a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param numberOfQueries How many 'top queries' to return. Default is 5. - * @param databases Comma separated list of databases to be included into search. All DB's are included if this - * parameter is not specified. - * @param startTime Start time for observed period. - * @param endTime End time for observed period. - * @param interval The time step to be used to summarize the metric values. Default value is PT1H. - * @param aggregationFunction Aggregation function to be used, default value is 'sum'. - * @param observationMetric Metric to be used for ranking top queries. Default is 'cpu'. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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> beginFailover(String resourceGroupName, String managedInstanceName); + + /** + * Failovers a managed instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. + * @param replicaType The type of replica to be failed over. * @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 top resource consuming queries of a managed instance as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance(String resourceGroupName, String managedInstanceName, - Integer numberOfQueries, String databases, String startTime, String endTime, QueryTimeGrainType interval, - AggregationFunctionType aggregationFunction, MetricType observationMetric, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginFailover(String resourceGroupName, String managedInstanceName, + ReplicaType replicaType, Context context); /** - * Validates customer managed key. + * Failovers a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key parameters. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. + * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> validateAzureKeyVaultEncryptionKeyWithResponseAsync(String resourceGroupName, - String managedInstanceName, ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters); + Mono failoverAsync(String resourceGroupName, String managedInstanceName, ReplicaType replicaType); /** - * Validates customer managed key. + * Failovers a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key parameters. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginValidateAzureKeyVaultEncryptionKeyAsync(String resourceGroupName, - String managedInstanceName, ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono failoverAsync(String resourceGroupName, String managedInstanceName); /** - * Validates customer managed key. + * Failovers a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key parameters. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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> beginValidateAzureKeyVaultEncryptionKey(String resourceGroupName, - String managedInstanceName, ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters); + @ServiceMethod(returns = ReturnType.SINGLE) + void failover(String resourceGroupName, String managedInstanceName); /** - * Validates customer managed key. + * Failovers a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key parameters. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. + * @param replicaType The type of replica to be failed over. * @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> beginValidateAzureKeyVaultEncryptionKey(String resourceGroupName, - String managedInstanceName, ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void failover(String resourceGroupName, String managedInstanceName, ReplicaType replicaType, Context context); /** - * Validates customer managed key. + * Gets the collection of outbound network dependencies for the given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 collection of outbound network dependencies for the given managed instance as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono validateAzureKeyVaultEncryptionKeyAsync(String resourceGroupName, String managedInstanceName, - ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux + listOutboundNetworkDependenciesByManagedInstanceAsync(String resourceGroupName, String managedInstanceName); /** - * Validates customer managed key. + * Gets the collection of outbound network dependencies for the given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the collection of outbound network dependencies for the given managed instance as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void validateAzureKeyVaultEncryptionKey(String resourceGroupName, String managedInstanceName, - ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable + listOutboundNetworkDependenciesByManagedInstance(String resourceGroupName, String managedInstanceName); /** - * Validates customer managed key. + * Gets the collection of outbound network dependencies for the given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key parameters. * @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 collection of outbound network dependencies for the given managed instance as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void validateAzureKeyVaultEncryptionKey(String resourceGroupName, String managedInstanceName, - ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOutboundNetworkDependenciesByManagedInstance( + String resourceGroupName, String managedInstanceName, Context context); /** - * Gets a list of all managed instances in an instance pool. + * Get top resource consuming queries of a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param expand The child resources to include in the response. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param numberOfQueries How many 'top queries' to return. Default is 5. + * @param databases Comma separated list of databases to be included into search. All DB's are included if this + * parameter is not specified. + * @param startTime Start time for observed period. + * @param endTime End time for observed period. + * @param interval The time step to be used to summarize the metric values. Default value is PT1H. + * @param aggregationFunction Aggregation function to be used, default value is 'sum'. + * @param observationMetric Metric to be used for ranking top queries. Default is 'cpu'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 all managed instances in an instance pool as paginated response with {@link PagedFlux}. + * @return top resource consuming queries of a managed instance as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName, - String expand); + PagedFlux listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName, + Integer numberOfQueries, String databases, String startTime, String endTime, QueryTimeGrainType interval, + AggregationFunctionType aggregationFunction, MetricType observationMetric); /** - * Gets a list of all managed instances in an instance pool. + * Get top resource consuming queries of a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 all managed instances in an instance pool as paginated response with {@link PagedFlux}. + * @return top resource consuming queries of a managed instance as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName); + PagedFlux listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName); /** - * Gets a list of all managed instances in an instance pool. + * Get top resource consuming queries of a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 all managed instances in an instance pool as paginated response with {@link PagedIterable}. + * @return top resource consuming queries of a managed instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstancePool(String resourceGroupName, String instancePoolName); + PagedIterable listByManagedInstance(String resourceGroupName, String managedInstanceName); /** - * Gets a list of all managed instances in an instance pool. + * Get top resource consuming queries of a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param expand The child resources to include in the response. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param numberOfQueries How many 'top queries' to return. Default is 5. + * @param databases Comma separated list of databases to be included into search. All DB's are included if this + * parameter is not specified. + * @param startTime Start time for observed period. + * @param endTime End time for observed period. + * @param interval The time step to be used to summarize the metric values. Default value is PT1H. + * @param aggregationFunction Aggregation function to be used, default value is 'sum'. + * @param observationMetric Metric to be used for ranking top queries. Default is 'cpu'. * @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 all managed instances in an instance pool as paginated response with {@link PagedIterable}. + * @return top resource consuming queries of a managed instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstancePool(String resourceGroupName, String instancePoolName, - String expand, Context context); + PagedIterable listByManagedInstance(String resourceGroupName, String managedInstanceName, + Integer numberOfQueries, String databases, String startTime, String endTime, QueryTimeGrainType interval, + AggregationFunctionType aggregationFunction, MetricType observationMetric, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedLedgerDigestUploadsOperationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedLedgerDigestUploadsOperationsClient.java deleted file mode 100644 index 5e2d67d3148f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedLedgerDigestUploadsOperationsClient.java +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.ManagedLedgerDigestUploadsInner; -import com.azure.resourcemanager.sql.models.ManagedLedgerDigestUploadsName; -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 - * ManagedLedgerDigestUploadsOperationsClient. - */ -public interface ManagedLedgerDigestUploadsOperationsClient { - /** - * Gets the current ledger digest upload configuration for a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 current ledger digest upload configuration for a database along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads); - - /** - * Gets the current ledger digest upload configuration for a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 current ledger digest upload configuration for a database on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads); - - /** - * Gets the current ledger digest upload configuration for a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 current ledger digest upload configuration for a database along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads, Context context); - - /** - * Gets the current ledger digest upload configuration for a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 current ledger digest upload configuration for a database. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedLedgerDigestUploadsInner get(String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads); - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure SQL Database ledger digest upload settings along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads, - ManagedLedgerDigestUploadsInner parameters); - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedLedgerDigestUploadsInner> beginCreateOrUpdateAsync( - String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads, ManagedLedgerDigestUploadsInner parameters); - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedLedgerDigestUploadsInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads, ManagedLedgerDigestUploadsInner parameters); - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedLedgerDigestUploadsInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads, ManagedLedgerDigestUploadsInner parameters, - Context context); - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure SQL Database ledger digest upload settings on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads, - ManagedLedgerDigestUploadsInner parameters); - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedLedgerDigestUploadsInner createOrUpdate(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads, - ManagedLedgerDigestUploadsInner parameters); - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedLedgerDigestUploadsInner createOrUpdate(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads, - ManagedLedgerDigestUploadsInner parameters, Context context); - - /** - * Gets all ledger digest upload settings on a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 all ledger digest upload settings on a database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, - String databaseName); - - /** - * Gets all ledger digest upload settings on a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 all ledger digest upload settings on a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, - String databaseName); - - /** - * Gets all ledger digest upload settings on a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 all ledger digest upload settings on a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, - String databaseName, Context context); - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> disableWithResponseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads); - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ManagedLedgerDigestUploadsInner> beginDisableAsync( - String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads); - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedLedgerDigestUploadsInner> beginDisable( - String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads); - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedLedgerDigestUploadsInner> beginDisable( - String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads, Context context); - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono disableAsync(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads); - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedLedgerDigestUploadsInner disable(String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads); - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedLedgerDigestUploadsInner disable(String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.java index 6760828bf11c..630388490da6 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -24,10 +24,60 @@ * ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient. */ public interface ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient { + /** + * Gets a dropped database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByRestorableDroppedDatabaseAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId); + + /** + * Gets a dropped database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByRestorableDroppedDatabase(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId); + + /** + * Gets a dropped database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByRestorableDroppedDatabase(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, Context context); + /** * Gets a dropped database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -44,7 +94,8 @@ Mono> getWithResponseAsync( /** * Gets a dropped database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -60,7 +111,8 @@ Mono getAsync(String resourceGroupNa /** * Gets a dropped database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -78,7 +130,8 @@ Response getWithResponse(String reso /** * Gets a dropped database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -94,10 +147,11 @@ ManagedBackupShortTermRetentionPolicyInner get(String resourceGroupName, String /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -112,10 +166,11 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -131,10 +186,11 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -149,10 +205,11 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -169,10 +226,11 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -187,10 +245,11 @@ Mono createOrUpdateAsync(String reso /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -205,10 +264,11 @@ ManagedBackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupNa /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -224,10 +284,11 @@ ManagedBackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupNa /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -242,10 +303,11 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -260,10 +322,11 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -278,10 +341,11 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -298,10 +362,11 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -316,10 +381,11 @@ Mono updateAsync(String resourceGrou /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -334,10 +400,11 @@ ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupName, Stri /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -349,50 +416,4 @@ ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupName, Stri ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, ManagedShortTermRetentionPolicyName policyName, ManagedBackupShortTermRetentionPolicyInner parameters, Context context); - - /** - * Gets a dropped database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByRestorableDroppedDatabaseAsync(String resourceGroupName, - String managedInstanceName, String restorableDroppedDatabaseId); - - /** - * Gets a dropped database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByRestorableDroppedDatabase(String resourceGroupName, - String managedInstanceName, String restorableDroppedDatabaseId); - - /** - * Gets a dropped database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByRestorableDroppedDatabase(String resourceGroupName, - String managedInstanceName, String restorableDroppedDatabaseId, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerDnsAliasesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerDnsAliasesClient.java index dbf271980c5b..17df432749c0 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerDnsAliasesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerDnsAliasesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -24,10 +24,59 @@ * An instance of this class provides access to all the operations defined in ManagedServerDnsAliasesClient. */ public interface ManagedServerDnsAliasesClient { + /** + * Gets a list of managed server DNS aliases for a managed server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 managed server DNS aliases for a managed server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName); + + /** + * Gets a list of managed server DNS aliases for a managed server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 managed server DNS aliases for a managed server as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName); + + /** + * Gets a list of managed server DNS aliases for a managed server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 managed server DNS aliases for a managed server as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName, Context context); + /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -42,7 +91,8 @@ Mono> getWithResponseAsync(String resourceG /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,7 +107,8 @@ Mono getAsync(String resourceGroupName, String manag /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -73,7 +124,8 @@ Response getWithResponse(String resourceGroupName, S /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,7 +139,8 @@ Response getWithResponse(String resourceGroupName, S /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -103,7 +156,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -120,7 +174,8 @@ PollerFlux, ManagedServerDnsAliasInner> b /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -137,7 +192,8 @@ SyncPoller, ManagedServerDnsAliasInner> b /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -155,7 +211,8 @@ SyncPoller, ManagedServerDnsAliasInner> b /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -171,7 +228,8 @@ Mono createOrUpdateAsync(String resourceGroupName, S /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -187,7 +245,8 @@ ManagedServerDnsAliasInner createOrUpdate(String resourceGroupName, String manag /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -204,7 +263,8 @@ ManagedServerDnsAliasInner createOrUpdate(String resourceGroupName, String manag /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -219,7 +279,8 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -234,7 +295,8 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -249,7 +311,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -265,7 +328,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -279,7 +343,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -292,7 +357,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -303,55 +369,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String managedInstanceName, String dnsAliasName, Context context); - /** - * Gets a list of managed server DNS aliases for a managed server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managed server DNS aliases for a managed server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedInstanceAsync(String resourceGroupName, - String managedInstanceName); - - /** - * Gets a list of managed server DNS aliases for a managed server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managed server DNS aliases for a managed server as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName); - - /** - * Gets a list of managed server DNS aliases for a managed server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed server DNS aliases for a managed server as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName, Context context); - /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -367,7 +389,8 @@ Mono>> acquireWithResponseAsync(String resourceGroupNa /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -384,7 +407,8 @@ PollerFlux, ManagedServerDnsAliasInner> b /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -401,7 +425,8 @@ SyncPoller, ManagedServerDnsAliasInner> b /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -419,7 +444,8 @@ SyncPoller, ManagedServerDnsAliasInner> b /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -435,7 +461,8 @@ Mono acquireAsync(String resourceGroupName, String m /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -451,7 +478,8 @@ ManagedServerDnsAliasInner acquire(String resourceGroupName, String managedInsta /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerSecurityAlertPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerSecurityAlertPoliciesClient.java index a77ed303c30e..e84531f82af3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerSecurityAlertPoliciesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerSecurityAlertPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -14,7 +14,7 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.models.ManagedServerSecurityAlertPolicyInner; -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; +import com.azure.resourcemanager.sql.models.SecurityAlertPolicyNameAutoGenerated; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -23,10 +23,57 @@ * An instance of this class provides access to all the operations defined in ManagedServerSecurityAlertPoliciesClient. */ public interface ManagedServerSecurityAlertPoliciesClient { + /** + * Get the managed server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 server's threat detection policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName); + + /** + * Get the managed server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 server's threat detection policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName); + + /** + * Get the managed server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 server's threat detection policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context); + /** * Get a managed server's threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -37,12 +84,13 @@ public interface ManagedServerSecurityAlertPoliciesClient { */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, SecurityAlertPolicyName securityAlertPolicyName); + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName); /** * Get a managed server's threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -52,12 +100,13 @@ Mono> getWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) Mono getAsync(String resourceGroupName, String managedInstanceName, - SecurityAlertPolicyName securityAlertPolicyName); + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName); /** * Get a managed server's threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. @@ -68,12 +117,13 @@ Mono getAsync(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, - String managedInstanceName, SecurityAlertPolicyName securityAlertPolicyName, Context context); + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, Context context); /** * Get a managed server's threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -83,12 +133,13 @@ Response getWithResponse(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) ManagedServerSecurityAlertPolicyInner get(String resourceGroupName, String managedInstanceName, - SecurityAlertPolicyName securityAlertPolicyName); + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName); /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -100,13 +151,14 @@ ManagedServerSecurityAlertPolicyInner get(String resourceGroupName, String manag */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, SecurityAlertPolicyName securityAlertPolicyName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -118,12 +170,14 @@ Mono>> createOrUpdateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ManagedServerSecurityAlertPolicyInner> beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, - SecurityAlertPolicyName securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters); + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + ManagedServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -135,12 +189,14 @@ Mono>> createOrUpdateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedServerSecurityAlertPolicyInner> beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, - SecurityAlertPolicyName securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters); + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + ManagedServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -153,13 +209,14 @@ Mono>> createOrUpdateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedServerSecurityAlertPolicyInner> beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, - SecurityAlertPolicyName securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters, - Context context); + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + ManagedServerSecurityAlertPolicyInner parameters, Context context); /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -170,13 +227,14 @@ Mono>> createOrUpdateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createOrUpdateAsync(String resourceGroupName, - String managedInstanceName, SecurityAlertPolicyName securityAlertPolicyName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -187,12 +245,13 @@ Mono createOrUpdateAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) ManagedServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, - SecurityAlertPolicyName securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters); + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -204,49 +263,6 @@ ManagedServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) ManagedServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, - SecurityAlertPolicyName securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters, Context context); - - /** - * Get the managed server's threat detection policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 server's threat detection policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName); - - /** - * Get the managed server's threat detection policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 server's threat detection policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName); - - /** - * Get the managed server's threat detection policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 server's threat detection policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/NetworkSecurityPerimeterConfigurationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/NetworkSecurityPerimeterConfigurationsClient.java deleted file mode 100644 index 088c828cdc9c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/NetworkSecurityPerimeterConfigurationsClient.java +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.NetworkSecurityPerimeterConfigurationInner; -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 - * NetworkSecurityPerimeterConfigurationsClient. - */ -public interface NetworkSecurityPerimeterConfigurationsClient { - /** - * Gets a network security perimeter configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 network security perimeter configuration along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String nspConfigName); - - /** - * Gets a network security perimeter configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 network security perimeter configuration on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - String nspConfigName); - - /** - * Gets a network security perimeter configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 network security perimeter configuration along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - String nspConfigName, Context context); - - /** - * Gets a network security perimeter configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 network security perimeter configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkSecurityPerimeterConfigurationInner get(String resourceGroupName, String serverName, String nspConfigName); - - /** - * Gets a list of NSP configurations 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 NSP configurations for a server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, - String serverName); - - /** - * Gets a list of NSP configurations 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 NSP configurations for a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Gets a list of NSP configurations 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 NSP configurations for a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> reconcileWithResponseAsync(String resourceGroupName, String serverName, - String nspConfigName); - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, NetworkSecurityPerimeterConfigurationInner> - beginReconcileAsync(String resourceGroupName, String serverName, String nspConfigName); - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkSecurityPerimeterConfigurationInner> - beginReconcile(String resourceGroupName, String serverName, String nspConfigName); - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkSecurityPerimeterConfigurationInner> - beginReconcile(String resourceGroupName, String serverName, String nspConfigName, Context context); - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono reconcileAsync(String resourceGroupName, String serverName, - String nspConfigName); - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, String serverName, - String nspConfigName); - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, String serverName, - String nspConfigName, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OperationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OperationsClient.java index 47871851619d..af088e1767c5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OperationsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OutboundFirewallRulesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OutboundFirewallRulesClient.java index 60dc03cb8358..fbdd5fa0cf45 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OutboundFirewallRulesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/OutboundFirewallRulesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -22,10 +22,54 @@ * An instance of this class provides access to all the operations defined in OutboundFirewallRulesClient. */ public interface OutboundFirewallRulesClient { + /** + * Gets all outbound firewall rules on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 outbound firewall rules on a server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Gets all outbound firewall rules on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 outbound firewall rules on a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Gets all outbound firewall rules on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 all outbound firewall rules on a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + /** * Gets an outbound firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -40,7 +84,8 @@ Mono> getWithResponseAsync(String resourceGr /** * Gets an outbound firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -54,7 +99,8 @@ Mono> getWithResponseAsync(String resourceGr /** * Gets an outbound firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -70,7 +116,8 @@ Response getWithResponse(String resourceGroupName, St /** * Gets an outbound firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -84,7 +131,8 @@ Response getWithResponse(String resourceGroupName, St /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -100,7 +148,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -115,7 +164,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -130,7 +180,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -146,7 +197,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -161,7 +213,8 @@ Mono createOrUpdateAsync(String resourceGroupName, St /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -175,7 +228,8 @@ Mono createOrUpdateAsync(String resourceGroupName, St /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -191,7 +245,8 @@ OutboundFirewallRuleInner createOrUpdate(String resourceGroupName, String server /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -206,7 +261,8 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -221,7 +277,8 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -236,7 +293,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -252,7 +310,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -266,7 +325,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -279,7 +339,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -289,44 +350,4 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String outboundRuleFqdn, Context context); - - /** - * Gets all outbound firewall rules 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 outbound firewall rules on a server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Gets all outbound firewall rules 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 outbound firewall rules on a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Gets all outbound firewall rules on 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 all outbound firewall rules on a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateEndpointConnectionsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateEndpointConnectionsClient.java index 74f21b2bb8e3..33bb6fbda1c5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateEndpointConnectionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -22,10 +22,55 @@ * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public interface PrivateEndpointConnectionsClient { + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 all private endpoint connections on a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); + /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -40,7 +85,8 @@ Mono> getWithResponseAsync(String resou /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -55,7 +101,8 @@ Mono getAsync(String resourceGroupName, String s /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -71,7 +118,8 @@ Response getWithResponse(String resourceGroupNam /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -86,9 +134,10 @@ PrivateEndpointConnectionInner get(String resourceGroupName, String serverName, /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -102,9 +151,10 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -119,9 +169,10 @@ PollerFlux, PrivateEndpointConnection /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -136,9 +187,10 @@ SyncPoller, PrivateEndpointConnection /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -154,9 +206,10 @@ SyncPoller, PrivateEndpointConnection /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -170,9 +223,10 @@ Mono createOrUpdateAsync(String resourceGroupNam /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -186,9 +240,10 @@ PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String s /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -203,9 +258,10 @@ PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String s /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -218,9 +274,10 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -233,9 +290,10 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -248,9 +306,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -264,9 +323,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -278,9 +338,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -291,9 +352,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -301,45 +363,4 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context); - - /** - * Gets 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}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Gets 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}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Gets 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. - * @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 all private endpoint connections on a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateLinkResourcesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateLinkResourcesClient.java index 59f8535f80ec..0aada0f70eab 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateLinkResourcesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/PrivateLinkResourcesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,102 +18,109 @@ */ public interface PrivateLinkResourcesClient { /** - * Gets a private link resource for SQL server. + * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param groupName The name of the private link 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 private link resource for SQL server along with {@link Response} on successful completion of - * {@link Mono}. + * @return the private link resources for SQL server as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String groupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * Gets a private link resource for SQL server. + * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param groupName The name of the private link 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 private link resource for SQL server on successful completion of {@link Mono}. + * @return the private link resources for SQL server as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String groupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets a private link resource for SQL server. + * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param groupName The name of the private link 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 a private link resource for SQL server along with {@link Response}. + * @return the private link resources for SQL server as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String groupName, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** * Gets a private link resource for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param groupName The name of the private link 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 private link resource for SQL server. + * @return a private link resource for SQL server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceInner get(String resourceGroupName, String serverName, String groupName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String groupName); /** - * Gets the private link resources for SQL server. + * Gets a private link resource for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param groupName The name of the private link 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 private link resources for SQL server as paginated response with {@link PagedFlux}. + * @return a private link resource for SQL 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, String groupName); /** - * Gets the private link resources for SQL server. + * Gets a private link resource for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param groupName The name of the private link 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 the private link resources for SQL server as paginated response with {@link PagedIterable}. + * @return a private link resource for SQL 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, String groupName, + Context context); /** - * Gets the private link resources for SQL server. + * Gets a private link resource for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param groupName The name of the private link 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 private link resources for SQL server as paginated response with {@link PagedIterable}. + * @return a private link resource for SQL server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourceInner get(String resourceGroupName, String serverName, String groupName); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecommendedSensitivityLabelsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecommendedSensitivityLabelsClient.java index 20f6ff837722..7ca1c1e64220 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecommendedSensitivityLabelsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecommendedSensitivityLabelsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,7 +18,8 @@ public interface RecommendedSensitivityLabelsClient { /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -34,7 +35,8 @@ Mono> updateWithResponseAsync(String resourceGroupName, String se /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -50,7 +52,8 @@ Mono updateAsync(String resourceGroupName, String serverName, String datab /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -67,7 +70,8 @@ Response updateWithResponse(String resourceGroupName, String serverName, S /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableDatabasesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableDatabasesClient.java index b3fd9c9a3b82..40480d37f288 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableDatabasesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableDatabasesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,105 +18,108 @@ */ public interface RecoverableDatabasesClient { /** - * Gets a recoverable database. + * Gets a list of recoverable databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param expand The child resources to include in the response. - * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recoverable database along with {@link Response} on successful completion of {@link Mono}. + * @return a list of recoverable databases as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String expand, String filter); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * Gets a recoverable database. + * Gets a list of recoverable databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the 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 a recoverable database on successful completion of {@link Mono}. + * @return a list of recoverable databases as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String databaseName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets a recoverable database. + * Gets a list of recoverable databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param expand The child resources to include in the response. - * @param filter An OData filter expression that filters elements in the collection. * @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 recoverable database along with {@link Response}. + * @return a list of recoverable databases as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - String expand, String filter, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** * Gets a recoverable database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the 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 a recoverable database. + * @return a recoverable database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - RecoverableDatabaseInner get(String resourceGroupName, String serverName, String databaseName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName); /** - * Gets a list of recoverable databases. + * Gets a recoverable database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param databaseName The name of the 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 a list of recoverable databases as paginated response with {@link PagedFlux}. + * @return a recoverable database 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, String databaseName); /** - * Gets a list of recoverable databases. + * Gets a recoverable database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param databaseName The name of the 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 a list of recoverable databases as paginated response with {@link PagedIterable}. + * @return a recoverable database along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + Context context); /** - * Gets a list of recoverable databases. + * Gets a recoverable database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param databaseName The name of the 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 a list of recoverable databases as paginated response with {@link PagedIterable}. + * @return a recoverable database. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + RecoverableDatabaseInner get(String resourceGroupName, String serverName, String databaseName); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableManagedDatabasesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableManagedDatabasesClient.java index b5e602a42566..d76468f40381 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableManagedDatabasesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableManagedDatabasesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,105 +18,112 @@ */ public interface RecoverableManagedDatabasesClient { /** - * Gets a recoverable managed database. + * Gets a list of recoverable managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param recoverableDatabaseName The recoverableDatabaseName 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 recoverable managed database along with {@link Response} on successful completion of {@link Mono}. + * @return a list of recoverable managed databases as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String recoverableDatabaseName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName); /** - * Gets a recoverable managed database. + * Gets a list of recoverable managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param recoverableDatabaseName The recoverableDatabaseName 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 recoverable managed database on successful completion of {@link Mono}. + * @return a list of recoverable managed databases as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, - String recoverableDatabaseName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, String managedInstanceName); /** - * Gets a recoverable managed database. + * Gets a list of recoverable managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param recoverableDatabaseName The recoverableDatabaseName 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 recoverable managed database along with {@link Response}. + * @return a list of recoverable managed databases as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String managedInstanceName, - String recoverableDatabaseName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + Context context); /** * Gets a recoverable managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param recoverableDatabaseName The recoverableDatabaseName 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 recoverable managed database. + * @return a recoverable managed database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - RecoverableManagedDatabaseInner get(String resourceGroupName, String managedInstanceName, - String recoverableDatabaseName); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String recoverableDatabaseName); /** - * Gets a list of recoverable managed databases. + * Gets a recoverable managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param recoverableDatabaseName The recoverableDatabaseName 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 list of recoverable managed databases as paginated response with {@link PagedFlux}. + * @return a recoverable managed database on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String managedInstanceName, + String recoverableDatabaseName); /** - * Gets a list of recoverable managed databases. + * Gets a recoverable managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param recoverableDatabaseName The recoverableDatabaseName 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 list of recoverable managed databases as paginated response with {@link PagedIterable}. + * @return a recoverable managed database along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, String managedInstanceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String managedInstanceName, + String recoverableDatabaseName, Context context); /** - * Gets a list of recoverable managed databases. + * Gets a recoverable managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param context The context to associate with this operation. + * @param recoverableDatabaseName The recoverableDatabaseName 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 list of recoverable managed databases as paginated response with {@link PagedIterable}. + * @return a recoverable managed database. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + RecoverableManagedDatabaseInner get(String resourceGroupName, String managedInstanceName, + String recoverableDatabaseName); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ReplicationLinksClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ReplicationLinksClient.java index aa692b95a23a..154515543b6b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ReplicationLinksClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ReplicationLinksClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -14,7 +14,6 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.models.ReplicationLinkInner; -import com.azure.resourcemanager.sql.models.ReplicationLinkUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -24,319 +23,130 @@ */ public interface ReplicationLinksClient { /** - * Gets a replication link. + * Gets a list of replication links on database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replication link along with {@link Response} on successful completion of {@link Mono}. + * @return a list of replication links on database as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String linkId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); /** - * Gets a replication link. + * Gets a list of replication links on database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replication link on successful completion of {@link Mono}. + * @return a list of replication links on database as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String databaseName, - String linkId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); /** - * Gets a replication link. + * Gets a list of replication links on database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. * @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 replication link along with {@link Response}. + * @return a list of replication links on database as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - String linkId, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, + Context context); /** * Gets a replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replication link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationLinkInner get(String resourceGroupName, String serverName, String databaseName, String linkId); - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 replication link along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String linkId, ReplicationLinkInner parameters); - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 a replication link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ReplicationLinkInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String databaseName, String linkId, - ReplicationLinkInner parameters); - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 replication link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationLinkInner> beginCreateOrUpdate(String resourceGroupName, - String serverName, String databaseName, String linkId, ReplicationLinkInner parameters); - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 replication link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationLinkInner> beginCreateOrUpdate(String resourceGroupName, - String serverName, String databaseName, String linkId, ReplicationLinkInner parameters, Context context); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String linkId); /** - * Updates the replication link type. + * Gets a replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. - * @param parameters The parameters 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 replication link on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, - String linkId, ReplicationLinkInner parameters); - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 replication link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationLinkInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, String linkId, - ReplicationLinkInner parameters); - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 replication link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationLinkInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, String linkId, - ReplicationLinkInner parameters, Context context); - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 replication link along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String linkId, ReplicationLinkUpdate parameters); - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 a replication link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ReplicationLinkInner> beginUpdateAsync(String resourceGroupName, - String serverName, String databaseName, String linkId, ReplicationLinkUpdate parameters); - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 replication link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationLinkInner> beginUpdate(String resourceGroupName, - String serverName, String databaseName, String linkId, ReplicationLinkUpdate parameters); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String linkId); /** - * Updates the replication link type. + * Gets a replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. - * @param parameters The parameters 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 replication link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ReplicationLinkInner> beginUpdate(String resourceGroupName, - String serverName, String databaseName, String linkId, ReplicationLinkUpdate parameters, Context context); - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 replication link on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, String databaseName, - String linkId, ReplicationLinkUpdate parameters); - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 replication link. + * @return a replication link along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationLinkInner update(String resourceGroupName, String serverName, String databaseName, String linkId, - ReplicationLinkUpdate parameters); + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String linkId, Context context); /** - * Updates the replication link type. + * Gets a replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. - * @param parameters The parameters 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 replication link. */ @ServiceMethod(returns = ReturnType.SINGLE) - ReplicationLinkInner update(String resourceGroupName, String serverName, String databaseName, String linkId, - ReplicationLinkUpdate parameters, Context context); + ReplicationLinkInner get(String resourceGroupName, String serverName, String databaseName, String linkId); /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -349,10 +159,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -365,10 +176,11 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -381,10 +193,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -398,10 +211,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -413,10 +227,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -427,10 +242,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -439,56 +255,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String databaseName, String linkId, Context context); - /** - * Gets a list of replication links on 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 replication links on database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets a list of replication links on 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 replication links on database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets a list of replication links on 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 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 replication links on database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, - Context context); - /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -504,7 +275,8 @@ Mono>> failoverWithResponseAsync(String resourceGroupN /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -520,7 +292,8 @@ PollerFlux, ReplicationLinkInner> beginFailover /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -536,7 +309,8 @@ SyncPoller, ReplicationLinkInner> beginFailover /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -553,7 +327,8 @@ SyncPoller, ReplicationLinkInner> beginFailover /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -569,7 +344,8 @@ Mono failoverAsync(String resourceGroupName, String server /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -584,7 +360,8 @@ Mono failoverAsync(String resourceGroupName, String server /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -601,7 +378,8 @@ ReplicationLinkInner failover(String resourceGroupName, String serverName, Strin /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -617,7 +395,8 @@ Mono>> failoverAllowDataLossWithResponseAsync(String r /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -633,7 +412,8 @@ PollerFlux, ReplicationLinkInner> beginFailover /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -649,7 +429,8 @@ PollerFlux, ReplicationLinkInner> beginFailover /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -666,7 +447,8 @@ SyncPoller, ReplicationLinkInner> beginFailover /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -682,7 +464,8 @@ Mono failoverAllowDataLossAsync(String resourceGroupName, /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -698,7 +481,8 @@ ReplicationLinkInner failoverAllowDataLoss(String resourceGroupName, String serv /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -715,7 +499,8 @@ ReplicationLinkInner failoverAllowDataLoss(String resourceGroupName, String serv /** * Gets a list of replication links. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -728,7 +513,8 @@ ReplicationLinkInner failoverAllowDataLoss(String resourceGroupName, String serv /** * Gets a list of replication links. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -741,7 +527,8 @@ ReplicationLinkInner failoverAllowDataLoss(String resourceGroupName, String serv /** * Gets a list of replication links. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedDatabasesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedDatabasesClient.java index 2fee381bd865..34c81e826c50 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedDatabasesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedDatabasesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,107 +18,110 @@ */ public interface RestorableDroppedDatabasesClient { /** - * Gets a restorable dropped database. + * Gets a list of restorable dropped databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param expand The child resources to include in the response. - * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a restorable dropped database along with {@link Response} on successful completion of {@link Mono}. + * @return a list of restorable dropped databases as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String restorableDroppedDatabaseId, String expand, String filter); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * Gets a restorable dropped database. + * Gets a list of restorable dropped databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 restorable dropped database on successful completion of {@link Mono}. + * @return a list of restorable dropped databases as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - String restorableDroppedDatabaseId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets a restorable dropped database. + * Gets a list of restorable dropped databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param expand The child resources to include in the response. - * @param filter An OData filter expression that filters elements in the collection. * @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 restorable dropped database along with {@link Response}. + * @return a list of restorable dropped databases as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - String restorableDroppedDatabaseId, String expand, String filter, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); /** * Gets a restorable dropped database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 restorable dropped database. + * @return a restorable dropped database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - RestorableDroppedDatabaseInner get(String resourceGroupName, String serverName, String restorableDroppedDatabaseId); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String restorableDroppedDatabaseId); /** - * Gets a list of restorable dropped databases. + * Gets a restorable dropped database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 list of restorable dropped databases as paginated response with {@link PagedFlux}. + * @return a restorable dropped database 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, + String restorableDroppedDatabaseId); /** - * Gets a list of restorable dropped databases. + * Gets a restorable dropped database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 list of restorable dropped databases as paginated response with {@link PagedIterable}. + * @return a restorable dropped database along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, + String restorableDroppedDatabaseId, Context context); /** - * Gets a list of restorable dropped databases. + * Gets a restorable dropped database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 list of restorable dropped databases as paginated response with {@link PagedIterable}. + * @return a restorable dropped database. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + RestorableDroppedDatabaseInner get(String resourceGroupName, String serverName, String restorableDroppedDatabaseId); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedManagedDatabasesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedManagedDatabasesClient.java index 98e1aeae2b97..c9d124bc490b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedManagedDatabasesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedManagedDatabasesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,107 +18,114 @@ */ public interface RestorableDroppedManagedDatabasesClient { /** - * Gets a restorable dropped managed database. + * Gets a list of restorable dropped managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 restorable dropped managed database along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of restorable dropped managed databases as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String restorableDroppedDatabaseId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName); /** - * Gets a restorable dropped managed database. + * Gets a list of restorable dropped managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 restorable dropped managed database on successful completion of {@link Mono}. + * @return a list of restorable dropped managed databases as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, - String restorableDroppedDatabaseId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName); /** - * Gets a restorable dropped managed database. + * Gets a list of restorable dropped managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 restorable dropped managed database along with {@link Response}. + * @return a list of restorable dropped managed databases as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, - String managedInstanceName, String restorableDroppedDatabaseId, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context); /** * Gets a restorable dropped managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 restorable dropped managed database. + * @return a restorable dropped managed database along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - RestorableDroppedManagedDatabaseInner get(String resourceGroupName, String managedInstanceName, - String restorableDroppedDatabaseId); + Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId); /** - * Gets a list of restorable dropped managed databases. + * Gets a restorable dropped managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 list of restorable dropped managed databases as paginated response with {@link PagedFlux}. + * @return a restorable dropped managed database on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId); /** - * Gets a list of restorable dropped managed databases. + * Gets a restorable dropped managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 list of restorable dropped managed databases as paginated response with {@link PagedIterable}. + * @return a restorable dropped managed database along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, Context context); /** - * Gets a list of restorable dropped managed databases. + * Gets a restorable dropped managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param context The context to associate with this operation. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 list of restorable dropped managed databases as paginated response with {@link PagedIterable}. + * @return a restorable dropped managed database. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + RestorableDroppedManagedDatabaseInner get(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorePointsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorePointsClient.java index 1d50ac7f1bbe..9493bfb356bd 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorePointsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/RestorePointsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -24,286 +24,304 @@ */ public interface RestorePointsClient { /** - * Gets a restore point. + * Gets a list of database restore points. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a restore point along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database restore points as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String restorePointName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName); /** - * Gets a restore point. + * Gets a list of database restore points. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a restore point on successful completion of {@link Mono}. + * @return a list of database restore points as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String databaseName, - String restorePointName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName); /** - * Gets a restore point. + * Gets a list of database restore points. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. * @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 restore point along with {@link Response}. + * @return a list of database restore points as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - String restorePointName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, + Context context); /** - * Gets a restore point. + * Creates a restore point for a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. + * @param parameters The definition for creating the restore point of this 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 a restore point. + * @return database restore points along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - RestorePointInner get(String resourceGroupName, String serverName, String databaseName, String restorePointName); + Mono>> createWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, CreateDatabaseRestorePointDefinition parameters); /** - * Deletes a restore point. + * Creates a restore point for a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. + * @param parameters The definition for creating the restore point of this 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 Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of database restore points. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, String databaseName, - String restorePointName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, RestorePointInner> beginCreateAsync(String resourceGroupName, + String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters); /** - * Deletes a restore point. + * Creates a restore point for a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. + * @param parameters The definition for creating the restore point of this 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 A {@link Mono} that completes when a successful response is received. + * @return the {@link SyncPoller} for polling of database restore points. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, String restorePointName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RestorePointInner> beginCreate(String resourceGroupName, + String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters); /** - * Deletes a restore point. + * Creates a restore point for a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. + * @param parameters The definition for creating the restore point of this 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 Response}. + * @return the {@link SyncPoller} for polling of database restore points. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, - String restorePointName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RestorePointInner> beginCreate(String resourceGroupName, + String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters, Context context); /** - * Deletes a restore point. + * Creates a restore point for a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. + * @param parameters The definition for creating the restore point of this 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 database restore points on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String serverName, String databaseName, String restorePointName); + Mono createAsync(String resourceGroupName, String serverName, String databaseName, + CreateDatabaseRestorePointDefinition parameters); /** - * Gets a list of database restore points. + * Creates a restore point for a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The definition for creating the restore point of this 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 a list of database restore points as paginated response with {@link PagedFlux}. + * @return database restore points. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + RestorePointInner create(String resourceGroupName, String serverName, String databaseName, + CreateDatabaseRestorePointDefinition parameters); /** - * Gets a list of database restore points. + * Creates a restore point for a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The definition for creating the restore point of this 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 a list of database restore points as paginated response with {@link PagedIterable}. + * @return database restore points. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName); + @ServiceMethod(returns = ReturnType.SINGLE) + RestorePointInner create(String resourceGroupName, String serverName, String databaseName, + CreateDatabaseRestorePointDefinition parameters, Context context); /** - * Gets a list of database restore points. + * Gets a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param context The context to associate with this operation. + * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 database restore points as paginated response with {@link PagedIterable}. + * @return a restore point along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String restorePointName); /** - * Creates a restore point for a data warehouse. + * Gets a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. + * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database restore points along with {@link Response} on successful completion of {@link Mono}. + * @return a restore point on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, CreateDatabaseRestorePointDefinition parameters); + Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String restorePointName); /** - * Creates a restore point for a data warehouse. + * Gets a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. + * @param restorePointName The name of the restore point. + * @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 PollerFlux} for polling of database restore points. + * @return a restore point along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, RestorePointInner> beginCreateAsync(String resourceGroupName, - String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String restorePointName, Context context); /** - * Creates a restore point for a data warehouse. + * Gets a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. + * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 database restore points. + * @return a restore point. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RestorePointInner> beginCreate(String resourceGroupName, - String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters); + @ServiceMethod(returns = ReturnType.SINGLE) + RestorePointInner get(String resourceGroupName, String serverName, String databaseName, String restorePointName); /** - * Creates a restore point for a data warehouse. + * Deletes a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. - * @param context The context to associate with this operation. + * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 database restore points. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RestorePointInner> beginCreate(String resourceGroupName, - String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, String databaseName, + String restorePointName); /** - * Creates a restore point for a data warehouse. + * Deletes a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. + * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database restore points on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync(String resourceGroupName, String serverName, String databaseName, - CreateDatabaseRestorePointDefinition parameters); + Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, String restorePointName); /** - * Creates a restore point for a data warehouse. + * Deletes a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. + * @param restorePointName The name of the restore point. + * @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 database restore points. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - RestorePointInner create(String resourceGroupName, String serverName, String databaseName, - CreateDatabaseRestorePointDefinition parameters); + Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, + String restorePointName, Context context); /** - * Creates a restore point for a data warehouse. + * Deletes a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. - * @param context The context to associate with this operation. + * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database restore points. */ @ServiceMethod(returns = ReturnType.SINGLE) - RestorePointInner create(String resourceGroupName, String serverName, String databaseName, - CreateDatabaseRestorePointDefinition parameters, Context context); + void delete(String resourceGroupName, String serverName, String databaseName, String restorePointName); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SensitivityLabelsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SensitivityLabelsClient.java index d0cc08c287b4..cab1a46584ae 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SensitivityLabelsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SensitivityLabelsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -11,8 +11,6 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelInner; -import com.azure.resourcemanager.sql.models.CurrentSensitivityLabelSource; -import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelSource; import com.azure.resourcemanager.sql.models.SensitivityLabelSource; import com.azure.resourcemanager.sql.models.SensitivityLabelUpdateList; import reactor.core.publisher.Mono; @@ -24,7 +22,8 @@ public interface SensitivityLabelsClient { /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -42,7 +41,8 @@ PagedFlux listCurrentByDatabaseAsync(String resourceGroup /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,7 +57,8 @@ PagedFlux listCurrentByDatabaseAsync(String resourceGroup /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,7 +73,8 @@ PagedIterable listCurrentByDatabase(String resourceGroupN /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -91,7 +93,8 @@ PagedIterable listCurrentByDatabase(String resourceGroupN /** * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -107,7 +110,8 @@ Mono> updateWithResponseAsync(String resourceGroupName, String se /** * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -123,7 +127,8 @@ Mono updateAsync(String resourceGroupName, String serverName, String datab /** * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -140,7 +145,8 @@ Response updateWithResponse(String resourceGroupName, String serverName, S /** * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -155,7 +161,8 @@ void update(String resourceGroupName, String serverName, String databaseName, /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -173,7 +180,8 @@ PagedFlux listRecommendedByDatabaseAsync(String resourceG /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -188,7 +196,8 @@ PagedFlux listRecommendedByDatabaseAsync(String resourceG /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -203,7 +212,8 @@ PagedIterable listRecommendedByDatabase(String resourceGr /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -219,73 +229,11 @@ PagedIterable listRecommendedByDatabase(String resourceGr PagedIterable listRecommendedByDatabase(String resourceGroupName, String serverName, String databaseName, String skipToken, Boolean includeDisabledRecommendations, String filter, Context context); - /** - * Gets the sensitivity labels of a given 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 filter An OData filter expression that filters elements in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, String filter); - - /** - * Gets the sensitivity labels of a given 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets the sensitivity labels of a given 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets the sensitivity labels of a given 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 filter An OData filter expression that filters elements in the collection. - * @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 sensitivity labels of a given database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, String filter, Context context); - /** * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -306,7 +254,8 @@ Mono> getWithResponseAsync(String resourceGroupN /** * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -325,7 +274,8 @@ Mono getAsync(String resourceGroupName, String serverName /** * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -346,7 +296,8 @@ Response getWithResponse(String resourceGroupName, String /** * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -365,13 +316,13 @@ SensitivityLabelInner get(String resourceGroupName, String serverName, String da /** * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @param parameters The column sensitivity label resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -380,19 +331,18 @@ SensitivityLabelInner get(String resourceGroupName, String serverName, String da */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource, SensitivityLabelInner parameters); + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters); /** * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @param parameters The column sensitivity label resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -401,19 +351,18 @@ Mono> createOrUpdateWithResponseAsync(String res */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName, CurrentSensitivityLabelSource sensitivityLabelSource, - SensitivityLabelInner parameters); + String schemaName, String tableName, String columnName, SensitivityLabelInner parameters); /** * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @param parameters The column sensitivity label resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -423,19 +372,19 @@ Mono createOrUpdateAsync(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource, SensitivityLabelInner parameters, Context context); + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters, + Context context); /** * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @param parameters The column sensitivity label resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -444,19 +393,18 @@ Response createOrUpdateWithResponse(String resourceGroupN */ @ServiceMethod(returns = ReturnType.SINGLE) SensitivityLabelInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName, CurrentSensitivityLabelSource sensitivityLabelSource, - SensitivityLabelInner parameters); + String schemaName, String tableName, String columnName, SensitivityLabelInner parameters); /** * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -464,18 +412,18 @@ SensitivityLabelInner createOrUpdate(String resourceGroupName, String serverName */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName, CurrentSensitivityLabelSource sensitivityLabelSource); + String schemaName, String tableName, String columnName); /** * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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,18 +431,18 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String se */ @ServiceMethod(returns = ReturnType.SINGLE) Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, String schemaName, - String tableName, String columnName, CurrentSensitivityLabelSource sensitivityLabelSource); + String tableName, String columnName); /** * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @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. @@ -503,37 +451,36 @@ Mono deleteAsync(String resourceGroupName, String serverName, String datab */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName, CurrentSensitivityLabelSource sensitivityLabelSource, - Context context); + String schemaName, String tableName, String columnName, Context context); /** * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 databaseName, String schemaName, String tableName, - String columnName, CurrentSensitivityLabelSource sensitivityLabelSource); + String columnName); /** * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -541,19 +488,18 @@ void delete(String resourceGroupName, String serverName, String databaseName, St */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> disableRecommendationWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource); + String databaseName, String schemaName, String tableName, String columnName); /** * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -561,19 +507,18 @@ Mono> disableRecommendationWithResponseAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) Mono disableRecommendationAsync(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource); + String schemaName, String tableName, String columnName); /** * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @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. @@ -582,37 +527,36 @@ Mono disableRecommendationAsync(String resourceGroupName, String serverNam */ @ServiceMethod(returns = ReturnType.SINGLE) Response disableRecommendationWithResponse(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource, Context context); + String schemaName, String tableName, String columnName, Context context); /** * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 disableRecommendation(String resourceGroupName, String serverName, String databaseName, String schemaName, - String tableName, String columnName, RecommendedSensitivityLabelSource sensitivityLabelSource); + String tableName, String columnName); /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -620,19 +564,18 @@ void disableRecommendation(String resourceGroupName, String serverName, String d */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> enableRecommendationWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource); + String databaseName, String schemaName, String tableName, String columnName); /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -640,19 +583,18 @@ Mono> enableRecommendationWithResponseAsync(String resourceGroupN */ @ServiceMethod(returns = ReturnType.SINGLE) Mono enableRecommendationAsync(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource); + String schemaName, String tableName, String columnName); /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @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. @@ -661,24 +603,90 @@ Mono enableRecommendationAsync(String resourceGroupName, String serverName */ @ServiceMethod(returns = ReturnType.SINGLE) Response enableRecommendationWithResponse(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource, Context context); + String schemaName, String tableName, String columnName, Context context); /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 enableRecommendation(String resourceGroupName, String serverName, String databaseName, String schemaName, - String tableName, String columnName, RecommendedSensitivityLabelSource sensitivityLabelSource); + String tableName, String columnName); + + /** + * Gets the sensitivity labels of a given database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param filter An OData filter expression that filters elements in the collection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, String filter); + + /** + * Gets the sensitivity labels of a given database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 sensitivity labels of a given database as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName); + + /** + * Gets the sensitivity labels of a given database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 sensitivity labels of a given database as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName); + + /** + * Gets the sensitivity labels of a given database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param filter An OData filter expression that filters elements in the collection. + * @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 sensitivity labels of a given database as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, String filter, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvancedThreatProtectionSettingsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvancedThreatProtectionSettingsClient.java index dec4c971cb9d..65f5efae1445 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvancedThreatProtectionSettingsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvancedThreatProtectionSettingsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -24,10 +24,57 @@ * ServerAdvancedThreatProtectionSettingsClient. */ public interface ServerAdvancedThreatProtectionSettingsClient { + /** + * Get a list of the server's Advanced Threat Protection states. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's Advanced Threat Protection states as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Get a list of the server's Advanced Threat Protection states. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's Advanced Threat Protection states as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Get a list of the server's Advanced Threat Protection states. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's Advanced Threat Protection states 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 state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -43,7 +90,8 @@ Mono> getWithResponseAsync(String /** * Get a server's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -58,7 +106,8 @@ Mono getAsync(String resourceGroupName, Str /** * Get a server's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param context The context to associate with this operation. @@ -74,7 +123,8 @@ Response getWithResponse(String resourceGro /** * Get a server's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -89,7 +139,8 @@ ServerAdvancedThreatProtectionInner get(String resourceGroupName, String serverN /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -105,7 +156,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -122,7 +174,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -139,7 +192,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -158,7 +212,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -174,7 +229,8 @@ Mono createOrUpdateAsync(String resourceGro /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -190,7 +246,8 @@ ServerAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, Str /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -204,47 +261,4 @@ ServerAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, Str ServerAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName, ServerAdvancedThreatProtectionInner parameters, Context context); - - /** - * Get a list of the server's Advanced Threat Protection states. - * - * @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 the server's Advanced Threat Protection states as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Get a list of the server's Advanced Threat Protection states. - * - * @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 the server's Advanced Threat Protection states as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Get a list of the server's Advanced Threat Protection states. - * - * @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 the server's Advanced Threat Protection states as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvisorsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvisorsClient.java index e32d29f6be5d..fda3653c5a4d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvisorsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvisorsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -17,182 +17,194 @@ */ public interface ServerAdvisorsClient { /** - * Gets a server advisor. + * Gets a list of server advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param advisorName The name of the Server Advisor. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 advisor along with {@link Response} on successful completion of {@link Mono}. + * @return a list of server advisors along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, String advisorName); + Mono>> listByServerWithResponseAsync(String resourceGroupName, String serverName, + String expand); /** - * Gets a server advisor. + * Gets a list of server advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param advisorName The name of the Server Advisor. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 advisor on successful completion of {@link Mono}. + * @return a list of server advisors on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String advisorName); + Mono> listByServerAsync(String resourceGroupName, String serverName); /** - * Gets a server advisor. + * Gets a list of server advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param advisorName The name of the Server Advisor. + * @param expand The child resources to include in the response. * @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 advisor along with {@link Response}. + * @return a list of server advisors along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String advisorName, + Response> listByServerWithResponse(String resourceGroupName, String serverName, String expand, Context context); /** - * Gets a server advisor. + * Gets a list of server advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param advisorName The name of the Server Advisor. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 advisor. + * @return a list of server advisors. */ @ServiceMethod(returns = ReturnType.SINGLE) - AdvisorInner get(String resourceGroupName, String serverName, String advisorName); + List listByServer(String resourceGroupName, String serverName); /** - * Updates a server advisor. + * Gets a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of - * {@link Mono}. + * @return a server advisor along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync(String resourceGroupName, String serverName, - String advisorName, AdvisorInner parameters); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, String advisorName); /** - * Updates a server advisor. + * Gets a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor on successful completion of {@link Mono}. + * @return a server advisor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, String advisorName, - AdvisorInner parameters); + Mono getAsync(String resourceGroupName, String serverName, String advisorName); /** - * Updates a server advisor. + * Gets a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor along with {@link Response}. + * @return a server advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String serverName, String advisorName, - AdvisorInner parameters, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String advisorName, + Context context); /** - * Updates a server advisor. + * Gets a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor. + * @return a server advisor. */ @ServiceMethod(returns = ReturnType.SINGLE) - AdvisorInner update(String resourceGroupName, String serverName, String advisorName, AdvisorInner parameters); + AdvisorInner get(String resourceGroupName, String serverName, String advisorName); /** - * Gets a list of server advisors. + * Updates a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param expand The child resources to include in the response. + * @param advisorName The name of the Server Advisor. + * @param parameters The requested advisor resource 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 list of server advisors along with {@link Response} on successful completion of {@link Mono}. + * @return database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> listByServerWithResponseAsync(String resourceGroupName, String serverName, - String expand); + Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String advisorName, AdvisorInner parameters); /** - * Gets a list of server advisors. + * Updates a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param advisorName The name of the Server Advisor. + * @param parameters The requested advisor resource 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 list of server advisors on successful completion of {@link Mono}. + * @return database, Server or Elastic Pool Advisor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listByServerAsync(String resourceGroupName, String serverName); + Mono updateAsync(String resourceGroupName, String serverName, String advisorName, + AdvisorInner parameters); /** - * Gets a list of server advisors. + * Updates a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param expand The child resources to include in the response. + * @param advisorName The name of the Server Advisor. + * @param parameters The requested advisor resource 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 list of server advisors along with {@link Response}. + * @return database, Server or Elastic Pool Advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> listByServerWithResponse(String resourceGroupName, String serverName, String expand, - Context context); + Response updateWithResponse(String resourceGroupName, String serverName, String advisorName, + AdvisorInner parameters, Context context); /** - * Gets a list of server advisors. + * Updates a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param advisorName The name of the Server Advisor. + * @param parameters The requested advisor resource 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 list of server advisors. + * @return database, Server or Elastic Pool Advisor. */ @ServiceMethod(returns = ReturnType.SINGLE) - List listByServer(String resourceGroupName, String serverName); + AdvisorInner update(String resourceGroupName, String serverName, String advisorName, AdvisorInner parameters); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAutomaticTuningsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAutomaticTuningsClient.java index 9c8bd1b587e1..43fcaeab316d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAutomaticTuningsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAutomaticTuningsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,7 +18,8 @@ public interface ServerAutomaticTuningsClient { /** * Retrieves server automatic tuning options. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -31,7 +32,8 @@ public interface ServerAutomaticTuningsClient { /** * Retrieves server automatic tuning options. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -44,7 +46,8 @@ public interface ServerAutomaticTuningsClient { /** * Retrieves server automatic tuning options. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -58,7 +61,8 @@ public interface ServerAutomaticTuningsClient { /** * Retrieves server automatic tuning options. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -71,7 +75,8 @@ public interface ServerAutomaticTuningsClient { /** * Update automatic tuning options on server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -86,7 +91,8 @@ Mono> updateWithResponseAsync(String resour /** * Update automatic tuning options on server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,7 +107,8 @@ Mono updateAsync(String resourceGroupName, String se /** * Update automatic tuning options on server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @param context The context to associate with this operation. @@ -117,7 +124,8 @@ Response updateWithResponse(String resourceGroupName /** * Update automatic tuning options on server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADAdministratorsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADAdministratorsClient.java index 2762eb4cd5db..246b620c8ea9 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADAdministratorsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADAdministratorsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,10 +23,57 @@ * An instance of this class provides access to all the operations defined in ServerAzureADAdministratorsClient. */ public interface ServerAzureADAdministratorsClient { + /** + * Gets a list of Azure Active Directory administrators in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory administrators in a server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Gets a list of Azure Active Directory administrators in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory administrators in a server as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Gets a list of Azure Active Directory administrators in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory administrators in a server as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); + /** * Gets a Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -42,7 +89,8 @@ Mono> getWithResponseAsync(String reso /** * Gets a Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,7 +105,8 @@ Mono getAsync(String resourceGroupName, String /** * Gets a Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -73,7 +122,8 @@ Response getWithResponse(String resourceGroupNa /** * Gets a Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -88,7 +138,8 @@ ServerAzureADAdministratorInner get(String resourceGroupName, String serverName, /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -105,7 +156,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -122,7 +174,8 @@ PollerFlux, ServerAzureADAdministrat /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -139,7 +192,8 @@ SyncPoller, ServerAzureADAdministrat /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -157,7 +211,8 @@ SyncPoller, ServerAzureADAdministrat /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -173,7 +228,8 @@ Mono createOrUpdateAsync(String resourceGroupNa /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -189,7 +245,8 @@ ServerAzureADAdministratorInner createOrUpdate(String resourceGroupName, String /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -206,7 +263,8 @@ ServerAzureADAdministratorInner createOrUpdate(String resourceGroupName, String /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -221,7 +279,8 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -236,7 +295,8 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -251,7 +311,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -267,7 +328,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -281,7 +343,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -294,7 +357,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -304,47 +368,4 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, AdministratorName administratorName, Context context); - - /** - * Gets a list of Azure Active Directory administrators 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 Azure Active Directory administrators in a server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Gets a list of Azure Active Directory administrators 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 Azure Active Directory administrators in a server as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Gets a list of Azure Active Directory administrators in 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 Azure Active Directory administrators 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/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADOnlyAuthenticationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADOnlyAuthenticationsClient.java index a8b36ed26cc1..c0e0ecb86368 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADOnlyAuthenticationsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADOnlyAuthenticationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,10 +23,58 @@ * An instance of this class provides access to all the operations defined in ServerAzureADOnlyAuthenticationsClient. */ public interface ServerAzureADOnlyAuthenticationsClient { + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory only authentications as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory only authentications as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory only authentications as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); + /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -42,7 +90,8 @@ Mono> getWithResponseAsync(String /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,7 +106,8 @@ Mono getAsync(String resourceGroupName, St /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -73,7 +123,8 @@ Response getWithResponse(String resourceGr /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -89,7 +140,8 @@ ServerAzureADOnlyAuthenticationInner get(String resourceGroupName, String server * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -108,7 +160,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -127,7 +180,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -146,7 +200,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -166,7 +221,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -184,7 +240,8 @@ Mono createOrUpdateAsync(String resourceGr * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -202,7 +259,8 @@ ServerAzureADOnlyAuthenticationInner createOrUpdate(String resourceGroupName, St * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -220,7 +278,8 @@ ServerAzureADOnlyAuthenticationInner createOrUpdate(String resourceGroupName, St /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -235,7 +294,8 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -250,7 +310,8 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -265,7 +326,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -281,7 +343,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -295,7 +358,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -308,7 +372,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -318,48 +383,4 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, AuthenticationName authenticationName, Context context); - - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @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 Azure Active Directory only authentications as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @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 Azure Active Directory only authentications as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @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 Azure Active Directory only authentications as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerBlobAuditingPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerBlobAuditingPoliciesClient.java index 73f9309f114e..9bd4b319510d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerBlobAuditingPoliciesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerBlobAuditingPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -14,7 +14,6 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.models.ServerBlobAuditingPolicyInner; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyName; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -23,42 +22,84 @@ * An instance of this class provides access to all the operations defined in ServerBlobAuditingPoliciesClient. */ public interface ServerBlobAuditingPoliciesClient { + /** + * Lists auditing settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 auditing settings as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Lists auditing settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 auditing settings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Lists auditing settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 auditing settings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); + /** * Gets a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName); /** * Gets a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName); + Mono getAsync(String resourceGroupName, String serverName); /** * Gets a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @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. @@ -67,29 +108,28 @@ Mono getAsync(String resourceGroupName, String se */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, Context context); + Context context); /** * Gets a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerBlobAuditingPolicyInner get(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName); + ServerBlobAuditingPolicyInner get(String resourceGroupName, String serverName); /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -98,14 +138,14 @@ ServerBlobAuditingPolicyInner get(String resourceGroupName, String serverName, */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ServerBlobAuditingPolicyInner parameters); + ServerBlobAuditingPolicyInner parameters); /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -113,16 +153,15 @@ Mono>> createOrUpdateWithResponseAsync(String resource * @return the {@link PollerFlux} for polling of a server blob auditing policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ServerBlobAuditingPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, BlobAuditingPolicyName blobAuditingPolicyName, - ServerBlobAuditingPolicyInner parameters); + PollerFlux, ServerBlobAuditingPolicyInner> + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters); /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -130,16 +169,15 @@ PollerFlux, ServerBlobAuditingPolicyIn * @return the {@link SyncPoller} for polling of a server blob auditing policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerBlobAuditingPolicyInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, BlobAuditingPolicyName blobAuditingPolicyName, - ServerBlobAuditingPolicyInner parameters); + SyncPoller, ServerBlobAuditingPolicyInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters); /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -149,15 +187,14 @@ SyncPoller, ServerBlobAuditingPolicyIn */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerBlobAuditingPolicyInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, BlobAuditingPolicyName blobAuditingPolicyName, - ServerBlobAuditingPolicyInner parameters, Context context); + String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters, Context context); /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -166,14 +203,14 @@ SyncPoller, ServerBlobAuditingPolicyIn */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createOrUpdateAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ServerBlobAuditingPolicyInner parameters); + ServerBlobAuditingPolicyInner parameters); /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -182,14 +219,14 @@ Mono createOrUpdateAsync(String resourceGroupName */ @ServiceMethod(returns = ReturnType.SINGLE) ServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ServerBlobAuditingPolicyInner parameters); + ServerBlobAuditingPolicyInner parameters); /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -199,48 +236,5 @@ ServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String se */ @ServiceMethod(returns = ReturnType.SINGLE) ServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ServerBlobAuditingPolicyInner parameters, Context context); - - /** - * Lists auditing settings 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 the response of a ServerBlobAuditingPolicy list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Lists auditing settings 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 the response of a ServerBlobAuditingPolicy list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Lists auditing settings 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 the response of a ServerBlobAuditingPolicy list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); + ServerBlobAuditingPolicyInner parameters, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerConfigurationOptionsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerConfigurationOptionsClient.java deleted file mode 100644 index 192e52935f55..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerConfigurationOptionsClient.java +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.ServerConfigurationOptionInner; -import com.azure.resourcemanager.sql.models.ServerConfigurationOptionName; -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 ServerConfigurationOptionsClient. - */ -public interface ServerConfigurationOptionsClient { - /** - * Gets managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration 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 managed instance server configuration option along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, ServerConfigurationOptionName serverConfigurationOptionName); - - /** - * Gets managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration 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 managed instance server configuration option on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName); - - /** - * Gets managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration 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 managed instance server configuration option along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName, Context context); - - /** - * Gets managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration 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 managed instance server configuration option. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServerConfigurationOptionInner get(String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName); - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 configuration option along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, ServerConfigurationOptionName serverConfigurationOptionName, - ServerConfigurationOptionInner parameters); - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 server configuration option. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ServerConfigurationOptionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName, ServerConfigurationOptionInner parameters); - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 server configuration option. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerConfigurationOptionInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName, ServerConfigurationOptionInner parameters); - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option parameters. - * @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 server configuration option. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerConfigurationOptionInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName, ServerConfigurationOptionInner parameters, - Context context); - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 configuration option on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName, ServerConfigurationOptionInner parameters); - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 configuration option. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServerConfigurationOptionInner createOrUpdate(String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName, ServerConfigurationOptionInner parameters); - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option parameters. - * @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 configuration option. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServerConfigurationOptionInner createOrUpdate(String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName, ServerConfigurationOptionInner parameters, - Context context); - - /** - * Gets a list of managed instance server configuration options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managed instance server configuration options as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByManagedInstanceAsync(String resourceGroupName, - String managedInstanceName); - - /** - * Gets a list of managed instance server configuration options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managed instance server configuration options as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName); - - /** - * Gets a list of managed instance server configuration options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed instance server configuration options as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerConnectionPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerConnectionPoliciesClient.java index 954ee984de12..f49424bf3960 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerConnectionPoliciesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerConnectionPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,10 +23,55 @@ * An instance of this class provides access to all the operations defined in ServerConnectionPoliciesClient. */ public interface ServerConnectionPoliciesClient { + /** + * Lists connection policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 connection policy objects as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Lists connection policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 connection policy objects as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Lists connection policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 connection policy objects as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); + /** * Gets a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -41,7 +86,8 @@ Mono> getWithResponseAsync(String resource /** * Gets a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -56,7 +102,8 @@ Mono getAsync(String resourceGroupName, String serv /** * Gets a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param context The context to associate with this operation. @@ -72,7 +119,8 @@ Response getWithResponse(String resourceGroupName, /** * Gets a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,7 +135,8 @@ ServerConnectionPolicyInner get(String resourceGroupName, String serverName, /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -103,7 +152,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -120,7 +170,8 @@ PollerFlux, ServerConnectionPolicyInner> /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -137,7 +188,8 @@ SyncPoller, ServerConnectionPolicyInner> /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -155,7 +207,8 @@ SyncPoller, ServerConnectionPolicyInner> /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -171,7 +224,8 @@ Mono createOrUpdateAsync(String resourceGroupName, /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -187,7 +241,8 @@ ServerConnectionPolicyInner createOrUpdate(String resourceGroupName, String serv /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -200,45 +255,4 @@ ServerConnectionPolicyInner createOrUpdate(String resourceGroupName, String serv @ServiceMethod(returns = ReturnType.SINGLE) ServerConnectionPolicyInner createOrUpdate(String resourceGroupName, String serverName, ConnectionPolicyName connectionPolicyName, ServerConnectionPolicyInner parameters, Context context); - - /** - * Lists connection policy. - * - * @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 response of a ServerConnectionPolicy list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Lists connection policy. - * - * @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 response of a ServerConnectionPolicy list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Lists connection policy. - * - * @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 the response of a ServerConnectionPolicy list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDevOpsAuditSettingsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDevOpsAuditSettingsClient.java index 91d8aa1ed14c..a2184c6ca0ab 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDevOpsAuditSettingsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDevOpsAuditSettingsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -14,7 +14,6 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.models.ServerDevOpsAuditingSettingsInner; -import com.azure.resourcemanager.sql.models.DevOpsAuditingSettingsName; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -23,12 +22,57 @@ * An instance of this class provides access to all the operations defined in ServerDevOpsAuditSettingsClient. */ public interface ServerDevOpsAuditSettingsClient { + /** + * Lists DevOps audit settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 DevOps audit settings as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Lists DevOps audit settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 DevOps audit settings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Lists DevOps audit settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 DevOps audit settings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); + /** * Gets a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -36,14 +80,15 @@ public interface ServerDevOpsAuditSettingsClient { */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getWithResponseAsync(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName); + String devOpsAuditingSettingsName); /** * Gets a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -51,14 +96,15 @@ Mono> getWithResponseAsync(String re */ @ServiceMethod(returns = ReturnType.SINGLE) Mono getAsync(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName); + String devOpsAuditingSettingsName); /** * Gets a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @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. @@ -67,14 +113,15 @@ Mono getAsync(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName, Context context); + String devOpsAuditingSettingsName, Context context); /** * Gets a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -82,14 +129,15 @@ Response getWithResponse(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) ServerDevOpsAuditingSettingsInner get(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName); + String devOpsAuditingSettingsName); /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -98,14 +146,15 @@ ServerDevOpsAuditingSettingsInner get(String resourceGroupName, String serverNam */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters); + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters); /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -114,15 +163,16 @@ Mono>> createOrUpdateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ServerDevOpsAuditingSettingsInner> - beginCreateOrUpdateAsync(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters); + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String devOpsAuditingSettingsName, + ServerDevOpsAuditingSettingsInner parameters); /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -131,15 +181,16 @@ Mono>> createOrUpdateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerDevOpsAuditingSettingsInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, DevOpsAuditingSettingsName devOpsAuditingSettingsName, + String resourceGroupName, String serverName, String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters); /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -149,15 +200,16 @@ SyncPoller, ServerDevOpsAuditingSe */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerDevOpsAuditingSettingsInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, DevOpsAuditingSettingsName devOpsAuditingSettingsName, + String resourceGroupName, String serverName, String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters, Context context); /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -166,14 +218,15 @@ SyncPoller, ServerDevOpsAuditingSe */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createOrUpdateAsync(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters); + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters); /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -182,14 +235,15 @@ Mono createOrUpdateAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) ServerDevOpsAuditingSettingsInner createOrUpdate(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters); + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters); /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -199,47 +253,5 @@ ServerDevOpsAuditingSettingsInner createOrUpdate(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) ServerDevOpsAuditingSettingsInner createOrUpdate(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters, - Context context); - - /** - * Lists DevOps audit settings 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 DevOps audit settings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Lists DevOps audit settings 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 DevOps audit settings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Lists DevOps audit settings 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 a list of server DevOps audit settings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDnsAliasesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDnsAliasesClient.java index a4f83a963ce9..96dff1bf1a16 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDnsAliasesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerDnsAliasesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,11 +23,55 @@ * An instance of this class provides access to all the operations defined in ServerDnsAliasesClient. */ public interface ServerDnsAliasesClient { + /** + * Gets a list of server DNS aliases for a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 DNS aliases for a server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Gets a list of server DNS aliases for a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 DNS aliases for a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Gets a list of server DNS aliases for a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @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 DNS aliases for a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -41,8 +85,9 @@ Mono> getWithResponseAsync(String resourceGroupNam /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -55,8 +100,9 @@ Mono> getWithResponseAsync(String resourceGroupNam /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -71,8 +117,9 @@ Response getWithResponse(String resourceGroupName, String s /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -85,8 +132,9 @@ Response getWithResponse(String resourceGroupName, String s /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -100,8 +148,9 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -115,8 +164,9 @@ PollerFlux, ServerDnsAliasInner> beginCreateOrUp /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -130,8 +180,9 @@ SyncPoller, ServerDnsAliasInner> beginCreateOrUp /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -146,8 +197,9 @@ SyncPoller, ServerDnsAliasInner> beginCreateOrUp /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -160,8 +212,9 @@ SyncPoller, ServerDnsAliasInner> beginCreateOrUp /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -174,8 +227,9 @@ SyncPoller, ServerDnsAliasInner> beginCreateOrUp /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -190,8 +244,9 @@ ServerDnsAliasInner createOrUpdate(String resourceGroupName, String serverName, /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -205,8 +260,9 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -220,8 +276,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -234,8 +291,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -250,8 +308,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -264,8 +323,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -277,8 +337,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -288,51 +349,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String dnsAliasName, Context context); - /** - * Gets a list of server DNS aliases 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 server DNS aliases for a server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Gets a list of server DNS aliases 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 server DNS aliases for a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Gets a list of server DNS aliases 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 server DNS aliases for a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); - /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -347,8 +369,9 @@ Mono>> acquireWithResponseAsync(String resourceGroupNa /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -363,8 +386,9 @@ PollerFlux, ServerDnsAliasInner> beginAcquireAsy /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -379,8 +403,9 @@ SyncPoller, ServerDnsAliasInner> beginAcquire(St /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @param context The context to associate with this operation. @@ -396,8 +421,9 @@ SyncPoller, ServerDnsAliasInner> beginAcquire(St /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -412,8 +438,9 @@ Mono acquireAsync(String resourceGroupName, String serverNa /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -428,8 +455,9 @@ ServerDnsAliasInner acquire(String resourceGroupName, String serverName, String /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @param context The context to associate with this operation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerKeysClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerKeysClient.java index 92da4be4f10b..0252fe85cccd 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerKeysClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerKeysClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -22,10 +22,54 @@ * An instance of this class provides access to all the operations defined in ServerKeysClient. */ public interface ServerKeysClient { + /** + * Gets a list of server keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 keys as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Gets a list of server keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 keys as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Gets a list of server keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 keys as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + /** * Gets a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -39,7 +83,8 @@ public interface ServerKeysClient { /** * Gets a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -53,7 +98,8 @@ public interface ServerKeysClient { /** * Gets a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @param context The context to associate with this operation. @@ -69,7 +115,8 @@ Response getWithResponse(String resourceGroupName, String server /** * Gets a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -83,9 +130,13 @@ Response getWithResponse(String resourceGroupName, String server /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -99,9 +150,13 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -115,9 +170,13 @@ PollerFlux, ServerKeyInner> beginCreateOrUpdateAsync( /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -131,9 +190,13 @@ SyncPoller, ServerKeyInner> beginCreateOrUpdate(Strin /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -148,9 +211,13 @@ SyncPoller, ServerKeyInner> beginCreateOrUpdate(Strin /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -164,9 +231,13 @@ Mono createOrUpdateAsync(String resourceGroupName, String server /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -180,9 +251,13 @@ ServerKeyInner createOrUpdate(String resourceGroupName, String serverName, Strin /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -197,9 +272,10 @@ ServerKeyInner createOrUpdate(String resourceGroupName, String serverName, Strin /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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,9 +288,10 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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,9 +303,10 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -240,9 +318,10 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @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. @@ -256,9 +335,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -270,9 +350,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -283,9 +364,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @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. @@ -293,44 +375,4 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String keyName, Context context); - - /** - * Gets a list of server keys. - * - * @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 keys as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Gets a list of server keys. - * - * @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 keys as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Gets a list of server keys. - * - * @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 keys as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerOperationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerOperationsClient.java index 7f0f0a44fde4..a50b98737698 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerOperationsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,7 +18,8 @@ public interface ServerOperationsClient { /** * Gets a list of operations performed on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -31,7 +32,8 @@ public interface ServerOperationsClient { /** * Gets a list of operations performed on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -44,7 +46,8 @@ public interface ServerOperationsClient { /** * Gets a list of operations performed on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerSecurityAlertPoliciesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerSecurityAlertPoliciesClient.java index f04493f23b43..449ccf421620 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerSecurityAlertPoliciesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerSecurityAlertPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -14,7 +14,7 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.models.ServerSecurityAlertPolicyInner; -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; +import com.azure.resourcemanager.sql.models.SecurityAlertPolicyNameAutoGenerated; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -23,10 +23,55 @@ * An instance of this class provides access to all the operations defined in ServerSecurityAlertPoliciesClient. */ public interface ServerSecurityAlertPoliciesClient { + /** + * Get the server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 server's threat detection policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Get the server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 server's threat detection policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Get the server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's threat detection policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); + /** * Get a server's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -36,12 +81,13 @@ public interface ServerSecurityAlertPoliciesClient { */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getWithResponseAsync(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName); + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName); /** * Get a server's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -51,12 +97,13 @@ Mono> getWithResponseAsync(String resou */ @ServiceMethod(returns = ReturnType.SINGLE) Mono getAsync(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName); + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName); /** * Get a server's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. @@ -67,12 +114,13 @@ Mono getAsync(String resourceGroupName, String s */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName, Context context); + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, Context context); /** * Get a server's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -82,14 +130,15 @@ Response getWithResponse(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.SINGLE) ServerSecurityAlertPolicyInner get(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName); + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName); /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -98,14 +147,15 @@ ServerSecurityAlertPolicyInner get(String resourceGroupName, String serverName, */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters); + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -114,15 +164,16 @@ Mono>> createOrUpdateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ServerSecurityAlertPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, SecurityAlertPolicyName securityAlertPolicyName, + String resourceGroupName, String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -131,15 +182,16 @@ PollerFlux, ServerSecurityAlertPolicy */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, SecurityAlertPolicyName securityAlertPolicyName, + String resourceGroupName, String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -149,15 +201,16 @@ SyncPoller, ServerSecurityAlertPolicy */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, SecurityAlertPolicyName securityAlertPolicyName, + String resourceGroupName, String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, Context context); /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -166,14 +219,15 @@ SyncPoller, ServerSecurityAlertPolicy */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createOrUpdateAsync(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters); + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -182,14 +236,15 @@ Mono createOrUpdateAsync(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.SINGLE) ServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters); + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters); /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -199,46 +254,6 @@ ServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String s */ @ServiceMethod(returns = ReturnType.SINGLE) ServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, Context context); - - /** - * Get the server's threat detection policies. - * - * @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 server's threat detection policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Get the server's threat detection policies. - * - * @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 server's threat detection policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Get the server's threat detection policies. - * - * @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 the server's threat detection policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustCertificatesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustCertificatesClient.java index 4224a3c21dae..4554615ed52d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustCertificatesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustCertificatesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,48 +23,98 @@ */ public interface ServerTrustCertificatesClient { /** - * Gets a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 trust certificates that were uploaded from box to the given Sql Managed Instance as + * paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName); + + /** + * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 trust certificates that were uploaded from box to the given Sql Managed Instance as + * paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, String managedInstanceName); + + /** + * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 trust certificates that were uploaded from box to the given Sql Managed Instance as + * paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + Context context); + + /** + * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 trust certificate that was uploaded from SQL Server to SQL Managed Instance along with - * {@link Response} on successful completion of {@link Mono}. + * @return a server trust certificate that was uploaded from box to Sql Managed Instance along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, String certificateName); /** - * Gets a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 trust certificate that was uploaded from SQL Server to SQL Managed Instance on successful - * completion of {@link Mono}. + * @return a server trust certificate that was uploaded from box to Sql Managed Instance on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono getAsync(String resourceGroupName, String managedInstanceName, String certificateName); /** - * Gets a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @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 trust certificate that was uploaded from SQL Server to SQL Managed Instance along with + * @return a server trust certificate that was uploaded from box to Sql Managed Instance along with * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -72,25 +122,27 @@ Response getWithResponse(String resourceGroupName, String certificateName, Context context); /** - * Gets a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * @return a server trust certificate that was uploaded from box to Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) ServerTrustCertificateInner get(String resourceGroupName, String managedInstanceName, String certificateName); /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -103,11 +155,12 @@ Mono>> createOrUpdateWithResponseAsync(String resource String managedInstanceName, String certificateName, ServerTrustCertificateInner parameters); /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -121,11 +174,12 @@ PollerFlux, ServerTrustCertificateInner> ServerTrustCertificateInner parameters); /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -139,11 +193,12 @@ SyncPoller, ServerTrustCertificateInner> ServerTrustCertificateInner parameters); /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -158,11 +213,12 @@ SyncPoller, ServerTrustCertificateInner> ServerTrustCertificateInner parameters, Context context); /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -175,11 +231,12 @@ Mono createOrUpdateAsync(String resourceGroupName, String certificateName, ServerTrustCertificateInner parameters); /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -191,11 +248,12 @@ ServerTrustCertificateInner createOrUpdate(String resourceGroupName, String mana String certificateName, ServerTrustCertificateInner parameters); /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -208,11 +266,12 @@ ServerTrustCertificateInner createOrUpdate(String resourceGroupName, String mana String certificateName, ServerTrustCertificateInner parameters, Context context); /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 +282,12 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam String certificateName); /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -238,11 +298,12 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St String certificateName); /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -253,11 +314,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String certificateName); /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @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. @@ -269,11 +331,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String certificateName, Context context); /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -283,11 +346,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Mono deleteAsync(String resourceGroupName, String managedInstanceName, String certificateName); /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -296,11 +360,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String managedInstanceName, String certificateName); /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @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. @@ -308,51 +373,4 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String managedInstanceName, String certificateName, Context context); - - /** - * Gets a list of the server trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName); - - /** - * Gets a list of the server trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, String managedInstanceName); - - /** - * Gets a list of the server trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 the server trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, - Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustGroupsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustGroupsClient.java index 83818c2cc94d..44abfd4c65bd 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustGroupsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustGroupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -22,10 +22,54 @@ * An instance of this class provides access to all the operations defined in ServerTrustGroupsClient. */ public interface ServerTrustGroupsClient { + /** + * Lists a server trust group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 trust groups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByLocationAsync(String resourceGroupName, String locationName); + + /** + * Lists a server trust group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 trust groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String resourceGroupName, String locationName); + + /** + * Lists a server trust group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @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 trust groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String resourceGroupName, String locationName, Context context); + /** * Gets a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -40,7 +84,8 @@ Mono> getWithResponseAsync(String resourceGroupN /** * Gets a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -54,7 +99,8 @@ Mono> getWithResponseAsync(String resourceGroupN /** * Gets a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -70,7 +116,8 @@ Response getWithResponse(String resourceGroupName, String /** * Gets a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -84,7 +131,8 @@ Response getWithResponse(String resourceGroupName, String /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -100,7 +148,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -116,7 +165,8 @@ PollerFlux, ServerTrustGroupInner> beginCreate /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -132,7 +182,8 @@ SyncPoller, ServerTrustGroupInner> beginCreate /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -149,7 +200,8 @@ SyncPoller, ServerTrustGroupInner> beginCreate /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -165,7 +217,8 @@ Mono createOrUpdateAsync(String resourceGroupName, String /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -181,7 +234,8 @@ ServerTrustGroupInner createOrUpdate(String resourceGroupName, String locationNa /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -198,7 +252,8 @@ ServerTrustGroupInner createOrUpdate(String resourceGroupName, String locationNa /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -213,7 +268,8 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -228,7 +284,8 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -243,7 +300,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -259,7 +317,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -273,7 +332,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -286,7 +346,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -297,50 +358,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String locationName, String serverTrustGroupName, Context context); - /** - * Lists a server trust group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 ServerTrustGroup list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByLocationAsync(String resourceGroupName, String locationName); - - /** - * Lists a server trust group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 ServerTrustGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String resourceGroupName, String locationName); - - /** - * Lists a server trust group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @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 response of a ServerTrustGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String resourceGroupName, String locationName, Context context); - /** * Gets a server trust groups by instance name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -353,7 +375,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Gets a server trust groups by instance name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -366,7 +389,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Gets a server trust groups by instance name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerUsagesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerUsagesClient.java index 86767c7b8bbb..d60465273759 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerUsagesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerUsagesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,7 +18,8 @@ public interface ServerUsagesClient { /** * Gets server usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -31,7 +32,8 @@ public interface ServerUsagesClient { /** * Gets server usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -44,7 +46,8 @@ public interface ServerUsagesClient { /** * Gets server usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerVulnerabilityAssessmentsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerVulnerabilityAssessmentsClient.java index ba2f8d3227cb..0a2686f62fc0 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerVulnerabilityAssessmentsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerVulnerabilityAssessmentsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -19,10 +19,55 @@ */ public interface ServerVulnerabilityAssessmentsClient { /** - * Gets the server's vulnerability assessment. + * Lists the vulnerability assessment policies associated with a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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 the server's vulnerability assessments as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Lists the vulnerability assessment policies associated with a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's vulnerability assessments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Lists the vulnerability assessment policies associated with a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's vulnerability assessments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); + + /** + * Gets the server's vulnerability assessment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,8 +82,9 @@ Mono> getWithResponseAsync(String r /** * Gets the server's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -52,8 +98,9 @@ Mono getAsync(String resourceGroupName, Stri /** * Gets the server's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -68,8 +115,9 @@ Response getWithResponse(String resourceGrou /** * Gets the server's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -85,8 +133,9 @@ ServerVulnerabilityAssessmentInner get(String resourceGroupName, String serverNa * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -104,8 +153,9 @@ Mono> createOrUpdateWithResponseAsy * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -122,8 +172,9 @@ Mono createOrUpdateAsync(String resourceGrou * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @param context The context to associate with this operation. @@ -142,8 +193,9 @@ Response createOrUpdateWithResponse(String r * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -158,8 +210,9 @@ ServerVulnerabilityAssessmentInner createOrUpdate(String resourceGroupName, Stri /** * Removes the server's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -173,8 +226,9 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String se /** * Removes the server's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -188,8 +242,9 @@ Mono deleteAsync(String resourceGroupName, String serverName, /** * Removes the server's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -204,8 +259,9 @@ Response deleteWithResponse(String resourceGroupName, String serverName, /** * Removes the server's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -213,48 +269,4 @@ Response deleteWithResponse(String resourceGroupName, String serverName, */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Lists the vulnerability assessment policies associated with 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 response of a ServerVulnerabilityAssessment list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Lists the vulnerability assessment policies associated with 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 response of a ServerVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Lists the vulnerability assessment policies associated with 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 the response of a ServerVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServersClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServersClient.java index dec8b5775922..2a8bee8a1f94 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServersClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,7 +18,6 @@ import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; import com.azure.resourcemanager.sql.fluent.models.CheckNameAvailabilityResponseInner; import com.azure.resourcemanager.sql.fluent.models.ImportExportOperationResultInner; -import com.azure.resourcemanager.sql.fluent.models.RefreshExternalGovernanceStatusOperationResultInner; import com.azure.resourcemanager.sql.fluent.models.ServerInner; import com.azure.resourcemanager.sql.models.CheckNameAvailabilityRequest; import com.azure.resourcemanager.sql.models.ImportNewDatabaseDefinition; @@ -33,170 +32,223 @@ public interface ServersClient extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { /** - * Gets a server. + * Determines whether a resource can be created with the specified name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param expand The child resources to include in the response. + * @param parameters The name availability request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 along with {@link Response} on successful completion of {@link Mono}. + * @return the result of a name availability check along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String serverName, - String expand); + Mono> + checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequest parameters); /** - * Gets a server. + * Determines whether a resource can be created with the specified name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param parameters The name availability request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 on successful completion of {@link Mono}. + * @return the result of a name availability check on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String serverName); + Mono checkNameAvailabilityAsync(CheckNameAvailabilityRequest parameters); /** - * Gets a server. + * Determines whether a resource can be created with the specified name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param expand The child resources to include in the response. + * @param parameters The name availability request parameters. * @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 along with {@link Response}. + * @return the result of a name availability check along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, String expand, - Context context); + Response + checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest parameters, Context context); /** - * Gets a server. + * Determines whether a resource can be created with the specified name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param parameters The name availability request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the result of a name availability check. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerInner getByResourceGroup(String resourceGroupName, String serverName); + CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest parameters); /** - * Creates or updates a server. + * Gets a list of all servers in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters The requested server resource state. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all servers in the subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - ServerInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String expand); /** - * Creates or updates a server. + * Gets a list of all servers in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters The requested server resource state. + * @throws com.azure.core.management.exception.ManagementException 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 all servers in the subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); + + /** + * Gets a list of all servers in the 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. + * @return a list of all servers in the subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of all servers in the subscription. + * + * @param expand The child resources to include in the response. + * @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 PollerFlux} for polling of an Azure SQL Database server. + * @return a list of all servers in the subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ServerInner> beginCreateOrUpdateAsync(String resourceGroupName, - String serverName, ServerInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String expand, Context context); /** - * Creates or updates a server. + * Gets a list of servers in a resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters The requested server resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an Azure SQL Database server. + * @return a list of servers in a resource groups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, String serverName, - ServerInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand); /** - * Creates or updates a server. + * Gets a list of servers in a resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters The requested server resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 servers in a resource groups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); + + /** + * Gets a list of servers in a resource groups. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 servers in a resource groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Gets a list of servers in a resource groups. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param expand The child resources to include in the response. * @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 an Azure SQL Database server. + * @return a list of servers in a resource groups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, String serverName, - ServerInner parameters, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, String expand, Context context); /** - * Creates or updates a server. + * Gets a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The requested server resource state. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL Database server on successful completion of {@link Mono}. + * @return a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String serverName, ServerInner parameters); + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String serverName, + String expand); /** - * Creates or updates a server. + * Gets a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The requested server resource 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 an Azure SQL Database server. + * @return a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters); + Mono getByResourceGroupAsync(String resourceGroupName, String serverName); /** - * Creates or updates a server. + * Gets a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The requested server resource state. + * @param expand The child resources to include in the response. * @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 an Azure SQL Database server. + * @return a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, String expand, + Context context); /** - * Updates a server. + * Gets a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ServerInner getByResourceGroup(String resourceGroupName, String serverName); + + /** + * Creates or updates a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -205,13 +257,14 @@ SyncPoller, ServerInner> beginCreateOrUpdate(String reso * @return an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - ServerUpdate parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + ServerInner parameters); /** - * Updates a server. + * Creates or updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -220,13 +273,14 @@ Mono>> updateWithResponseAsync(String resourceGroupNam * @return the {@link PollerFlux} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ServerInner> beginUpdateAsync(String resourceGroupName, String serverName, - ServerUpdate parameters); + PollerFlux, ServerInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, ServerInner parameters); /** - * Updates a server. + * Creates or updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -235,13 +289,14 @@ PollerFlux, ServerInner> beginUpdateAsync(String resourc * @return the {@link SyncPoller} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, - ServerUpdate parameters); + SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, String serverName, + ServerInner parameters); /** - * Updates a server. + * Creates or updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @param context The context to associate with this operation. @@ -251,13 +306,14 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou * @return the {@link SyncPoller} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, - ServerUpdate parameters, Context context); + SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, String serverName, + ServerInner parameters, Context context); /** - * Updates a server. + * Creates or updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -266,12 +322,13 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou * @return an Azure SQL Database server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, ServerUpdate parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, ServerInner parameters); /** - * Updates a server. + * Creates or updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -280,12 +337,13 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou * @return an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerInner update(String resourceGroupName, String serverName, ServerUpdate parameters); + ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters); /** - * Updates a server. + * Creates or updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested server resource state. * @param context The context to associate with this operation. @@ -295,12 +353,13 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou * @return an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerInner update(String resourceGroupName, String serverName, ServerUpdate parameters, Context context); + ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters, Context context); /** * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -313,7 +372,8 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou /** * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -326,7 +386,8 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou /** * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -339,7 +400,8 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou /** * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -353,7 +415,8 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou /** * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -366,7 +429,8 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou /** * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -378,7 +442,8 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou /** * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -389,105 +454,121 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou void delete(String resourceGroupName, String serverName, Context context); /** - * Gets a list of servers in a resource groups. + * Updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param expand The child resources to include in the response. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 list of servers in a resource groups as paginated response with {@link PagedFlux}. + * @return an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + ServerUpdate parameters); /** - * Gets a list of servers in a resource groups. + * Updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 list of servers in a resource groups as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of an Azure SQL Database server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, ServerInner> beginUpdateAsync(String resourceGroupName, String serverName, + ServerUpdate parameters); /** - * Gets a list of servers in a resource groups. + * Updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 list of servers in a resource groups as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of an Azure SQL Database server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, + ServerUpdate parameters); /** - * Gets a list of servers in a resource groups. + * Updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param expand The child resources to include in the response. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 list of servers in a resource groups as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of an Azure SQL Database server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String expand, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, + ServerUpdate parameters, Context context); /** - * Gets a list of all servers in the subscription. + * Updates a server. * - * @param expand The child resources to include in the response. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 list of all servers in the subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String expand); - - /** - * Gets a list of all servers in the 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. - * @return a list of all servers in the subscription as paginated response with {@link PagedFlux}. + * @return an Azure SQL Database server on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String serverName, ServerUpdate parameters); /** - * Gets a list of all servers in the subscription. + * Updates a server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 list of all servers in the subscription as paginated response with {@link PagedIterable}. + * @return an Azure SQL Database server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + @ServiceMethod(returns = ReturnType.SINGLE) + ServerInner update(String resourceGroupName, String serverName, ServerUpdate parameters); /** - * Gets a list of all servers in the subscription. + * Updates a server. * - * @param expand The child resources to include in the response. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 list of all servers in the subscription as paginated response with {@link PagedIterable}. + * @return an Azure SQL Database server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String expand, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ServerInner update(String resourceGroupName, String serverName, ServerUpdate parameters, Context context); /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -503,7 +584,8 @@ Mono>> importDatabaseWithResponseAsync(String resource /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -518,7 +600,8 @@ Mono>> importDatabaseWithResponseAsync(String resource /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -533,7 +616,8 @@ Mono>> importDatabaseWithResponseAsync(String resource /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @param context The context to associate with this operation. @@ -549,7 +633,8 @@ SyncPoller, ImportExportOperationRe /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -564,7 +649,8 @@ Mono importDatabaseAsync(String resourceGroupN /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -579,7 +665,8 @@ ImportExportOperationResultInner importDatabase(String resourceGroupName, String /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The database import request parameters. * @param context The context to associate with this operation. @@ -591,155 +678,4 @@ ImportExportOperationResultInner importDatabase(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) ImportExportOperationResultInner importDatabase(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters, Context context); - - /** - * Refresh external governance enablement status. - * - * @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 an RefreshExternalGovernanceStatus operation result resource along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> refreshStatusWithResponseAsync(String resourceGroupName, String serverName); - - /** - * Refresh external governance enablement status. - * - * @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 {@link PollerFlux} for polling of an RefreshExternalGovernanceStatus operation result resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, RefreshExternalGovernanceStatusOperationResultInner> - beginRefreshStatusAsync(String resourceGroupName, String serverName); - - /** - * Refresh external governance enablement status. - * - * @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 {@link SyncPoller} for polling of an RefreshExternalGovernanceStatus operation result resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RefreshExternalGovernanceStatusOperationResultInner> - beginRefreshStatus(String resourceGroupName, String serverName); - - /** - * Refresh external governance enablement status. - * - * @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 the {@link SyncPoller} for polling of an RefreshExternalGovernanceStatus operation result resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RefreshExternalGovernanceStatusOperationResultInner> - beginRefreshStatus(String resourceGroupName, String serverName, Context context); - - /** - * Refresh external governance enablement status. - * - * @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 an RefreshExternalGovernanceStatus operation result resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono refreshStatusAsync(String resourceGroupName, - String serverName); - - /** - * Refresh external governance enablement status. - * - * @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 an RefreshExternalGovernanceStatus operation result resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RefreshExternalGovernanceStatusOperationResultInner refreshStatus(String resourceGroupName, String serverName); - - /** - * Refresh external governance enablement status. - * - * @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 an RefreshExternalGovernanceStatus operation result resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RefreshExternalGovernanceStatusOperationResultInner refreshStatus(String resourceGroupName, String serverName, - Context context); - - /** - * Determines whether a resource can be created with the specified name. - * - * @param parameters 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 the result of a name availability check along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> - checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequest parameters); - - /** - * Determines whether a resource can be created with the specified name. - * - * @param parameters 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 the result of a name availability check on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono checkNameAvailabilityAsync(CheckNameAvailabilityRequest parameters); - - /** - * Determines whether a resource can be created with the specified name. - * - * @param parameters 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 the result of a name availability check along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response - checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest parameters, Context context); - - /** - * Determines whether a resource can be created with the specified name. - * - * @param parameters 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 the result of a name availability check. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest parameters); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlAgentsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlAgentsClient.java index 0674f23bb208..50ad4bcde7b0 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlAgentsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlAgentsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,7 +18,8 @@ public interface SqlAgentsClient { /** * Gets current instance sql agent configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -33,7 +34,8 @@ Mono> getWithResponseAsync(String resourceG /** * Gets current instance sql agent configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -46,7 +48,8 @@ Mono> getWithResponseAsync(String resourceG /** * Gets current instance sql agent configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -61,7 +64,8 @@ Response getWithResponse(String resourceGroupName, S /** * Gets current instance sql agent configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -74,7 +78,8 @@ Response getWithResponse(String resourceGroupName, S /** * Puts new sql agent configuration to instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -90,7 +95,8 @@ Mono> createOrUpdateWithResponseAsync(Strin /** * Puts new sql agent configuration to instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -105,7 +111,8 @@ Mono createOrUpdateAsync(String resourceGroupName, S /** * Puts new sql agent configuration to instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The parameters parameter. * @param context The context to associate with this operation. @@ -121,7 +128,8 @@ Response createOrUpdateWithResponse(String resourceG /** * Puts new sql agent configuration to instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlManagementClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlManagementClient.java index d0a9698e41cc..b8e2d60e2416 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlManagementClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -12,25 +12,25 @@ */ public interface SqlManagementClient { /** - * Gets Service host. + * Gets The subscription ID that identifies an Azure subscription. * - * @return the endpoint value. + * @return the subscriptionId value. */ - String getEndpoint(); + String getSubscriptionId(); /** - * Gets Version parameter. + * Gets server parameter. * - * @return the apiVersion value. + * @return the endpoint value. */ - String getApiVersion(); + String getEndpoint(); /** - * Gets The ID of the target subscription. The value must be an UUID. + * Gets Api Version. * - * @return the subscriptionId value. + * @return the apiVersion value. */ - String getSubscriptionId(); + String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. @@ -46,13 +46,6 @@ public interface SqlManagementClient { */ Duration getDefaultPollInterval(); - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - /** * Gets the BackupShortTermRetentionPoliciesClient object to access its operations. * @@ -60,55 +53,6 @@ public interface SqlManagementClient { */ BackupShortTermRetentionPoliciesClient getBackupShortTermRetentionPolicies(); - /** - * Gets the DatabaseColumnsClient object to access its operations. - * - * @return the DatabaseColumnsClient object. - */ - DatabaseColumnsClient getDatabaseColumns(); - - /** - * Gets the RestorePointsClient object to access its operations. - * - * @return the RestorePointsClient object. - */ - RestorePointsClient getRestorePoints(); - - /** - * Gets the SensitivityLabelsClient object to access its operations. - * - * @return the SensitivityLabelsClient object. - */ - SensitivityLabelsClient getSensitivityLabels(); - - /** - * Gets the DatabasesClient object to access its operations. - * - * @return the DatabasesClient object. - */ - DatabasesClient getDatabases(); - - /** - * Gets the FirewallRulesClient object to access its operations. - * - * @return the FirewallRulesClient object. - */ - FirewallRulesClient getFirewallRules(); - - /** - * Gets the ReplicationLinksClient object to access its operations. - * - * @return the ReplicationLinksClient object. - */ - ReplicationLinksClient getReplicationLinks(); - - /** - * Gets the ServersClient object to access its operations. - * - * @return the ServersClient object. - */ - ServersClient getServers(); - /** * Gets the ServerBlobAuditingPoliciesClient object to access its operations. * @@ -138,109 +82,88 @@ public interface SqlManagementClient { ExtendedServerBlobAuditingPoliciesClient getExtendedServerBlobAuditingPolicies(); /** - * Gets the ServerAdvisorsClient object to access its operations. - * - * @return the ServerAdvisorsClient object. - */ - ServerAdvisorsClient getServerAdvisors(); - - /** - * Gets the ManagedDatabaseColumnsClient object to access its operations. - * - * @return the ManagedDatabaseColumnsClient object. - */ - ManagedDatabaseColumnsClient getManagedDatabaseColumns(); - - /** - * Gets the DatabaseTablesClient object to access its operations. - * - * @return the DatabaseTablesClient object. - */ - DatabaseTablesClient getDatabaseTables(); - - /** - * Gets the ManagedDatabaseTablesClient object to access its operations. + * Gets the DatabaseAdvancedThreatProtectionSettingsClient object to access its operations. * - * @return the ManagedDatabaseTablesClient object. + * @return the DatabaseAdvancedThreatProtectionSettingsClient object. */ - ManagedDatabaseTablesClient getManagedDatabaseTables(); + DatabaseAdvancedThreatProtectionSettingsClient getDatabaseAdvancedThreatProtectionSettings(); /** - * Gets the DatabaseSchemasClient object to access its operations. + * Gets the DatabaseAdvisorsClient object to access its operations. * - * @return the DatabaseSchemasClient object. + * @return the DatabaseAdvisorsClient object. */ - DatabaseSchemasClient getDatabaseSchemas(); + DatabaseAdvisorsClient getDatabaseAdvisors(); /** - * Gets the ManagedDatabaseSchemasClient object to access its operations. + * Gets the DatabaseAutomaticTuningsClient object to access its operations. * - * @return the ManagedDatabaseSchemasClient object. + * @return the DatabaseAutomaticTuningsClient object. */ - ManagedDatabaseSchemasClient getManagedDatabaseSchemas(); + DatabaseAutomaticTuningsClient getDatabaseAutomaticTunings(); /** - * Gets the DatabaseSecurityAlertPoliciesClient object to access its operations. + * Gets the DatabaseColumnsClient object to access its operations. * - * @return the DatabaseSecurityAlertPoliciesClient object. + * @return the DatabaseColumnsClient object. */ - DatabaseSecurityAlertPoliciesClient getDatabaseSecurityAlertPolicies(); + DatabaseColumnsClient getDatabaseColumns(); /** - * Gets the SqlVulnerabilityAssessmentBaselinesClient object to access its operations. + * Gets the DatabaseExtensionsOperationsClient object to access its operations. * - * @return the SqlVulnerabilityAssessmentBaselinesClient object. + * @return the DatabaseExtensionsOperationsClient object. */ - SqlVulnerabilityAssessmentBaselinesClient getSqlVulnerabilityAssessmentBaselines(); + DatabaseExtensionsOperationsClient getDatabaseExtensionsOperations(); /** - * Gets the SqlVulnerabilityAssessmentsClient object to access its operations. + * Gets the DatabaseOperationsClient object to access its operations. * - * @return the SqlVulnerabilityAssessmentsClient object. + * @return the DatabaseOperationsClient object. */ - SqlVulnerabilityAssessmentsClient getSqlVulnerabilityAssessments(); + DatabaseOperationsClient getDatabaseOperations(); /** - * Gets the SqlVulnerabilityAssessmentsSettingsClient object to access its operations. + * Gets the DatabaseRecommendedActionsClient object to access its operations. * - * @return the SqlVulnerabilityAssessmentsSettingsClient object. + * @return the DatabaseRecommendedActionsClient object. */ - SqlVulnerabilityAssessmentsSettingsClient getSqlVulnerabilityAssessmentsSettings(); + DatabaseRecommendedActionsClient getDatabaseRecommendedActions(); /** - * Gets the DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient object to access its operations. + * Gets the DatabasesClient object to access its operations. * - * @return the DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient object. + * @return the DatabasesClient object. */ - DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient getDatabaseSqlVulnerabilityAssessmentRuleBaselines(); + DatabasesClient getDatabases(); /** - * Gets the SqlVulnerabilityAssessmentRuleBaselinesClient object to access its operations. + * Gets the DatabaseSchemasClient object to access its operations. * - * @return the SqlVulnerabilityAssessmentRuleBaselinesClient object. + * @return the DatabaseSchemasClient object. */ - SqlVulnerabilityAssessmentRuleBaselinesClient getSqlVulnerabilityAssessmentRuleBaselines(); + DatabaseSchemasClient getDatabaseSchemas(); /** - * Gets the DatabaseSqlVulnerabilityAssessmentScanResultsClient object to access its operations. + * Gets the DatabaseSecurityAlertPoliciesClient object to access its operations. * - * @return the DatabaseSqlVulnerabilityAssessmentScanResultsClient object. + * @return the DatabaseSecurityAlertPoliciesClient object. */ - DatabaseSqlVulnerabilityAssessmentScanResultsClient getDatabaseSqlVulnerabilityAssessmentScanResults(); + DatabaseSecurityAlertPoliciesClient getDatabaseSecurityAlertPolicies(); /** - * Gets the SqlVulnerabilityAssessmentScanResultOperationsClient object to access its operations. + * Gets the DatabaseTablesClient object to access its operations. * - * @return the SqlVulnerabilityAssessmentScanResultOperationsClient object. + * @return the DatabaseTablesClient object. */ - SqlVulnerabilityAssessmentScanResultOperationsClient getSqlVulnerabilityAssessmentScanResultOperations(); + DatabaseTablesClient getDatabaseTables(); /** - * Gets the SqlVulnerabilityAssessmentScansClient object to access its operations. + * Gets the DatabaseUsagesClient object to access its operations. * - * @return the SqlVulnerabilityAssessmentScansClient object. + * @return the DatabaseUsagesClient object. */ - SqlVulnerabilityAssessmentScansClient getSqlVulnerabilityAssessmentScans(); + DatabaseUsagesClient getDatabaseUsages(); /** * Gets the DatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. @@ -249,13 +172,6 @@ public interface SqlManagementClient { */ DatabaseVulnerabilityAssessmentRuleBaselinesClient getDatabaseVulnerabilityAssessmentRuleBaselines(); - /** - * Gets the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. - * - * @return the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient object. - */ - ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient getManagedDatabaseVulnerabilityAssessmentRuleBaselines(); - /** * Gets the DatabaseVulnerabilityAssessmentsClient object to access its operations. * @@ -264,18 +180,11 @@ public interface SqlManagementClient { DatabaseVulnerabilityAssessmentsClient getDatabaseVulnerabilityAssessments(); /** - * Gets the ManagedDatabaseVulnerabilityAssessmentsClient object to access its operations. - * - * @return the ManagedDatabaseVulnerabilityAssessmentsClient object. - */ - ManagedDatabaseVulnerabilityAssessmentsClient getManagedDatabaseVulnerabilityAssessments(); - - /** - * Gets the ManagedDatabaseVulnerabilityAssessmentScansClient object to access its operations. + * Gets the DatabaseVulnerabilityAssessmentScansClient object to access its operations. * - * @return the ManagedDatabaseVulnerabilityAssessmentScansClient object. + * @return the DatabaseVulnerabilityAssessmentScansClient object. */ - ManagedDatabaseVulnerabilityAssessmentScansClient getManagedDatabaseVulnerabilityAssessmentScans(); + DatabaseVulnerabilityAssessmentScansClient getDatabaseVulnerabilityAssessmentScans(); /** * Gets the DataMaskingPoliciesClient object to access its operations. @@ -285,39 +194,39 @@ public interface SqlManagementClient { DataMaskingPoliciesClient getDataMaskingPolicies(); /** - * Gets the DeletedServersClient object to access its operations. + * Gets the DataMaskingRulesClient object to access its operations. * - * @return the DeletedServersClient object. + * @return the DataMaskingRulesClient object. */ - DeletedServersClient getDeletedServers(); + DataMaskingRulesClient getDataMaskingRules(); /** - * Gets the DistributedAvailabilityGroupsClient object to access its operations. + * Gets the DataWarehouseUserActivitiesOperationsClient object to access its operations. * - * @return the DistributedAvailabilityGroupsClient object. + * @return the DataWarehouseUserActivitiesOperationsClient object. */ - DistributedAvailabilityGroupsClient getDistributedAvailabilityGroups(); + DataWarehouseUserActivitiesOperationsClient getDataWarehouseUserActivitiesOperations(); /** - * Gets the ManagedDatabasesClient object to access its operations. + * Gets the DeletedServersClient object to access its operations. * - * @return the ManagedDatabasesClient object. + * @return the DeletedServersClient object. */ - ManagedDatabasesClient getManagedDatabases(); + DeletedServersClient getDeletedServers(); /** - * Gets the ServerTrustGroupsClient object to access its operations. + * Gets the DistributedAvailabilityGroupsClient object to access its operations. * - * @return the ServerTrustGroupsClient object. + * @return the DistributedAvailabilityGroupsClient object. */ - ServerTrustGroupsClient getServerTrustGroups(); + DistributedAvailabilityGroupsClient getDistributedAvailabilityGroups(); /** - * Gets the ManagedInstancesClient object to access its operations. + * Gets the ElasticPoolOperationsClient object to access its operations. * - * @return the ManagedInstancesClient object. + * @return the ElasticPoolOperationsClient object. */ - ManagedInstancesClient getManagedInstances(); + ElasticPoolOperationsClient getElasticPoolOperations(); /** * Gets the ElasticPoolsClient object to access its operations. @@ -347,6 +256,13 @@ public interface SqlManagementClient { */ FailoverGroupsClient getFailoverGroups(); + /** + * Gets the FirewallRulesClient object to access its operations. + * + * @return the FirewallRulesClient object. + */ + FirewallRulesClient getFirewallRules(); + /** * Gets the GeoBackupPoliciesClient object to access its operations. * @@ -361,13 +277,6 @@ public interface SqlManagementClient { */ InstanceFailoverGroupsClient getInstanceFailoverGroups(); - /** - * Gets the InstancePoolOperationsClient object to access its operations. - * - * @return the InstancePoolOperationsClient object. - */ - InstancePoolOperationsClient getInstancePoolOperations(); - /** * Gets the InstancePoolsClient object to access its operations. * @@ -382,13 +291,6 @@ public interface SqlManagementClient { */ IPv6FirewallRulesClient getIPv6FirewallRules(); - /** - * Gets the JobExecutionsClient object to access its operations. - * - * @return the JobExecutionsClient object. - */ - JobExecutionsClient getJobExecutions(); - /** * Gets the JobAgentsClient object to access its operations. * @@ -404,18 +306,11 @@ public interface SqlManagementClient { JobCredentialsClient getJobCredentials(); /** - * Gets the JobStepExecutionsClient object to access its operations. - * - * @return the JobStepExecutionsClient object. - */ - JobStepExecutionsClient getJobStepExecutions(); - - /** - * Gets the JobTargetExecutionsClient object to access its operations. + * Gets the JobExecutionsClient object to access its operations. * - * @return the JobTargetExecutionsClient object. + * @return the JobExecutionsClient object. */ - JobTargetExecutionsClient getJobTargetExecutions(); + JobExecutionsClient getJobExecutions(); /** * Gets the JobsClient object to access its operations. @@ -425,11 +320,11 @@ public interface SqlManagementClient { JobsClient getJobs(); /** - * Gets the JobPrivateEndpointsClient object to access its operations. + * Gets the JobStepExecutionsClient object to access its operations. * - * @return the JobPrivateEndpointsClient object. + * @return the JobStepExecutionsClient object. */ - JobPrivateEndpointsClient getJobPrivateEndpoints(); + JobStepExecutionsClient getJobStepExecutions(); /** * Gets the JobStepsClient object to access its operations. @@ -438,6 +333,13 @@ public interface SqlManagementClient { */ JobStepsClient getJobSteps(); + /** + * Gets the JobTargetExecutionsClient object to access its operations. + * + * @return the JobTargetExecutionsClient object. + */ + JobTargetExecutionsClient getJobTargetExecutions(); + /** * Gets the JobTargetGroupsClient object to access its operations. * @@ -452,6 +354,20 @@ public interface SqlManagementClient { */ JobVersionsClient getJobVersions(); + /** + * Gets the LedgerDigestUploadsOperationsClient object to access its operations. + * + * @return the LedgerDigestUploadsOperationsClient object. + */ + LedgerDigestUploadsOperationsClient getLedgerDigestUploadsOperations(); + + /** + * Gets the CapabilitiesClient object to access its operations. + * + * @return the CapabilitiesClient object. + */ + CapabilitiesClient getCapabilities(); + /** * Gets the LongTermRetentionBackupsClient object to access its operations. * @@ -474,327 +390,299 @@ public interface SqlManagementClient { LongTermRetentionPoliciesClient getLongTermRetentionPolicies(); /** - * Gets the ManagedBackupShortTermRetentionPoliciesClient object to access its operations. + * Gets the MaintenanceWindowOptionsOperationsClient object to access its operations. * - * @return the ManagedBackupShortTermRetentionPoliciesClient object. + * @return the MaintenanceWindowOptionsOperationsClient object. */ - ManagedBackupShortTermRetentionPoliciesClient getManagedBackupShortTermRetentionPolicies(); + MaintenanceWindowOptionsOperationsClient getMaintenanceWindowOptionsOperations(); /** - * Gets the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient object to access its operations. + * Gets the MaintenanceWindowsOperationsClient object to access its operations. * - * @return the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient object. + * @return the MaintenanceWindowsOperationsClient object. */ - ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient - getManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies(); + MaintenanceWindowsOperationsClient getMaintenanceWindowsOperations(); /** - * Gets the ManagedDatabaseSecurityAlertPoliciesClient object to access its operations. - * - * @return the ManagedDatabaseSecurityAlertPoliciesClient object. - */ - ManagedDatabaseSecurityAlertPoliciesClient getManagedDatabaseSecurityAlertPolicies(); - - /** - * Gets the ManagedInstanceAdministratorsClient object to access its operations. - * - * @return the ManagedInstanceAdministratorsClient object. - */ - ManagedInstanceAdministratorsClient getManagedInstanceAdministrators(); - - /** - * Gets the ManagedInstanceAzureADOnlyAuthenticationsClient object to access its operations. - * - * @return the ManagedInstanceAzureADOnlyAuthenticationsClient object. - */ - ManagedInstanceAzureADOnlyAuthenticationsClient getManagedInstanceAzureADOnlyAuthentications(); - - /** - * Gets the ManagedInstanceDtcsClient object to access its operations. - * - * @return the ManagedInstanceDtcsClient object. - */ - ManagedInstanceDtcsClient getManagedInstanceDtcs(); - - /** - * Gets the ManagedInstanceEncryptionProtectorsClient object to access its operations. + * Gets the ManagedBackupShortTermRetentionPoliciesClient object to access its operations. * - * @return the ManagedInstanceEncryptionProtectorsClient object. + * @return the ManagedBackupShortTermRetentionPoliciesClient object. */ - ManagedInstanceEncryptionProtectorsClient getManagedInstanceEncryptionProtectors(); + ManagedBackupShortTermRetentionPoliciesClient getManagedBackupShortTermRetentionPolicies(); /** - * Gets the ManagedInstanceKeysClient object to access its operations. + * Gets the ManagedDatabaseColumnsClient object to access its operations. * - * @return the ManagedInstanceKeysClient object. + * @return the ManagedDatabaseColumnsClient object. */ - ManagedInstanceKeysClient getManagedInstanceKeys(); + ManagedDatabaseColumnsClient getManagedDatabaseColumns(); /** - * Gets the ManagedInstanceLongTermRetentionPoliciesClient object to access its operations. + * Gets the ManagedDatabaseQueriesClient object to access its operations. * - * @return the ManagedInstanceLongTermRetentionPoliciesClient object. + * @return the ManagedDatabaseQueriesClient object. */ - ManagedInstanceLongTermRetentionPoliciesClient getManagedInstanceLongTermRetentionPolicies(); + ManagedDatabaseQueriesClient getManagedDatabaseQueries(); /** - * Gets the ManagedInstanceOperationsClient object to access its operations. + * Gets the ManagedDatabaseRestoreDetailsClient object to access its operations. * - * @return the ManagedInstanceOperationsClient object. + * @return the ManagedDatabaseRestoreDetailsClient object. */ - ManagedInstanceOperationsClient getManagedInstanceOperations(); + ManagedDatabaseRestoreDetailsClient getManagedDatabaseRestoreDetails(); /** - * Gets the ManagedInstancePrivateEndpointConnectionsClient object to access its operations. + * Gets the ManagedDatabasesClient object to access its operations. * - * @return the ManagedInstancePrivateEndpointConnectionsClient object. + * @return the ManagedDatabasesClient object. */ - ManagedInstancePrivateEndpointConnectionsClient getManagedInstancePrivateEndpointConnections(); + ManagedDatabasesClient getManagedDatabases(); /** - * Gets the ManagedInstanceVulnerabilityAssessmentsClient object to access its operations. + * Gets the ManagedDatabaseSchemasClient object to access its operations. * - * @return the ManagedInstanceVulnerabilityAssessmentsClient object. + * @return the ManagedDatabaseSchemasClient object. */ - ManagedInstanceVulnerabilityAssessmentsClient getManagedInstanceVulnerabilityAssessments(); + ManagedDatabaseSchemasClient getManagedDatabaseSchemas(); /** - * Gets the ManagedServerDnsAliasesClient object to access its operations. + * Gets the ManagedDatabaseSecurityAlertPoliciesClient object to access its operations. * - * @return the ManagedServerDnsAliasesClient object. + * @return the ManagedDatabaseSecurityAlertPoliciesClient object. */ - ManagedServerDnsAliasesClient getManagedServerDnsAliases(); + ManagedDatabaseSecurityAlertPoliciesClient getManagedDatabaseSecurityAlertPolicies(); /** - * Gets the ManagedServerSecurityAlertPoliciesClient object to access its operations. + * Gets the ManagedDatabaseSecurityEventsClient object to access its operations. * - * @return the ManagedServerSecurityAlertPoliciesClient object. + * @return the ManagedDatabaseSecurityEventsClient object. */ - ManagedServerSecurityAlertPoliciesClient getManagedServerSecurityAlertPolicies(); + ManagedDatabaseSecurityEventsClient getManagedDatabaseSecurityEvents(); /** - * Gets the NetworkSecurityPerimeterConfigurationsClient object to access its operations. + * Gets the ManagedDatabaseSensitivityLabelsClient object to access its operations. * - * @return the NetworkSecurityPerimeterConfigurationsClient object. + * @return the ManagedDatabaseSensitivityLabelsClient object. */ - NetworkSecurityPerimeterConfigurationsClient getNetworkSecurityPerimeterConfigurations(); + ManagedDatabaseSensitivityLabelsClient getManagedDatabaseSensitivityLabels(); /** - * Gets the OutboundFirewallRulesClient object to access its operations. + * Gets the ManagedDatabaseRecommendedSensitivityLabelsClient object to access its operations. * - * @return the OutboundFirewallRulesClient object. + * @return the ManagedDatabaseRecommendedSensitivityLabelsClient object. */ - OutboundFirewallRulesClient getOutboundFirewallRules(); + ManagedDatabaseRecommendedSensitivityLabelsClient getManagedDatabaseRecommendedSensitivityLabels(); /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. + * Gets the ManagedDatabaseTablesClient object to access its operations. * - * @return the PrivateEndpointConnectionsClient object. + * @return the ManagedDatabaseTablesClient object. */ - PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + ManagedDatabaseTablesClient getManagedDatabaseTables(); /** - * Gets the PrivateLinkResourcesClient object to access its operations. + * Gets the ManagedDatabaseTransparentDataEncryptionsClient object to access its operations. * - * @return the PrivateLinkResourcesClient object. + * @return the ManagedDatabaseTransparentDataEncryptionsClient object. */ - PrivateLinkResourcesClient getPrivateLinkResources(); + ManagedDatabaseTransparentDataEncryptionsClient getManagedDatabaseTransparentDataEncryptions(); /** - * Gets the RecoverableDatabasesClient object to access its operations. + * Gets the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. * - * @return the RecoverableDatabasesClient object. + * @return the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient object. */ - RecoverableDatabasesClient getRecoverableDatabases(); + ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient getManagedDatabaseVulnerabilityAssessmentRuleBaselines(); /** - * Gets the RecoverableManagedDatabasesClient object to access its operations. + * Gets the ManagedDatabaseVulnerabilityAssessmentsClient object to access its operations. * - * @return the RecoverableManagedDatabasesClient object. + * @return the ManagedDatabaseVulnerabilityAssessmentsClient object. */ - RecoverableManagedDatabasesClient getRecoverableManagedDatabases(); + ManagedDatabaseVulnerabilityAssessmentsClient getManagedDatabaseVulnerabilityAssessments(); /** - * Gets the RestorableDroppedDatabasesClient object to access its operations. + * Gets the ManagedDatabaseVulnerabilityAssessmentScansClient object to access its operations. * - * @return the RestorableDroppedDatabasesClient object. + * @return the ManagedDatabaseVulnerabilityAssessmentScansClient object. */ - RestorableDroppedDatabasesClient getRestorableDroppedDatabases(); + ManagedDatabaseVulnerabilityAssessmentScansClient getManagedDatabaseVulnerabilityAssessmentScans(); /** - * Gets the RestorableDroppedManagedDatabasesClient object to access its operations. + * Gets the ManagedInstanceAdministratorsClient object to access its operations. * - * @return the RestorableDroppedManagedDatabasesClient object. + * @return the ManagedInstanceAdministratorsClient object. */ - RestorableDroppedManagedDatabasesClient getRestorableDroppedManagedDatabases(); + ManagedInstanceAdministratorsClient getManagedInstanceAdministrators(); /** - * Gets the ServerAzureADAdministratorsClient object to access its operations. + * Gets the ManagedInstanceAzureADOnlyAuthenticationsClient object to access its operations. * - * @return the ServerAzureADAdministratorsClient object. + * @return the ManagedInstanceAzureADOnlyAuthenticationsClient object. */ - ServerAzureADAdministratorsClient getServerAzureADAdministrators(); + ManagedInstanceAzureADOnlyAuthenticationsClient getManagedInstanceAzureADOnlyAuthentications(); /** - * Gets the ServerAzureADOnlyAuthenticationsClient object to access its operations. + * Gets the ManagedInstanceEncryptionProtectorsClient object to access its operations. * - * @return the ServerAzureADOnlyAuthenticationsClient object. + * @return the ManagedInstanceEncryptionProtectorsClient object. */ - ServerAzureADOnlyAuthenticationsClient getServerAzureADOnlyAuthentications(); + ManagedInstanceEncryptionProtectorsClient getManagedInstanceEncryptionProtectors(); /** - * Gets the ServerConfigurationOptionsClient object to access its operations. + * Gets the ManagedInstanceKeysClient object to access its operations. * - * @return the ServerConfigurationOptionsClient object. + * @return the ManagedInstanceKeysClient object. */ - ServerConfigurationOptionsClient getServerConfigurationOptions(); + ManagedInstanceKeysClient getManagedInstanceKeys(); /** - * Gets the ServerConnectionPoliciesClient object to access its operations. + * Gets the ManagedInstanceLongTermRetentionPoliciesClient object to access its operations. * - * @return the ServerConnectionPoliciesClient object. + * @return the ManagedInstanceLongTermRetentionPoliciesClient object. */ - ServerConnectionPoliciesClient getServerConnectionPolicies(); + ManagedInstanceLongTermRetentionPoliciesClient getManagedInstanceLongTermRetentionPolicies(); /** - * Gets the ServerDevOpsAuditSettingsClient object to access its operations. + * Gets the ManagedInstanceOperationsClient object to access its operations. * - * @return the ServerDevOpsAuditSettingsClient object. + * @return the ManagedInstanceOperationsClient object. */ - ServerDevOpsAuditSettingsClient getServerDevOpsAuditSettings(); + ManagedInstanceOperationsClient getManagedInstanceOperations(); /** - * Gets the ServerDnsAliasesClient object to access its operations. + * Gets the ManagedInstancePrivateEndpointConnectionsClient object to access its operations. * - * @return the ServerDnsAliasesClient object. + * @return the ManagedInstancePrivateEndpointConnectionsClient object. */ - ServerDnsAliasesClient getServerDnsAliases(); + ManagedInstancePrivateEndpointConnectionsClient getManagedInstancePrivateEndpointConnections(); /** - * Gets the ServerKeysClient object to access its operations. + * Gets the ManagedInstancePrivateLinkResourcesClient object to access its operations. * - * @return the ServerKeysClient object. + * @return the ManagedInstancePrivateLinkResourcesClient object. */ - ServerKeysClient getServerKeys(); + ManagedInstancePrivateLinkResourcesClient getManagedInstancePrivateLinkResources(); /** - * Gets the ServerSecurityAlertPoliciesClient object to access its operations. + * Gets the ManagedInstancesClient object to access its operations. * - * @return the ServerSecurityAlertPoliciesClient object. + * @return the ManagedInstancesClient object. */ - ServerSecurityAlertPoliciesClient getServerSecurityAlertPolicies(); + ManagedInstancesClient getManagedInstances(); /** - * Gets the ServerTrustCertificatesClient object to access its operations. + * Gets the ManagedInstanceTdeCertificatesClient object to access its operations. * - * @return the ServerTrustCertificatesClient object. + * @return the ManagedInstanceTdeCertificatesClient object. */ - ServerTrustCertificatesClient getServerTrustCertificates(); + ManagedInstanceTdeCertificatesClient getManagedInstanceTdeCertificates(); /** - * Gets the ServerVulnerabilityAssessmentsClient object to access its operations. + * Gets the ManagedInstanceVulnerabilityAssessmentsClient object to access its operations. * - * @return the ServerVulnerabilityAssessmentsClient object. + * @return the ManagedInstanceVulnerabilityAssessmentsClient object. */ - ServerVulnerabilityAssessmentsClient getServerVulnerabilityAssessments(); + ManagedInstanceVulnerabilityAssessmentsClient getManagedInstanceVulnerabilityAssessments(); /** - * Gets the StartStopManagedInstanceSchedulesClient object to access its operations. + * Gets the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient object to access its operations. * - * @return the StartStopManagedInstanceSchedulesClient object. + * @return the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient object. */ - StartStopManagedInstanceSchedulesClient getStartStopManagedInstanceSchedules(); + ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient + getManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies(); /** - * Gets the SubscriptionUsagesClient object to access its operations. + * Gets the ManagedServerDnsAliasesClient object to access its operations. * - * @return the SubscriptionUsagesClient object. + * @return the ManagedServerDnsAliasesClient object. */ - SubscriptionUsagesClient getSubscriptionUsages(); + ManagedServerDnsAliasesClient getManagedServerDnsAliases(); /** - * Gets the SyncAgentsClient object to access its operations. + * Gets the ManagedServerSecurityAlertPoliciesClient object to access its operations. * - * @return the SyncAgentsClient object. + * @return the ManagedServerSecurityAlertPoliciesClient object. */ - SyncAgentsClient getSyncAgents(); + ManagedServerSecurityAlertPoliciesClient getManagedServerSecurityAlertPolicies(); /** - * Gets the SyncGroupsClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the SyncGroupsClient object. + * @return the OperationsClient object. */ - SyncGroupsClient getSyncGroups(); + OperationsClient getOperations(); /** - * Gets the SyncMembersClient object to access its operations. + * Gets the OutboundFirewallRulesClient object to access its operations. * - * @return the SyncMembersClient object. + * @return the OutboundFirewallRulesClient object. */ - SyncMembersClient getSyncMembers(); + OutboundFirewallRulesClient getOutboundFirewallRules(); /** - * Gets the TimeZonesClient object to access its operations. + * Gets the PrivateEndpointConnectionsClient object to access its operations. * - * @return the TimeZonesClient object. + * @return the PrivateEndpointConnectionsClient object. */ - TimeZonesClient getTimeZones(); + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); /** - * Gets the VirtualClustersClient object to access its operations. + * Gets the PrivateLinkResourcesClient object to access its operations. * - * @return the VirtualClustersClient object. + * @return the PrivateLinkResourcesClient object. */ - VirtualClustersClient getVirtualClusters(); + PrivateLinkResourcesClient getPrivateLinkResources(); /** - * Gets the VirtualNetworkRulesClient object to access its operations. + * Gets the RecoverableDatabasesClient object to access its operations. * - * @return the VirtualNetworkRulesClient object. + * @return the RecoverableDatabasesClient object. */ - VirtualNetworkRulesClient getVirtualNetworkRules(); + RecoverableDatabasesClient getRecoverableDatabases(); /** - * Gets the WorkloadClassifiersClient object to access its operations. + * Gets the RecoverableManagedDatabasesClient object to access its operations. * - * @return the WorkloadClassifiersClient object. + * @return the RecoverableManagedDatabasesClient object. */ - WorkloadClassifiersClient getWorkloadClassifiers(); + RecoverableManagedDatabasesClient getRecoverableManagedDatabases(); /** - * Gets the WorkloadGroupsClient object to access its operations. + * Gets the ReplicationLinksClient object to access its operations. * - * @return the WorkloadGroupsClient object. + * @return the ReplicationLinksClient object. */ - WorkloadGroupsClient getWorkloadGroups(); + ReplicationLinksClient getReplicationLinks(); /** - * Gets the ManagedDatabaseSensitivityLabelsClient object to access its operations. + * Gets the RestorableDroppedDatabasesClient object to access its operations. * - * @return the ManagedDatabaseSensitivityLabelsClient object. + * @return the RestorableDroppedDatabasesClient object. */ - ManagedDatabaseSensitivityLabelsClient getManagedDatabaseSensitivityLabels(); + RestorableDroppedDatabasesClient getRestorableDroppedDatabases(); /** - * Gets the DatabaseEncryptionProtectorsClient object to access its operations. + * Gets the RestorableDroppedManagedDatabasesClient object to access its operations. * - * @return the DatabaseEncryptionProtectorsClient object. + * @return the RestorableDroppedManagedDatabasesClient object. */ - DatabaseEncryptionProtectorsClient getDatabaseEncryptionProtectors(); + RestorableDroppedManagedDatabasesClient getRestorableDroppedManagedDatabases(); /** - * Gets the DatabaseOperationsClient object to access its operations. + * Gets the RestorePointsClient object to access its operations. * - * @return the DatabaseOperationsClient object. + * @return the RestorePointsClient object. */ - DatabaseOperationsClient getDatabaseOperations(); + RestorePointsClient getRestorePoints(); /** - * Gets the DatabaseUsagesClient object to access its operations. + * Gets the SensitivityLabelsClient object to access its operations. * - * @return the DatabaseUsagesClient object. + * @return the SensitivityLabelsClient object. */ - DatabaseUsagesClient getDatabaseUsages(); + SensitivityLabelsClient getSensitivityLabels(); /** * Gets the RecommendedSensitivityLabelsClient object to access its operations. @@ -804,282 +692,205 @@ public interface SqlManagementClient { RecommendedSensitivityLabelsClient getRecommendedSensitivityLabels(); /** - * Gets the SynapseLinkWorkspacesClient object to access its operations. - * - * @return the SynapseLinkWorkspacesClient object. - */ - SynapseLinkWorkspacesClient getSynapseLinkWorkspaces(); - - /** - * Gets the ServerOperationsClient object to access its operations. - * - * @return the ServerOperationsClient object. - */ - ServerOperationsClient getServerOperations(); - - /** - * Gets the ServerUsagesClient object to access its operations. - * - * @return the ServerUsagesClient object. - */ - ServerUsagesClient getServerUsages(); - - /** - * Gets the TdeCertificatesClient object to access its operations. - * - * @return the TdeCertificatesClient object. - */ - TdeCertificatesClient getTdeCertificates(); - - /** - * Gets the DatabaseAdvancedThreatProtectionSettingsClient object to access its operations. - * - * @return the DatabaseAdvancedThreatProtectionSettingsClient object. - */ - DatabaseAdvancedThreatProtectionSettingsClient getDatabaseAdvancedThreatProtectionSettings(); - - /** - * Gets the DatabaseAdvisorsClient object to access its operations. - * - * @return the DatabaseAdvisorsClient object. - */ - DatabaseAdvisorsClient getDatabaseAdvisors(); - - /** - * Gets the DatabaseAutomaticTuningsClient object to access its operations. - * - * @return the DatabaseAutomaticTuningsClient object. - */ - DatabaseAutomaticTuningsClient getDatabaseAutomaticTunings(); - - /** - * Gets the DatabaseExtensionsOperationsClient object to access its operations. - * - * @return the DatabaseExtensionsOperationsClient object. - */ - DatabaseExtensionsOperationsClient getDatabaseExtensionsOperations(); - - /** - * Gets the DatabaseRecommendedActionsClient object to access its operations. - * - * @return the DatabaseRecommendedActionsClient object. - */ - DatabaseRecommendedActionsClient getDatabaseRecommendedActions(); - - /** - * Gets the DatabaseSqlVulnerabilityAssessmentBaselinesClient object to access its operations. - * - * @return the DatabaseSqlVulnerabilityAssessmentBaselinesClient object. - */ - DatabaseSqlVulnerabilityAssessmentBaselinesClient getDatabaseSqlVulnerabilityAssessmentBaselines(); - - /** - * Gets the SqlVulnerabilityAssessmentBaselinesOperationsClient object to access its operations. - * - * @return the SqlVulnerabilityAssessmentBaselinesOperationsClient object. - */ - SqlVulnerabilityAssessmentBaselinesOperationsClient getSqlVulnerabilityAssessmentBaselinesOperations(); - - /** - * Gets the DatabaseSqlVulnerabilityAssessmentsSettingsClient object to access its operations. + * Gets the ServerAdvancedThreatProtectionSettingsClient object to access its operations. * - * @return the DatabaseSqlVulnerabilityAssessmentsSettingsClient object. + * @return the ServerAdvancedThreatProtectionSettingsClient object. */ - DatabaseSqlVulnerabilityAssessmentsSettingsClient getDatabaseSqlVulnerabilityAssessmentsSettings(); + ServerAdvancedThreatProtectionSettingsClient getServerAdvancedThreatProtectionSettings(); /** - * Gets the DatabaseSqlVulnerabilityAssessmentExecuteScansClient object to access its operations. + * Gets the ServerAdvisorsClient object to access its operations. * - * @return the DatabaseSqlVulnerabilityAssessmentExecuteScansClient object. + * @return the ServerAdvisorsClient object. */ - DatabaseSqlVulnerabilityAssessmentExecuteScansClient getDatabaseSqlVulnerabilityAssessmentExecuteScans(); + ServerAdvisorsClient getServerAdvisors(); /** - * Gets the SqlVulnerabilityAssessmentExecuteScansClient object to access its operations. + * Gets the ServerAutomaticTuningsClient object to access its operations. * - * @return the SqlVulnerabilityAssessmentExecuteScansClient object. + * @return the ServerAutomaticTuningsClient object. */ - SqlVulnerabilityAssessmentExecuteScansClient getSqlVulnerabilityAssessmentExecuteScans(); + ServerAutomaticTuningsClient getServerAutomaticTunings(); /** - * Gets the SqlVulnerabilityAssessmentRuleBaselinesOperationsClient object to access its operations. + * Gets the ServerAzureADAdministratorsClient object to access its operations. * - * @return the SqlVulnerabilityAssessmentRuleBaselinesOperationsClient object. + * @return the ServerAzureADAdministratorsClient object. */ - SqlVulnerabilityAssessmentRuleBaselinesOperationsClient getSqlVulnerabilityAssessmentRuleBaselinesOperations(); + ServerAzureADAdministratorsClient getServerAzureADAdministrators(); /** - * Gets the DatabaseSqlVulnerabilityAssessmentScansClient object to access its operations. + * Gets the ServerAzureADOnlyAuthenticationsClient object to access its operations. * - * @return the DatabaseSqlVulnerabilityAssessmentScansClient object. + * @return the ServerAzureADOnlyAuthenticationsClient object. */ - DatabaseSqlVulnerabilityAssessmentScansClient getDatabaseSqlVulnerabilityAssessmentScans(); + ServerAzureADOnlyAuthenticationsClient getServerAzureADOnlyAuthentications(); /** - * Gets the DatabaseVulnerabilityAssessmentScansClient object to access its operations. + * Gets the ServerConnectionPoliciesClient object to access its operations. * - * @return the DatabaseVulnerabilityAssessmentScansClient object. + * @return the ServerConnectionPoliciesClient object. */ - DatabaseVulnerabilityAssessmentScansClient getDatabaseVulnerabilityAssessmentScans(); + ServerConnectionPoliciesClient getServerConnectionPolicies(); /** - * Gets the DataMaskingRulesClient object to access its operations. + * Gets the ServerDevOpsAuditSettingsClient object to access its operations. * - * @return the DataMaskingRulesClient object. + * @return the ServerDevOpsAuditSettingsClient object. */ - DataMaskingRulesClient getDataMaskingRules(); + ServerDevOpsAuditSettingsClient getServerDevOpsAuditSettings(); /** - * Gets the DataWarehouseUserActivitiesOperationsClient object to access its operations. + * Gets the ServerDnsAliasesClient object to access its operations. * - * @return the DataWarehouseUserActivitiesOperationsClient object. + * @return the ServerDnsAliasesClient object. */ - DataWarehouseUserActivitiesOperationsClient getDataWarehouseUserActivitiesOperations(); + ServerDnsAliasesClient getServerDnsAliases(); /** - * Gets the ManagedDatabaseSecurityEventsClient object to access its operations. + * Gets the ServerKeysClient object to access its operations. * - * @return the ManagedDatabaseSecurityEventsClient object. + * @return the ServerKeysClient object. */ - ManagedDatabaseSecurityEventsClient getManagedDatabaseSecurityEvents(); + ServerKeysClient getServerKeys(); /** - * Gets the ManagedDatabaseRecommendedSensitivityLabelsClient object to access its operations. + * Gets the ServerOperationsClient object to access its operations. * - * @return the ManagedDatabaseRecommendedSensitivityLabelsClient object. + * @return the ServerOperationsClient object. */ - ManagedDatabaseRecommendedSensitivityLabelsClient getManagedDatabaseRecommendedSensitivityLabels(); + ServerOperationsClient getServerOperations(); /** - * Gets the ManagedInstanceTdeCertificatesClient object to access its operations. + * Gets the ServersClient object to access its operations. * - * @return the ManagedInstanceTdeCertificatesClient object. + * @return the ServersClient object. */ - ManagedInstanceTdeCertificatesClient getManagedInstanceTdeCertificates(); + ServersClient getServers(); /** - * Gets the ElasticPoolOperationsClient object to access its operations. + * Gets the ServerSecurityAlertPoliciesClient object to access its operations. * - * @return the ElasticPoolOperationsClient object. + * @return the ServerSecurityAlertPoliciesClient object. */ - ElasticPoolOperationsClient getElasticPoolOperations(); + ServerSecurityAlertPoliciesClient getServerSecurityAlertPolicies(); /** - * Gets the UsagesClient object to access its operations. + * Gets the ServerTrustCertificatesClient object to access its operations. * - * @return the UsagesClient object. + * @return the ServerTrustCertificatesClient object. */ - UsagesClient getUsages(); + ServerTrustCertificatesClient getServerTrustCertificates(); /** - * Gets the LedgerDigestUploadsOperationsClient object to access its operations. + * Gets the ServerTrustGroupsClient object to access its operations. * - * @return the LedgerDigestUploadsOperationsClient object. + * @return the ServerTrustGroupsClient object. */ - LedgerDigestUploadsOperationsClient getLedgerDigestUploadsOperations(); + ServerTrustGroupsClient getServerTrustGroups(); /** - * Gets the MaintenanceWindowOptionsOperationsClient object to access its operations. + * Gets the ServerUsagesClient object to access its operations. * - * @return the MaintenanceWindowOptionsOperationsClient object. + * @return the ServerUsagesClient object. */ - MaintenanceWindowOptionsOperationsClient getMaintenanceWindowOptionsOperations(); + ServerUsagesClient getServerUsages(); /** - * Gets the MaintenanceWindowsOperationsClient object to access its operations. + * Gets the ServerVulnerabilityAssessmentsClient object to access its operations. * - * @return the MaintenanceWindowsOperationsClient object. + * @return the ServerVulnerabilityAssessmentsClient object. */ - MaintenanceWindowsOperationsClient getMaintenanceWindowsOperations(); + ServerVulnerabilityAssessmentsClient getServerVulnerabilityAssessments(); /** - * Gets the ManagedDatabaseAdvancedThreatProtectionSettingsClient object to access its operations. + * Gets the SqlAgentsClient object to access its operations. * - * @return the ManagedDatabaseAdvancedThreatProtectionSettingsClient object. + * @return the SqlAgentsClient object. */ - ManagedDatabaseAdvancedThreatProtectionSettingsClient getManagedDatabaseAdvancedThreatProtectionSettings(); + SqlAgentsClient getSqlAgents(); /** - * Gets the ManagedDatabaseMoveOperationsClient object to access its operations. + * Gets the SubscriptionUsagesClient object to access its operations. * - * @return the ManagedDatabaseMoveOperationsClient object. + * @return the SubscriptionUsagesClient object. */ - ManagedDatabaseMoveOperationsClient getManagedDatabaseMoveOperations(); + SubscriptionUsagesClient getSubscriptionUsages(); /** - * Gets the ManagedDatabaseQueriesClient object to access its operations. + * Gets the SyncAgentsClient object to access its operations. * - * @return the ManagedDatabaseQueriesClient object. + * @return the SyncAgentsClient object. */ - ManagedDatabaseQueriesClient getManagedDatabaseQueries(); + SyncAgentsClient getSyncAgents(); /** - * Gets the ManagedDatabaseRestoreDetailsClient object to access its operations. + * Gets the SyncGroupsClient object to access its operations. * - * @return the ManagedDatabaseRestoreDetailsClient object. + * @return the SyncGroupsClient object. */ - ManagedDatabaseRestoreDetailsClient getManagedDatabaseRestoreDetails(); + SyncGroupsClient getSyncGroups(); /** - * Gets the ManagedDatabaseTransparentDataEncryptionsClient object to access its operations. + * Gets the SyncMembersClient object to access its operations. * - * @return the ManagedDatabaseTransparentDataEncryptionsClient object. + * @return the SyncMembersClient object. */ - ManagedDatabaseTransparentDataEncryptionsClient getManagedDatabaseTransparentDataEncryptions(); + SyncMembersClient getSyncMembers(); /** - * Gets the ManagedInstanceAdvancedThreatProtectionSettingsClient object to access its operations. + * Gets the TdeCertificatesClient object to access its operations. * - * @return the ManagedInstanceAdvancedThreatProtectionSettingsClient object. + * @return the TdeCertificatesClient object. */ - ManagedInstanceAdvancedThreatProtectionSettingsClient getManagedInstanceAdvancedThreatProtectionSettings(); + TdeCertificatesClient getTdeCertificates(); /** - * Gets the ManagedInstancePrivateLinkResourcesClient object to access its operations. + * Gets the TimeZonesClient object to access its operations. * - * @return the ManagedInstancePrivateLinkResourcesClient object. + * @return the TimeZonesClient object. */ - ManagedInstancePrivateLinkResourcesClient getManagedInstancePrivateLinkResources(); + TimeZonesClient getTimeZones(); /** - * Gets the ManagedLedgerDigestUploadsOperationsClient object to access its operations. + * Gets the TransparentDataEncryptionsClient object to access its operations. * - * @return the ManagedLedgerDigestUploadsOperationsClient object. + * @return the TransparentDataEncryptionsClient object. */ - ManagedLedgerDigestUploadsOperationsClient getManagedLedgerDigestUploadsOperations(); + TransparentDataEncryptionsClient getTransparentDataEncryptions(); /** - * Gets the ServerAdvancedThreatProtectionSettingsClient object to access its operations. + * Gets the UsagesClient object to access its operations. * - * @return the ServerAdvancedThreatProtectionSettingsClient object. + * @return the UsagesClient object. */ - ServerAdvancedThreatProtectionSettingsClient getServerAdvancedThreatProtectionSettings(); + UsagesClient getUsages(); /** - * Gets the ServerAutomaticTuningsClient object to access its operations. + * Gets the VirtualClustersClient object to access its operations. * - * @return the ServerAutomaticTuningsClient object. + * @return the VirtualClustersClient object. */ - ServerAutomaticTuningsClient getServerAutomaticTunings(); + VirtualClustersClient getVirtualClusters(); /** - * Gets the SqlAgentsClient object to access its operations. + * Gets the VirtualNetworkRulesClient object to access its operations. * - * @return the SqlAgentsClient object. + * @return the VirtualNetworkRulesClient object. */ - SqlAgentsClient getSqlAgents(); + VirtualNetworkRulesClient getVirtualNetworkRules(); /** - * Gets the TransparentDataEncryptionsClient object to access its operations. + * Gets the WorkloadClassifiersClient object to access its operations. * - * @return the TransparentDataEncryptionsClient object. + * @return the WorkloadClassifiersClient object. */ - TransparentDataEncryptionsClient getTransparentDataEncryptions(); + WorkloadClassifiersClient getWorkloadClassifiers(); /** - * Gets the CapabilitiesClient object to access its operations. + * Gets the WorkloadGroupsClient object to access its operations. * - * @return the CapabilitiesClient object. + * @return the WorkloadGroupsClient object. */ - CapabilitiesClient getCapabilities(); + WorkloadGroupsClient getWorkloadGroups(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentBaselinesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentBaselinesClient.java deleted file mode 100644 index 5687c129667a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentBaselinesClient.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.DatabaseSqlVulnerabilityAssessmentBaselineSetInner; -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in SqlVulnerabilityAssessmentBaselinesClient. - */ -public interface SqlVulnerabilityAssessmentBaselinesClient { - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 database's sql vulnerability assessment rule baselines along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 database's sql vulnerability assessment rule baselines on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 database's sql vulnerability assessment rule baselines along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context); - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 database's sql vulnerability assessment rule baselines. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseSqlVulnerabilityAssessmentBaselineSetInner get(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listBySqlVulnerabilityAssessmentAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySqlVulnerabilityAssessment( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySqlVulnerabilityAssessment( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentBaselinesOperationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentBaselinesOperationsClient.java deleted file mode 100644 index 566fd4804684..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentBaselinesOperationsClient.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.DatabaseSqlVulnerabilityAssessmentBaselineSetInner; -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * SqlVulnerabilityAssessmentBaselinesOperationsClient. - */ -public interface SqlVulnerabilityAssessmentBaselinesOperationsClient { - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment baseline set along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput parameters); - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment baseline set on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput parameters); - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 a database sql vulnerability assessment baseline set along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput parameters, Context context); - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment baseline set. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseSqlVulnerabilityAssessmentBaselineSetInner createOrUpdate(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput parameters); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentExecuteScansClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentExecuteScansClient.java deleted file mode 100644 index 5a9a2853a215..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentExecuteScansClient.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; -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 - * SqlVulnerabilityAssessmentExecuteScansClient. - */ -public interface SqlVulnerabilityAssessmentExecuteScansClient { - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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>> executeWithResponseAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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> beginExecuteAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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> beginExecute(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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> beginExecute(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context); - - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 executeAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 execute(String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 execute(String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentRuleBaselinesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentRuleBaselinesClient.java deleted file mode 100644 index 03f92b52a496..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentRuleBaselinesClient.java +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInner; -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInput; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * SqlVulnerabilityAssessmentRuleBaselinesClient. - */ -public interface SqlVulnerabilityAssessmentRuleBaselinesClient { - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database's sql vulnerability assessment rule baseline along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - String ruleId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database's sql vulnerability assessment rule baseline on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 system database's sql vulnerability assessment rule baseline along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - String ruleId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context); - - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database's sql vulnerability assessment rule baseline. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseSqlVulnerabilityAssessmentRuleBaselineInner get(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment rule baseline along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, String ruleId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineInput parameters); - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment rule baseline on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - String ruleId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineInput parameters); - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 a database sql vulnerability assessment rule baseline along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - String ruleId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineInput parameters, Context context); - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment rule baseline. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseSqlVulnerabilityAssessmentRuleBaselineInner createOrUpdate(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineInput parameters); - - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database's sql vulnerability assessment rule baseline as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByBaselineAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database's sql vulnerability assessment rule baseline as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByBaseline(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 system database's sql vulnerability assessment rule baseline as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByBaseline(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentRuleBaselinesOperationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentRuleBaselinesOperationsClient.java deleted file mode 100644 index 7b5c266b01b9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentRuleBaselinesOperationsClient.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * SqlVulnerabilityAssessmentRuleBaselinesOperationsClient. - */ -public interface SqlVulnerabilityAssessmentRuleBaselinesOperationsClient { - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context); - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, String ruleId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentScanResultOperationsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentScanResultOperationsClient.java deleted file mode 100644 index 0030b6e92e29..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentScanResultOperationsClient.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.SqlVulnerabilityAssessmentScanResultsInner; -import com.azure.resourcemanager.sql.models.SqlVulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * SqlVulnerabilityAssessmentScanResultOperationsClient. - */ -public interface SqlVulnerabilityAssessmentScanResultOperationsClient { - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String serverName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - String scanResultId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, String scanResultId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @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 vulnerability assessment scan record of a database along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, String scanResultId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context); - - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SqlVulnerabilityAssessmentScanResultsInner get(String resourceGroupName, String serverName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, String scanResultId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByScanAsync(String resourceGroupName, String serverName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByScan(String resourceGroupName, String serverName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @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 vulnerability assessment scan record of a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByScan(String resourceGroupName, String serverName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentScansClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentScansClient.java deleted file mode 100644 index f21f407bad7b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentScansClient.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.SqlVulnerabilityAssessmentScanRecordInner; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in SqlVulnerabilityAssessmentScansClient. - */ -public interface SqlVulnerabilityAssessmentScansClient { - /** - * Get a system database vulnerability assessment scan record. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The scanId parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database vulnerability assessment scan record along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Get a system database vulnerability assessment scan record. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The scanId parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database vulnerability assessment scan record on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Get a system database vulnerability assessment scan record. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The scanId parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 system database vulnerability assessment scan record along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context); - - /** - * Get a system database vulnerability assessment scan record. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The scanId parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database vulnerability assessment scan record. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SqlVulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Lists the vulnerability assessment scans of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 SqlVulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listBySqlVulnerabilityAssessmentsAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Lists the vulnerability assessment scans of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 SqlVulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySqlVulnerabilityAssessments(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName); - - /** - * Lists the vulnerability assessment scans of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 response of a SqlVulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySqlVulnerabilityAssessments(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentsClient.java deleted file mode 100644 index 002d4b06f5c7..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentsClient.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.VulnerabilityAssessmentName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in SqlVulnerabilityAssessmentsClient. - */ -public interface SqlVulnerabilityAssessmentsClient { - /** - * Removes SQL Vulnerability Assessment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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, - VulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Removes SQL Vulnerability Assessment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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, - VulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Removes SQL Vulnerability Assessment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); - - /** - * Removes SQL Vulnerability Assessment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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, VulnerabilityAssessmentName vulnerabilityAssessmentName); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentsSettingsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentsSettingsClient.java deleted file mode 100644 index 642561fd0ea6..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentsSettingsClient.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.SqlVulnerabilityAssessmentInner; -import com.azure.resourcemanager.sql.models.SqlVulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in SqlVulnerabilityAssessmentsSettingsClient. - */ -public interface SqlVulnerabilityAssessmentsSettingsClient { - /** - * Gets SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sQL Vulnerability Assessment policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Gets SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sQL Vulnerability Assessment policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Gets SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @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 sQL Vulnerability Assessment policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, Context context); - - /** - * Gets SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sQL Vulnerability Assessment policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SqlVulnerabilityAssessmentInner get(String resourceGroupName, String serverName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName); - - /** - * Creates or updates SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param parameters The requested 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 SQL Vulnerability Assessment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - SqlVulnerabilityAssessmentInner parameters); - - /** - * Creates or updates SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param parameters The requested 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 SQL Vulnerability Assessment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, SqlVulnerabilityAssessmentInner parameters); - - /** - * Creates or updates SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param parameters The requested 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 a SQL Vulnerability Assessment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, SqlVulnerabilityAssessmentInner parameters, - Context context); - - /** - * Creates or updates SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param parameters The requested 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 SQL Vulnerability Assessment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SqlVulnerabilityAssessmentInner createOrUpdate(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, SqlVulnerabilityAssessmentInner parameters); - - /** - * Lists SQL Vulnerability Assessment policies associated with 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 response of a SqlVulnerabilityAssessment list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Lists SQL Vulnerability Assessment policies associated with 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 response of a SqlVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Lists SQL Vulnerability Assessment policies associated with 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 the response of a SqlVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/StartStopManagedInstanceSchedulesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/StartStopManagedInstanceSchedulesClient.java deleted file mode 100644 index 2d4f2223e394..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/StartStopManagedInstanceSchedulesClient.java +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.StartStopManagedInstanceScheduleInner; -import com.azure.resourcemanager.sql.models.StartStopScheduleName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in StartStopManagedInstanceSchedulesClient. - */ -public interface StartStopManagedInstanceSchedulesClient { - /** - * Gets the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 instance's Start/Stop schedule along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, StartStopScheduleName startStopScheduleName); - - /** - * Gets the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 instance's Start/Stop schedule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String managedInstanceName, - StartStopScheduleName startStopScheduleName); - - /** - * Gets the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @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 instance's Start/Stop schedule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, - String managedInstanceName, StartStopScheduleName startStopScheduleName, Context context); - - /** - * Gets the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 instance's Start/Stop schedule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - StartStopManagedInstanceScheduleInner get(String resourceGroupName, String managedInstanceName, - StartStopScheduleName startStopScheduleName); - - /** - * Creates or updates the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @param parameters The requested managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed instance's Start/Stop schedule along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, StartStopScheduleName startStopScheduleName, - StartStopManagedInstanceScheduleInner parameters); - - /** - * Creates or updates the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @param parameters The requested managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed instance's Start/Stop schedule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, - String managedInstanceName, StartStopScheduleName startStopScheduleName, - StartStopManagedInstanceScheduleInner parameters); - - /** - * Creates or updates the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @param parameters The requested managed instance Start/Stop schedule. - * @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 managed instance's Start/Stop schedule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, - String managedInstanceName, StartStopScheduleName startStopScheduleName, - StartStopManagedInstanceScheduleInner parameters, Context context); - - /** - * Creates or updates the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @param parameters The requested managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed instance's Start/Stop schedule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - StartStopManagedInstanceScheduleInner createOrUpdate(String resourceGroupName, String managedInstanceName, - StartStopScheduleName startStopScheduleName, StartStopManagedInstanceScheduleInner parameters); - - /** - * Deletes the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managedInstanceName, - StartStopScheduleName startStopScheduleName); - - /** - * Deletes the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 managedInstanceName, - StartStopScheduleName startStopScheduleName); - - /** - * Deletes the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String managedInstanceName, - StartStopScheduleName startStopScheduleName, Context context); - - /** - * Deletes the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 managedInstanceName, StartStopScheduleName startStopScheduleName); - - /** - * Lists the managed instance's Start/Stop schedules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 StartStopManagedInstanceSchedule list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName); - - /** - * Lists the managed instance's Start/Stop schedules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 StartStopManagedInstanceSchedule list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName); - - /** - * Lists the managed instance's Start/Stop schedules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 response of a StartStopManagedInstanceSchedule list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SubscriptionUsagesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SubscriptionUsagesClient.java index 9a102a2633f8..68c682c08c53 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SubscriptionUsagesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SubscriptionUsagesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,44 +18,41 @@ */ public interface SubscriptionUsagesClient { /** - * Gets a subscription usage metric. + * Gets all subscription usage metrics in a given location. * * @param locationName The name of the region where the resource is located. - * @param usageName Name of usage metric to return. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a subscription usage metric along with {@link Response} on successful completion of {@link Mono}. + * @return all subscription usage metrics in a given location as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String locationName, String usageName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByLocationAsync(String locationName); /** - * Gets a subscription usage metric. + * Gets all subscription usage metrics in a given location. * * @param locationName The name of the region where the resource is located. - * @param usageName Name of usage metric to return. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a subscription usage metric on successful completion of {@link Mono}. + * @return all subscription usage metrics in a given location as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String locationName, String usageName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String locationName); /** - * Gets a subscription usage metric. + * Gets all subscription usage metrics in a given location. * * @param locationName The name of the region where the resource is located. - * @param usageName Name of usage metric to return. * @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 subscription usage metric along with {@link Response}. + * @return all subscription usage metrics in a given location as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String locationName, String usageName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String locationName, Context context); /** * Gets a subscription usage metric. @@ -65,45 +62,48 @@ public interface SubscriptionUsagesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a subscription usage metric. + * @return a subscription usage metric along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SubscriptionUsageInner get(String locationName, String usageName); + Mono> getWithResponseAsync(String locationName, String usageName); /** - * Gets all subscription usage metrics in a given location. + * Gets a subscription usage metric. * * @param locationName The name of the region where the resource is located. + * @param usageName Name of usage metric to return. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 subscription usage metrics in a given location as paginated response with {@link PagedFlux}. + * @return a subscription usage metric on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByLocationAsync(String locationName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String locationName, String usageName); /** - * Gets all subscription usage metrics in a given location. + * Gets a subscription usage metric. * * @param locationName The name of the region where the resource is located. + * @param usageName Name of usage metric to return. + * @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 all subscription usage metrics in a given location as paginated response with {@link PagedIterable}. + * @return a subscription usage metric along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String locationName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String locationName, String usageName, Context context); /** - * Gets all subscription usage metrics in a given location. + * Gets a subscription usage metric. * * @param locationName The name of the region where the resource is located. - * @param context The context to associate with this operation. + * @param usageName Name of usage metric to return. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 subscription usage metrics in a given location as paginated response with {@link PagedIterable}. + * @return a subscription usage metric. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String locationName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + SubscriptionUsageInner get(String locationName, String usageName); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SynapseLinkWorkspacesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SynapseLinkWorkspacesClient.java deleted file mode 100644 index 94c3ae157689..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SynapseLinkWorkspacesClient.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.SynapseLinkWorkspaceInner; - -/** - * An instance of this class provides access to all the operations defined in SynapseLinkWorkspacesClient. - */ -public interface SynapseLinkWorkspacesClient { - /** - * Gets all synapselink workspaces for a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 synapselink workspaces for a database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets all synapselink workspaces for a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 synapselink workspaces for a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets all synapselink workspaces for a 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 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 all synapselink workspaces for a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context); -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncAgentsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncAgentsClient.java index 30560e048fd9..202451f5eea4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncAgentsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncAgentsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -24,11 +24,55 @@ * An instance of this class provides access to all the operations defined in SyncAgentsClient. */ public interface SyncAgentsClient { + /** + * Lists sync agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 sync agents as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Lists sync agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 sync agents as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Lists sync agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @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 sync agents as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + /** * Gets a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -42,8 +86,9 @@ Mono> getWithResponseAsync(String resourceGroupName, St /** * Gets a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -56,8 +101,9 @@ Mono> getWithResponseAsync(String resourceGroupName, St /** * Gets a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,8 +118,9 @@ Response getWithResponse(String resourceGroupName, String server /** * Gets a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -86,8 +133,9 @@ Response getWithResponse(String resourceGroupName, String server /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -102,8 +150,9 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -118,8 +167,9 @@ PollerFlux, SyncAgentInner> beginCreateOrUpdateAsync( /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,8 +184,9 @@ SyncPoller, SyncAgentInner> beginCreateOrUpdate(Strin /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @param context The context to associate with this operation. @@ -151,8 +202,9 @@ SyncPoller, SyncAgentInner> beginCreateOrUpdate(Strin /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -167,8 +219,9 @@ Mono createOrUpdateAsync(String resourceGroupName, String server /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -183,8 +236,9 @@ SyncAgentInner createOrUpdate(String resourceGroupName, String serverName, Strin /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @param context The context to associate with this operation. @@ -200,8 +254,9 @@ SyncAgentInner createOrUpdate(String resourceGroupName, String serverName, Strin /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -215,8 +270,9 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -230,8 +286,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -244,8 +301,9 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -260,8 +318,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -274,8 +333,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -287,8 +347,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -298,51 +359,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String syncAgentName, Context context); - /** - * Lists sync agents 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 the response of a SyncAgent list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Lists sync agents 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 the response of a SyncAgent list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Lists sync agents in 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 the response of a SyncAgent list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); - /** * Generates a sync agent key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -357,8 +379,9 @@ Mono> generateKeyWithResponseAsync(String /** * Generates a sync agent key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -372,8 +395,9 @@ Mono generateKeyAsync(String resourceGroupName, Str /** * Generates a sync agent key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -388,8 +412,9 @@ Response generateKeyWithResponse(String resourceGro /** * Generates a sync agent key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -402,13 +427,14 @@ Response generateKeyWithResponse(String resourceGro /** * Lists databases linked to a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 SyncAgentLinkedDatabase list operation as paginated response with {@link PagedFlux}. + * @return a list of sync agent linked databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listLinkedDatabasesAsync(String resourceGroupName, String serverName, @@ -417,14 +443,14 @@ PagedFlux listLinkedDatabasesAsync(String resource /** * Lists databases linked to a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 SyncAgentLinkedDatabase list operation as paginated response with - * {@link PagedIterable}. + * @return a list of sync agent linked databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listLinkedDatabases(String resourceGroupName, String serverName, @@ -433,15 +459,15 @@ PagedIterable listLinkedDatabases(String resourceG /** * Lists databases linked to a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @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 response of a SyncAgentLinkedDatabase list operation as paginated response with - * {@link PagedIterable}. + * @return a list of sync agent linked databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listLinkedDatabases(String resourceGroupName, String serverName, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncGroupsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncGroupsClient.java index fda8bafb1d35..64fd5905de03 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncGroupsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncGroupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -26,12 +26,97 @@ * An instance of this class provides access to all the operations defined in SyncGroupsClient. */ public interface SyncGroupsClient { + /** + * Gets a collection of sync database ids. + * + * @param locationName The name of the region where the resource is located. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of sync database ids as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listSyncDatabaseIdsAsync(String locationName); + + /** + * Gets a collection of sync database ids. + * + * @param locationName The name of the region where the resource is located. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of sync database ids as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSyncDatabaseIds(String locationName); + + /** + * Gets a collection of sync database ids. + * + * @param locationName The name of the region where the resource is located. + * @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 collection of sync database ids as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSyncDatabaseIds(String locationName, Context context); + + /** + * Lists sync groups under a hub database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 sync groups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName); + + /** + * Lists sync groups under a hub database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 sync groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName); + + /** + * Lists sync groups under a hub database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @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 sync groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, + Context context); + /** * Gets a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -45,9 +130,10 @@ Mono> getWithResponseAsync(String resourceGroupName, St /** * Gets a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -61,9 +147,10 @@ Mono getAsync(String resourceGroupName, String serverName, Strin /** * Gets a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -78,9 +165,10 @@ Response getWithResponse(String resourceGroupName, String server /** * Gets a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -93,9 +181,10 @@ Response getWithResponse(String resourceGroupName, String server /** * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -110,9 +199,10 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -127,9 +217,10 @@ PollerFlux, SyncGroupInner> beginCreateOrUpdateAsync( /** * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -144,9 +235,10 @@ SyncPoller, SyncGroupInner> beginCreateOrUpdate(Strin /** * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @param context The context to associate with this operation. @@ -162,9 +254,10 @@ SyncPoller, SyncGroupInner> beginCreateOrUpdate(Strin /** * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -179,9 +272,10 @@ Mono createOrUpdateAsync(String resourceGroupName, String server /** * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -196,9 +290,10 @@ SyncGroupInner createOrUpdate(String resourceGroupName, String serverName, Strin /** * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @param context The context to associate with this operation. @@ -212,286 +307,257 @@ SyncGroupInner createOrUpdate(String resourceGroupName, String serverName, Strin String syncGroupName, SyncGroupInner parameters, Context context); /** - * Updates a sync group. + * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource 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 an Azure SQL Database sync group along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, SyncGroupInner parameters); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName); /** - * Updates a sync group. + * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource 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 the {@link PollerFlux} for polling of an Azure SQL Database sync group. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, SyncGroupInner> beginUpdateAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, SyncGroupInner parameters); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName); /** - * Updates a sync group. + * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource 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 the {@link SyncPoller} for polling of an Azure SQL Database sync group. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SyncGroupInner> beginUpdate(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, SyncGroupInner parameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, + String syncGroupName); /** - * Updates a sync group. + * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource 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 the {@link SyncPoller} for polling of an Azure SQL Database sync group. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SyncGroupInner> beginUpdate(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, SyncGroupInner parameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, Context context); /** - * Updates a sync group. + * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource 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 an Azure SQL Database sync group on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, SyncGroupInner parameters); + Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName); /** - * Updates a sync group. + * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource 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 an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncGroupInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, - SyncGroupInner parameters); + void delete(String resourceGroupName, String serverName, String databaseName, String syncGroupName); /** - * Updates a sync group. + * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource 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 an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncGroupInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, - SyncGroupInner parameters, Context context); + void delete(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + Context context); /** - * Deletes a sync group. + * Updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 the {@link Response} on successful completion of {@link Mono}. + * @return an Azure SQL Database sync group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName); + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, SyncGroupInner parameters); /** - * Deletes a sync group. + * Updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName); + PollerFlux, SyncGroupInner> beginUpdateAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, SyncGroupInner parameters); /** - * Deletes a sync group. + * Updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, - String syncGroupName); + SyncPoller, SyncGroupInner> beginUpdate(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, SyncGroupInner parameters); /** - * Deletes a sync group. + * Updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, Context context); + SyncPoller, SyncGroupInner> beginUpdate(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, SyncGroupInner parameters, Context context); /** - * Deletes a sync group. + * Updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 {@link Mono} that completes when a successful response is received. + * @return an Azure SQL Database sync group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName); + Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, SyncGroupInner parameters); /** - * Deletes a sync group. + * Updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String serverName, String databaseName, String syncGroupName); + SyncGroupInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + SyncGroupInner parameters); /** - * Deletes a sync group. + * Updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String serverName, String databaseName, String syncGroupName, - Context context); - - /** - * Lists sync groups under a hub 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 SyncGroup list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName); - - /** - * Lists sync groups under a hub 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 SyncGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName); - - /** - * Lists sync groups under a hub 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 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 response of a SyncGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, - Context context); + SyncGroupInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + SyncGroupInner parameters, Context context); /** * Cancels a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -505,9 +571,10 @@ Mono> cancelSyncWithResponseAsync(String resourceGroupName, Strin /** * Cancels a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -520,9 +587,10 @@ Mono> cancelSyncWithResponseAsync(String resourceGroupName, Strin /** * Cancels a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -537,9 +605,10 @@ Response cancelSyncWithResponse(String resourceGroupName, String serverNam /** * Cancels a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -551,9 +620,10 @@ Response cancelSyncWithResponse(String resourceGroupName, String serverNam /** * Gets a collection of hub database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -567,9 +637,10 @@ PagedFlux listHubSchemasAsync(String resourceGrou /** * Gets a collection of hub database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -583,9 +654,10 @@ PagedIterable listHubSchemas(String resourceGroup /** * Gets a collection of hub database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -600,9 +672,10 @@ PagedIterable listHubSchemas(String resourceGroup /** * Gets a collection of sync group logs. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param startTime Get logs generated after this time. * @param endTime Get logs generated before this time. @@ -621,9 +694,10 @@ PagedFlux listLogsAsync(String resourceGroupName, S /** * Gets a collection of sync group logs. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param startTime Get logs generated after this time. * @param endTime Get logs generated before this time. @@ -640,9 +714,10 @@ PagedFlux listLogsAsync(String resourceGroupName, S /** * Gets a collection of sync group logs. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param startTime Get logs generated after this time. * @param endTime Get logs generated before this time. @@ -659,9 +734,10 @@ PagedIterable listLogs(String resourceGroupName, St /** * Gets a collection of sync group logs. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param startTime Get logs generated after this time. * @param endTime Get logs generated before this time. @@ -681,9 +757,10 @@ PagedIterable listLogs(String resourceGroupName, St /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -697,9 +774,10 @@ Mono>> refreshHubSchemaWithResponseAsync(String resour /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -713,9 +791,10 @@ PollerFlux, Void> beginRefreshHubSchemaAsync(String resourceGro /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -729,9 +808,10 @@ SyncPoller, Void> beginRefreshHubSchema(String resourceGroupNam /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -746,9 +826,10 @@ SyncPoller, Void> beginRefreshHubSchema(String resourceGroupNam /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -762,9 +843,10 @@ Mono refreshHubSchemaAsync(String resourceGroupName, String serverName, St /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -776,9 +858,10 @@ Mono refreshHubSchemaAsync(String resourceGroupName, String serverName, St /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -792,9 +875,10 @@ void refreshHubSchema(String resourceGroupName, String serverName, String databa /** * Triggers a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -808,9 +892,10 @@ Mono> triggerSyncWithResponseAsync(String resourceGroupName, Stri /** * Triggers a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -823,9 +908,10 @@ Mono> triggerSyncWithResponseAsync(String resourceGroupName, Stri /** * Triggers a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -840,9 +926,10 @@ Response triggerSyncWithResponse(String resourceGroupName, String serverNa /** * Triggers a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -850,41 +937,4 @@ Response triggerSyncWithResponse(String resourceGroupName, String serverNa */ @ServiceMethod(returns = ReturnType.SINGLE) void triggerSync(String resourceGroupName, String serverName, String databaseName, String syncGroupName); - - /** - * Gets a collection of sync database ids. - * - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of sync database ids as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listSyncDatabaseIdsAsync(String locationName); - - /** - * Gets a collection of sync database ids. - * - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of sync database ids as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSyncDatabaseIds(String locationName); - - /** - * Gets a collection of sync database ids. - * - * @param locationName The name of the region where the resource is located. - * @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 collection of sync database ids as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSyncDatabaseIds(String locationName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncMembersClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncMembersClient.java index d78fc34f5f3d..b577f8b4300d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncMembersClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/SyncMembersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -24,12 +24,65 @@ */ public interface SyncMembersClient { /** - * Gets a sync member. + * Lists sync members in the given sync group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Azure SQL Database sync members as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listBySyncGroupAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName); + + /** + * Lists sync members in the given sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Azure SQL Database sync members as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySyncGroup(String resourceGroupName, String serverName, String databaseName, + String syncGroupName); + + /** + * Lists sync members in the given sync group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @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 Azure SQL Database sync members as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySyncGroup(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, Context context); + + /** + * Gets a sync member. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -43,10 +96,11 @@ Mono> getWithResponseAsync(String resourceGroupName, S /** * Gets a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -60,10 +114,11 @@ Mono getAsync(String resourceGroupName, String serverName, Stri /** * Gets a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -78,10 +133,11 @@ Response getWithResponse(String resourceGroupName, String serve /** * Gets a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -95,10 +151,11 @@ SyncMemberInner get(String resourceGroupName, String serverName, String database /** * Creates or updates a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -113,10 +170,11 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -132,10 +190,11 @@ PollerFlux, SyncMemberInner> beginCreateOrUpdateAsyn /** * Creates or updates a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -151,10 +210,11 @@ SyncPoller, SyncMemberInner> beginCreateOrUpdate(Str /** * Creates or updates a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @param context The context to associate with this operation. @@ -171,10 +231,11 @@ SyncPoller, SyncMemberInner> beginCreateOrUpdate(Str /** * Creates or updates a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -189,10 +250,11 @@ Mono createOrUpdateAsync(String resourceGroupName, String serve /** * Creates or updates a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -207,10 +269,11 @@ SyncMemberInner createOrUpdate(String resourceGroupName, String serverName, Stri /** * Creates or updates a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @param context The context to associate with this operation. @@ -224,309 +287,275 @@ SyncMemberInner createOrUpdate(String resourceGroupName, String serverName, Stri String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context); /** - * Updates an existing sync member. + * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 an Azure SQL Database sync member along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters); + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName); /** - * Updates an existing sync member. + * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 the {@link PollerFlux} for polling of an Azure SQL Database sync member. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, SyncMemberInner> beginUpdateAsync(String resourceGroupName, - String serverName, String databaseName, String syncGroupName, String syncMemberName, - SyncMemberInner parameters); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName); /** - * Updates an existing sync member. + * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 the {@link SyncPoller} for polling of an Azure SQL Database sync member. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SyncMemberInner> beginUpdate(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName); /** - * Updates an existing sync member. + * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 the {@link SyncPoller} for polling of an Azure SQL Database sync member. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SyncMemberInner> beginUpdate(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, Context context); /** - * Updates an existing sync member. + * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 an Azure SQL Database sync member on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, String syncMemberName, SyncMemberInner parameters); + Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName); /** - * Updates an existing sync member. + * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncMemberInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, - String syncMemberName, SyncMemberInner parameters); + void delete(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName); /** - * Updates an existing sync member. + * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - SyncMemberInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, - String syncMemberName, SyncMemberInner parameters, Context context); + void delete(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName, Context context); /** - * Deletes a sync member. + * Updates an existing sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 the {@link Response} on successful completion of {@link Mono}. + * @return an Azure SQL Database sync member along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, String syncMemberName); + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters); /** - * Deletes a sync member. + * Updates an existing sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, String syncMemberName); + PollerFlux, SyncMemberInner> beginUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, + SyncMemberInner parameters); /** - * Deletes a sync member. + * Updates an existing sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, String syncMemberName); + SyncPoller, SyncMemberInner> beginUpdate(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters); /** - * Deletes a sync member. + * Updates an existing sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, String syncMemberName, Context context); + SyncPoller, SyncMemberInner> beginUpdate(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context); /** - * Deletes a sync member. + * Updates an existing sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 {@link Mono} that completes when a successful response is received. + * @return an Azure SQL Database sync member on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, - String syncMemberName); + Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters); /** - * Deletes a sync member. + * Updates an existing sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String serverName, String databaseName, String syncGroupName, - String syncMemberName); + SyncMemberInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName, SyncMemberInner parameters); /** - * Deletes a sync member. + * Updates an existing sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String serverName, String databaseName, String syncGroupName, - String syncMemberName, Context context); - - /** - * Lists sync members in the given sync group. - * - * @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 syncGroupName The name of the sync group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 SyncMember list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listBySyncGroupAsync(String resourceGroupName, String serverName, String databaseName, - String syncGroupName); - - /** - * Lists sync members in the given sync group. - * - * @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 syncGroupName The name of the sync group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 SyncMember list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySyncGroup(String resourceGroupName, String serverName, String databaseName, - String syncGroupName); - - /** - * Lists sync members in the given sync group. - * - * @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 syncGroupName The name of the sync group. - * @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 response of a SyncMember list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySyncGroup(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, Context context); + SyncMemberInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName, SyncMemberInner parameters, Context context); /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -540,10 +569,11 @@ Mono>> refreshMemberSchemaWithResponseAsync(String res /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -557,10 +587,11 @@ PollerFlux, Void> beginRefreshMemberSchemaAsync(String resource /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -574,10 +605,11 @@ SyncPoller, Void> beginRefreshMemberSchema(String resourceGroup /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -592,10 +624,11 @@ SyncPoller, Void> beginRefreshMemberSchema(String resourceGroup /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -609,10 +642,11 @@ Mono refreshMemberSchemaAsync(String resourceGroupName, String serverName, /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -625,10 +659,11 @@ void refreshMemberSchema(String resourceGroupName, String serverName, String dat /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -642,10 +677,11 @@ void refreshMemberSchema(String resourceGroupName, String serverName, String dat /** * Gets a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -659,10 +695,11 @@ PagedFlux listMemberSchemasAsync(String resourceG /** * Gets a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -676,10 +713,11 @@ PagedIterable listMemberSchemas(String resourceGr /** * Gets a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TdeCertificatesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TdeCertificatesClient.java index 01cad4e96348..f3ac5f40ac5d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TdeCertificatesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TdeCertificatesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,7 +23,8 @@ public interface TdeCertificatesClient { /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,7 +39,8 @@ Mono>> createWithResponseAsync(String resourceGroupNam /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -53,7 +55,8 @@ PollerFlux, Void> beginCreateAsync(String resourceGroupName, St /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -68,7 +71,8 @@ SyncPoller, Void> beginCreate(String resourceGroupName, String /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -84,7 +88,8 @@ SyncPoller, Void> beginCreate(String resourceGroupName, String /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -98,7 +103,8 @@ SyncPoller, Void> beginCreate(String resourceGroupName, String /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -111,7 +117,8 @@ SyncPoller, Void> beginCreate(String resourceGroupName, String /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TimeZonesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TimeZonesClient.java index 1f72ebc2d785..17e73c8740bc 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TimeZonesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TimeZonesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,92 +18,92 @@ */ public interface TimeZonesClient { /** - * Gets a managed instance time zone. + * Gets a list of managed instance time zones by location. * - * @param locationName The location of the database. - * @param timeZoneId The time zone ID. + * @param locationName The locationName 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 managed instance time zone along with {@link Response} on successful completion of {@link Mono}. + * @return a list of managed instance time zones by location as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String locationName, String timeZoneId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByLocationAsync(String locationName); /** - * Gets a managed instance time zone. + * Gets a list of managed instance time zones by location. * - * @param locationName The location of the database. - * @param timeZoneId The time zone ID. + * @param locationName The locationName 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 managed instance time zone on successful completion of {@link Mono}. + * @return a list of managed instance time zones by location as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String locationName, String timeZoneId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String locationName); /** - * Gets a managed instance time zone. + * Gets a list of managed instance time zones by location. * - * @param locationName The location of the database. - * @param timeZoneId The time zone ID. + * @param locationName The locationName 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 managed instance time zone along with {@link Response}. + * @return a list of managed instance time zones by location as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String locationName, String timeZoneId, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String locationName, Context context); /** * Gets a managed instance time zone. * - * @param locationName The location of the database. - * @param timeZoneId The time zone ID. + * @param locationName The locationName parameter. + * @param timeZoneId The timeZoneId 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 managed instance time zone. + * @return a managed instance time zone along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - TimeZoneInner get(String locationName, String timeZoneId); + Mono> getWithResponseAsync(String locationName, String timeZoneId); /** - * Gets a list of managed instance time zones by location. + * Gets a managed instance time zone. * - * @param locationName The location of the database. + * @param locationName The locationName parameter. + * @param timeZoneId The timeZoneId 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 list of managed instance time zones by location as paginated response with {@link PagedFlux}. + * @return a managed instance time zone on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByLocationAsync(String locationName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String locationName, String timeZoneId); /** - * Gets a list of managed instance time zones by location. + * Gets a managed instance time zone. * - * @param locationName The location of the database. + * @param locationName The locationName parameter. + * @param timeZoneId The timeZoneId 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 list of managed instance time zones by location as paginated response with {@link PagedIterable}. + * @return a managed instance time zone along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String locationName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String locationName, String timeZoneId, Context context); /** - * Gets a list of managed instance time zones by location. + * Gets a managed instance time zone. * - * @param locationName The location of the database. - * @param context The context to associate with this operation. + * @param locationName The locationName parameter. + * @param timeZoneId The timeZoneId 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 list of managed instance time zones by location as paginated response with {@link PagedIterable}. + * @return a managed instance time zone. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String locationName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + TimeZoneInner get(String locationName, String timeZoneId); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionsClient.java index 98072715d144..c22052a388b1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -23,12 +23,65 @@ * An instance of this class provides access to all the operations defined in TransparentDataEncryptionsClient. */ public interface TransparentDataEncryptionsClient { + /** + * Gets a list of the logical database's transparent data encryption. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 logical database's transparent data encryption as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName); + + /** + * Gets a list of the logical database's transparent data encryption. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 logical database's transparent data encryption as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName); + + /** + * Gets a list of the logical database's transparent data encryption. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. + * @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 the logical database's transparent data encryption as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, Context context); + /** * Gets a logical database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -43,9 +96,10 @@ Mono> getWithResponseAsy /** * Gets a logical database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -59,9 +113,10 @@ Mono getAsync(String resourceGrou /** * Gets a logical database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -76,9 +131,10 @@ Response getWithResponse(String r /** * Gets a logical database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -92,16 +148,17 @@ LogicalDatabaseTransparentDataEncryptionInner get(String resourceGroupName, Stri /** * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state along with {@link Response} on successful - * completion of {@link Mono}. + * @return a logical database transparent data encryption state along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, @@ -111,15 +168,16 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 logical database transparent data encryption scan state. + * @return the {@link PollerFlux} for polling of a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, LogicalDatabaseTransparentDataEncryptionInner> @@ -129,15 +187,16 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 logical database transparent data encryption scan state. + * @return the {@link SyncPoller} for polling of a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LogicalDatabaseTransparentDataEncryptionInner> @@ -147,16 +206,17 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. * @param parameters The database transparent data encryption. * @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 logical database transparent data encryption scan state. + * @return the {@link SyncPoller} for polling of a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LogicalDatabaseTransparentDataEncryptionInner> @@ -167,15 +227,16 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state on successful completion of {@link Mono}. + * @return a logical database transparent data encryption state on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createOrUpdateAsync(String resourceGroupName, String serverName, @@ -185,15 +246,16 @@ Mono createOrUpdateAsync(String r /** * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state. + * @return a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.SINGLE) LogicalDatabaseTransparentDataEncryptionInner createOrUpdate(String resourceGroupName, String serverName, @@ -203,304 +265,20 @@ LogicalDatabaseTransparentDataEncryptionInner createOrUpdate(String resourceGrou /** * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. * @param parameters The database transparent data encryption. * @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 logical database transparent data encryption scan state. + * @return a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.SINGLE) LogicalDatabaseTransparentDataEncryptionInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters, Context context); - - /** - * Gets a list of the logical database's transparent data encryption. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 logical database's transparent data encryption as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, - String serverName, String databaseName); - - /** - * Gets a list of the logical database's transparent data encryption. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 logical database's transparent data encryption as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String serverName, String databaseName); - - /** - * Gets a list of the logical database's transparent data encryption. - * - * @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 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 the logical database's transparent data encryption as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, - String serverName, String databaseName, Context context); - - /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> resumeWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName); - - /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, LogicalDatabaseTransparentDataEncryptionInner> - beginResumeAsync(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName); - - /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LogicalDatabaseTransparentDataEncryptionInner> - beginResume(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName); - - /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LogicalDatabaseTransparentDataEncryptionInner> - beginResume(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName, Context context); - - /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono resumeAsync(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName); - - /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LogicalDatabaseTransparentDataEncryptionInner resume(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName); - - /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LogicalDatabaseTransparentDataEncryptionInner resume(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName, Context context); - - /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> suspendWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName); - - /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, LogicalDatabaseTransparentDataEncryptionInner> - beginSuspendAsync(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName); - - /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LogicalDatabaseTransparentDataEncryptionInner> - beginSuspend(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName); - - /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LogicalDatabaseTransparentDataEncryptionInner> - beginSuspend(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName, Context context); - - /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono suspendAsync(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName); - - /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LogicalDatabaseTransparentDataEncryptionInner suspend(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName); - - /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LogicalDatabaseTransparentDataEncryptionInner suspend(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/UsagesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/UsagesClient.java index 6fbf404b5500..49cf941cb14f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/UsagesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/UsagesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -18,7 +18,8 @@ public interface UsagesClient { /** * Gets all instance pool usage metrics. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param expandChildren Optional request parameter to include managed instance usages within the instance pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -33,7 +34,8 @@ PagedFlux listByInstancePoolAsync(String resourceGroupName, String i /** * Gets all instance pool usage metrics. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -46,7 +48,8 @@ PagedFlux listByInstancePoolAsync(String resourceGroupName, String i /** * Gets all instance pool usage metrics. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -59,7 +62,8 @@ PagedFlux listByInstancePoolAsync(String resourceGroupName, String i /** * Gets all instance pool usage metrics. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param expandChildren Optional request parameter to include managed instance usages within the instance pool. * @param context The context to associate with this operation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualClustersClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualClustersClient.java index 403ee703bbc3..5fe6eadda67c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualClustersClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualClustersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -16,7 +16,7 @@ import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import com.azure.resourcemanager.sql.fluent.models.UpdateVirtualClusterDnsServersOperationInner; +import com.azure.resourcemanager.sql.fluent.models.UpdateManagedInstanceDnsServersOperationInner; import com.azure.resourcemanager.sql.fluent.models.VirtualClusterInner; import com.azure.resourcemanager.sql.models.VirtualClusterUpdate; import java.nio.ByteBuffer; @@ -29,277 +29,141 @@ public interface VirtualClustersClient extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { /** - * Gets a virtual cluster. + * Gets a list of all virtualClusters in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual 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 a virtual cluster along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all virtualClusters in the subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String virtualClusterName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); /** - * Gets a virtual cluster. + * Gets a list of all virtualClusters in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual 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 a virtual cluster on successful completion of {@link Mono}. + * @return a list of all virtualClusters in the subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String virtualClusterName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * Gets a virtual cluster. + * Gets a list of all virtualClusters in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. * @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 virtual cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String virtualClusterName, - Context context); - - /** - * Gets a virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual 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 a virtual cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VirtualClusterInner getByResourceGroup(String resourceGroupName, String virtualClusterName); - - /** - * Creates virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all virtualClusters in the subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String virtualClusterName, VirtualClusterInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); /** - * Creates virtual cluster. + * Gets a list of virtual clusters in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an Azure SQL virtual cluster. + * @return a list of virtual clusters in a resource group as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, VirtualClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, - String virtualClusterName, VirtualClusterInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); /** - * Creates virtual cluster. + * Gets a list of virtual clusters in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an Azure SQL virtual cluster. + * @return a list of virtual clusters in a resource group as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualClusterInner> beginCreateOrUpdate(String resourceGroupName, - String virtualClusterName, VirtualClusterInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Creates virtual cluster. + * Gets a list of virtual clusters in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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 an Azure SQL virtual cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualClusterInner> beginCreateOrUpdate(String resourceGroupName, - String virtualClusterName, VirtualClusterInner parameters, Context context); - - /** - * Creates virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster on successful completion of {@link Mono}. + * @return a list of virtual clusters in a resource group as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String virtualClusterName, - VirtualClusterInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Creates virtual cluster. + * Gets a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VirtualClusterInner createOrUpdate(String resourceGroupName, String virtualClusterName, - VirtualClusterInner parameters); - - /** - * Creates virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster. + * @return a virtual cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualClusterInner createOrUpdate(String resourceGroupName, String virtualClusterName, - VirtualClusterInner parameters, Context context); + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String virtualClusterName); /** - * Updates an existing virtual cluster. + * Gets a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster along with {@link Response} on successful completion of {@link Mono}. + * @return a virtual cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String virtualClusterName, - VirtualClusterUpdate parameters); - - /** - * Updates an existing virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 the {@link PollerFlux} for polling of an Azure SQL virtual cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, VirtualClusterInner> beginUpdateAsync(String resourceGroupName, - String virtualClusterName, VirtualClusterUpdate parameters); - - /** - * Updates an existing virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 the {@link SyncPoller} for polling of an Azure SQL virtual cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualClusterInner> beginUpdate(String resourceGroupName, - String virtualClusterName, VirtualClusterUpdate parameters); + Mono getByResourceGroupAsync(String resourceGroupName, String virtualClusterName); /** - * Updates an existing virtual cluster. + * Gets a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 the {@link SyncPoller} for polling of an Azure SQL virtual cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualClusterInner> beginUpdate(String resourceGroupName, - String virtualClusterName, VirtualClusterUpdate parameters, Context context); - - /** - * Updates an existing virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String virtualClusterName, - VirtualClusterUpdate parameters); - - /** - * Updates an existing virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster. + * @return a virtual cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualClusterInner update(String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters); + Response getByResourceGroupWithResponse(String resourceGroupName, String virtualClusterName, + Context context); /** - * Updates an existing virtual cluster. + * Gets a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster. + * @return a virtual cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualClusterInner update(String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters, - Context context); + VirtualClusterInner getByResourceGroup(String resourceGroupName, String virtualClusterName); /** * Deletes a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -312,7 +176,8 @@ VirtualClusterInner update(String resourceGroupName, String virtualClusterName, /** * Deletes a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -325,7 +190,8 @@ VirtualClusterInner update(String resourceGroupName, String virtualClusterName, /** * Deletes a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -338,7 +204,8 @@ VirtualClusterInner update(String resourceGroupName, String virtualClusterName, /** * Deletes a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -353,7 +220,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -366,7 +234,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -378,7 +247,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -389,170 +259,176 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String virtualClusterName, Context context); /** - * Gets a list of virtual clusters in a resource group. + * Updates a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 list of virtual clusters in a resource group as paginated response with {@link PagedFlux}. + * @return an Azure SQL virtual cluster along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String virtualClusterName, + VirtualClusterUpdate parameters); /** - * Gets a list of virtual clusters in a resource group. + * Updates a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 list of virtual clusters in a resource group as paginated response with {@link PagedIterable}. + * @return the {@link PollerFlux} for polling of an Azure SQL virtual cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, VirtualClusterInner> beginUpdateAsync(String resourceGroupName, + String virtualClusterName, VirtualClusterUpdate parameters); /** - * Gets a list of virtual clusters in a resource group. + * Updates a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 list of virtual clusters in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Gets a list of all virtualClusters in the 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. - * @return a list of all virtualClusters in the subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); - - /** - * Gets a list of all virtualClusters in the 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. - * @return a list of all virtualClusters in the subscription as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of an Azure SQL virtual cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VirtualClusterInner> beginUpdate(String resourceGroupName, + String virtualClusterName, VirtualClusterUpdate parameters); /** - * Gets a list of all virtualClusters in the subscription. + * Updates a virtual cluster. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 list of all virtualClusters in the subscription as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of an Azure SQL virtual cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VirtualClusterInner> beginUpdate(String resourceGroupName, + String virtualClusterName, VirtualClusterUpdate parameters, Context context); /** - * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. + * Updates a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 refresh DNS servers operation along with {@link Response} on successful completion of {@link Mono}. + * @return an Azure SQL virtual cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateDnsServersWithResponseAsync(String resourceGroupName, - String virtualClusterName); + Mono updateAsync(String resourceGroupName, String virtualClusterName, + VirtualClusterUpdate parameters); /** - * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. + * Updates a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 the {@link PollerFlux} for polling of a refresh DNS servers operation. + * @return an Azure SQL virtual cluster. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, UpdateVirtualClusterDnsServersOperationInner> - beginUpdateDnsServersAsync(String resourceGroupName, String virtualClusterName); + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualClusterInner update(String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters); /** - * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. + * Updates a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 the {@link SyncPoller} for polling of a refresh DNS servers operation. + * @return an Azure SQL virtual cluster. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, UpdateVirtualClusterDnsServersOperationInner> - beginUpdateDnsServers(String resourceGroupName, String virtualClusterName); + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualClusterInner update(String resourceGroupName, String virtualClusterName, VirtualClusterUpdate parameters, + Context context); /** * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. - * @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 refresh DNS servers operation. + * @return a recoverable managed database resource along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, UpdateVirtualClusterDnsServersOperationInner> - beginUpdateDnsServers(String resourceGroupName, String virtualClusterName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> + updateDnsServersWithResponseAsync(String resourceGroupName, String virtualClusterName); /** * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual 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 a refresh DNS servers operation on successful completion of {@link Mono}. + * @return a recoverable managed database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateDnsServersAsync(String resourceGroupName, + Mono updateDnsServersAsync(String resourceGroupName, String virtualClusterName); /** * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. + * @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 refresh DNS servers operation. + * @return a recoverable managed database resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - UpdateVirtualClusterDnsServersOperationInner updateDnsServers(String resourceGroupName, String virtualClusterName); + Response updateDnsServersWithResponse(String resourceGroupName, + String virtualClusterName, Context context); /** * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. - * @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 refresh DNS servers operation. + * @return a recoverable managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - UpdateVirtualClusterDnsServersOperationInner updateDnsServers(String resourceGroupName, String virtualClusterName, - Context context); + UpdateManagedInstanceDnsServersOperationInner updateDnsServers(String resourceGroupName, String virtualClusterName); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualNetworkRulesClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualNetworkRulesClient.java index 7ebfc5abfa33..23e5fcb99be4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualNetworkRulesClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/VirtualNetworkRulesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -22,10 +22,54 @@ * An instance of this class provides access to all the operations defined in VirtualNetworkRulesClient. */ public interface VirtualNetworkRulesClient { + /** + * Gets a list of virtual network rules in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 network rules in a server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Gets a list of virtual network rules in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 network rules in a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Gets a list of virtual network rules in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 virtual network rules in a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + /** * Gets a virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -40,7 +84,8 @@ Mono> getWithResponseAsync(String resourceGrou /** * Gets a virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -54,7 +99,8 @@ Mono> getWithResponseAsync(String resourceGrou /** * Gets a virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -70,7 +116,8 @@ Response getWithResponse(String resourceGroupName, Stri /** * Gets a virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -84,7 +131,8 @@ Response getWithResponse(String resourceGroupName, Stri /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -100,7 +148,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -116,7 +165,8 @@ PollerFlux, VirtualNetworkRuleInner> beginCr /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -132,7 +182,8 @@ SyncPoller, VirtualNetworkRuleInner> beginCr /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -150,7 +201,8 @@ SyncPoller, VirtualNetworkRuleInner> beginCr /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -166,7 +218,8 @@ Mono createOrUpdateAsync(String resourceGroupName, Stri /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -182,7 +235,8 @@ VirtualNetworkRuleInner createOrUpdate(String resourceGroupName, String serverNa /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -199,7 +253,8 @@ VirtualNetworkRuleInner createOrUpdate(String resourceGroupName, String serverNa /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -214,7 +269,8 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -229,7 +285,8 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -244,7 +301,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -260,7 +318,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -274,7 +333,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -287,7 +347,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -297,44 +358,4 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context); - - /** - * Gets a list of virtual network 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 virtual network rules in a server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Gets a list of virtual network 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 virtual network rules in a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Gets a list of virtual network rules in 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 virtual network rules 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/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadClassifiersClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadClassifiersClient.java index 4c6695e3fca8..315512f12251 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadClassifiersClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadClassifiersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -22,13 +22,66 @@ * An instance of this class provides access to all the operations defined in WorkloadClassifiersClient. */ public interface WorkloadClassifiersClient { + /** + * Gets the list of workload classifiers for a workload group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param workloadGroupName The name of the workload group from which to receive the classifiers from. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of workload classifiers for a workload group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByWorkloadGroupAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName); + + /** + * Gets the list of workload classifiers for a workload group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param workloadGroupName The name of the workload group from which to receive the classifiers from. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of workload classifiers for a workload group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadGroup(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName); + + /** + * Gets the list of workload classifiers for a workload group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param workloadGroupName The name of the workload group from which to receive the classifiers from. + * @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 list of workload classifiers for a workload group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadGroup(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, Context context); + /** * Gets a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. * @param workloadClassifierName The name of the workload classifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -42,10 +95,11 @@ Mono> getWithResponseAsync(String resourceGrou /** * Gets a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. * @param workloadClassifierName The name of the workload classifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -59,10 +113,11 @@ Mono getAsync(String resourceGroupName, String serverNa /** * Gets a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. * @param workloadClassifierName The name of the workload classifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,10 +132,11 @@ Response getWithResponse(String resourceGroupName, Stri /** * Gets a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. * @param workloadClassifierName The name of the workload classifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -94,11 +150,12 @@ WorkloadClassifierInner get(String resourceGroupName, String serverName, String /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -114,11 +171,12 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -133,11 +191,12 @@ PollerFlux, WorkloadClassifierInner> beginCr /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -152,11 +211,12 @@ SyncPoller, WorkloadClassifierInner> beginCr /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -172,11 +232,12 @@ SyncPoller, WorkloadClassifierInner> beginCr /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -190,11 +251,12 @@ Mono createOrUpdateAsync(String resourceGroupName, Stri /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -208,11 +270,12 @@ WorkloadClassifierInner createOrUpdate(String resourceGroupName, String serverNa /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -227,11 +290,12 @@ WorkloadClassifierInner createOrUpdate(String resourceGroupName, String serverNa /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -244,11 +308,12 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -261,11 +326,12 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -278,11 +344,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @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. @@ -296,11 +363,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -313,11 +381,12 @@ Mono deleteAsync(String resourceGroupName, String serverName, String datab /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -329,11 +398,12 @@ void delete(String resourceGroupName, String serverName, String databaseName, St /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @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. @@ -342,53 +412,4 @@ void delete(String resourceGroupName, String serverName, String databaseName, St @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String databaseName, String workloadGroupName, String workloadClassifierName, Context context); - - /** - * Gets the list of workload classifiers for a workload group. - * - * @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 workloadGroupName The name of the workload group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of workload classifiers for a workload group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByWorkloadGroupAsync(String resourceGroupName, String serverName, - String databaseName, String workloadGroupName); - - /** - * Gets the list of workload classifiers for a workload group. - * - * @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 workloadGroupName The name of the workload group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of workload classifiers for a workload group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkloadGroup(String resourceGroupName, String serverName, - String databaseName, String workloadGroupName); - - /** - * Gets the list of workload classifiers for a workload group. - * - * @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 workloadGroupName The name of the workload group. - * @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 list of workload classifiers for a workload group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkloadGroup(String resourceGroupName, String serverName, - String databaseName, String workloadGroupName, Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadGroupsClient.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadGroupsClient.java index 0fdad542b21f..a9280557be06 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadGroupsClient.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadGroupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent; @@ -22,10 +22,58 @@ * An instance of this class provides access to all the operations defined in WorkloadGroupsClient. */ public interface WorkloadGroupsClient { + /** + * Gets the list of workload groups. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 list of workload groups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName); + + /** + * Gets the list of workload groups. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 list of workload groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName); + + /** + * Gets the list of workload groups. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 list of workload groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, + Context context); + /** * Gets a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -41,7 +89,8 @@ Mono> getWithResponseAsync(String resourceGroupName /** * Gets a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -57,7 +106,8 @@ Mono getAsync(String resourceGroupName, String serverName, S /** * Gets a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -74,7 +124,8 @@ Response getWithResponse(String resourceGroupName, String se /** * Gets a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -89,7 +140,8 @@ Response getWithResponse(String resourceGroupName, String se /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -107,7 +159,8 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -124,7 +177,8 @@ PollerFlux, WorkloadGroupInner> beginCreateOrUpda /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -141,7 +195,8 @@ SyncPoller, WorkloadGroupInner> beginCreateOrUpda /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -160,7 +215,8 @@ SyncPoller, WorkloadGroupInner> beginCreateOrUpda /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -177,7 +233,8 @@ Mono createOrUpdateAsync(String resourceGroupName, String se /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -194,7 +251,8 @@ WorkloadGroupInner createOrUpdate(String resourceGroupName, String serverName, S /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -212,10 +270,11 @@ WorkloadGroupInner createOrUpdate(String resourceGroupName, String serverName, S /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -228,10 +287,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -244,10 +304,11 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -260,10 +321,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @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. @@ -277,10 +339,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -292,10 +355,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -306,10 +370,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @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. @@ -318,48 +383,4 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String databaseName, String workloadGroupName, Context context); - - /** - * Gets the list of workload groups. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of workload groups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName); - - /** - * Gets the list of workload groups. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of workload groups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName); - - /** - * Gets the list of workload groups. - * - * @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 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 list of workload groups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, - Context context); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdministratorProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdministratorProperties.java index 91c15eef7d2a..8427a8a29477 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdministratorProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdministratorProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -146,6 +146,11 @@ public Boolean azureADOnlyAuthentication() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (administratorType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property administratorType in model AdministratorProperties")); + } if (login() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property login in model AdministratorProperties")); @@ -164,10 +169,10 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("login", this.login); - jsonWriter.writeStringField("sid", Objects.toString(this.sid, null)); jsonWriter.writeStringField("administratorType", this.administratorType == null ? null : this.administratorType.toString()); + jsonWriter.writeStringField("login", this.login); + jsonWriter.writeStringField("sid", Objects.toString(this.sid, null)); jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); return jsonWriter.writeEndObject(); } @@ -188,14 +193,14 @@ public static AdministratorProperties fromJson(JsonReader jsonReader) throws IOE String fieldName = reader.getFieldName(); reader.nextToken(); - if ("login".equals(fieldName)) { + if ("administratorType".equals(fieldName)) { + deserializedAdministratorProperties.administratorType + = AdministratorType.fromString(reader.getString()); + } else if ("login".equals(fieldName)) { deserializedAdministratorProperties.login = reader.getString(); } else if ("sid".equals(fieldName)) { deserializedAdministratorProperties.sid = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("administratorType".equals(fieldName)) { - deserializedAdministratorProperties.administratorType - = AdministratorType.fromString(reader.getString()); } else if ("tenantId".equals(fieldName)) { deserializedAdministratorProperties.tenantId = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvancedThreatProtectionProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvancedThreatProtectionProperties.java index 19e58fb50ad0..10a45ec312e5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvancedThreatProtectionProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvancedThreatProtectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorInner.java index b1228f94ace2..c4eab8e296f6 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ */ @Fluent public final class AdvisorInner extends ProxyResource { - /* - * Resource properties. - */ - private AdvisorProperties innerProperties; - /* * Resource kind. */ @@ -38,9 +32,9 @@ public final class AdvisorInner extends ProxyResource { private String location; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private AdvisorProperties innerProperties; /* * The type of the resource. @@ -63,15 +57,6 @@ public final class AdvisorInner extends ProxyResource { public AdvisorInner() { } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private AdvisorProperties innerProperties() { - return this.innerProperties; - } - /** * Get the kind property: Resource kind. * @@ -91,12 +76,12 @@ public String location() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private AdvisorProperties innerProperties() { + return this.innerProperties; } /** @@ -249,14 +234,12 @@ public static AdvisorInner fromJson(JsonReader jsonReader) throws IOException { deserializedAdvisorInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedAdvisorInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedAdvisorInner.innerProperties = AdvisorProperties.fromJson(reader); } else if ("kind".equals(fieldName)) { deserializedAdvisorInner.kind = reader.getString(); } else if ("location".equals(fieldName)) { deserializedAdvisorInner.location = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedAdvisorInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedAdvisorInner.innerProperties = AdvisorProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorProperties.java index 9553cef86b89..a6646d54a6ef 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AutomaticTuningServerProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AutomaticTuningServerProperties.java index 3ec0e2b41e16..de81e412472c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AutomaticTuningServerProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AutomaticTuningServerProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AzureADOnlyAuthProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AzureADOnlyAuthProperties.java index 9bc864e97567..fa0c8cf14e71 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AzureADOnlyAuthProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/AzureADOnlyAuthProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyInner.java index 7cd5113495a2..19d6b673eaa6 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -23,11 +22,6 @@ public final class BackupShortTermRetentionPolicyInner extends ProxyResource { */ private BackupShortTermRetentionPolicyProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -58,15 +52,6 @@ private BackupShortTermRetentionPolicyProperties 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. * @@ -197,8 +182,6 @@ public static BackupShortTermRetentionPolicyInner fromJson(JsonReader jsonReader } else if ("properties".equals(fieldName)) { deserializedBackupShortTermRetentionPolicyInner.innerProperties = BackupShortTermRetentionPolicyProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedBackupShortTermRetentionPolicyInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyProperties.java index 8593af040642..8cb3a3557df7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -97,8 +97,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeNumberField("retentionDays", this.retentionDays); - jsonWriter.writeNumberField("diffBackupIntervalInHours", - this.diffBackupIntervalInHours == null ? null : this.diffBackupIntervalInHours.getValue()); + jsonWriter.writeStringField("diffBackupIntervalInHours", + this.diffBackupIntervalInHours == null ? null : this.diffBackupIntervalInHours.toString()); return jsonWriter.writeEndObject(); } @@ -123,7 +123,7 @@ public static BackupShortTermRetentionPolicyProperties fromJson(JsonReader jsonR = reader.getNullable(JsonReader::getInt); } else if ("diffBackupIntervalInHours".equals(fieldName)) { deserializedBackupShortTermRetentionPolicyProperties.diffBackupIntervalInHours - = DiffBackupIntervalInHours.fromValue(reader.getInt()); + = DiffBackupIntervalInHours.fromInt(reader.getInt()); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionPolicyProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BaseLongTermRetentionPolicyProperties.java similarity index 54% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionPolicyProperties.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BaseLongTermRetentionPolicyProperties.java index 4320d9698903..df740dddeb28 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionPolicyProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/BaseLongTermRetentionPolicyProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -9,20 +9,14 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.sql.models.BackupStorageAccessTier; import java.io.IOException; /** * Properties of a long term retention policy. */ @Fluent -public final class ManagedInstanceLongTermRetentionPolicyProperties - implements JsonSerializable { - /* - * The BackupStorageAccessTier for the LTR backups - */ - private BackupStorageAccessTier backupStorageAccessTier; - +public final class BaseLongTermRetentionPolicyProperties + implements JsonSerializable { /* * The weekly retention policy for an LTR backup in an ISO 8601 format. */ @@ -44,30 +38,9 @@ public final class ManagedInstanceLongTermRetentionPolicyProperties private Integer weekOfYear; /** - * Creates an instance of ManagedInstanceLongTermRetentionPolicyProperties class. - */ - public ManagedInstanceLongTermRetentionPolicyProperties() { - } - - /** - * Get the backupStorageAccessTier property: The BackupStorageAccessTier for the LTR backups. - * - * @return the backupStorageAccessTier value. + * Creates an instance of BaseLongTermRetentionPolicyProperties class. */ - public BackupStorageAccessTier backupStorageAccessTier() { - return this.backupStorageAccessTier; - } - - /** - * Set the backupStorageAccessTier property: The BackupStorageAccessTier for the LTR backups. - * - * @param backupStorageAccessTier the backupStorageAccessTier value to set. - * @return the ManagedInstanceLongTermRetentionPolicyProperties object itself. - */ - public ManagedInstanceLongTermRetentionPolicyProperties - withBackupStorageAccessTier(BackupStorageAccessTier backupStorageAccessTier) { - this.backupStorageAccessTier = backupStorageAccessTier; - return this; + public BaseLongTermRetentionPolicyProperties() { } /** @@ -83,9 +56,9 @@ public String weeklyRetention() { * Set the weeklyRetention property: The weekly retention policy for an LTR backup in an ISO 8601 format. * * @param weeklyRetention the weeklyRetention value to set. - * @return the ManagedInstanceLongTermRetentionPolicyProperties object itself. + * @return the BaseLongTermRetentionPolicyProperties object itself. */ - public ManagedInstanceLongTermRetentionPolicyProperties withWeeklyRetention(String weeklyRetention) { + public BaseLongTermRetentionPolicyProperties withWeeklyRetention(String weeklyRetention) { this.weeklyRetention = weeklyRetention; return this; } @@ -103,9 +76,9 @@ public String monthlyRetention() { * Set the monthlyRetention property: The monthly retention policy for an LTR backup in an ISO 8601 format. * * @param monthlyRetention the monthlyRetention value to set. - * @return the ManagedInstanceLongTermRetentionPolicyProperties object itself. + * @return the BaseLongTermRetentionPolicyProperties object itself. */ - public ManagedInstanceLongTermRetentionPolicyProperties withMonthlyRetention(String monthlyRetention) { + public BaseLongTermRetentionPolicyProperties withMonthlyRetention(String monthlyRetention) { this.monthlyRetention = monthlyRetention; return this; } @@ -123,9 +96,9 @@ public String yearlyRetention() { * Set the yearlyRetention property: The yearly retention policy for an LTR backup in an ISO 8601 format. * * @param yearlyRetention the yearlyRetention value to set. - * @return the ManagedInstanceLongTermRetentionPolicyProperties object itself. + * @return the BaseLongTermRetentionPolicyProperties object itself. */ - public ManagedInstanceLongTermRetentionPolicyProperties withYearlyRetention(String yearlyRetention) { + public BaseLongTermRetentionPolicyProperties withYearlyRetention(String yearlyRetention) { this.yearlyRetention = yearlyRetention; return this; } @@ -143,9 +116,9 @@ public Integer weekOfYear() { * Set the weekOfYear property: The week of year to take the yearly backup in an ISO 8601 format. * * @param weekOfYear the weekOfYear value to set. - * @return the ManagedInstanceLongTermRetentionPolicyProperties object itself. + * @return the BaseLongTermRetentionPolicyProperties object itself. */ - public ManagedInstanceLongTermRetentionPolicyProperties withWeekOfYear(Integer weekOfYear) { + public BaseLongTermRetentionPolicyProperties withWeekOfYear(Integer weekOfYear) { this.weekOfYear = weekOfYear; return this; } @@ -164,8 +137,6 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("backupStorageAccessTier", - this.backupStorageAccessTier == null ? null : this.backupStorageAccessTier.toString()); jsonWriter.writeStringField("weeklyRetention", this.weeklyRetention); jsonWriter.writeStringField("monthlyRetention", this.monthlyRetention); jsonWriter.writeStringField("yearlyRetention", this.yearlyRetention); @@ -174,39 +145,36 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ManagedInstanceLongTermRetentionPolicyProperties from the JsonReader. + * Reads an instance of BaseLongTermRetentionPolicyProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ManagedInstanceLongTermRetentionPolicyProperties 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 ManagedInstanceLongTermRetentionPolicyProperties. + * @return An instance of BaseLongTermRetentionPolicyProperties 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 BaseLongTermRetentionPolicyProperties. */ - public static ManagedInstanceLongTermRetentionPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + public static BaseLongTermRetentionPolicyProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ManagedInstanceLongTermRetentionPolicyProperties deserializedManagedInstanceLongTermRetentionPolicyProperties - = new ManagedInstanceLongTermRetentionPolicyProperties(); + BaseLongTermRetentionPolicyProperties deserializedBaseLongTermRetentionPolicyProperties + = new BaseLongTermRetentionPolicyProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("backupStorageAccessTier".equals(fieldName)) { - deserializedManagedInstanceLongTermRetentionPolicyProperties.backupStorageAccessTier - = BackupStorageAccessTier.fromString(reader.getString()); - } else if ("weeklyRetention".equals(fieldName)) { - deserializedManagedInstanceLongTermRetentionPolicyProperties.weeklyRetention = reader.getString(); + if ("weeklyRetention".equals(fieldName)) { + deserializedBaseLongTermRetentionPolicyProperties.weeklyRetention = reader.getString(); } else if ("monthlyRetention".equals(fieldName)) { - deserializedManagedInstanceLongTermRetentionPolicyProperties.monthlyRetention = reader.getString(); + deserializedBaseLongTermRetentionPolicyProperties.monthlyRetention = reader.getString(); } else if ("yearlyRetention".equals(fieldName)) { - deserializedManagedInstanceLongTermRetentionPolicyProperties.yearlyRetention = reader.getString(); + deserializedBaseLongTermRetentionPolicyProperties.yearlyRetention = reader.getString(); } else if ("weekOfYear".equals(fieldName)) { - deserializedManagedInstanceLongTermRetentionPolicyProperties.weekOfYear + deserializedBaseLongTermRetentionPolicyProperties.weekOfYear = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } } - return deserializedManagedInstanceLongTermRetentionPolicyProperties; + return deserializedBaseLongTermRetentionPolicyProperties; }); } } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/CheckNameAvailabilityResponseInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/CheckNameAvailabilityResponseInner.java index 6d85528982ad..42929332cdf2 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/CheckNameAvailabilityResponseInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/CheckNameAvailabilityResponseInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -40,7 +40,7 @@ public final class CheckNameAvailabilityResponseInner implements JsonSerializabl /** * Creates an instance of CheckNameAvailabilityResponseInner class. */ - private CheckNameAvailabilityResponseInner() { + public CheckNameAvailabilityResponseInner() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/CopyLongTermRetentionBackupParametersProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/CopyLongTermRetentionBackupParametersProperties.java index 89a41a6aa4d1..5cde960829a8 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/CopyLongTermRetentionBackupParametersProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/CopyLongTermRetentionBackupParametersProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyInner.java index d8e77b8a7617..7f72771b9b8f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -18,11 +17,6 @@ */ @Fluent public final class DataMaskingPolicyInner extends ProxyResource { - /* - * Resource properties. - */ - private DataMaskingPolicyProperties innerProperties; - /* * The location of the data masking policy. */ @@ -34,9 +28,9 @@ public final class DataMaskingPolicyInner extends ProxyResource { private String kind; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private DataMaskingPolicyProperties innerProperties; /* * The type of the resource. @@ -59,15 +53,6 @@ public final class DataMaskingPolicyInner extends ProxyResource { public DataMaskingPolicyInner() { } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private DataMaskingPolicyProperties innerProperties() { - return this.innerProperties; - } - /** * Get the location property: The location of the data masking policy. * @@ -87,12 +72,12 @@ public String kind() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private DataMaskingPolicyProperties innerProperties() { + return this.innerProperties; } /** @@ -237,14 +222,12 @@ public static DataMaskingPolicyInner fromJson(JsonReader jsonReader) throws IOEx deserializedDataMaskingPolicyInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedDataMaskingPolicyInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDataMaskingPolicyInner.innerProperties = DataMaskingPolicyProperties.fromJson(reader); } else if ("location".equals(fieldName)) { deserializedDataMaskingPolicyInner.location = reader.getString(); } else if ("kind".equals(fieldName)) { deserializedDataMaskingPolicyInner.kind = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedDataMaskingPolicyInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedDataMaskingPolicyInner.innerProperties = DataMaskingPolicyProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyProperties.java index def6fc754b0f..e07bd4d9372b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleInner.java index c50cf4bad597..cc1a02e612c4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -34,11 +33,6 @@ public final class DataMaskingRuleInner extends ProxyResource { */ private DataMaskingRuleProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -87,15 +81,6 @@ private DataMaskingRuleProperties 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. * @@ -453,8 +438,6 @@ public static DataMaskingRuleInner fromJson(JsonReader jsonReader) throws IOExce deserializedDataMaskingRuleInner.kind = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedDataMaskingRuleInner.innerProperties = DataMaskingRuleProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDataMaskingRuleInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleProperties.java index 0f5606a05ee7..c2cf38a3f21c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesInner.java index 977a859f952b..99953f927986 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ public final class DataWarehouseUserActivitiesInner extends ProxyResource { */ private DataWarehouseUserActivitiesProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -45,7 +39,7 @@ public final class DataWarehouseUserActivitiesInner extends ProxyResource { /** * Creates an instance of DataWarehouseUserActivitiesInner class. */ - private DataWarehouseUserActivitiesInner() { + public DataWarehouseUserActivitiesInner() { } /** @@ -57,15 +51,6 @@ private DataWarehouseUserActivitiesProperties 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. * @@ -152,8 +137,6 @@ public static DataWarehouseUserActivitiesInner fromJson(JsonReader jsonReader) t } else if ("properties".equals(fieldName)) { deserializedDataWarehouseUserActivitiesInner.innerProperties = DataWarehouseUserActivitiesProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDataWarehouseUserActivitiesInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesProperties.java index e695497ada9c..b2ea327117d3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -26,7 +26,7 @@ public final class DataWarehouseUserActivitiesProperties /** * Creates an instance of DataWarehouseUserActivitiesProperties class. */ - private DataWarehouseUserActivitiesProperties() { + public DataWarehouseUserActivitiesProperties() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAdvancedThreatProtectionInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAdvancedThreatProtectionInner.java index ab678fc18e6a..681a4c7f356d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAdvancedThreatProtectionInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAdvancedThreatProtectionInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -20,14 +20,14 @@ @Fluent public final class DatabaseAdvancedThreatProtectionInner extends ProxyResource { /* - * Resource properties. + * SystemData of AdvancedThreatProtectionResource. */ - private AdvancedThreatProtectionProperties innerProperties; + private SystemData systemData; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private AdvancedThreatProtectionProperties innerProperties; /* * The type of the resource. @@ -51,21 +51,21 @@ public DatabaseAdvancedThreatProtectionInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the systemData property: SystemData of AdvancedThreatProtectionResource. * - * @return the innerProperties value. + * @return the systemData value. */ - private AdvancedThreatProtectionProperties innerProperties() { - return this.innerProperties; + public SystemData systemData() { + return this.systemData; } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private AdvancedThreatProtectionProperties innerProperties() { + return this.innerProperties; } /** @@ -176,11 +176,11 @@ public static DatabaseAdvancedThreatProtectionInner fromJson(JsonReader jsonRead deserializedDatabaseAdvancedThreatProtectionInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedDatabaseAdvancedThreatProtectionInner.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedDatabaseAdvancedThreatProtectionInner.systemData = SystemData.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedDatabaseAdvancedThreatProtectionInner.innerProperties = AdvancedThreatProtectionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseAdvancedThreatProtectionInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningInner.java index 943a5228bd27..00985c2bc8d8 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -25,11 +24,6 @@ public final class DatabaseAutomaticTuningInner extends ProxyResource { */ private DatabaseAutomaticTuningProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -60,15 +54,6 @@ private DatabaseAutomaticTuningProperties 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. * @@ -200,8 +185,6 @@ public static DatabaseAutomaticTuningInner fromJson(JsonReader jsonReader) throw } else if ("properties".equals(fieldName)) { deserializedDatabaseAutomaticTuningInner.innerProperties = DatabaseAutomaticTuningProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseAutomaticTuningInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningProperties.java index 87817b0dc8c3..8e448b9e3c8a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyInner.java index 3affc560e7a4..59e7dd6eca64 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -20,20 +19,15 @@ */ @Fluent public final class DatabaseBlobAuditingPolicyInner extends ProxyResource { - /* - * Resource properties. - */ - private DatabaseBlobAuditingPolicyProperties innerProperties; - /* * Resource kind. */ private String kind; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private DatabaseBlobAuditingPolicyProperties innerProperties; /* * The type of the resource. @@ -56,15 +50,6 @@ public final class DatabaseBlobAuditingPolicyInner extends ProxyResource { public DatabaseBlobAuditingPolicyInner() { } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private DatabaseBlobAuditingPolicyProperties innerProperties() { - return this.innerProperties; - } - /** * Get the kind property: Resource kind. * @@ -75,12 +60,12 @@ public String kind() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private DatabaseBlobAuditingPolicyProperties innerProperties() { + return this.innerProperties; } /** @@ -579,13 +564,11 @@ public static DatabaseBlobAuditingPolicyInner fromJson(JsonReader jsonReader) th deserializedDatabaseBlobAuditingPolicyInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedDatabaseBlobAuditingPolicyInner.type = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedDatabaseBlobAuditingPolicyInner.kind = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedDatabaseBlobAuditingPolicyInner.innerProperties = DatabaseBlobAuditingPolicyProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedDatabaseBlobAuditingPolicyInner.kind = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseBlobAuditingPolicyInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyProperties.java index 4e392c067cee..ab0df6ca324f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnInner.java index 24b8598a71e7..95be1814a687 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; -import com.azure.core.annotation.Immutable; +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; @@ -17,18 +16,13 @@ /** * A database column resource. */ -@Immutable +@Fluent public final class DatabaseColumnInner extends ProxyResource { /* * Resource properties. */ private DatabaseColumnProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -47,7 +41,7 @@ public final class DatabaseColumnInner extends ProxyResource { /** * Creates an instance of DatabaseColumnInner class. */ - private DatabaseColumnInner() { + public DatabaseColumnInner() { } /** @@ -59,15 +53,6 @@ private DatabaseColumnProperties 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. * @@ -107,6 +92,20 @@ public ColumnDataType columnType() { return this.innerProperties() == null ? null : this.innerProperties().columnType(); } + /** + * Set the columnType property: The column data type. + * + * @param columnType the columnType value to set. + * @return the DatabaseColumnInner object itself. + */ + public DatabaseColumnInner withColumnType(ColumnDataType columnType) { + if (this.innerProperties() == null) { + this.innerProperties = new DatabaseColumnProperties(); + } + this.innerProperties().withColumnType(columnType); + return this; + } + /** * Get the temporalType property: The table temporal type. * @@ -116,6 +115,20 @@ public TableTemporalType temporalType() { return this.innerProperties() == null ? null : this.innerProperties().temporalType(); } + /** + * Set the temporalType property: The table temporal type. + * + * @param temporalType the temporalType value to set. + * @return the DatabaseColumnInner object itself. + */ + public DatabaseColumnInner withTemporalType(TableTemporalType temporalType) { + if (this.innerProperties() == null) { + this.innerProperties = new DatabaseColumnProperties(); + } + this.innerProperties().withTemporalType(temporalType); + return this; + } + /** * Get the memoryOptimized property: Whether or not the column belongs to a memory optimized table. * @@ -125,6 +138,20 @@ public Boolean memoryOptimized() { return this.innerProperties() == null ? null : this.innerProperties().memoryOptimized(); } + /** + * Set the memoryOptimized property: Whether or not the column belongs to a memory optimized table. + * + * @param memoryOptimized the memoryOptimized value to set. + * @return the DatabaseColumnInner object itself. + */ + public DatabaseColumnInner withMemoryOptimized(Boolean memoryOptimized) { + if (this.innerProperties() == null) { + this.innerProperties = new DatabaseColumnProperties(); + } + this.innerProperties().withMemoryOptimized(memoryOptimized); + return this; + } + /** * Get the isComputed property: Whether or not the column is computed. * @@ -134,6 +161,20 @@ public Boolean isComputed() { return this.innerProperties() == null ? null : this.innerProperties().isComputed(); } + /** + * Set the isComputed property: Whether or not the column is computed. + * + * @param isComputed the isComputed value to set. + * @return the DatabaseColumnInner object itself. + */ + public DatabaseColumnInner withIsComputed(Boolean isComputed) { + if (this.innerProperties() == null) { + this.innerProperties = new DatabaseColumnProperties(); + } + this.innerProperties().withIsComputed(isComputed); + return this; + } + /** * Validates the instance. * @@ -179,8 +220,6 @@ public static DatabaseColumnInner fromJson(JsonReader jsonReader) throws IOExcep deserializedDatabaseColumnInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedDatabaseColumnInner.innerProperties = DatabaseColumnProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseColumnInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnProperties.java index aa6b1c388f9d..79a8c11895e7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.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,7 +16,7 @@ /** * Database column properties. */ -@Immutable +@Fluent public final class DatabaseColumnProperties implements JsonSerializable { /* * The column data type. @@ -41,7 +41,7 @@ public final class DatabaseColumnProperties implements JsonSerializable -o table - * ``` + * ```` * * ```powershell * Get-AzSqlServerServiceObjective -Location - * ``` + * ```` */ private Sku sku; @@ -72,9 +62,9 @@ public final class DatabaseInner extends Resource { private DatabaseIdentity identity; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private DatabaseProperties innerProperties; /* * The type of the resource. @@ -97,15 +87,6 @@ public final class DatabaseInner extends Resource { public DatabaseInner() { } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private DatabaseProperties innerProperties() { - return this.innerProperties; - } - /** * Get the sku property: The database SKU. * @@ -115,11 +96,11 @@ private DatabaseProperties innerProperties() { * * ```azurecli * az sql db list-editions -l <location> -o table - * ``` + * ```` * * ```powershell * Get-AzSqlServerServiceObjective -Location <location> - * ```. + * ````. * * @return the sku value. */ @@ -136,11 +117,11 @@ public Sku sku() { * * ```azurecli * az sql db list-editions -l <location> -o table - * ``` + * ```` * * ```powershell * Get-AzSqlServerServiceObjective -Location <location> - * ```. + * ````. * * @param sku the sku value to set. * @return the DatabaseInner object itself. @@ -189,12 +170,12 @@ public DatabaseInner withIdentity(DatabaseIdentity identity) { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private DatabaseProperties innerProperties() { + return this.innerProperties; } /** @@ -766,9 +747,8 @@ public DatabaseInner withReadScale(DatabaseReadScale readScale) { } /** - * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the Business - * Critical, Premium, or Hyperscale edition database that are used to provide high availability. Not applicable to a - * Hyperscale database within an elastic pool. + * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that + * are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. * * @return the highAvailabilityReplicaCount value. */ @@ -777,9 +757,8 @@ public Integer highAvailabilityReplicaCount() { } /** - * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the Business - * Critical, Premium, or Hyperscale edition database that are used to provide high availability. Not applicable to a - * Hyperscale database within an elastic pool. + * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that + * are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. * * @param highAvailabilityReplicaCount the highAvailabilityReplicaCount value to set. * @return the DatabaseInner object itself. @@ -793,8 +772,8 @@ public DatabaseInner withHighAvailabilityReplicaCount(Integer highAvailabilityRe } /** - * Get the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo, - * Named and Standby. + * Get the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and + * Named. * * @return the secondaryType value. */ @@ -803,8 +782,8 @@ public SecondaryType secondaryType() { } /** - * Set the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo, - * Named and Standby. + * Set the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and + * Named. * * @param secondaryType the secondaryType value to set. * @return the DatabaseInner object itself. @@ -1014,137 +993,6 @@ public DatabaseInner withFederatedClientId(UUID federatedClientId) { return this; } - /** - * Get the keys property: The resource ids of the user assigned identities to use. - * - * @return the keys value. - */ - public Map keys() { - return this.innerProperties() == null ? null : this.innerProperties().keys(); - } - - /** - * Set the keys property: The resource ids of the user assigned identities to use. - * - * @param keys the keys value to set. - * @return the DatabaseInner object itself. - */ - public DatabaseInner withKeys(Map keys) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseProperties(); - } - this.innerProperties().withKeys(keys); - return this; - } - - /** - * Get the encryptionProtector property: The azure key vault URI of the database if it's configured with per - * Database Customer Managed Keys. - * - * @return the encryptionProtector value. - */ - public String encryptionProtector() { - return this.innerProperties() == null ? null : this.innerProperties().encryptionProtector(); - } - - /** - * Set the encryptionProtector property: The azure key vault URI of the database if it's configured with per - * Database Customer Managed Keys. - * - * @param encryptionProtector the encryptionProtector value to set. - * @return the DatabaseInner object itself. - */ - public DatabaseInner withEncryptionProtector(String encryptionProtector) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseProperties(); - } - this.innerProperties().withEncryptionProtector(encryptionProtector); - return this; - } - - /** - * Get the preferredEnclaveType property: Type of enclave requested on the database i.e. Default or VBS enclaves. - * - * @return the preferredEnclaveType value. - */ - public AlwaysEncryptedEnclaveType preferredEnclaveType() { - return this.innerProperties() == null ? null : this.innerProperties().preferredEnclaveType(); - } - - /** - * Set the preferredEnclaveType property: Type of enclave requested on the database i.e. Default or VBS enclaves. - * - * @param preferredEnclaveType the preferredEnclaveType value to set. - * @return the DatabaseInner object itself. - */ - public DatabaseInner withPreferredEnclaveType(AlwaysEncryptedEnclaveType preferredEnclaveType) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseProperties(); - } - this.innerProperties().withPreferredEnclaveType(preferredEnclaveType); - return this; - } - - /** - * Get the useFreeLimit property: Whether or not the database uses free monthly limits. Allowed on one database in a - * subscription. - * - * @return the useFreeLimit value. - */ - public Boolean useFreeLimit() { - return this.innerProperties() == null ? null : this.innerProperties().useFreeLimit(); - } - - /** - * Set the useFreeLimit property: Whether or not the database uses free monthly limits. Allowed on one database in a - * subscription. - * - * @param useFreeLimit the useFreeLimit value to set. - * @return the DatabaseInner object itself. - */ - public DatabaseInner withUseFreeLimit(Boolean useFreeLimit) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseProperties(); - } - this.innerProperties().withUseFreeLimit(useFreeLimit); - return this; - } - - /** - * Get the freeLimitExhaustionBehavior property: Specifies the behavior when monthly free limits are exhausted for - * the free database. - * - * AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. - * - * BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be - * billed. - * - * @return the freeLimitExhaustionBehavior value. - */ - public FreeLimitExhaustionBehavior freeLimitExhaustionBehavior() { - return this.innerProperties() == null ? null : this.innerProperties().freeLimitExhaustionBehavior(); - } - - /** - * Set the freeLimitExhaustionBehavior property: Specifies the behavior when monthly free limits are exhausted for - * the free database. - * - * AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. - * - * BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be - * billed. - * - * @param freeLimitExhaustionBehavior the freeLimitExhaustionBehavior value to set. - * @return the DatabaseInner object itself. - */ - public DatabaseInner withFreeLimitExhaustionBehavior(FreeLimitExhaustionBehavior freeLimitExhaustionBehavior) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseProperties(); - } - this.innerProperties().withFreeLimitExhaustionBehavior(freeLimitExhaustionBehavior); - return this; - } - /** * Get the sourceResourceId property: The resource identifier of the source associated with the create operation of * this database. @@ -1208,162 +1056,21 @@ public DatabaseInner withSourceResourceId(String sourceResourceId) { return this; } - /** - * Get the manualCutover property: Whether or not customer controlled manual cutover needs to be done during Update - * Database operation to Hyperscale tier. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier. - * - * When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale - * database. - * - * To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state. - * - * @return the manualCutover value. - */ - public Boolean manualCutover() { - return this.innerProperties() == null ? null : this.innerProperties().manualCutover(); - } - - /** - * Set the manualCutover property: Whether or not customer controlled manual cutover needs to be done during Update - * Database operation to Hyperscale tier. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier. - * - * When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale - * database. - * - * To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state. - * - * @param manualCutover the manualCutover value to set. - * @return the DatabaseInner object itself. - */ - public DatabaseInner withManualCutover(Boolean manualCutover) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseProperties(); - } - this.innerProperties().withManualCutover(manualCutover); - return this; - } - - /** - * Get the performCutover property: To trigger customer controlled manual cutover during the wait state while - * Scaling operation is in progress. - * - * This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' - * parameter. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier is already in progress. - * - * When performCutover is specified, the scaling operation will trigger cutover and perform role-change to - * Hyperscale database. - * - * @return the performCutover value. - */ - public Boolean performCutover() { - return this.innerProperties() == null ? null : this.innerProperties().performCutover(); - } - - /** - * Set the performCutover property: To trigger customer controlled manual cutover during the wait state while - * Scaling operation is in progress. - * - * This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' - * parameter. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier is already in progress. - * - * When performCutover is specified, the scaling operation will trigger cutover and perform role-change to - * Hyperscale database. - * - * @param performCutover the performCutover value to set. - * @return the DatabaseInner object itself. - */ - public DatabaseInner withPerformCutover(Boolean performCutover) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseProperties(); - } - this.innerProperties().withPerformCutover(performCutover); - return this; - } - - /** - * Get the availabilityZone property: Specifies the availability zone the database is pinned to. - * - * @return the availabilityZone value. - */ - public AvailabilityZoneType availabilityZone() { - return this.innerProperties() == null ? null : this.innerProperties().availabilityZone(); - } - - /** - * Set the availabilityZone property: Specifies the availability zone the database is pinned to. - * - * @param availabilityZone the availabilityZone value to set. - * @return the DatabaseInner object itself. - */ - public DatabaseInner withAvailabilityZone(AvailabilityZoneType availabilityZone) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseProperties(); - } - this.innerProperties().withAvailabilityZone(availabilityZone); - return this; - } - - /** - * Get the encryptionProtectorAutoRotation property: The flag to enable or disable auto rotation of database - * encryption protector AKV key. - * - * @return the encryptionProtectorAutoRotation value. - */ - public Boolean encryptionProtectorAutoRotation() { - return this.innerProperties() == null ? null : this.innerProperties().encryptionProtectorAutoRotation(); - } - - /** - * Set the encryptionProtectorAutoRotation property: The flag to enable or disable auto rotation of database - * encryption protector AKV key. - * - * @param encryptionProtectorAutoRotation the encryptionProtectorAutoRotation value to set. - * @return the DatabaseInner object itself. - */ - public DatabaseInner withEncryptionProtectorAutoRotation(Boolean encryptionProtectorAutoRotation) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseProperties(); - } - this.innerProperties().withEncryptionProtectorAutoRotation(encryptionProtectorAutoRotation); - return this; - } - - /** - * Get the provisioningState property: Specifies the provisioning state for this resource. - * - * @return the provisioningState value. - */ - public String 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(); - } if (sku() != null) { sku().validate(); } if (identity() != null) { identity().validate(); } + if (innerProperties() != null) { + innerProperties().validate(); + } } /** @@ -1374,9 +1081,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeJsonField("sku", this.sku); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } @@ -1407,8 +1114,6 @@ public static DatabaseInner fromJson(JsonReader jsonReader) throws IOException { } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedDatabaseInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedDatabaseInner.innerProperties = DatabaseProperties.fromJson(reader); } else if ("sku".equals(fieldName)) { deserializedDatabaseInner.sku = Sku.fromJson(reader); } else if ("kind".equals(fieldName)) { @@ -1417,8 +1122,8 @@ public static DatabaseInner fromJson(JsonReader jsonReader) throws IOException { deserializedDatabaseInner.managedBy = reader.getString(); } else if ("identity".equals(fieldName)) { deserializedDatabaseInner.identity = DatabaseIdentity.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseInner.innerProperties = DatabaseProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationInner.java index db4c359a76f5..b3204374687a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationInner.java @@ -1,17 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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.sql.models.ManagementOperationState; -import com.azure.resourcemanager.sql.models.PhaseDetails; import java.io.IOException; import java.time.OffsetDateTime; @@ -25,11 +23,6 @@ public final class DatabaseOperationInner extends ProxyResource { */ private DatabaseOperationProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -48,7 +41,7 @@ public final class DatabaseOperationInner extends ProxyResource { /** * Creates an instance of DatabaseOperationInner class. */ - private DatabaseOperationInner() { + public DatabaseOperationInner() { } /** @@ -60,15 +53,6 @@ private DatabaseOperationProperties 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. * @@ -225,15 +209,6 @@ public Boolean isCancellable() { return this.innerProperties() == null ? null : this.innerProperties().isCancellable(); } - /** - * Get the operationPhaseDetails property: The operation phase details. - * - * @return the operationPhaseDetails value. - */ - public PhaseDetails operationPhaseDetails() { - return this.innerProperties() == null ? null : this.innerProperties().operationPhaseDetails(); - } - /** * Validates the instance. * @@ -279,8 +254,6 @@ public static DatabaseOperationInner fromJson(JsonReader jsonReader) throws IOEx deserializedDatabaseOperationInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedDatabaseOperationInner.innerProperties = DatabaseOperationProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseOperationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationProperties.java index ae109a4fbdf1..dd1b21d38331 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.ManagementOperationState; -import com.azure.resourcemanager.sql.models.PhaseDetails; import java.io.IOException; import java.time.OffsetDateTime; @@ -90,15 +89,10 @@ public final class DatabaseOperationProperties implements JsonSerializable keys; - - /* - * The azure key vault URI of the database if it's configured with per Database Customer Managed Keys. - */ - private String encryptionProtector; - - /* - * Type of enclave requested on the database i.e. Default or VBS enclaves. - */ - private AlwaysEncryptedEnclaveType preferredEnclaveType; - - /* - * Whether or not the database uses free monthly limits. Allowed on one database in a subscription. - */ - private Boolean useFreeLimit; - - /* - * Specifies the behavior when monthly free limits are exhausted for the free database. - * - * AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. - * - * BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be - * billed. - */ - private FreeLimitExhaustionBehavior freeLimitExhaustionBehavior; - /* * The resource identifier of the source associated with the create operation of this database. * @@ -314,49 +279,6 @@ public final class DatabaseProperties implements JsonSerializable keys() { - return this.keys; - } - - /** - * Set the keys property: The resource ids of the user assigned identities to use. - * - * @param keys the keys value to set. - * @return the DatabaseProperties object itself. - */ - public DatabaseProperties withKeys(Map keys) { - this.keys = keys; - return this; - } - - /** - * Get the encryptionProtector property: The azure key vault URI of the database if it's configured with per - * Database Customer Managed Keys. - * - * @return the encryptionProtector value. - */ - public String encryptionProtector() { - return this.encryptionProtector; - } - - /** - * Set the encryptionProtector property: The azure key vault URI of the database if it's configured with per - * Database Customer Managed Keys. - * - * @param encryptionProtector the encryptionProtector value to set. - * @return the DatabaseProperties object itself. - */ - public DatabaseProperties withEncryptionProtector(String encryptionProtector) { - this.encryptionProtector = encryptionProtector; - return this; - } - - /** - * Get the preferredEnclaveType property: Type of enclave requested on the database i.e. Default or VBS enclaves. - * - * @return the preferredEnclaveType value. - */ - public AlwaysEncryptedEnclaveType preferredEnclaveType() { - return this.preferredEnclaveType; - } - - /** - * Set the preferredEnclaveType property: Type of enclave requested on the database i.e. Default or VBS enclaves. - * - * @param preferredEnclaveType the preferredEnclaveType value to set. - * @return the DatabaseProperties object itself. - */ - public DatabaseProperties withPreferredEnclaveType(AlwaysEncryptedEnclaveType preferredEnclaveType) { - this.preferredEnclaveType = preferredEnclaveType; - return this; - } - - /** - * Get the useFreeLimit property: Whether or not the database uses free monthly limits. Allowed on one database in a - * subscription. - * - * @return the useFreeLimit value. - */ - public Boolean useFreeLimit() { - return this.useFreeLimit; - } - - /** - * Set the useFreeLimit property: Whether or not the database uses free monthly limits. Allowed on one database in a - * subscription. - * - * @param useFreeLimit the useFreeLimit value to set. - * @return the DatabaseProperties object itself. - */ - public DatabaseProperties withUseFreeLimit(Boolean useFreeLimit) { - this.useFreeLimit = useFreeLimit; - return this; - } - - /** - * Get the freeLimitExhaustionBehavior property: Specifies the behavior when monthly free limits are exhausted for - * the free database. - * - * AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. - * - * BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be - * billed. - * - * @return the freeLimitExhaustionBehavior value. - */ - public FreeLimitExhaustionBehavior freeLimitExhaustionBehavior() { - return this.freeLimitExhaustionBehavior; - } - - /** - * Set the freeLimitExhaustionBehavior property: Specifies the behavior when monthly free limits are exhausted for - * the free database. - * - * AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. - * - * BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be - * billed. - * - * @param freeLimitExhaustionBehavior the freeLimitExhaustionBehavior value to set. - * @return the DatabaseProperties object itself. - */ - public DatabaseProperties withFreeLimitExhaustionBehavior(FreeLimitExhaustionBehavior freeLimitExhaustionBehavior) { - this.freeLimitExhaustionBehavior = freeLimitExhaustionBehavior; - return this; - } - /** * Get the sourceResourceId property: The resource identifier of the source associated with the create operation of * this database. @@ -1236,135 +1040,6 @@ public DatabaseProperties withSourceResourceId(String sourceResourceId) { return this; } - /** - * Get the manualCutover property: Whether or not customer controlled manual cutover needs to be done during Update - * Database operation to Hyperscale tier. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier. - * - * When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale - * database. - * - * To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state. - * - * @return the manualCutover value. - */ - public Boolean manualCutover() { - return this.manualCutover; - } - - /** - * Set the manualCutover property: Whether or not customer controlled manual cutover needs to be done during Update - * Database operation to Hyperscale tier. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier. - * - * When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale - * database. - * - * To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state. - * - * @param manualCutover the manualCutover value to set. - * @return the DatabaseProperties object itself. - */ - public DatabaseProperties withManualCutover(Boolean manualCutover) { - this.manualCutover = manualCutover; - return this; - } - - /** - * Get the performCutover property: To trigger customer controlled manual cutover during the wait state while - * Scaling operation is in progress. - * - * This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' - * parameter. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier is already in progress. - * - * When performCutover is specified, the scaling operation will trigger cutover and perform role-change to - * Hyperscale database. - * - * @return the performCutover value. - */ - public Boolean performCutover() { - return this.performCutover; - } - - /** - * Set the performCutover property: To trigger customer controlled manual cutover during the wait state while - * Scaling operation is in progress. - * - * This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' - * parameter. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier is already in progress. - * - * When performCutover is specified, the scaling operation will trigger cutover and perform role-change to - * Hyperscale database. - * - * @param performCutover the performCutover value to set. - * @return the DatabaseProperties object itself. - */ - public DatabaseProperties withPerformCutover(Boolean performCutover) { - this.performCutover = performCutover; - return this; - } - - /** - * Get the availabilityZone property: Specifies the availability zone the database is pinned to. - * - * @return the availabilityZone value. - */ - public AvailabilityZoneType availabilityZone() { - return this.availabilityZone; - } - - /** - * Set the availabilityZone property: Specifies the availability zone the database is pinned to. - * - * @param availabilityZone the availabilityZone value to set. - * @return the DatabaseProperties object itself. - */ - public DatabaseProperties withAvailabilityZone(AvailabilityZoneType availabilityZone) { - this.availabilityZone = availabilityZone; - return this; - } - - /** - * Get the encryptionProtectorAutoRotation property: The flag to enable or disable auto rotation of database - * encryption protector AKV key. - * - * @return the encryptionProtectorAutoRotation value. - */ - public Boolean encryptionProtectorAutoRotation() { - return this.encryptionProtectorAutoRotation; - } - - /** - * Set the encryptionProtectorAutoRotation property: The flag to enable or disable auto rotation of database - * encryption protector AKV key. - * - * @param encryptionProtectorAutoRotation the encryptionProtectorAutoRotation value to set. - * @return the DatabaseProperties object itself. - */ - public DatabaseProperties withEncryptionProtectorAutoRotation(Boolean encryptionProtectorAutoRotation) { - this.encryptionProtectorAutoRotation = encryptionProtectorAutoRotation; - return this; - } - - /** - * Get the provisioningState property: Specifies the provisioning state for this resource. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - /** * Validates the instance. * @@ -1374,13 +1049,6 @@ public void validate() { if (currentSku() != null) { currentSku().validate(); } - if (keys() != null) { - keys().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } } /** @@ -1421,19 +1089,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("maintenanceConfigurationId", this.maintenanceConfigurationId); jsonWriter.writeBooleanField("isLedgerOn", this.isLedgerOn); jsonWriter.writeStringField("federatedClientId", Objects.toString(this.federatedClientId, null)); - jsonWriter.writeMapField("keys", this.keys, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("encryptionProtector", this.encryptionProtector); - jsonWriter.writeStringField("preferredEnclaveType", - this.preferredEnclaveType == null ? null : this.preferredEnclaveType.toString()); - jsonWriter.writeBooleanField("useFreeLimit", this.useFreeLimit); - jsonWriter.writeStringField("freeLimitExhaustionBehavior", - this.freeLimitExhaustionBehavior == null ? null : this.freeLimitExhaustionBehavior.toString()); jsonWriter.writeStringField("sourceResourceId", this.sourceResourceId); - jsonWriter.writeBooleanField("manualCutover", this.manualCutover); - jsonWriter.writeBooleanField("performCutover", this.performCutover); - jsonWriter.writeStringField("availabilityZone", - this.availabilityZone == null ? null : this.availabilityZone.toString()); - jsonWriter.writeBooleanField("encryptionProtectorAutoRotation", this.encryptionProtectorAutoRotation); return jsonWriter.writeEndObject(); } @@ -1541,33 +1197,8 @@ public static DatabaseProperties fromJson(JsonReader jsonReader) throws IOExcept } else if ("federatedClientId".equals(fieldName)) { deserializedDatabaseProperties.federatedClientId = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("keys".equals(fieldName)) { - Map keys = reader.readMap(reader1 -> DatabaseKey.fromJson(reader1)); - deserializedDatabaseProperties.keys = keys; - } else if ("encryptionProtector".equals(fieldName)) { - deserializedDatabaseProperties.encryptionProtector = reader.getString(); - } else if ("preferredEnclaveType".equals(fieldName)) { - deserializedDatabaseProperties.preferredEnclaveType - = AlwaysEncryptedEnclaveType.fromString(reader.getString()); - } else if ("useFreeLimit".equals(fieldName)) { - deserializedDatabaseProperties.useFreeLimit = reader.getNullable(JsonReader::getBoolean); - } else if ("freeLimitExhaustionBehavior".equals(fieldName)) { - deserializedDatabaseProperties.freeLimitExhaustionBehavior - = FreeLimitExhaustionBehavior.fromString(reader.getString()); } else if ("sourceResourceId".equals(fieldName)) { deserializedDatabaseProperties.sourceResourceId = reader.getString(); - } else if ("manualCutover".equals(fieldName)) { - deserializedDatabaseProperties.manualCutover = reader.getNullable(JsonReader::getBoolean); - } else if ("performCutover".equals(fieldName)) { - deserializedDatabaseProperties.performCutover = reader.getNullable(JsonReader::getBoolean); - } else if ("availabilityZone".equals(fieldName)) { - deserializedDatabaseProperties.availabilityZone - = AvailabilityZoneType.fromString(reader.getString()); - } else if ("encryptionProtectorAutoRotation".equals(fieldName)) { - deserializedDatabaseProperties.encryptionProtectorAutoRotation - = reader.getNullable(JsonReader::getBoolean); - } else if ("provisioningState".equals(fieldName)) { - deserializedDatabaseProperties.provisioningState = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSchemaInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSchemaInner.java index d50075672dc7..60e70c4cfd44 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSchemaInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSchemaInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -17,11 +16,6 @@ */ @Immutable public final class DatabaseSchemaInner extends ProxyResource { - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -40,16 +34,7 @@ public final class DatabaseSchemaInner extends ProxyResource { /** * Creates an instance of DatabaseSchemaInner class. */ - private DatabaseSchemaInner() { - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; + public DatabaseSchemaInner() { } /** @@ -121,8 +106,6 @@ public static DatabaseSchemaInner fromJson(JsonReader jsonReader) throws IOExcep deserializedDatabaseSchemaInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedDatabaseSchemaInner.type = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseSchemaInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSecurityAlertPolicyInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSecurityAlertPolicyInner.java index 49f1bf8be48f..b333d57ba0b2 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSecurityAlertPolicyInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSecurityAlertPolicyInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -21,14 +21,14 @@ @Fluent public final class DatabaseSecurityAlertPolicyInner extends ProxyResource { /* - * Resource properties. + * SystemData of SecurityAlertPolicyResource. */ - private SecurityAlertsPolicyProperties innerProperties; + private SystemData systemData; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private SecurityAlertsPolicyProperties innerProperties; /* * The type of the resource. @@ -52,21 +52,21 @@ public DatabaseSecurityAlertPolicyInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the systemData property: SystemData of SecurityAlertPolicyResource. * - * @return the innerProperties value. + * @return the systemData value. */ - private SecurityAlertsPolicyProperties innerProperties() { - return this.innerProperties; + public SystemData systemData() { + return this.systemData; } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private SecurityAlertsPolicyProperties innerProperties() { + return this.innerProperties; } /** @@ -321,11 +321,11 @@ public static DatabaseSecurityAlertPolicyInner fromJson(JsonReader jsonReader) t deserializedDatabaseSecurityAlertPolicyInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedDatabaseSecurityAlertPolicyInner.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedDatabaseSecurityAlertPolicyInner.systemData = SystemData.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedDatabaseSecurityAlertPolicyInner.innerProperties = SecurityAlertsPolicyProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseSecurityAlertPolicyInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentBaselineSetInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentBaselineSetInner.java deleted file mode 100644 index 699c73e4154e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentBaselineSetInner.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * A database sql vulnerability assessment baseline set. - */ -@Immutable -public final class DatabaseSqlVulnerabilityAssessmentBaselineSetInner extends ProxyResource { - /* - * Resource properties. - */ - private DatabaseSqlVulnerabilityAssessmentBaselineSetProperties 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 DatabaseSqlVulnerabilityAssessmentBaselineSetInner class. - */ - private DatabaseSqlVulnerabilityAssessmentBaselineSetInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private DatabaseSqlVulnerabilityAssessmentBaselineSetProperties 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 results property: The baseline set result. - * - * @return the results value. - */ - public Map>> results() { - return this.innerProperties() == null ? null : this.innerProperties().results(); - } - - /** - * 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatabaseSqlVulnerabilityAssessmentBaselineSetInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabaseSqlVulnerabilityAssessmentBaselineSetInner 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 DatabaseSqlVulnerabilityAssessmentBaselineSetInner. - */ - public static DatabaseSqlVulnerabilityAssessmentBaselineSetInner fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DatabaseSqlVulnerabilityAssessmentBaselineSetInner deserializedDatabaseSqlVulnerabilityAssessmentBaselineSetInner - = new DatabaseSqlVulnerabilityAssessmentBaselineSetInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentBaselineSetInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentBaselineSetInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentBaselineSetInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentBaselineSetInner.innerProperties - = DatabaseSqlVulnerabilityAssessmentBaselineSetProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentBaselineSetInner.systemData - = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDatabaseSqlVulnerabilityAssessmentBaselineSetInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentBaselineSetProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentBaselineSetProperties.java deleted file mode 100644 index 56ce71fa9a65..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentBaselineSetProperties.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.fluent.models; - -import com.azure.core.annotation.Immutable; -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; -import java.util.List; -import java.util.Map; - -/** - * Properties of a database Sql Vulnerability Assessment baseline set. - */ -@Immutable -public final class DatabaseSqlVulnerabilityAssessmentBaselineSetProperties - implements JsonSerializable { - /* - * The baseline set result - */ - private Map>> results; - - /** - * Creates an instance of DatabaseSqlVulnerabilityAssessmentBaselineSetProperties class. - */ - private DatabaseSqlVulnerabilityAssessmentBaselineSetProperties() { - } - - /** - * Get the results property: The baseline set result. - * - * @return the results value. - */ - public Map>> results() { - return this.results; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (results() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property results in model DatabaseSqlVulnerabilityAssessmentBaselineSetProperties")); - } - } - - private static final ClientLogger LOGGER - = new ClientLogger(DatabaseSqlVulnerabilityAssessmentBaselineSetProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("results", this.results, (writer, element) -> writer.writeArray(element, - (writer1, element1) -> writer1.writeArray(element1, (writer2, element2) -> writer2.writeString(element2)))); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatabaseSqlVulnerabilityAssessmentBaselineSetProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabaseSqlVulnerabilityAssessmentBaselineSetProperties 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 DatabaseSqlVulnerabilityAssessmentBaselineSetProperties. - */ - public static DatabaseSqlVulnerabilityAssessmentBaselineSetProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DatabaseSqlVulnerabilityAssessmentBaselineSetProperties deserializedDatabaseSqlVulnerabilityAssessmentBaselineSetProperties - = new DatabaseSqlVulnerabilityAssessmentBaselineSetProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("results".equals(fieldName)) { - Map>> results = reader.readMap( - reader1 -> reader1.readArray(reader2 -> reader2.readArray(reader3 -> reader3.getString()))); - deserializedDatabaseSqlVulnerabilityAssessmentBaselineSetProperties.results = results; - } else { - reader.skipChildren(); - } - } - - return deserializedDatabaseSqlVulnerabilityAssessmentBaselineSetProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineInner.java deleted file mode 100644 index c871a8a88003..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineInner.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; -import java.util.List; - -/** - * A database sql vulnerability assessment rule baseline. - */ -@Immutable -public final class DatabaseSqlVulnerabilityAssessmentRuleBaselineInner extends ProxyResource { - /* - * Resource properties. - */ - private DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties 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 DatabaseSqlVulnerabilityAssessmentRuleBaselineInner class. - */ - private DatabaseSqlVulnerabilityAssessmentRuleBaselineInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties 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 results property: The rule baseline result. - * - * @return the results value. - */ - public List> results() { - return this.innerProperties() == null ? null : this.innerProperties().results(); - } - - /** - * 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineInner 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 DatabaseSqlVulnerabilityAssessmentRuleBaselineInner. - */ - public static DatabaseSqlVulnerabilityAssessmentRuleBaselineInner fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DatabaseSqlVulnerabilityAssessmentRuleBaselineInner deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInner - = new DatabaseSqlVulnerabilityAssessmentRuleBaselineInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInner.innerProperties - = DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInner.systemData - = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties.java deleted file mode 100644 index db27ad2e023b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.fluent.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; -import java.util.List; - -/** - * Properties of a database Sql Vulnerability Assessment rule baseline. - */ -@Fluent -public final class DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties - implements JsonSerializable { - /* - * The latest scan flag - */ - private boolean latestScan; - - /* - * The rule baseline result - */ - private List> results; - - /** - * Creates an instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties class. - */ - public DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties() { - } - - /** - * Get the latestScan property: The latest scan flag. - * - * @return the latestScan value. - */ - public boolean latestScan() { - return this.latestScan; - } - - /** - * Set the latestScan property: The latest scan flag. - * - * @param latestScan the latestScan value to set. - * @return the DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties object itself. - */ - public DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties withLatestScan(boolean latestScan) { - this.latestScan = latestScan; - return this; - } - - /** - * Get the results property: The rule baseline result. - * - * @return the results value. - */ - public List> results() { - return this.results; - } - - /** - * Set the results property: The rule baseline result. - * - * @param results the results value to set. - * @return the DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties object itself. - */ - public DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties withResults(List> results) { - this.results = results; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (results() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property results in model DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties")); - } - } - - private static final ClientLogger LOGGER - = new ClientLogger(DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("latestScan", this.latestScan); - jsonWriter.writeArrayField("results", this.results, - (writer, element) -> writer.writeArray(element, (writer1, element1) -> writer1.writeString(element1))); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties 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 - * DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties. - */ - public static DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties - = new DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("latestScan".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties.latestScan - = reader.getBoolean(); - } else if ("results".equals(fieldName)) { - List> results - = reader.readArray(reader1 -> reader1.readArray(reader2 -> reader2.getString())); - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties.results = results; - } else { - reader.skipChildren(); - } - } - - return deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties.java deleted file mode 100644 index ab52554b1877..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.fluent.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; -import java.util.List; -import java.util.Map; - -/** - * Properties of a database Sql Vulnerability Assessment rule baseline. - */ -@Fluent -public final class DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties - implements JsonSerializable { - /* - * The latest scan flag - */ - private boolean latestScan; - - /* - * The rule baseline result list - */ - private Map>> results; - - /** - * Creates an instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties class. - */ - public DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties() { - } - - /** - * Get the latestScan property: The latest scan flag. - * - * @return the latestScan value. - */ - public boolean latestScan() { - return this.latestScan; - } - - /** - * Set the latestScan property: The latest scan flag. - * - * @param latestScan the latestScan value to set. - * @return the DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties object itself. - */ - public DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties withLatestScan(boolean latestScan) { - this.latestScan = latestScan; - return this; - } - - /** - * Get the results property: The rule baseline result list. - * - * @return the results value. - */ - public Map>> results() { - return this.results; - } - - /** - * Set the results property: The rule baseline result list. - * - * @param results the results value to set. - * @return the DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties object itself. - */ - public DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties - withResults(Map>> results) { - this.results = results; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (results() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property results in model DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties")); - } - } - - private static final ClientLogger LOGGER - = new ClientLogger(DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("latestScan", this.latestScan); - jsonWriter.writeMapField("results", this.results, (writer, element) -> writer.writeArray(element, - (writer1, element1) -> writer1.writeArray(element1, (writer2, element2) -> writer2.writeString(element2)))); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties 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 - * DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties. - */ - public static DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties - = new DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("latestScan".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties.latestScan - = reader.getBoolean(); - } else if ("results".equals(fieldName)) { - Map>> results = reader.readMap( - reader1 -> reader1.readArray(reader2 -> reader2.readArray(reader3 -> reader3.getString()))); - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties.results = results; - } else { - reader.skipChildren(); - } - } - - return deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties.java deleted file mode 100644 index a84198c2e067..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.fluent.models; - -import com.azure.core.annotation.Immutable; -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; -import java.util.List; - -/** - * Properties of a database Sql Vulnerability Assessment rule baseline. - */ -@Immutable -public final class DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties - implements JsonSerializable { - /* - * The rule baseline result - */ - private List> results; - - /** - * Creates an instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties class. - */ - private DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties() { - } - - /** - * Get the results property: The rule baseline result. - * - * @return the results value. - */ - public List> results() { - return this.results; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (results() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property results in model DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties")); - } - } - - private static final ClientLogger LOGGER - = new ClientLogger(DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("results", this.results, - (writer, element) -> writer.writeArray(element, (writer1, element1) -> writer1.writeString(element1))); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties 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 - * DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties. - */ - public static DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineProperties - = new DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("results".equals(fieldName)) { - List> results - = reader.readArray(reader1 -> reader1.readArray(reader2 -> reader2.getString())); - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineProperties.results = results; - } else { - reader.skipChildren(); - } - } - - return deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableInner.java index ae0a6a387731..436aa5ecdb61 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; -import com.azure.core.annotation.Immutable; +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; @@ -16,18 +15,13 @@ /** * A database table resource. */ -@Immutable +@Fluent public final class DatabaseTableInner extends ProxyResource { /* * Resource properties. */ private DatabaseTableProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -46,7 +40,7 @@ public final class DatabaseTableInner extends ProxyResource { /** * Creates an instance of DatabaseTableInner class. */ - private DatabaseTableInner() { + public DatabaseTableInner() { } /** @@ -58,15 +52,6 @@ private DatabaseTableProperties 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. * @@ -106,6 +91,20 @@ public TableTemporalType temporalType() { return this.innerProperties() == null ? null : this.innerProperties().temporalType(); } + /** + * Set the temporalType property: The table temporal type. + * + * @param temporalType the temporalType value to set. + * @return the DatabaseTableInner object itself. + */ + public DatabaseTableInner withTemporalType(TableTemporalType temporalType) { + if (this.innerProperties() == null) { + this.innerProperties = new DatabaseTableProperties(); + } + this.innerProperties().withTemporalType(temporalType); + return this; + } + /** * Get the memoryOptimized property: Whether or not the table is memory optimized. * @@ -115,6 +114,20 @@ public Boolean memoryOptimized() { return this.innerProperties() == null ? null : this.innerProperties().memoryOptimized(); } + /** + * Set the memoryOptimized property: Whether or not the table is memory optimized. + * + * @param memoryOptimized the memoryOptimized value to set. + * @return the DatabaseTableInner object itself. + */ + public DatabaseTableInner withMemoryOptimized(Boolean memoryOptimized) { + if (this.innerProperties() == null) { + this.innerProperties = new DatabaseTableProperties(); + } + this.innerProperties().withMemoryOptimized(memoryOptimized); + return this; + } + /** * Validates the instance. * @@ -160,8 +173,6 @@ public static DatabaseTableInner fromJson(JsonReader jsonReader) throws IOExcept deserializedDatabaseTableInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedDatabaseTableInner.innerProperties = DatabaseTableProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseTableInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableProperties.java index dc4822bf0062..2a315ed31c92 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.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; @@ -15,7 +15,7 @@ /** * Database table properties. */ -@Immutable +@Fluent public final class DatabaseTableProperties implements JsonSerializable { /* * The table temporal type. @@ -30,7 +30,7 @@ public final class DatabaseTableProperties implements JsonSerializable keys; - - /* - * The azure key vault URI of the database if it's configured with per Database Customer Managed Keys. - */ - private String encryptionProtector; - - /* - * Type of enclave requested on the database i.e. Default or VBS enclaves. - */ - private AlwaysEncryptedEnclaveType preferredEnclaveType; - - /* - * Whether or not the database uses free monthly limits. Allowed on one database in a subscription. - */ - private Boolean useFreeLimit; - - /* - * Specifies the behavior when monthly free limits are exhausted for the free database. - * - * AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. - * - * BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be - * billed. - */ - private FreeLimitExhaustionBehavior freeLimitExhaustionBehavior; - - /* - * Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale - * tier. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier. - * - * When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale - * database. - * - * To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state. - */ - private Boolean manualCutover; - - /* - * To trigger customer controlled manual cutover during the wait state while Scaling operation is in progress. - * - * This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' - * parameter. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier is already in progress. - * - * When performCutover is specified, the scaling operation will trigger cutover and perform role-change to - * Hyperscale database. - */ - private Boolean performCutover; - - /* - * The flag to enable or disable auto rotation of database encryption protector AKV key. - */ - private Boolean encryptionProtectorAutoRotation; - - /* - * Specifies the provisioning state for this resource - */ - private String provisioningState; - /** * Creates an instance of DatabaseUpdateProperties class. */ @@ -806,9 +734,8 @@ public DatabaseUpdateProperties withReadScale(DatabaseReadScale readScale) { } /** - * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the Business - * Critical, Premium, or Hyperscale edition database that are used to provide high availability. Not applicable to a - * Hyperscale database within an elastic pool. + * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that + * are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. * * @return the highAvailabilityReplicaCount value. */ @@ -817,9 +744,8 @@ public Integer highAvailabilityReplicaCount() { } /** - * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the Business - * Critical, Premium, or Hyperscale edition database that are used to provide high availability. Not applicable to a - * Hyperscale database within an elastic pool. + * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that + * are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. * * @param highAvailabilityReplicaCount the highAvailabilityReplicaCount value to set. * @return the DatabaseUpdateProperties object itself. @@ -830,8 +756,8 @@ public DatabaseUpdateProperties withHighAvailabilityReplicaCount(Integer highAva } /** - * Get the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo, - * Named and Standby. + * Get the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and + * Named. * * @return the secondaryType value. */ @@ -840,8 +766,8 @@ public SecondaryType secondaryType() { } /** - * Set the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo, - * Named and Standby. + * Set the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and + * Named. * * @param secondaryType the secondaryType value to set. * @return the DatabaseUpdateProperties object itself. @@ -1030,232 +956,6 @@ public DatabaseUpdateProperties withFederatedClientId(UUID federatedClientId) { return this; } - /** - * Get the keys property: The resource ids of the user assigned identities to use. - * - * @return the keys value. - */ - public Map keys() { - return this.keys; - } - - /** - * Set the keys property: The resource ids of the user assigned identities to use. - * - * @param keys the keys value to set. - * @return the DatabaseUpdateProperties object itself. - */ - public DatabaseUpdateProperties withKeys(Map keys) { - this.keys = keys; - return this; - } - - /** - * Get the encryptionProtector property: The azure key vault URI of the database if it's configured with per - * Database Customer Managed Keys. - * - * @return the encryptionProtector value. - */ - public String encryptionProtector() { - return this.encryptionProtector; - } - - /** - * Set the encryptionProtector property: The azure key vault URI of the database if it's configured with per - * Database Customer Managed Keys. - * - * @param encryptionProtector the encryptionProtector value to set. - * @return the DatabaseUpdateProperties object itself. - */ - public DatabaseUpdateProperties withEncryptionProtector(String encryptionProtector) { - this.encryptionProtector = encryptionProtector; - return this; - } - - /** - * Get the preferredEnclaveType property: Type of enclave requested on the database i.e. Default or VBS enclaves. - * - * @return the preferredEnclaveType value. - */ - public AlwaysEncryptedEnclaveType preferredEnclaveType() { - return this.preferredEnclaveType; - } - - /** - * Set the preferredEnclaveType property: Type of enclave requested on the database i.e. Default or VBS enclaves. - * - * @param preferredEnclaveType the preferredEnclaveType value to set. - * @return the DatabaseUpdateProperties object itself. - */ - public DatabaseUpdateProperties withPreferredEnclaveType(AlwaysEncryptedEnclaveType preferredEnclaveType) { - this.preferredEnclaveType = preferredEnclaveType; - return this; - } - - /** - * Get the useFreeLimit property: Whether or not the database uses free monthly limits. Allowed on one database in a - * subscription. - * - * @return the useFreeLimit value. - */ - public Boolean useFreeLimit() { - return this.useFreeLimit; - } - - /** - * Set the useFreeLimit property: Whether or not the database uses free monthly limits. Allowed on one database in a - * subscription. - * - * @param useFreeLimit the useFreeLimit value to set. - * @return the DatabaseUpdateProperties object itself. - */ - public DatabaseUpdateProperties withUseFreeLimit(Boolean useFreeLimit) { - this.useFreeLimit = useFreeLimit; - return this; - } - - /** - * Get the freeLimitExhaustionBehavior property: Specifies the behavior when monthly free limits are exhausted for - * the free database. - * - * AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. - * - * BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be - * billed. - * - * @return the freeLimitExhaustionBehavior value. - */ - public FreeLimitExhaustionBehavior freeLimitExhaustionBehavior() { - return this.freeLimitExhaustionBehavior; - } - - /** - * Set the freeLimitExhaustionBehavior property: Specifies the behavior when monthly free limits are exhausted for - * the free database. - * - * AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. - * - * BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be - * billed. - * - * @param freeLimitExhaustionBehavior the freeLimitExhaustionBehavior value to set. - * @return the DatabaseUpdateProperties object itself. - */ - public DatabaseUpdateProperties - withFreeLimitExhaustionBehavior(FreeLimitExhaustionBehavior freeLimitExhaustionBehavior) { - this.freeLimitExhaustionBehavior = freeLimitExhaustionBehavior; - return this; - } - - /** - * Get the manualCutover property: Whether or not customer controlled manual cutover needs to be done during Update - * Database operation to Hyperscale tier. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier. - * - * When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale - * database. - * - * To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state. - * - * @return the manualCutover value. - */ - public Boolean manualCutover() { - return this.manualCutover; - } - - /** - * Set the manualCutover property: Whether or not customer controlled manual cutover needs to be done during Update - * Database operation to Hyperscale tier. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier. - * - * When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale - * database. - * - * To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state. - * - * @param manualCutover the manualCutover value to set. - * @return the DatabaseUpdateProperties object itself. - */ - public DatabaseUpdateProperties withManualCutover(Boolean manualCutover) { - this.manualCutover = manualCutover; - return this; - } - - /** - * Get the performCutover property: To trigger customer controlled manual cutover during the wait state while - * Scaling operation is in progress. - * - * This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' - * parameter. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier is already in progress. - * - * When performCutover is specified, the scaling operation will trigger cutover and perform role-change to - * Hyperscale database. - * - * @return the performCutover value. - */ - public Boolean performCutover() { - return this.performCutover; - } - - /** - * Set the performCutover property: To trigger customer controlled manual cutover during the wait state while - * Scaling operation is in progress. - * - * This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' - * parameter. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier is already in progress. - * - * When performCutover is specified, the scaling operation will trigger cutover and perform role-change to - * Hyperscale database. - * - * @param performCutover the performCutover value to set. - * @return the DatabaseUpdateProperties object itself. - */ - public DatabaseUpdateProperties withPerformCutover(Boolean performCutover) { - this.performCutover = performCutover; - return this; - } - - /** - * Get the encryptionProtectorAutoRotation property: The flag to enable or disable auto rotation of database - * encryption protector AKV key. - * - * @return the encryptionProtectorAutoRotation value. - */ - public Boolean encryptionProtectorAutoRotation() { - return this.encryptionProtectorAutoRotation; - } - - /** - * Set the encryptionProtectorAutoRotation property: The flag to enable or disable auto rotation of database - * encryption protector AKV key. - * - * @param encryptionProtectorAutoRotation the encryptionProtectorAutoRotation value to set. - * @return the DatabaseUpdateProperties object itself. - */ - public DatabaseUpdateProperties withEncryptionProtectorAutoRotation(Boolean encryptionProtectorAutoRotation) { - this.encryptionProtectorAutoRotation = encryptionProtectorAutoRotation; - return this; - } - - /** - * Get the provisioningState property: Specifies the provisioning state for this resource. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - /** * Validates the instance. * @@ -1265,13 +965,6 @@ public void validate() { if (currentSku() != null) { currentSku().validate(); } - if (keys() != null) { - keys().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } } /** @@ -1312,16 +1005,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("maintenanceConfigurationId", this.maintenanceConfigurationId); jsonWriter.writeBooleanField("isLedgerOn", this.isLedgerOn); jsonWriter.writeStringField("federatedClientId", Objects.toString(this.federatedClientId, null)); - jsonWriter.writeMapField("keys", this.keys, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("encryptionProtector", this.encryptionProtector); - jsonWriter.writeStringField("preferredEnclaveType", - this.preferredEnclaveType == null ? null : this.preferredEnclaveType.toString()); - jsonWriter.writeBooleanField("useFreeLimit", this.useFreeLimit); - jsonWriter.writeStringField("freeLimitExhaustionBehavior", - this.freeLimitExhaustionBehavior == null ? null : this.freeLimitExhaustionBehavior.toString()); - jsonWriter.writeBooleanField("manualCutover", this.manualCutover); - jsonWriter.writeBooleanField("performCutover", this.performCutover); - jsonWriter.writeBooleanField("encryptionProtectorAutoRotation", this.encryptionProtectorAutoRotation); return jsonWriter.writeEndObject(); } @@ -1430,28 +1113,6 @@ public static DatabaseUpdateProperties fromJson(JsonReader jsonReader) throws IO } else if ("federatedClientId".equals(fieldName)) { deserializedDatabaseUpdateProperties.federatedClientId = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("keys".equals(fieldName)) { - Map keys = reader.readMap(reader1 -> DatabaseKey.fromJson(reader1)); - deserializedDatabaseUpdateProperties.keys = keys; - } else if ("encryptionProtector".equals(fieldName)) { - deserializedDatabaseUpdateProperties.encryptionProtector = reader.getString(); - } else if ("preferredEnclaveType".equals(fieldName)) { - deserializedDatabaseUpdateProperties.preferredEnclaveType - = AlwaysEncryptedEnclaveType.fromString(reader.getString()); - } else if ("useFreeLimit".equals(fieldName)) { - deserializedDatabaseUpdateProperties.useFreeLimit = reader.getNullable(JsonReader::getBoolean); - } else if ("freeLimitExhaustionBehavior".equals(fieldName)) { - deserializedDatabaseUpdateProperties.freeLimitExhaustionBehavior - = FreeLimitExhaustionBehavior.fromString(reader.getString()); - } else if ("manualCutover".equals(fieldName)) { - deserializedDatabaseUpdateProperties.manualCutover = reader.getNullable(JsonReader::getBoolean); - } else if ("performCutover".equals(fieldName)) { - deserializedDatabaseUpdateProperties.performCutover = reader.getNullable(JsonReader::getBoolean); - } else if ("encryptionProtectorAutoRotation".equals(fieldName)) { - deserializedDatabaseUpdateProperties.encryptionProtectorAutoRotation - = reader.getNullable(JsonReader::getBoolean); - } else if ("provisioningState".equals(fieldName)) { - deserializedDatabaseUpdateProperties.provisioningState = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageInner.java index a3e2a188309f..da1f94c05cea 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ public final class DatabaseUsageInner extends ProxyResource { */ private DatabaseUsageProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -45,7 +39,7 @@ public final class DatabaseUsageInner extends ProxyResource { /** * Creates an instance of DatabaseUsageInner class. */ - private DatabaseUsageInner() { + public DatabaseUsageInner() { } /** @@ -57,15 +51,6 @@ private DatabaseUsageProperties 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. * @@ -177,8 +162,6 @@ public static DatabaseUsageInner fromJson(JsonReader jsonReader) throws IOExcept deserializedDatabaseUsageInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedDatabaseUsageInner.innerProperties = DatabaseUsageProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseUsageInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageProperties.java index a638ca4c27cf..9d998a5e1e46 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -39,7 +39,7 @@ public final class DatabaseUsageProperties implements JsonSerializable { + DatabaseVulnerabilityAssessmentAutoGeneratedInner deserializedDatabaseVulnerabilityAssessmentAutoGeneratedInner + = new DatabaseVulnerabilityAssessmentAutoGeneratedInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentAutoGeneratedInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentAutoGeneratedInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentAutoGeneratedInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentAutoGeneratedInner.innerProperties + = DatabaseVulnerabilityAssessmentPropertiesAutoGenerated.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseVulnerabilityAssessmentAutoGeneratedInner; + }); + } +} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentInner.java index fdfc1beb6e21..dccce8c79ff5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -23,11 +22,6 @@ public final class DatabaseVulnerabilityAssessmentInner extends ProxyResource { */ private DatabaseVulnerabilityAssessmentProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -58,15 +52,6 @@ private DatabaseVulnerabilityAssessmentProperties 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. * @@ -249,8 +234,6 @@ public static DatabaseVulnerabilityAssessmentInner fromJson(JsonReader jsonReade } else if ("properties".equals(fieldName)) { deserializedDatabaseVulnerabilityAssessmentInner.innerProperties = DatabaseVulnerabilityAssessmentProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseVulnerabilityAssessmentInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentProperties.java index 06a13a122540..cbac528174ef 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentPropertiesAutoGenerated.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentPropertiesAutoGenerated.java new file mode 100644 index 000000000000..97516e237bc5 --- /dev/null +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentPropertiesAutoGenerated.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.sql.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.sql.models.VulnerabilityAssessmentRecurringScansProperties; +import java.io.IOException; + +/** + * Properties of a database Vulnerability Assessment. + */ +@Fluent +public final class DatabaseVulnerabilityAssessmentPropertiesAutoGenerated + implements JsonSerializable { + /* + * A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). + * It is required if server level vulnerability assessment policy doesn't set + */ + private String storageContainerPath; + + /* + * A shared access signature (SAS Key) that has write access to the blob container specified in + * 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is + * required. Applies only if the storage account is not behind a Vnet or a firewall + */ + private String storageContainerSasKey; + + /* + * Specifies the identifier key of the storage account for vulnerability assessment scan results. If + * 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage + * account is not behind a Vnet or a firewall + */ + private String storageAccountAccessKey; + + /* + * The recurring scans settings + */ + private VulnerabilityAssessmentRecurringScansProperties recurringScans; + + /** + * Creates an instance of DatabaseVulnerabilityAssessmentPropertiesAutoGenerated class. + */ + public DatabaseVulnerabilityAssessmentPropertiesAutoGenerated() { + } + + /** + * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy + * doesn't set. + * + * @return the storageContainerPath value. + */ + public String storageContainerPath() { + return this.storageContainerPath; + } + + /** + * Set the storageContainerPath property: A blob storage container path to hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy + * doesn't set. + * + * @param storageContainerPath the storageContainerPath value to set. + * @return the DatabaseVulnerabilityAssessmentPropertiesAutoGenerated object itself. + */ + public DatabaseVulnerabilityAssessmentPropertiesAutoGenerated + withStorageContainerPath(String storageContainerPath) { + this.storageContainerPath = storageContainerPath; + return this; + } + + /** + * Get the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob + * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, + * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. + * + * @return the storageContainerSasKey value. + */ + public String storageContainerSasKey() { + return this.storageContainerSasKey; + } + + /** + * Set the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob + * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, + * StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall. + * + * @param storageContainerSasKey the storageContainerSasKey value to set. + * @return the DatabaseVulnerabilityAssessmentPropertiesAutoGenerated object itself. + */ + public DatabaseVulnerabilityAssessmentPropertiesAutoGenerated + withStorageContainerSasKey(String storageContainerSasKey) { + this.storageContainerSasKey = storageContainerSasKey; + return this; + } + + /** + * Get the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability + * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. + * Applies only if the storage account is not behind a Vnet or a firewall. + * + * @return the storageAccountAccessKey value. + */ + public String storageAccountAccessKey() { + return this.storageAccountAccessKey; + } + + /** + * Set the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability + * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. + * Applies only if the storage account is not behind a Vnet or a firewall. + * + * @param storageAccountAccessKey the storageAccountAccessKey value to set. + * @return the DatabaseVulnerabilityAssessmentPropertiesAutoGenerated object itself. + */ + public DatabaseVulnerabilityAssessmentPropertiesAutoGenerated + withStorageAccountAccessKey(String storageAccountAccessKey) { + this.storageAccountAccessKey = storageAccountAccessKey; + return this; + } + + /** + * Get the recurringScans property: The recurring scans settings. + * + * @return the recurringScans value. + */ + public VulnerabilityAssessmentRecurringScansProperties recurringScans() { + return this.recurringScans; + } + + /** + * Set the recurringScans property: The recurring scans settings. + * + * @param recurringScans the recurringScans value to set. + * @return the DatabaseVulnerabilityAssessmentPropertiesAutoGenerated object itself. + */ + public DatabaseVulnerabilityAssessmentPropertiesAutoGenerated + withRecurringScans(VulnerabilityAssessmentRecurringScansProperties recurringScans) { + this.recurringScans = recurringScans; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (recurringScans() != null) { + recurringScans().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageContainerPath", this.storageContainerPath); + jsonWriter.writeStringField("storageContainerSasKey", this.storageContainerSasKey); + jsonWriter.writeStringField("storageAccountAccessKey", this.storageAccountAccessKey); + jsonWriter.writeJsonField("recurringScans", this.recurringScans); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseVulnerabilityAssessmentPropertiesAutoGenerated from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseVulnerabilityAssessmentPropertiesAutoGenerated 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 DatabaseVulnerabilityAssessmentPropertiesAutoGenerated. + */ + public static DatabaseVulnerabilityAssessmentPropertiesAutoGenerated fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + DatabaseVulnerabilityAssessmentPropertiesAutoGenerated deserializedDatabaseVulnerabilityAssessmentPropertiesAutoGenerated + = new DatabaseVulnerabilityAssessmentPropertiesAutoGenerated(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageContainerPath".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentPropertiesAutoGenerated.storageContainerPath + = reader.getString(); + } else if ("storageContainerSasKey".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentPropertiesAutoGenerated.storageContainerSasKey + = reader.getString(); + } else if ("storageAccountAccessKey".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentPropertiesAutoGenerated.storageAccountAccessKey + = reader.getString(); + } else if ("recurringScans".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentPropertiesAutoGenerated.recurringScans + = VulnerabilityAssessmentRecurringScansProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseVulnerabilityAssessmentPropertiesAutoGenerated; + }); + } +} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineInner.java index 5d6de61e3868..f1a9554201c0 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -24,11 +23,6 @@ public final class DatabaseVulnerabilityAssessmentRuleBaselineInner extends Prox */ private DatabaseVulnerabilityAssessmentRuleBaselineProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -59,15 +53,6 @@ private DatabaseVulnerabilityAssessmentRuleBaselineProperties 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. * @@ -169,9 +154,6 @@ public static DatabaseVulnerabilityAssessmentRuleBaselineInner fromJson(JsonRead } else if ("properties".equals(fieldName)) { deserializedDatabaseVulnerabilityAssessmentRuleBaselineInner.innerProperties = DatabaseVulnerabilityAssessmentRuleBaselineProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseVulnerabilityAssessmentRuleBaselineInner.systemData - = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineProperties.java index 418a3a5ae72c..21479cb7e460 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScanExportProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScanExportProperties.java index 85c74424b4fb..790442ca6d0d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScanExportProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScanExportProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -26,7 +26,7 @@ public final class DatabaseVulnerabilityAssessmentScanExportProperties /** * Creates an instance of DatabaseVulnerabilityAssessmentScanExportProperties class. */ - private DatabaseVulnerabilityAssessmentScanExportProperties() { + public DatabaseVulnerabilityAssessmentScanExportProperties() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScansExportInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScansExportInner.java index 0c71940ef3a5..c615ec5fc26f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScansExportInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScansExportInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ public final class DatabaseVulnerabilityAssessmentScansExportInner extends Proxy */ private DatabaseVulnerabilityAssessmentScanExportProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -45,7 +39,7 @@ public final class DatabaseVulnerabilityAssessmentScansExportInner extends Proxy /** * Creates an instance of DatabaseVulnerabilityAssessmentScansExportInner class. */ - private DatabaseVulnerabilityAssessmentScansExportInner() { + public DatabaseVulnerabilityAssessmentScansExportInner() { } /** @@ -57,15 +51,6 @@ private DatabaseVulnerabilityAssessmentScanExportProperties 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. * @@ -153,9 +138,6 @@ public static DatabaseVulnerabilityAssessmentScansExportInner fromJson(JsonReade } else if ("properties".equals(fieldName)) { deserializedDatabaseVulnerabilityAssessmentScansExportInner.innerProperties = DatabaseVulnerabilityAssessmentScanExportProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseVulnerabilityAssessmentScansExportInner.systemData - = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerInner.java index ce233cada8ba..f2ac7a0fb9b8 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -23,11 +22,6 @@ public final class DeletedServerInner extends ProxyResource { */ private DeletedServerProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -46,7 +40,7 @@ public final class DeletedServerInner extends ProxyResource { /** * Creates an instance of DeletedServerInner class. */ - private DeletedServerInner() { + public DeletedServerInner() { } /** @@ -58,15 +52,6 @@ private DeletedServerProperties 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. * @@ -178,8 +163,6 @@ public static DeletedServerInner fromJson(JsonReader jsonReader) throws IOExcept deserializedDeletedServerInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedDeletedServerInner.innerProperties = DeletedServerProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDeletedServerInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerProperties.java index 209a1e04ba0a..ca202b5e5766 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -41,7 +41,7 @@ public final class DeletedServerProperties implements JsonSerializable databases() { - return this.innerProperties() == null ? null : this.innerProperties().databases(); + public String linkState() { + return this.innerProperties() == null ? null : this.innerProperties().linkState(); } /** - * Set the databases property: Databases in the distributed availability group. + * Get the lastHardenedLsn property: The last hardened lsn. * - * @param databases the databases value to set. - * @return the DistributedAvailabilityGroupInner object itself. + * @return the lastHardenedLsn value. */ - public DistributedAvailabilityGroupInner withDatabases(List databases) { - if (this.innerProperties() == null) { - this.innerProperties = new DistributedAvailabilityGroupProperties(); - } - this.innerProperties().withDatabases(databases); - return this; + public String lastHardenedLsn() { + return this.innerProperties() == null ? null : this.innerProperties().lastHardenedLsn(); } /** @@ -365,8 +292,6 @@ public static DistributedAvailabilityGroupInner fromJson(JsonReader jsonReader) } else if ("properties".equals(fieldName)) { deserializedDistributedAvailabilityGroupInner.innerProperties = DistributedAvailabilityGroupProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDistributedAvailabilityGroupInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DistributedAvailabilityGroupProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DistributedAvailabilityGroupProperties.java index abe366fa6263..f0b6cb720422 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DistributedAvailabilityGroupProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DistributedAvailabilityGroupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -9,13 +9,8 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.sql.models.DistributedAvailabilityGroupDatabase; -import com.azure.resourcemanager.sql.models.FailoverModeType; -import com.azure.resourcemanager.sql.models.LinkRole; import com.azure.resourcemanager.sql.models.ReplicationMode; -import com.azure.resourcemanager.sql.models.SeedingModeType; import java.io.IOException; -import java.util.List; import java.util.UUID; /** @@ -25,60 +20,54 @@ public final class DistributedAvailabilityGroupProperties implements JsonSerializable { /* - * Name of the distributed availability group + * The name of the target database */ - private String distributedAvailabilityGroupName; + private String targetDatabase; /* - * ID of the distributed availability group + * The source endpoint */ - private UUID distributedAvailabilityGroupId; - - /* - * Replication mode of the link - */ - private ReplicationMode replicationMode; + private String sourceEndpoint; /* - * SQL server side link role + * The primary availability group name */ - private LinkRole partnerLinkRole; + private String primaryAvailabilityGroupName; /* - * SQL server side availability group name + * The secondary availability group name */ - private String partnerAvailabilityGroupName; + private String secondaryAvailabilityGroupName; /* - * SQL server side endpoint - IP or DNS resolvable name + * The replication mode of a distributed availability group. Parameter will be ignored during link creation. */ - private String partnerEndpoint; + private ReplicationMode replicationMode; /* - * Managed instance side link role + * The distributed availability group id */ - private LinkRole instanceLinkRole; + private UUID distributedAvailabilityGroupId; /* - * Managed instance side availability group name + * The source replica id */ - private String instanceAvailabilityGroupName; + private UUID sourceReplicaId; /* - * The link failover mode - can be Manual if intended to be used for two-way failover with a supported SQL Server, - * or None for one-way failover to Azure. + * The target replica id */ - private FailoverModeType failoverMode; + private UUID targetReplicaId; /* - * Database seeding mode – can be Automatic (default), or Manual for supported scenarios. + * The link state */ - private SeedingModeType seedingMode; + private String linkState; /* - * Databases in the distributed availability group + * The last hardened lsn */ - private List databases; + private String lastHardenedLsn; /** * Creates an instance of DistributedAvailabilityGroupProperties class. @@ -87,196 +76,152 @@ public DistributedAvailabilityGroupProperties() { } /** - * Get the distributedAvailabilityGroupName property: Name of the distributed availability group. + * Get the targetDatabase property: The name of the target database. * - * @return the distributedAvailabilityGroupName value. + * @return the targetDatabase value. */ - public String distributedAvailabilityGroupName() { - return this.distributedAvailabilityGroupName; + public String targetDatabase() { + return this.targetDatabase; } /** - * Get the distributedAvailabilityGroupId property: ID of the distributed availability group. + * Set the targetDatabase property: The name of the target database. * - * @return the distributedAvailabilityGroupId value. - */ - public UUID distributedAvailabilityGroupId() { - return this.distributedAvailabilityGroupId; - } - - /** - * Get the replicationMode property: Replication mode of the link. - * - * @return the replicationMode value. - */ - public ReplicationMode replicationMode() { - return this.replicationMode; - } - - /** - * Set the replicationMode property: Replication mode of the link. - * - * @param replicationMode the replicationMode value to set. + * @param targetDatabase the targetDatabase value to set. * @return the DistributedAvailabilityGroupProperties object itself. */ - public DistributedAvailabilityGroupProperties withReplicationMode(ReplicationMode replicationMode) { - this.replicationMode = replicationMode; + public DistributedAvailabilityGroupProperties withTargetDatabase(String targetDatabase) { + this.targetDatabase = targetDatabase; return this; } /** - * Get the partnerLinkRole property: SQL server side link role. - * - * @return the partnerLinkRole value. - */ - public LinkRole partnerLinkRole() { - return this.partnerLinkRole; - } - - /** - * Get the partnerAvailabilityGroupName property: SQL server side availability group name. + * Get the sourceEndpoint property: The source endpoint. * - * @return the partnerAvailabilityGroupName value. + * @return the sourceEndpoint value. */ - public String partnerAvailabilityGroupName() { - return this.partnerAvailabilityGroupName; + public String sourceEndpoint() { + return this.sourceEndpoint; } /** - * Set the partnerAvailabilityGroupName property: SQL server side availability group name. + * Set the sourceEndpoint property: The source endpoint. * - * @param partnerAvailabilityGroupName the partnerAvailabilityGroupName value to set. + * @param sourceEndpoint the sourceEndpoint value to set. * @return the DistributedAvailabilityGroupProperties object itself. */ - public DistributedAvailabilityGroupProperties - withPartnerAvailabilityGroupName(String partnerAvailabilityGroupName) { - this.partnerAvailabilityGroupName = partnerAvailabilityGroupName; + public DistributedAvailabilityGroupProperties withSourceEndpoint(String sourceEndpoint) { + this.sourceEndpoint = sourceEndpoint; return this; } /** - * Get the partnerEndpoint property: SQL server side endpoint - IP or DNS resolvable name. + * Get the primaryAvailabilityGroupName property: The primary availability group name. * - * @return the partnerEndpoint value. + * @return the primaryAvailabilityGroupName value. */ - public String partnerEndpoint() { - return this.partnerEndpoint; + public String primaryAvailabilityGroupName() { + return this.primaryAvailabilityGroupName; } /** - * Set the partnerEndpoint property: SQL server side endpoint - IP or DNS resolvable name. + * Set the primaryAvailabilityGroupName property: The primary availability group name. * - * @param partnerEndpoint the partnerEndpoint value to set. + * @param primaryAvailabilityGroupName the primaryAvailabilityGroupName value to set. * @return the DistributedAvailabilityGroupProperties object itself. */ - public DistributedAvailabilityGroupProperties withPartnerEndpoint(String partnerEndpoint) { - this.partnerEndpoint = partnerEndpoint; + public DistributedAvailabilityGroupProperties + withPrimaryAvailabilityGroupName(String primaryAvailabilityGroupName) { + this.primaryAvailabilityGroupName = primaryAvailabilityGroupName; return this; } /** - * Get the instanceLinkRole property: Managed instance side link role. + * Get the secondaryAvailabilityGroupName property: The secondary availability group name. * - * @return the instanceLinkRole value. + * @return the secondaryAvailabilityGroupName value. */ - public LinkRole instanceLinkRole() { - return this.instanceLinkRole; + public String secondaryAvailabilityGroupName() { + return this.secondaryAvailabilityGroupName; } /** - * Set the instanceLinkRole property: Managed instance side link role. + * Set the secondaryAvailabilityGroupName property: The secondary availability group name. * - * @param instanceLinkRole the instanceLinkRole value to set. + * @param secondaryAvailabilityGroupName the secondaryAvailabilityGroupName value to set. * @return the DistributedAvailabilityGroupProperties object itself. */ - public DistributedAvailabilityGroupProperties withInstanceLinkRole(LinkRole instanceLinkRole) { - this.instanceLinkRole = instanceLinkRole; + public DistributedAvailabilityGroupProperties + withSecondaryAvailabilityGroupName(String secondaryAvailabilityGroupName) { + this.secondaryAvailabilityGroupName = secondaryAvailabilityGroupName; return this; } /** - * Get the instanceAvailabilityGroupName property: Managed instance side availability group name. + * Get the replicationMode property: The replication mode of a distributed availability group. Parameter will be + * ignored during link creation. * - * @return the instanceAvailabilityGroupName value. + * @return the replicationMode value. */ - public String instanceAvailabilityGroupName() { - return this.instanceAvailabilityGroupName; + public ReplicationMode replicationMode() { + return this.replicationMode; } /** - * Set the instanceAvailabilityGroupName property: Managed instance side availability group name. + * Set the replicationMode property: The replication mode of a distributed availability group. Parameter will be + * ignored during link creation. * - * @param instanceAvailabilityGroupName the instanceAvailabilityGroupName value to set. + * @param replicationMode the replicationMode value to set. * @return the DistributedAvailabilityGroupProperties object itself. */ - public DistributedAvailabilityGroupProperties - withInstanceAvailabilityGroupName(String instanceAvailabilityGroupName) { - this.instanceAvailabilityGroupName = instanceAvailabilityGroupName; + public DistributedAvailabilityGroupProperties withReplicationMode(ReplicationMode replicationMode) { + this.replicationMode = replicationMode; return this; } /** - * Get the failoverMode property: The link failover mode - can be Manual if intended to be used for two-way failover - * with a supported SQL Server, or None for one-way failover to Azure. + * Get the distributedAvailabilityGroupId property: The distributed availability group id. * - * @return the failoverMode value. - */ - public FailoverModeType failoverMode() { - return this.failoverMode; - } - - /** - * Set the failoverMode property: The link failover mode - can be Manual if intended to be used for two-way failover - * with a supported SQL Server, or None for one-way failover to Azure. - * - * @param failoverMode the failoverMode value to set. - * @return the DistributedAvailabilityGroupProperties object itself. + * @return the distributedAvailabilityGroupId value. */ - public DistributedAvailabilityGroupProperties withFailoverMode(FailoverModeType failoverMode) { - this.failoverMode = failoverMode; - return this; + public UUID distributedAvailabilityGroupId() { + return this.distributedAvailabilityGroupId; } /** - * Get the seedingMode property: Database seeding mode – can be Automatic (default), or Manual for supported - * scenarios. + * Get the sourceReplicaId property: The source replica id. * - * @return the seedingMode value. + * @return the sourceReplicaId value. */ - public SeedingModeType seedingMode() { - return this.seedingMode; + public UUID sourceReplicaId() { + return this.sourceReplicaId; } /** - * Set the seedingMode property: Database seeding mode – can be Automatic (default), or Manual for supported - * scenarios. + * Get the targetReplicaId property: The target replica id. * - * @param seedingMode the seedingMode value to set. - * @return the DistributedAvailabilityGroupProperties object itself. + * @return the targetReplicaId value. */ - public DistributedAvailabilityGroupProperties withSeedingMode(SeedingModeType seedingMode) { - this.seedingMode = seedingMode; - return this; + public UUID targetReplicaId() { + return this.targetReplicaId; } /** - * Get the databases property: Databases in the distributed availability group. + * Get the linkState property: The link state. * - * @return the databases value. + * @return the linkState value. */ - public List databases() { - return this.databases; + public String linkState() { + return this.linkState; } /** - * Set the databases property: Databases in the distributed availability group. + * Get the lastHardenedLsn property: The last hardened lsn. * - * @param databases the databases value to set. - * @return the DistributedAvailabilityGroupProperties object itself. + * @return the lastHardenedLsn value. */ - public DistributedAvailabilityGroupProperties withDatabases(List databases) { - this.databases = databases; - return this; + public String lastHardenedLsn() { + return this.lastHardenedLsn; } /** @@ -285,9 +230,6 @@ public DistributedAvailabilityGroupProperties withDatabases(List e.validate()); - } } /** @@ -296,16 +238,12 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("targetDatabase", this.targetDatabase); + jsonWriter.writeStringField("sourceEndpoint", this.sourceEndpoint); + jsonWriter.writeStringField("primaryAvailabilityGroupName", this.primaryAvailabilityGroupName); + jsonWriter.writeStringField("secondaryAvailabilityGroupName", this.secondaryAvailabilityGroupName); jsonWriter.writeStringField("replicationMode", this.replicationMode == null ? null : this.replicationMode.toString()); - jsonWriter.writeStringField("partnerAvailabilityGroupName", this.partnerAvailabilityGroupName); - jsonWriter.writeStringField("partnerEndpoint", this.partnerEndpoint); - jsonWriter.writeStringField("instanceLinkRole", - this.instanceLinkRole == null ? null : this.instanceLinkRole.toString()); - jsonWriter.writeStringField("instanceAvailabilityGroupName", this.instanceAvailabilityGroupName); - jsonWriter.writeStringField("failoverMode", this.failoverMode == null ? null : this.failoverMode.toString()); - jsonWriter.writeStringField("seedingMode", this.seedingMode == null ? null : this.seedingMode.toString()); - jsonWriter.writeArrayField("databases", this.databases, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -325,39 +263,32 @@ public static DistributedAvailabilityGroupProperties fromJson(JsonReader jsonRea String fieldName = reader.getFieldName(); reader.nextToken(); - if ("distributedAvailabilityGroupName".equals(fieldName)) { - deserializedDistributedAvailabilityGroupProperties.distributedAvailabilityGroupName + if ("targetDatabase".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.targetDatabase = reader.getString(); + } else if ("sourceEndpoint".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.sourceEndpoint = reader.getString(); + } else if ("primaryAvailabilityGroupName".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.primaryAvailabilityGroupName + = reader.getString(); + } else if ("secondaryAvailabilityGroupName".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.secondaryAvailabilityGroupName = reader.getString(); - } else if ("distributedAvailabilityGroupId".equals(fieldName)) { - deserializedDistributedAvailabilityGroupProperties.distributedAvailabilityGroupId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("replicationMode".equals(fieldName)) { deserializedDistributedAvailabilityGroupProperties.replicationMode = ReplicationMode.fromString(reader.getString()); - } else if ("partnerLinkRole".equals(fieldName)) { - deserializedDistributedAvailabilityGroupProperties.partnerLinkRole - = LinkRole.fromString(reader.getString()); - } else if ("partnerAvailabilityGroupName".equals(fieldName)) { - deserializedDistributedAvailabilityGroupProperties.partnerAvailabilityGroupName - = reader.getString(); - } else if ("partnerEndpoint".equals(fieldName)) { - deserializedDistributedAvailabilityGroupProperties.partnerEndpoint = reader.getString(); - } else if ("instanceLinkRole".equals(fieldName)) { - deserializedDistributedAvailabilityGroupProperties.instanceLinkRole - = LinkRole.fromString(reader.getString()); - } else if ("instanceAvailabilityGroupName".equals(fieldName)) { - deserializedDistributedAvailabilityGroupProperties.instanceAvailabilityGroupName - = reader.getString(); - } else if ("failoverMode".equals(fieldName)) { - deserializedDistributedAvailabilityGroupProperties.failoverMode - = FailoverModeType.fromString(reader.getString()); - } else if ("seedingMode".equals(fieldName)) { - deserializedDistributedAvailabilityGroupProperties.seedingMode - = SeedingModeType.fromString(reader.getString()); - } else if ("databases".equals(fieldName)) { - List databases - = reader.readArray(reader1 -> DistributedAvailabilityGroupDatabase.fromJson(reader1)); - deserializedDistributedAvailabilityGroupProperties.databases = databases; + } else if ("distributedAvailabilityGroupId".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.distributedAvailabilityGroupId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("sourceReplicaId".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.sourceReplicaId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("targetReplicaId".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.targetReplicaId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("linkState".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.linkState = reader.getString(); + } else if ("lastHardenedLsn".equals(fieldName)) { + deserializedDistributedAvailabilityGroupProperties.lastHardenedLsn = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterDnsServersProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DnsRefreshConfigurationProperties.java similarity index 65% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterDnsServersProperties.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DnsRefreshConfigurationProperties.java index d675c51f816a..2e7dc2db96ba 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterDnsServersProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/DnsRefreshConfigurationProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -13,19 +13,19 @@ import java.io.IOException; /** - * The properties of dns servers on virtual cluster. + * DNS refresh configuration properties. */ @Immutable -public final class VirtualClusterDnsServersProperties implements JsonSerializable { +public final class DnsRefreshConfigurationProperties implements JsonSerializable { /* * The status of the DNS refresh operation. */ private DnsRefreshConfigurationPropertiesStatus status; /** - * Creates an instance of VirtualClusterDnsServersProperties class. + * Creates an instance of DnsRefreshConfigurationProperties class. */ - private VirtualClusterDnsServersProperties() { + public DnsRefreshConfigurationProperties() { } /** @@ -55,30 +55,30 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of VirtualClusterDnsServersProperties from the JsonReader. + * Reads an instance of DnsRefreshConfigurationProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of VirtualClusterDnsServersProperties if the JsonReader was pointing to an instance of it, or + * @return An instance of DnsRefreshConfigurationProperties 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 VirtualClusterDnsServersProperties. + * @throws IOException If an error occurs while reading the DnsRefreshConfigurationProperties. */ - public static VirtualClusterDnsServersProperties fromJson(JsonReader jsonReader) throws IOException { + public static DnsRefreshConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - VirtualClusterDnsServersProperties deserializedVirtualClusterDnsServersProperties - = new VirtualClusterDnsServersProperties(); + DnsRefreshConfigurationProperties deserializedDnsRefreshConfigurationProperties + = new DnsRefreshConfigurationProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("status".equals(fieldName)) { - deserializedVirtualClusterDnsServersProperties.status + deserializedDnsRefreshConfigurationProperties.status = DnsRefreshConfigurationPropertiesStatus.fromString(reader.getString()); } else { reader.skipChildren(); } } - return deserializedVirtualClusterDnsServersProperties; + return deserializedDnsRefreshConfigurationProperties; }); } } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolInner.java index 0dbdd9562696..9b08ca391ecb 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolInner.java @@ -1,17 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -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.sql.models.AlwaysEncryptedEnclaveType; -import com.azure.resourcemanager.sql.models.AvailabilityZoneType; import com.azure.resourcemanager.sql.models.ElasticPoolLicenseType; import com.azure.resourcemanager.sql.models.ElasticPoolPerDatabaseSettings; import com.azure.resourcemanager.sql.models.ElasticPoolState; @@ -25,11 +22,6 @@ */ @Fluent public final class ElasticPoolInner extends Resource { - /* - * Resource properties. - */ - private ElasticPoolProperties innerProperties; - /* * The elastic pool SKU. * @@ -39,7 +31,7 @@ public final class ElasticPoolInner extends Resource { * * ```azurecli * az sql elastic-pool list-editions -l -o table - * ``` + * ```` */ private Sku sku; @@ -49,9 +41,9 @@ public final class ElasticPoolInner extends Resource { private String kind; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private ElasticPoolProperties innerProperties; /* * The type of the resource. @@ -74,15 +66,6 @@ public final class ElasticPoolInner extends Resource { public ElasticPoolInner() { } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private ElasticPoolProperties innerProperties() { - return this.innerProperties; - } - /** * Get the sku property: The elastic pool SKU. * @@ -92,7 +75,7 @@ private ElasticPoolProperties innerProperties() { * * ```azurecli * az sql elastic-pool list-editions -l <location> -o table - * ```. + * ````. * * @return the sku value. */ @@ -109,7 +92,7 @@ public Sku sku() { * * ```azurecli * az sql elastic-pool list-editions -l <location> -o table - * ```. + * ````. * * @param sku the sku value to set. * @return the ElasticPoolInner object itself. @@ -129,12 +112,12 @@ public String kind() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private ElasticPoolProperties innerProperties() { + return this.innerProperties; } /** @@ -346,9 +329,8 @@ public ElasticPoolInner withMaintenanceConfigurationId(String maintenanceConfigu } /** - * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the Business - * Critical, Premium, or Hyperscale edition elastic pool that are used to provide high availability. Applicable only - * to Hyperscale elastic pools. + * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the elastic pool + * that are used to provide high availability. Applicable only to Hyperscale elastic pools. * * @return the highAvailabilityReplicaCount value. */ @@ -357,9 +339,8 @@ public Integer highAvailabilityReplicaCount() { } /** - * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the Business - * Critical, Premium, or Hyperscale edition elastic pool that are used to provide high availability. Applicable only - * to Hyperscale elastic pools. + * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the elastic pool + * that are used to provide high availability. Applicable only to Hyperscale elastic pools. * * @param highAvailabilityReplicaCount the highAvailabilityReplicaCount value to set. * @return the ElasticPoolInner object itself. @@ -372,98 +353,18 @@ public ElasticPoolInner withHighAvailabilityReplicaCount(Integer highAvailabilit return this; } - /** - * Get the autoPauseDelay property: Time in minutes after which elastic pool is automatically paused. A value of -1 - * means that automatic pause is disabled. - * - * @return the autoPauseDelay value. - */ - public Integer autoPauseDelay() { - return this.innerProperties() == null ? null : this.innerProperties().autoPauseDelay(); - } - - /** - * Set the autoPauseDelay property: Time in minutes after which elastic pool is automatically paused. A value of -1 - * means that automatic pause is disabled. - * - * @param autoPauseDelay the autoPauseDelay value to set. - * @return the ElasticPoolInner object itself. - */ - public ElasticPoolInner withAutoPauseDelay(Integer autoPauseDelay) { - if (this.innerProperties() == null) { - this.innerProperties = new ElasticPoolProperties(); - } - this.innerProperties().withAutoPauseDelay(autoPauseDelay); - return this; - } - - /** - * Get the preferredEnclaveType property: Type of enclave requested on the elastic pool. - * - * @return the preferredEnclaveType value. - */ - public AlwaysEncryptedEnclaveType preferredEnclaveType() { - return this.innerProperties() == null ? null : this.innerProperties().preferredEnclaveType(); - } - - /** - * Set the preferredEnclaveType property: Type of enclave requested on the elastic pool. - * - * @param preferredEnclaveType the preferredEnclaveType value to set. - * @return the ElasticPoolInner object itself. - */ - public ElasticPoolInner withPreferredEnclaveType(AlwaysEncryptedEnclaveType preferredEnclaveType) { - if (this.innerProperties() == null) { - this.innerProperties = new ElasticPoolProperties(); - } - this.innerProperties().withPreferredEnclaveType(preferredEnclaveType); - return this; - } - - /** - * Get the availabilityZone property: Specifies the availability zone the pool's primary replica is pinned to. - * - * @return the availabilityZone value. - */ - public AvailabilityZoneType availabilityZone() { - return this.innerProperties() == null ? null : this.innerProperties().availabilityZone(); - } - - /** - * Set the availabilityZone property: Specifies the availability zone the pool's primary replica is pinned to. - * - * @param availabilityZone the availabilityZone value to set. - * @return the ElasticPoolInner object itself. - */ - public ElasticPoolInner withAvailabilityZone(AvailabilityZoneType availabilityZone) { - if (this.innerProperties() == null) { - this.innerProperties = new ElasticPoolProperties(); - } - this.innerProperties().withAvailabilityZone(availabilityZone); - return this; - } - - /** - * Get the currentSku property: The name and tier of the current SKU. - * - * @return the currentSku value. - */ - public Sku currentSku() { - return this.innerProperties() == null ? null : this.innerProperties().currentSku(); - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } if (sku() != null) { sku().validate(); } + if (innerProperties() != null) { + innerProperties().validate(); + } } /** @@ -474,8 +375,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } @@ -506,14 +407,12 @@ public static ElasticPoolInner fromJson(JsonReader jsonReader) throws IOExceptio } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedElasticPoolInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedElasticPoolInner.innerProperties = ElasticPoolProperties.fromJson(reader); } else if ("sku".equals(fieldName)) { deserializedElasticPoolInner.sku = Sku.fromJson(reader); } else if ("kind".equals(fieldName)) { deserializedElasticPoolInner.kind = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedElasticPoolInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedElasticPoolInner.innerProperties = ElasticPoolProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationInner.java index 7595ac6dd759..4790901e2ae9 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -23,11 +22,6 @@ public final class ElasticPoolOperationInner extends ProxyResource { */ private ElasticPoolOperationProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -46,7 +40,7 @@ public final class ElasticPoolOperationInner extends ProxyResource { /** * Creates an instance of ElasticPoolOperationInner class. */ - private ElasticPoolOperationInner() { + public ElasticPoolOperationInner() { } /** @@ -58,15 +52,6 @@ private ElasticPoolOperationProperties 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. * @@ -269,8 +254,6 @@ public static ElasticPoolOperationInner fromJson(JsonReader jsonReader) throws I } else if ("properties".equals(fieldName)) { deserializedElasticPoolOperationInner.innerProperties = ElasticPoolOperationProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedElasticPoolOperationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationProperties.java index ffb3ccf4ef85..7207ed68d562 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -91,7 +91,7 @@ public final class ElasticPoolOperationProperties implements JsonSerializable { /* * The certificate public blob @@ -24,7 +24,7 @@ public final class EndpointCertificateProperties implements JsonSerializable tags; /* - * Resource location. - */ - private String location; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private FailoverGroupProperties innerProperties; /* * The type of the resource. @@ -66,12 +59,12 @@ public FailoverGroupInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the location property: Resource location. * - * @return the innerProperties value. + * @return the location value. */ - private FailoverGroupProperties innerProperties() { - return this.innerProperties; + public String location() { + return this.location; } /** @@ -95,21 +88,12 @@ public FailoverGroupInner withTags(Map tags) { } /** - * Get the location property: Resource location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private FailoverGroupProperties innerProperties() { + return this.innerProperties; } /** @@ -252,29 +236,6 @@ public FailoverGroupInner withDatabases(List databases) { return this; } - /** - * Get the secondaryType property: Databases secondary type on partner server. - * - * @return the secondaryType value. - */ - public FailoverGroupDatabasesSecondaryType secondaryType() { - return this.innerProperties() == null ? null : this.innerProperties().secondaryType(); - } - - /** - * Set the secondaryType property: Databases secondary type on partner server. - * - * @param secondaryType the secondaryType value to set. - * @return the FailoverGroupInner object itself. - */ - public FailoverGroupInner withSecondaryType(FailoverGroupDatabasesSecondaryType secondaryType) { - if (this.innerProperties() == null) { - this.innerProperties = new FailoverGroupProperties(); - } - this.innerProperties().withSecondaryType(secondaryType); - return this; - } - /** * Validates the instance. * @@ -292,8 +253,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } @@ -319,15 +280,13 @@ public static FailoverGroupInner fromJson(JsonReader jsonReader) throws IOExcept deserializedFailoverGroupInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedFailoverGroupInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedFailoverGroupInner.innerProperties = FailoverGroupProperties.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedFailoverGroupInner.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedFailoverGroupInner.tags = tags; - } else if ("location".equals(fieldName)) { - deserializedFailoverGroupInner.location = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedFailoverGroupInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedFailoverGroupInner.innerProperties = FailoverGroupProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupProperties.java index 1d17e47134f4..1ff37b011de9 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -10,7 +10,6 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.sql.models.FailoverGroupDatabasesSecondaryType; import com.azure.resourcemanager.sql.models.FailoverGroupReadOnlyEndpoint; import com.azure.resourcemanager.sql.models.FailoverGroupReadWriteEndpoint; import com.azure.resourcemanager.sql.models.FailoverGroupReplicationRole; @@ -53,11 +52,6 @@ public final class FailoverGroupProperties implements JsonSerializable databases; - /* - * Databases secondary type on partner server. - */ - private FailoverGroupDatabasesSecondaryType secondaryType; - /** * Creates an instance of FailoverGroupProperties class. */ @@ -162,26 +156,6 @@ public FailoverGroupProperties withDatabases(List databases) { return this; } - /** - * Get the secondaryType property: Databases secondary type on partner server. - * - * @return the secondaryType value. - */ - public FailoverGroupDatabasesSecondaryType secondaryType() { - return this.secondaryType; - } - - /** - * Set the secondaryType property: Databases secondary type on partner server. - * - * @param secondaryType the secondaryType value to set. - * @return the FailoverGroupProperties object itself. - */ - public FailoverGroupProperties withSecondaryType(FailoverGroupDatabasesSecondaryType secondaryType) { - this.secondaryType = secondaryType; - return this; - } - /** * Validates the instance. * @@ -220,7 +194,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("readOnlyEndpoint", this.readOnlyEndpoint); jsonWriter.writeArrayField("databases", this.databases, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("secondaryType", this.secondaryType == null ? null : this.secondaryType.toString()); return jsonWriter.writeEndObject(); } @@ -257,9 +230,6 @@ public static FailoverGroupProperties fromJson(JsonReader jsonReader) throws IOE } else if ("databases".equals(fieldName)) { List databases = reader.readArray(reader1 -> reader1.getString()); deserializedFailoverGroupProperties.databases = databases; - } else if ("secondaryType".equals(fieldName)) { - deserializedFailoverGroupProperties.secondaryType - = FailoverGroupDatabasesSecondaryType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupUpdateProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupUpdateProperties.java index 38070d8dc81b..1bcfb42ab742 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupUpdateProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -9,10 +9,8 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.sql.models.FailoverGroupDatabasesSecondaryType; import com.azure.resourcemanager.sql.models.FailoverGroupReadOnlyEndpoint; import com.azure.resourcemanager.sql.models.FailoverGroupReadWriteEndpoint; -import com.azure.resourcemanager.sql.models.PartnerInfo; import java.io.IOException; import java.util.List; @@ -36,16 +34,6 @@ public final class FailoverGroupUpdateProperties implements JsonSerializable databases; - /* - * List of partner server information for the failover group. - */ - private List partnerServers; - - /* - * Databases secondary type on partner server. - */ - private FailoverGroupDatabasesSecondaryType secondaryType; - /** * Creates an instance of FailoverGroupUpdateProperties class. */ @@ -112,46 +100,6 @@ public FailoverGroupUpdateProperties withDatabases(List databases) { return this; } - /** - * Get the partnerServers property: List of partner server information for the failover group. - * - * @return the partnerServers value. - */ - public List partnerServers() { - return this.partnerServers; - } - - /** - * Set the partnerServers property: List of partner server information for the failover group. - * - * @param partnerServers the partnerServers value to set. - * @return the FailoverGroupUpdateProperties object itself. - */ - public FailoverGroupUpdateProperties withPartnerServers(List partnerServers) { - this.partnerServers = partnerServers; - return this; - } - - /** - * Get the secondaryType property: Databases secondary type on partner server. - * - * @return the secondaryType value. - */ - public FailoverGroupDatabasesSecondaryType secondaryType() { - return this.secondaryType; - } - - /** - * Set the secondaryType property: Databases secondary type on partner server. - * - * @param secondaryType the secondaryType value to set. - * @return the FailoverGroupUpdateProperties object itself. - */ - public FailoverGroupUpdateProperties withSecondaryType(FailoverGroupDatabasesSecondaryType secondaryType) { - this.secondaryType = secondaryType; - return this; - } - /** * Validates the instance. * @@ -164,9 +112,6 @@ public void validate() { if (readOnlyEndpoint() != null) { readOnlyEndpoint().validate(); } - if (partnerServers() != null) { - partnerServers().forEach(e -> e.validate()); - } } /** @@ -178,9 +123,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("readWriteEndpoint", this.readWriteEndpoint); jsonWriter.writeJsonField("readOnlyEndpoint", this.readOnlyEndpoint); jsonWriter.writeArrayField("databases", this.databases, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("partnerServers", this.partnerServers, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("secondaryType", this.secondaryType == null ? null : this.secondaryType.toString()); return jsonWriter.writeEndObject(); } @@ -209,12 +151,6 @@ public static FailoverGroupUpdateProperties fromJson(JsonReader jsonReader) thro } else if ("databases".equals(fieldName)) { List databases = reader.readArray(reader1 -> reader1.getString()); deserializedFailoverGroupUpdateProperties.databases = databases; - } else if ("partnerServers".equals(fieldName)) { - List partnerServers = reader.readArray(reader1 -> PartnerInfo.fromJson(reader1)); - deserializedFailoverGroupUpdateProperties.partnerServers = partnerServers; - } else if ("secondaryType".equals(fieldName)) { - deserializedFailoverGroupUpdateProperties.secondaryType - = FailoverGroupDatabasesSecondaryType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FirewallRuleInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FirewallRuleInner.java index fcbd54009e45..10350292c247 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FirewallRuleInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/FirewallRuleInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -22,12 +22,12 @@ public final class FirewallRuleInner extends ProxyResourceWithWritableName { private ServerFirewallRuleProperties innerProperties; /* - * Resource type. + * The type of the resource. */ private String type; /* - * Resource ID. + * Fully qualified resource Id for the resource. */ private String id; @@ -47,7 +47,7 @@ private ServerFirewallRuleProperties innerProperties() { } /** - * Get the type property: Resource type. + * Get the type property: The type of the resource. * * @return the type value. */ @@ -57,7 +57,7 @@ public String type() { } /** - * Get the id property: Resource ID. + * Get the id property: Fully qualified resource Id for the resource. * * @return the id value. */ @@ -132,6 +132,7 @@ public FirewallRuleInner withEndIpAddress(String endIpAddress) { */ @Override public void validate() { + super.validate(); if (innerProperties() != null) { innerProperties().validate(); } @@ -154,6 +155,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of FirewallRuleInner 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 FirewallRuleInner. */ public static FirewallRuleInner fromJson(JsonReader jsonReader) throws IOException { @@ -165,10 +167,10 @@ public static FirewallRuleInner fromJson(JsonReader jsonReader) throws IOExcepti if ("id".equals(fieldName)) { deserializedFirewallRuleInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedFirewallRuleInner.withName(reader.getString()); } else if ("type".equals(fieldName)) { deserializedFirewallRuleInner.type = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedFirewallRuleInner.withName(reader.getString()); } else if ("properties".equals(fieldName)) { deserializedFirewallRuleInner.innerProperties = ServerFirewallRuleProperties.fromJson(reader); } else { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyInner.java index aef722f325c0..761a7f883476 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -18,11 +17,6 @@ */ @Fluent public final class GeoBackupPolicyInner extends ProxyResource { - /* - * Resource properties. - */ - private GeoBackupPolicyProperties innerProperties; - /* * Backup policy location. */ @@ -34,9 +28,9 @@ public final class GeoBackupPolicyInner extends ProxyResource { private String kind; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private GeoBackupPolicyProperties innerProperties; /* * The type of the resource. @@ -59,15 +53,6 @@ public final class GeoBackupPolicyInner extends ProxyResource { public GeoBackupPolicyInner() { } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private GeoBackupPolicyProperties innerProperties() { - return this.innerProperties; - } - /** * Get the location property: Backup policy location. * @@ -87,12 +72,12 @@ public String kind() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private GeoBackupPolicyProperties innerProperties() { + return this.innerProperties; } /** @@ -200,14 +185,12 @@ public static GeoBackupPolicyInner fromJson(JsonReader jsonReader) throws IOExce deserializedGeoBackupPolicyInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedGeoBackupPolicyInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedGeoBackupPolicyInner.innerProperties = GeoBackupPolicyProperties.fromJson(reader); } else if ("location".equals(fieldName)) { deserializedGeoBackupPolicyInner.location = reader.getString(); } else if ("kind".equals(fieldName)) { deserializedGeoBackupPolicyInner.kind = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedGeoBackupPolicyInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedGeoBackupPolicyInner.innerProperties = GeoBackupPolicyProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyProperties.java index 4b1c318b3d7d..b8146cc72a27 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6FirewallRuleInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6FirewallRuleInner.java index 6a7330f70165..d6b4f8bcae2d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6FirewallRuleInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6FirewallRuleInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -22,12 +22,12 @@ public final class IPv6FirewallRuleInner extends ProxyResourceWithWritableName { private IPv6ServerFirewallRuleProperties innerProperties; /* - * Resource type. + * The type of the resource. */ private String type; /* - * Resource ID. + * Fully qualified resource Id for the resource. */ private String id; @@ -47,7 +47,7 @@ private IPv6ServerFirewallRuleProperties innerProperties() { } /** - * Get the type property: Resource type. + * Get the type property: The type of the resource. * * @return the type value. */ @@ -57,7 +57,7 @@ public String type() { } /** - * Get the id property: Resource ID. + * Get the id property: Fully qualified resource Id for the resource. * * @return the id value. */ @@ -100,7 +100,7 @@ public IPv6FirewallRuleInner withStartIPv6Address(String startIPv6Address) { /** * Get the endIPv6Address property: The end IP address of the firewall rule. Must be IPv6 format. Must be greater - * than or equal to startIpv6Address. + * than or equal to startIpAddress. * * @return the endIPv6Address value. */ @@ -110,7 +110,7 @@ public String endIPv6Address() { /** * Set the endIPv6Address property: The end IP address of the firewall rule. Must be IPv6 format. Must be greater - * than or equal to startIpv6Address. + * than or equal to startIpAddress. * * @param endIPv6Address the endIPv6Address value to set. * @return the IPv6FirewallRuleInner object itself. @@ -130,6 +130,7 @@ public IPv6FirewallRuleInner withEndIPv6Address(String endIPv6Address) { */ @Override public void validate() { + super.validate(); if (innerProperties() != null) { innerProperties().validate(); } @@ -152,6 +153,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of IPv6FirewallRuleInner 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 IPv6FirewallRuleInner. */ public static IPv6FirewallRuleInner fromJson(JsonReader jsonReader) throws IOException { @@ -163,10 +165,10 @@ public static IPv6FirewallRuleInner fromJson(JsonReader jsonReader) throws IOExc if ("id".equals(fieldName)) { deserializedIPv6FirewallRuleInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedIPv6FirewallRuleInner.withName(reader.getString()); } else if ("type".equals(fieldName)) { deserializedIPv6FirewallRuleInner.type = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedIPv6FirewallRuleInner.withName(reader.getString()); } else if ("properties".equals(fieldName)) { deserializedIPv6FirewallRuleInner.innerProperties = IPv6ServerFirewallRuleProperties.fromJson(reader); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6ServerFirewallRuleProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6ServerFirewallRuleProperties.java index 6441e33927c1..fe7570678f51 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6ServerFirewallRuleProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6ServerFirewallRuleProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -22,7 +22,7 @@ public final class IPv6ServerFirewallRuleProperties implements JsonSerializable< private String startIPv6Address; /* - * The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpv6Address. + * The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpAddress. */ private String endIPv6Address; @@ -54,7 +54,7 @@ public IPv6ServerFirewallRuleProperties withStartIPv6Address(String startIPv6Add /** * Get the endIPv6Address property: The end IP address of the firewall rule. Must be IPv6 format. Must be greater - * than or equal to startIpv6Address. + * than or equal to startIpAddress. * * @return the endIPv6Address value. */ @@ -64,7 +64,7 @@ public String endIPv6Address() { /** * Set the endIPv6Address property: The end IP address of the firewall rule. Must be IPv6 format. Must be greater - * than or equal to startIpv6Address. + * than or equal to startIpAddress. * * @param endIPv6Address the endIPv6Address value to set. * @return the IPv6ServerFirewallRuleProperties object itself. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultInner.java index 79a2ba7479a9..3fc2b41e29ee 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -25,11 +24,6 @@ public final class ImportExportExtensionsOperationResultInner extends ProxyResou */ private ImportExportExtensionsOperationResultProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -48,7 +42,7 @@ public final class ImportExportExtensionsOperationResultInner extends ProxyResou /** * Creates an instance of ImportExportExtensionsOperationResultInner class. */ - private ImportExportExtensionsOperationResultInner() { + public ImportExportExtensionsOperationResultInner() { } /** @@ -60,15 +54,6 @@ private ImportExportExtensionsOperationResultProperties 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. * @@ -236,8 +221,6 @@ public static ImportExportExtensionsOperationResultInner fromJson(JsonReader jso } else if ("properties".equals(fieldName)) { deserializedImportExportExtensionsOperationResultInner.innerProperties = ImportExportExtensionsOperationResultProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedImportExportExtensionsOperationResultInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultProperties.java index e677821cd69d..5af1ddc109a5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -73,7 +73,7 @@ public final class ImportExportExtensionsOperationResultProperties /** * Creates an instance of ImportExportExtensionsOperationResultProperties class. */ - private ImportExportExtensionsOperationResultProperties() { + public ImportExportExtensionsOperationResultProperties() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultInner.java index 4e91d170e738..66aa3d9b0729 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -25,11 +24,6 @@ public final class ImportExportOperationResultInner extends ProxyResource { */ private ImportExportOperationResultProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -48,7 +42,7 @@ public final class ImportExportOperationResultInner extends ProxyResource { /** * Creates an instance of ImportExportOperationResultInner class. */ - private ImportExportOperationResultInner() { + public ImportExportOperationResultInner() { } /** @@ -60,15 +54,6 @@ private ImportExportOperationResultProperties 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. * @@ -236,8 +221,6 @@ public static ImportExportOperationResultInner fromJson(JsonReader jsonReader) t } else if ("properties".equals(fieldName)) { deserializedImportExportOperationResultInner.innerProperties = ImportExportOperationResultProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedImportExportOperationResultInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultProperties.java index 53b6d9f49619..16703add607e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -73,7 +73,7 @@ public final class ImportExportOperationResultProperties /** * Creates an instance of ImportExportOperationResultProperties class. */ - private ImportExportOperationResultProperties() { + public ImportExportOperationResultProperties() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupInner.java index 64cc67daacb4..8eeba3a6ddc5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -15,7 +14,6 @@ import com.azure.resourcemanager.sql.models.InstanceFailoverGroupReplicationRole; import com.azure.resourcemanager.sql.models.ManagedInstancePairInfo; import com.azure.resourcemanager.sql.models.PartnerRegionInfo; -import com.azure.resourcemanager.sql.models.SecondaryInstanceType; import java.io.IOException; import java.util.List; @@ -29,11 +27,6 @@ public final class InstanceFailoverGroupInner extends ProxyResource { */ private InstanceFailoverGroupProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -64,15 +57,6 @@ private InstanceFailoverGroupProperties 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. * @@ -103,31 +87,6 @@ public String id() { return this.id; } - /** - * Get the secondaryType property: Type of the geo-secondary instance. Set 'Standby' if the instance is used as a DR - * option only. - * - * @return the secondaryType value. - */ - public SecondaryInstanceType secondaryType() { - return this.innerProperties() == null ? null : this.innerProperties().secondaryType(); - } - - /** - * Set the secondaryType property: Type of the geo-secondary instance. Set 'Standby' if the instance is used as a DR - * option only. - * - * @param secondaryType the secondaryType value to set. - * @return the InstanceFailoverGroupInner object itself. - */ - public InstanceFailoverGroupInner withSecondaryType(SecondaryInstanceType secondaryType) { - if (this.innerProperties() == null) { - this.innerProperties = new InstanceFailoverGroupProperties(); - } - this.innerProperties().withSecondaryType(secondaryType); - return this; - } - /** * Get the readWriteEndpoint property: Read-write endpoint of the failover group instance. * @@ -284,8 +243,6 @@ public static InstanceFailoverGroupInner fromJson(JsonReader jsonReader) throws } else if ("properties".equals(fieldName)) { deserializedInstanceFailoverGroupInner.innerProperties = InstanceFailoverGroupProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedInstanceFailoverGroupInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupProperties.java index e5c0f27b6ea4..6b08f9b048e3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -15,7 +15,6 @@ import com.azure.resourcemanager.sql.models.InstanceFailoverGroupReplicationRole; import com.azure.resourcemanager.sql.models.ManagedInstancePairInfo; import com.azure.resourcemanager.sql.models.PartnerRegionInfo; -import com.azure.resourcemanager.sql.models.SecondaryInstanceType; import java.io.IOException; import java.util.List; @@ -24,11 +23,6 @@ */ @Fluent public final class InstanceFailoverGroupProperties implements JsonSerializable { - /* - * Type of the geo-secondary instance. Set 'Standby' if the instance is used as a DR option only. - */ - private SecondaryInstanceType secondaryType; - /* * Read-write endpoint of the failover group instance. */ @@ -65,28 +59,6 @@ public final class InstanceFailoverGroupProperties implements JsonSerializable writer.writeJson(element)); jsonWriter.writeArrayField("managedInstancePairs", this.managedInstancePairs, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("secondaryType", this.secondaryType == null ? null : this.secondaryType.toString()); jsonWriter.writeJsonField("readOnlyEndpoint", this.readOnlyEndpoint); return jsonWriter.writeEndObject(); } @@ -266,9 +237,6 @@ public static InstanceFailoverGroupProperties fromJson(JsonReader jsonReader) th List managedInstancePairs = reader.readArray(reader1 -> ManagedInstancePairInfo.fromJson(reader1)); deserializedInstanceFailoverGroupProperties.managedInstancePairs = managedInstancePairs; - } else if ("secondaryType".equals(fieldName)) { - deserializedInstanceFailoverGroupProperties.secondaryType - = SecondaryInstanceType.fromString(reader.getString()); } else if ("readOnlyEndpoint".equals(fieldName)) { deserializedInstanceFailoverGroupProperties.readOnlyEndpoint = InstanceFailoverGroupReadOnlyEndpoint.fromJson(reader); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolInner.java index ca2fd008f4ce..ef960f4f60f2 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -20,20 +19,15 @@ */ @Fluent public final class InstancePoolInner extends Resource { - /* - * Resource properties. - */ - private InstancePoolProperties innerProperties; - /* * The name and tier of the SKU. */ private Sku sku; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private InstancePoolProperties innerProperties; /* * The type of the resource. @@ -56,15 +50,6 @@ public final class InstancePoolInner extends Resource { public InstancePoolInner() { } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private InstancePoolProperties innerProperties() { - return this.innerProperties; - } - /** * Get the sku property: The name and tier of the SKU. * @@ -86,12 +71,12 @@ public InstancePoolInner withSku(Sku sku) { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private InstancePoolProperties innerProperties() { + return this.innerProperties; } /** @@ -213,52 +198,18 @@ public InstancePoolInner withLicenseType(InstancePoolLicenseType licenseType) { return this; } - /** - * Get the dnsZone property: The Dns Zone that the managed instance pool is in. - * - * @return the dnsZone value. - */ - public String dnsZone() { - return this.innerProperties() == null ? null : this.innerProperties().dnsZone(); - } - - /** - * Get the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this managed - * instance. - * - * @return the maintenanceConfigurationId value. - */ - public String maintenanceConfigurationId() { - return this.innerProperties() == null ? null : this.innerProperties().maintenanceConfigurationId(); - } - - /** - * Set the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this managed - * instance. - * - * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. - * @return the InstancePoolInner object itself. - */ - public InstancePoolInner withMaintenanceConfigurationId(String maintenanceConfigurationId) { - if (this.innerProperties() == null) { - this.innerProperties = new InstancePoolProperties(); - } - this.innerProperties().withMaintenanceConfigurationId(maintenanceConfigurationId); - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } if (sku() != null) { sku().validate(); } + if (innerProperties() != null) { + innerProperties().validate(); + } } /** @@ -269,8 +220,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } @@ -301,12 +252,10 @@ public static InstancePoolInner fromJson(JsonReader jsonReader) throws IOExcepti } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedInstancePoolInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedInstancePoolInner.innerProperties = InstancePoolProperties.fromJson(reader); } else if ("sku".equals(fieldName)) { deserializedInstancePoolInner.sku = Sku.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedInstancePoolInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedInstancePoolInner.innerProperties = InstancePoolProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolOperationInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolOperationInner.java deleted file mode 100644 index ba9faf72b665..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolOperationInner.java +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.ErrorType; -import com.azure.resourcemanager.sql.models.ManagementOperationState; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * A instance pool operation. - */ -@Immutable -public final class InstancePoolOperationInner extends ProxyResource { - /* - * Resource properties. - */ - private InstancePoolOperationProperties 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 InstancePoolOperationInner class. - */ - private InstancePoolOperationInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private InstancePoolOperationProperties 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 instancePoolName property: The name of the instance pool the operation is being performed on. - * - * @return the instancePoolName value. - */ - public String instancePoolName() { - return this.innerProperties() == null ? null : this.innerProperties().instancePoolName(); - } - - /** - * Get the operation property: The name of operation. - * - * @return the operation value. - */ - public String operation() { - return this.innerProperties() == null ? null : this.innerProperties().operation(); - } - - /** - * Get the operationFriendlyName property: The friendly name of operation. - * - * @return the operationFriendlyName value. - */ - public String operationFriendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().operationFriendlyName(); - } - - /** - * Get the percentComplete property: The percentage of the operation completed. - * - * @return the percentComplete value. - */ - public Integer percentComplete() { - return this.innerProperties() == null ? null : this.innerProperties().percentComplete(); - } - - /** - * Get the startTime property: The operation start time. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.innerProperties() == null ? null : this.innerProperties().startTime(); - } - - /** - * Get the state property: The operation state. - * - * @return the state value. - */ - public ManagementOperationState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); - } - - /** - * Get the errorCode property: The operation error code. - * - * @return the errorCode value. - */ - public Integer errorCode() { - return this.innerProperties() == null ? null : this.innerProperties().errorCode(); - } - - /** - * Get the errorDescription property: The operation error description. - * - * @return the errorDescription value. - */ - public String errorDescription() { - return this.innerProperties() == null ? null : this.innerProperties().errorDescription(); - } - - /** - * Get the errorSeverity property: The operation error severity. - * - * @return the errorSeverity value. - */ - public Integer errorSeverity() { - return this.innerProperties() == null ? null : this.innerProperties().errorSeverity(); - } - - /** - * Get the errorType property: Error type (e.g. None, User). - * - * @return the errorType value. - */ - public ErrorType errorType() { - return this.innerProperties() == null ? null : this.innerProperties().errorType(); - } - - /** - * Get the estimatedCompletionTime property: The estimated completion time of the operation. - * - * @return the estimatedCompletionTime value. - */ - public OffsetDateTime estimatedCompletionTime() { - return this.innerProperties() == null ? null : this.innerProperties().estimatedCompletionTime(); - } - - /** - * Get the description property: The operation description. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Get the isCancellable property: Whether the operation can be cancelled. - * - * @return the isCancellable value. - */ - public Boolean isCancellable() { - return this.innerProperties() == null ? null : this.innerProperties().isCancellable(); - } - - /** - * 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InstancePoolOperationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InstancePoolOperationInner 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 InstancePoolOperationInner. - */ - public static InstancePoolOperationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InstancePoolOperationInner deserializedInstancePoolOperationInner = new InstancePoolOperationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedInstancePoolOperationInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedInstancePoolOperationInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedInstancePoolOperationInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedInstancePoolOperationInner.innerProperties - = InstancePoolOperationProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedInstancePoolOperationInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedInstancePoolOperationInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolOperationProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolOperationProperties.java deleted file mode 100644 index 38eb7454bef2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolOperationProperties.java +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.fluent.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.models.ErrorType; -import com.azure.resourcemanager.sql.models.ManagementOperationState; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * The properties of a instance pool operation. - */ -@Immutable -public final class InstancePoolOperationProperties implements JsonSerializable { - /* - * The name of the instance pool the operation is being performed on. - */ - private String instancePoolName; - - /* - * The name of operation. - */ - private String operation; - - /* - * The friendly name of operation. - */ - private String operationFriendlyName; - - /* - * The percentage of the operation completed. - */ - private Integer percentComplete; - - /* - * The operation start time. - */ - private OffsetDateTime startTime; - - /* - * The operation state. - */ - private ManagementOperationState state; - - /* - * The operation error code. - */ - private Integer errorCode; - - /* - * The operation error description. - */ - private String errorDescription; - - /* - * The operation error severity. - */ - private Integer errorSeverity; - - /* - * Error type (e.g. None, User). - */ - private ErrorType errorType; - - /* - * The estimated completion time of the operation. - */ - private OffsetDateTime estimatedCompletionTime; - - /* - * The operation description. - */ - private String description; - - /* - * Whether the operation can be cancelled. - */ - private Boolean isCancellable; - - /** - * Creates an instance of InstancePoolOperationProperties class. - */ - private InstancePoolOperationProperties() { - } - - /** - * Get the instancePoolName property: The name of the instance pool the operation is being performed on. - * - * @return the instancePoolName value. - */ - public String instancePoolName() { - return this.instancePoolName; - } - - /** - * Get the operation property: The name of operation. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the operationFriendlyName property: The friendly name of operation. - * - * @return the operationFriendlyName value. - */ - public String operationFriendlyName() { - return this.operationFriendlyName; - } - - /** - * Get the percentComplete property: The percentage of the operation completed. - * - * @return the percentComplete value. - */ - public Integer percentComplete() { - return this.percentComplete; - } - - /** - * Get the startTime property: The operation start time. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the state property: The operation state. - * - * @return the state value. - */ - public ManagementOperationState state() { - return this.state; - } - - /** - * Get the errorCode property: The operation error code. - * - * @return the errorCode value. - */ - public Integer errorCode() { - return this.errorCode; - } - - /** - * Get the errorDescription property: The operation error description. - * - * @return the errorDescription value. - */ - public String errorDescription() { - return this.errorDescription; - } - - /** - * Get the errorSeverity property: The operation error severity. - * - * @return the errorSeverity value. - */ - public Integer errorSeverity() { - return this.errorSeverity; - } - - /** - * Get the errorType property: Error type (e.g. None, User). - * - * @return the errorType value. - */ - public ErrorType errorType() { - return this.errorType; - } - - /** - * Get the estimatedCompletionTime property: The estimated completion time of the operation. - * - * @return the estimatedCompletionTime value. - */ - public OffsetDateTime estimatedCompletionTime() { - return this.estimatedCompletionTime; - } - - /** - * Get the description property: The operation description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the isCancellable property: Whether the operation can be cancelled. - * - * @return the isCancellable value. - */ - public Boolean isCancellable() { - return this.isCancellable; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InstancePoolOperationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InstancePoolOperationProperties 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 InstancePoolOperationProperties. - */ - public static InstancePoolOperationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InstancePoolOperationProperties deserializedInstancePoolOperationProperties - = new InstancePoolOperationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instancePoolName".equals(fieldName)) { - deserializedInstancePoolOperationProperties.instancePoolName = reader.getString(); - } else if ("operation".equals(fieldName)) { - deserializedInstancePoolOperationProperties.operation = reader.getString(); - } else if ("operationFriendlyName".equals(fieldName)) { - deserializedInstancePoolOperationProperties.operationFriendlyName = reader.getString(); - } else if ("percentComplete".equals(fieldName)) { - deserializedInstancePoolOperationProperties.percentComplete - = reader.getNullable(JsonReader::getInt); - } else if ("startTime".equals(fieldName)) { - deserializedInstancePoolOperationProperties.startTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("state".equals(fieldName)) { - deserializedInstancePoolOperationProperties.state - = ManagementOperationState.fromString(reader.getString()); - } else if ("errorCode".equals(fieldName)) { - deserializedInstancePoolOperationProperties.errorCode = reader.getNullable(JsonReader::getInt); - } else if ("errorDescription".equals(fieldName)) { - deserializedInstancePoolOperationProperties.errorDescription = reader.getString(); - } else if ("errorSeverity".equals(fieldName)) { - deserializedInstancePoolOperationProperties.errorSeverity = reader.getNullable(JsonReader::getInt); - } else if ("errorType".equals(fieldName)) { - deserializedInstancePoolOperationProperties.errorType = ErrorType.fromString(reader.getString()); - } else if ("estimatedCompletionTime".equals(fieldName)) { - deserializedInstancePoolOperationProperties.estimatedCompletionTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("description".equals(fieldName)) { - deserializedInstancePoolOperationProperties.description = reader.getString(); - } else if ("isCancellable".equals(fieldName)) { - deserializedInstancePoolOperationProperties.isCancellable - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedInstancePoolOperationProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolProperties.java index 00ca28c1a233..b3be3a41ff97 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -34,16 +34,6 @@ public final class InstancePoolProperties implements JsonSerializable writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeJsonField("sku", this.sku); - jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } @@ -258,14 +213,10 @@ public static JobAgentInner fromJson(JsonReader jsonReader) throws IOException { } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedJobAgentInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedJobAgentInner.innerProperties = JobAgentProperties.fromJson(reader); } else if ("sku".equals(fieldName)) { deserializedJobAgentInner.sku = Sku.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedJobAgentInner.identity = JobAgentIdentity.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedJobAgentInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedJobAgentInner.innerProperties = JobAgentProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobAgentProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobAgentProperties.java index bd7cff35dc26..7f2e7d115458 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobAgentProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobAgentProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialInner.java index 7a9b3af7289e..e1253e8782a9 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ public final class JobCredentialInner extends ProxyResource { */ private JobCredentialProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -57,15 +51,6 @@ private JobCredentialProperties 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. * @@ -187,8 +172,6 @@ public static JobCredentialInner fromJson(JsonReader jsonReader) throws IOExcept deserializedJobCredentialInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedJobCredentialInner.innerProperties = JobCredentialProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedJobCredentialInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialProperties.java index 47342e9e4c37..5a8bbf6454e4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionInner.java index ea06f6001b9d..baead7958ef6 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; -import com.azure.core.annotation.Immutable; +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; @@ -20,18 +19,13 @@ /** * An execution of a job. */ -@Immutable +@Fluent public final class JobExecutionInner extends ProxyResource { /* * Resource properties. */ private JobExecutionProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -50,7 +44,7 @@ public final class JobExecutionInner extends ProxyResource { /** * Creates an instance of JobExecutionInner class. */ - private JobExecutionInner() { + public JobExecutionInner() { } /** @@ -62,15 +56,6 @@ private JobExecutionProperties 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. * @@ -191,6 +176,20 @@ public Integer currentAttempts() { return this.innerProperties() == null ? null : this.innerProperties().currentAttempts(); } + /** + * Set the currentAttempts property: Number of times the job execution has been attempted. + * + * @param currentAttempts the currentAttempts value to set. + * @return the JobExecutionInner object itself. + */ + public JobExecutionInner withCurrentAttempts(Integer currentAttempts) { + if (this.innerProperties() == null) { + this.innerProperties = new JobExecutionProperties(); + } + this.innerProperties().withCurrentAttempts(currentAttempts); + return this; + } + /** * Get the currentAttemptStartTime property: Start time of the current attempt. * @@ -263,8 +262,6 @@ public static JobExecutionInner fromJson(JsonReader jsonReader) throws IOExcepti deserializedJobExecutionInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedJobExecutionInner.innerProperties = JobExecutionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedJobExecutionInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionProperties.java index 8c070d173979..4060ca9352ea 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -20,7 +20,7 @@ /** * Properties for an Azure SQL Database Elastic job execution. */ -@Immutable +@Fluent public final class JobExecutionProperties implements JsonSerializable { /* * The job version number. @@ -90,7 +90,7 @@ public final class JobExecutionProperties implements JsonSerializable { - JobPrivateEndpointInner deserializedJobPrivateEndpointInner = new JobPrivateEndpointInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedJobPrivateEndpointInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedJobPrivateEndpointInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedJobPrivateEndpointInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedJobPrivateEndpointInner.innerProperties = JobPrivateEndpointProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedJobPrivateEndpointInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJobPrivateEndpointInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobPrivateEndpointProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobPrivateEndpointProperties.java deleted file mode 100644 index e0fe2769757c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobPrivateEndpointProperties.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.fluent.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; - -/** - * Properties of job agent private endpoint. - */ -@Fluent -public final class JobPrivateEndpointProperties implements JsonSerializable { - /* - * ARM resource id of the server the private endpoint will target. - */ - private String targetServerAzureResourceId; - - /* - * Private endpoint id of the private endpoint. - */ - private String privateEndpointId; - - /** - * Creates an instance of JobPrivateEndpointProperties class. - */ - public JobPrivateEndpointProperties() { - } - - /** - * Get the targetServerAzureResourceId property: ARM resource id of the server the private endpoint will target. - * - * @return the targetServerAzureResourceId value. - */ - public String targetServerAzureResourceId() { - return this.targetServerAzureResourceId; - } - - /** - * Set the targetServerAzureResourceId property: ARM resource id of the server the private endpoint will target. - * - * @param targetServerAzureResourceId the targetServerAzureResourceId value to set. - * @return the JobPrivateEndpointProperties object itself. - */ - public JobPrivateEndpointProperties withTargetServerAzureResourceId(String targetServerAzureResourceId) { - this.targetServerAzureResourceId = targetServerAzureResourceId; - return this; - } - - /** - * Get the privateEndpointId property: Private endpoint id of the private endpoint. - * - * @return the privateEndpointId value. - */ - public String privateEndpointId() { - return this.privateEndpointId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (targetServerAzureResourceId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetServerAzureResourceId in model JobPrivateEndpointProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JobPrivateEndpointProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("targetServerAzureResourceId", this.targetServerAzureResourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobPrivateEndpointProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobPrivateEndpointProperties 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 JobPrivateEndpointProperties. - */ - public static JobPrivateEndpointProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobPrivateEndpointProperties deserializedJobPrivateEndpointProperties = new JobPrivateEndpointProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetServerAzureResourceId".equals(fieldName)) { - deserializedJobPrivateEndpointProperties.targetServerAzureResourceId = reader.getString(); - } else if ("privateEndpointId".equals(fieldName)) { - deserializedJobPrivateEndpointProperties.privateEndpointId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobPrivateEndpointProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobProperties.java index 23161bbc3a6a..9413583d5b4a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepInner.java index 21fbbe83b7d9..2d1cdbcd7b45 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -25,11 +24,6 @@ public final class JobStepInner extends ProxyResource { */ private JobStepProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -60,15 +54,6 @@ private JobStepProperties 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. * @@ -284,8 +269,6 @@ public static JobStepInner fromJson(JsonReader jsonReader) throws IOException { deserializedJobStepInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedJobStepInner.innerProperties = JobStepProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedJobStepInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepProperties.java index c7f6d3d9322c..f9138ac6469f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -189,6 +189,10 @@ public void validate() { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property targetGroup in model JobStepProperties")); } + if (credential() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property credential in model JobStepProperties")); + } if (action() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property action in model JobStepProperties")); @@ -212,9 +216,9 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("targetGroup", this.targetGroup); + jsonWriter.writeStringField("credential", this.credential); jsonWriter.writeJsonField("action", this.action); jsonWriter.writeNumberField("stepId", this.stepId); - jsonWriter.writeStringField("credential", this.credential); jsonWriter.writeJsonField("output", this.output); jsonWriter.writeJsonField("executionOptions", this.executionOptions); return jsonWriter.writeEndObject(); @@ -238,12 +242,12 @@ public static JobStepProperties fromJson(JsonReader jsonReader) throws IOExcepti if ("targetGroup".equals(fieldName)) { deserializedJobStepProperties.targetGroup = reader.getString(); + } else if ("credential".equals(fieldName)) { + deserializedJobStepProperties.credential = reader.getString(); } else if ("action".equals(fieldName)) { deserializedJobStepProperties.action = JobStepAction.fromJson(reader); } else if ("stepId".equals(fieldName)) { deserializedJobStepProperties.stepId = reader.getNullable(JsonReader::getInt); - } else if ("credential".equals(fieldName)) { - deserializedJobStepProperties.credential = reader.getString(); } else if ("output".equals(fieldName)) { deserializedJobStepProperties.output = JobStepOutput.fromJson(reader); } else if ("executionOptions".equals(fieldName)) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupInner.java index cbcd12ca6f66..5fc1861d7314 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -24,11 +23,6 @@ public final class JobTargetGroupInner extends ProxyResource { */ private JobTargetGroupProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -59,15 +53,6 @@ private JobTargetGroupProperties 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. * @@ -166,8 +151,6 @@ public static JobTargetGroupInner fromJson(JsonReader jsonReader) throws IOExcep deserializedJobTargetGroupInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedJobTargetGroupInner.innerProperties = JobTargetGroupProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedJobTargetGroupInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupProperties.java index fad3d94beb5a..1a6a99cbd3c4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobVersionInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobVersionInner.java index f321535c2ae1..de9a0cf26191 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobVersionInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/JobVersionInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -17,11 +16,6 @@ */ @Immutable public final class JobVersionInner extends ProxyResource { - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -40,16 +34,7 @@ public final class JobVersionInner extends ProxyResource { /** * Creates an instance of JobVersionInner class. */ - private JobVersionInner() { - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; + public JobVersionInner() { } /** @@ -121,8 +106,6 @@ public static JobVersionInner fromJson(JsonReader jsonReader) throws IOException deserializedJobVersionInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedJobVersionInner.type = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedJobVersionInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsInner.java index 79e40f92f79c..f54f069b9316 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -23,11 +22,6 @@ public final class LedgerDigestUploadsInner extends ProxyResource { */ private LedgerDigestUploadsProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -58,15 +52,6 @@ private LedgerDigestUploadsProperties 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. * @@ -177,8 +162,6 @@ public static LedgerDigestUploadsInner fromJson(JsonReader jsonReader) throws IO } else if ("properties".equals(fieldName)) { deserializedLedgerDigestUploadsInner.innerProperties = LedgerDigestUploadsProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedLedgerDigestUploadsInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsProperties.java index 23f6dd7e9b08..23f90cfa6494 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LocationCapabilitiesInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LocationCapabilitiesInner.java index fc144e2ab65e..eed75e259572 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LocationCapabilitiesInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LocationCapabilitiesInner.java @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.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.sql.models.CapabilityStatus; -import com.azure.resourcemanager.sql.models.JobAgentVersionCapability; import com.azure.resourcemanager.sql.models.ManagedInstanceVersionCapability; import com.azure.resourcemanager.sql.models.ServerVersionCapability; import java.io.IOException; @@ -19,7 +18,7 @@ /** * The location capability. */ -@Immutable +@Fluent public final class LocationCapabilitiesInner implements JsonSerializable { /* * The location name. @@ -36,16 +35,6 @@ public final class LocationCapabilitiesInner implements JsonSerializable supportedManagedInstanceVersions; - /* - * The list of supported job agent versions. - */ - private List supportedJobAgentVersions; - - /* - * Whether or not the subscription is allowed to provision zone resilient resources. - */ - private Boolean isZoneResilientProvisioningAllowed; - /* * The status of the capability. */ @@ -59,7 +48,7 @@ public final class LocationCapabilitiesInner implements JsonSerializable supportedManagedInstanceVersions() return this.supportedManagedInstanceVersions; } - /** - * Get the supportedJobAgentVersions property: The list of supported job agent versions. - * - * @return the supportedJobAgentVersions value. - */ - public List supportedJobAgentVersions() { - return this.supportedJobAgentVersions; - } - - /** - * Get the isZoneResilientProvisioningAllowed property: Whether or not the subscription is allowed to provision zone - * resilient resources. - * - * @return the isZoneResilientProvisioningAllowed value. - */ - public Boolean isZoneResilientProvisioningAllowed() { - return this.isZoneResilientProvisioningAllowed; - } - /** * Get the status property: The status of the capability. * @@ -126,6 +96,17 @@ public String reason() { return this.reason; } + /** + * Set the reason property: The reason for the capability not being available. + * + * @param reason the reason value to set. + * @return the LocationCapabilitiesInner object itself. + */ + public LocationCapabilitiesInner withReason(String reason) { + this.reason = reason; + return this; + } + /** * Validates the instance. * @@ -138,9 +119,6 @@ public void validate() { if (supportedManagedInstanceVersions() != null) { supportedManagedInstanceVersions().forEach(e -> e.validate()); } - if (supportedJobAgentVersions() != null) { - supportedJobAgentVersions().forEach(e -> e.validate()); - } } /** @@ -179,13 +157,6 @@ public static LocationCapabilitiesInner fromJson(JsonReader jsonReader) throws I = reader.readArray(reader1 -> ManagedInstanceVersionCapability.fromJson(reader1)); deserializedLocationCapabilitiesInner.supportedManagedInstanceVersions = supportedManagedInstanceVersions; - } else if ("supportedJobAgentVersions".equals(fieldName)) { - List supportedJobAgentVersions - = reader.readArray(reader1 -> JobAgentVersionCapability.fromJson(reader1)); - deserializedLocationCapabilitiesInner.supportedJobAgentVersions = supportedJobAgentVersions; - } else if ("isZoneResilientProvisioningAllowed".equals(fieldName)) { - deserializedLocationCapabilitiesInner.isZoneResilientProvisioningAllowed - = reader.getNullable(JsonReader::getBoolean); } else if ("status".equals(fieldName)) { deserializedLocationCapabilitiesInner.status = CapabilityStatus.fromString(reader.getString()); } else if ("reason".equals(fieldName)) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LogicalDatabaseTransparentDataEncryptionInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LogicalDatabaseTransparentDataEncryptionInner.java index ce645087a732..2bd136061332 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LogicalDatabaseTransparentDataEncryptionInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LogicalDatabaseTransparentDataEncryptionInner.java @@ -1,21 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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.sql.models.TransparentDataEncryptionScanState; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionState; import java.io.IOException; /** - * A logical database transparent data encryption scan state. + * A logical database transparent data encryption state. */ @Fluent public final class LogicalDatabaseTransparentDataEncryptionInner extends ProxyResource { @@ -24,11 +22,6 @@ public final class LogicalDatabaseTransparentDataEncryptionInner extends ProxyRe */ private TransparentDataEncryptionProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -59,15 +52,6 @@ private TransparentDataEncryptionProperties 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. * @@ -121,29 +105,6 @@ public LogicalDatabaseTransparentDataEncryptionInner withState(TransparentDataEn return this; } - /** - * Get the scanState property: Specifies the encryption scan state of the transparent data encryption. - * - * @return the scanState value. - */ - public TransparentDataEncryptionScanState scanState() { - return this.innerProperties() == null ? null : this.innerProperties().scanState(); - } - - /** - * Set the scanState property: Specifies the encryption scan state of the transparent data encryption. - * - * @param scanState the scanState value to set. - * @return the LogicalDatabaseTransparentDataEncryptionInner object itself. - */ - public LogicalDatabaseTransparentDataEncryptionInner withScanState(TransparentDataEncryptionScanState scanState) { - if (this.innerProperties() == null) { - this.innerProperties = new TransparentDataEncryptionProperties(); - } - this.innerProperties().withScanState(scanState); - return this; - } - /** * Validates the instance. * @@ -191,8 +152,6 @@ public static LogicalDatabaseTransparentDataEncryptionInner fromJson(JsonReader } else if ("properties".equals(fieldName)) { deserializedLogicalDatabaseTransparentDataEncryptionInner.innerProperties = TransparentDataEncryptionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedLogicalDatabaseTransparentDataEncryptionInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupInner.java index 033dfe3de969..c3cbfb82e39a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupInner.java @@ -1,38 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; -import com.azure.core.annotation.Immutable; +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.sql.models.BackupStorageAccessTier; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.azure.resourcemanager.sql.models.SetLegalHoldImmutability; -import com.azure.resourcemanager.sql.models.TimeBasedImmutability; -import com.azure.resourcemanager.sql.models.TimeBasedImmutabilityMode; import java.io.IOException; import java.time.OffsetDateTime; /** * A long term retention backup. */ -@Immutable +@Fluent public final class LongTermRetentionBackupInner extends ProxyResource { /* * Resource properties. */ private LongTermRetentionBackupProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -51,7 +41,7 @@ public final class LongTermRetentionBackupInner extends ProxyResource { /** * Creates an instance of LongTermRetentionBackupInner class. */ - private LongTermRetentionBackupInner() { + public LongTermRetentionBackupInner() { } /** @@ -63,15 +53,6 @@ private LongTermRetentionBackupProperties 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. * @@ -175,52 +156,18 @@ public BackupStorageRedundancy requestedBackupStorageRedundancy() { } /** - * Get the isBackupImmutable property: The setting whether the LTR backup is immutable. + * Set the requestedBackupStorageRedundancy property: The storage redundancy type of the backup. * - * @return the isBackupImmutable value. + * @param requestedBackupStorageRedundancy the requestedBackupStorageRedundancy value to set. + * @return the LongTermRetentionBackupInner object itself. */ - public Boolean isBackupImmutable() { - return this.innerProperties() == null ? null : this.innerProperties().isBackupImmutable(); - } - - /** - * Get the timeBasedImmutability property: The setting for whether or not time-based immutability is enabled for the - * LTR backup. When time-based immutability is enabled and locked, the backup cannot be deleted until - * BackupExpirationTime. - * - * @return the timeBasedImmutability value. - */ - public TimeBasedImmutability timeBasedImmutability() { - return this.innerProperties() == null ? null : this.innerProperties().timeBasedImmutability(); - } - - /** - * Get the timeBasedImmutabilityMode property: The time-based immutability mode. Only applicable if time-based - * immutability is enabled. - * - * @return the timeBasedImmutabilityMode value. - */ - public TimeBasedImmutabilityMode timeBasedImmutabilityMode() { - return this.innerProperties() == null ? null : this.innerProperties().timeBasedImmutabilityMode(); - } - - /** - * Get the legalHoldImmutability property: The setting for whether LegalHold is enabled or disabled on the LTR - * backup. When LegalHold is enabled, the backup cannot be deleted until the LegalHold is removed. - * - * @return the legalHoldImmutability value. - */ - public SetLegalHoldImmutability legalHoldImmutability() { - return this.innerProperties() == null ? null : this.innerProperties().legalHoldImmutability(); - } - - /** - * Get the backupStorageAccessTier property: The BackupStorageAccessTier for the LTR backup. - * - * @return the backupStorageAccessTier value. - */ - public BackupStorageAccessTier backupStorageAccessTier() { - return this.innerProperties() == null ? null : this.innerProperties().backupStorageAccessTier(); + public LongTermRetentionBackupInner + withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy) { + if (this.innerProperties() == null) { + this.innerProperties = new LongTermRetentionBackupProperties(); + } + this.innerProperties().withRequestedBackupStorageRedundancy(requestedBackupStorageRedundancy); + return this; } /** @@ -269,8 +216,6 @@ public static LongTermRetentionBackupInner fromJson(JsonReader jsonReader) throw } else if ("properties".equals(fieldName)) { deserializedLongTermRetentionBackupInner.innerProperties = LongTermRetentionBackupProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedLongTermRetentionBackupInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupOperationResultInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupOperationResultInner.java index 4b4b16b945c4..d71e4e1d1b92 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupOperationResultInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupOperationResultInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -24,11 +23,6 @@ public final class LongTermRetentionBackupOperationResultInner extends ProxyReso */ private LongTermRetentionOperationResultProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -47,7 +41,7 @@ public final class LongTermRetentionBackupOperationResultInner extends ProxyReso /** * Creates an instance of LongTermRetentionBackupOperationResultInner class. */ - private LongTermRetentionBackupOperationResultInner() { + public LongTermRetentionBackupOperationResultInner() { } /** @@ -59,15 +53,6 @@ private LongTermRetentionOperationResultProperties 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. * @@ -208,8 +193,6 @@ public static LongTermRetentionBackupOperationResultInner fromJson(JsonReader js } else if ("properties".equals(fieldName)) { deserializedLongTermRetentionBackupOperationResultInner.innerProperties = LongTermRetentionOperationResultProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedLongTermRetentionBackupOperationResultInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupProperties.java index 42e4b7dcbfd3..0fe025f13781 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupProperties.java @@ -1,27 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; -import com.azure.core.annotation.Immutable; +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 com.azure.resourcemanager.sql.models.BackupStorageAccessTier; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.azure.resourcemanager.sql.models.SetLegalHoldImmutability; -import com.azure.resourcemanager.sql.models.TimeBasedImmutability; -import com.azure.resourcemanager.sql.models.TimeBasedImmutabilityMode; import java.io.IOException; import java.time.OffsetDateTime; /** * Properties of a long term retention backup. */ -@Immutable +@Fluent public final class LongTermRetentionBackupProperties implements JsonSerializable { /* * The server name that the backup database belong to. @@ -63,37 +59,10 @@ public final class LongTermRetentionBackupProperties implements JsonSerializable */ private BackupStorageRedundancy requestedBackupStorageRedundancy; - /* - * The setting whether the LTR backup is immutable - */ - private Boolean isBackupImmutable; - - /* - * The setting for whether or not time-based immutability is enabled for the LTR backup. When time-based - * immutability is enabled and locked, the backup cannot be deleted until BackupExpirationTime. - */ - private TimeBasedImmutability timeBasedImmutability; - - /* - * The time-based immutability mode. Only applicable if time-based immutability is enabled. - */ - private TimeBasedImmutabilityMode timeBasedImmutabilityMode; - - /* - * The setting for whether LegalHold is enabled or disabled on the LTR backup. When LegalHold is enabled, the backup - * cannot be deleted until the LegalHold is removed. - */ - private SetLegalHoldImmutability legalHoldImmutability; - - /* - * The BackupStorageAccessTier for the LTR backup - */ - private BackupStorageAccessTier backupStorageAccessTier; - /** * Creates an instance of LongTermRetentionBackupProperties class. */ - private LongTermRetentionBackupProperties() { + public LongTermRetentionBackupProperties() { } /** @@ -169,52 +138,15 @@ public BackupStorageRedundancy requestedBackupStorageRedundancy() { } /** - * Get the isBackupImmutable property: The setting whether the LTR backup is immutable. - * - * @return the isBackupImmutable value. - */ - public Boolean isBackupImmutable() { - return this.isBackupImmutable; - } - - /** - * Get the timeBasedImmutability property: The setting for whether or not time-based immutability is enabled for the - * LTR backup. When time-based immutability is enabled and locked, the backup cannot be deleted until - * BackupExpirationTime. - * - * @return the timeBasedImmutability value. - */ - public TimeBasedImmutability timeBasedImmutability() { - return this.timeBasedImmutability; - } - - /** - * Get the timeBasedImmutabilityMode property: The time-based immutability mode. Only applicable if time-based - * immutability is enabled. - * - * @return the timeBasedImmutabilityMode value. - */ - public TimeBasedImmutabilityMode timeBasedImmutabilityMode() { - return this.timeBasedImmutabilityMode; - } - - /** - * Get the legalHoldImmutability property: The setting for whether LegalHold is enabled or disabled on the LTR - * backup. When LegalHold is enabled, the backup cannot be deleted until the LegalHold is removed. - * - * @return the legalHoldImmutability value. - */ - public SetLegalHoldImmutability legalHoldImmutability() { - return this.legalHoldImmutability; - } - - /** - * Get the backupStorageAccessTier property: The BackupStorageAccessTier for the LTR backup. + * Set the requestedBackupStorageRedundancy property: The storage redundancy type of the backup. * - * @return the backupStorageAccessTier value. + * @param requestedBackupStorageRedundancy the requestedBackupStorageRedundancy value to set. + * @return the LongTermRetentionBackupProperties object itself. */ - public BackupStorageAccessTier backupStorageAccessTier() { - return this.backupStorageAccessTier; + public LongTermRetentionBackupProperties + withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy) { + this.requestedBackupStorageRedundancy = requestedBackupStorageRedundancy; + return this; } /** @@ -233,13 +165,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("requestedBackupStorageRedundancy", this.requestedBackupStorageRedundancy == null ? null : this.requestedBackupStorageRedundancy.toString()); - jsonWriter.writeBooleanField("isBackupImmutable", this.isBackupImmutable); - jsonWriter.writeStringField("timeBasedImmutability", - this.timeBasedImmutability == null ? null : this.timeBasedImmutability.toString()); - jsonWriter.writeStringField("timeBasedImmutabilityMode", - this.timeBasedImmutabilityMode == null ? null : this.timeBasedImmutabilityMode.toString()); - jsonWriter.writeStringField("legalHoldImmutability", - this.legalHoldImmutability == null ? null : this.legalHoldImmutability.toString()); return jsonWriter.writeEndObject(); } @@ -281,21 +206,6 @@ public static LongTermRetentionBackupProperties fromJson(JsonReader jsonReader) } else if ("requestedBackupStorageRedundancy".equals(fieldName)) { deserializedLongTermRetentionBackupProperties.requestedBackupStorageRedundancy = BackupStorageRedundancy.fromString(reader.getString()); - } else if ("isBackupImmutable".equals(fieldName)) { - deserializedLongTermRetentionBackupProperties.isBackupImmutable - = reader.getNullable(JsonReader::getBoolean); - } else if ("timeBasedImmutability".equals(fieldName)) { - deserializedLongTermRetentionBackupProperties.timeBasedImmutability - = TimeBasedImmutability.fromString(reader.getString()); - } else if ("timeBasedImmutabilityMode".equals(fieldName)) { - deserializedLongTermRetentionBackupProperties.timeBasedImmutabilityMode - = TimeBasedImmutabilityMode.fromString(reader.getString()); - } else if ("legalHoldImmutability".equals(fieldName)) { - deserializedLongTermRetentionBackupProperties.legalHoldImmutability - = SetLegalHoldImmutability.fromString(reader.getString()); - } else if ("backupStorageAccessTier".equals(fieldName)) { - deserializedLongTermRetentionBackupProperties.backupStorageAccessTier - = BackupStorageAccessTier.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionOperationResultProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionOperationResultProperties.java index eec1bf61c21b..7a1bd1aa1bbd 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionOperationResultProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionOperationResultProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -57,7 +57,7 @@ public final class LongTermRetentionOperationResultProperties /** * Creates an instance of LongTermRetentionOperationResultProperties class. */ - private LongTermRetentionOperationResultProperties() { + public LongTermRetentionOperationResultProperties() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionPolicyInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionPolicyInner.java index e02ab6e3c31c..c7ddedad02e3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionPolicyInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionPolicyInner.java @@ -1,17 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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.sql.models.TimeBasedImmutability; -import com.azure.resourcemanager.sql.models.TimeBasedImmutabilityMode; import java.io.IOException; /** @@ -22,12 +19,7 @@ public final class LongTermRetentionPolicyInner extends ProxyResource { /* * Resource properties. */ - private LongTermRetentionPolicyProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; + private BaseLongTermRetentionPolicyProperties innerProperties; /* * The type of the resource. @@ -55,19 +47,10 @@ public LongTermRetentionPolicyInner() { * * @return the innerProperties value. */ - private LongTermRetentionPolicyProperties innerProperties() { + private BaseLongTermRetentionPolicyProperties 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. * @@ -98,59 +81,6 @@ public String id() { return this.id; } - /** - * Get the timeBasedImmutability property: The setting for whether to enable time-based immutability for future - * backups. When set, future backups will have TimeBasedImmutability enabled. - * - * @return the timeBasedImmutability value. - */ - public TimeBasedImmutability timeBasedImmutability() { - return this.innerProperties() == null ? null : this.innerProperties().timeBasedImmutability(); - } - - /** - * Set the timeBasedImmutability property: The setting for whether to enable time-based immutability for future - * backups. When set, future backups will have TimeBasedImmutability enabled. - * - * @param timeBasedImmutability the timeBasedImmutability value to set. - * @return the LongTermRetentionPolicyInner object itself. - */ - public LongTermRetentionPolicyInner withTimeBasedImmutability(TimeBasedImmutability timeBasedImmutability) { - if (this.innerProperties() == null) { - this.innerProperties = new LongTermRetentionPolicyProperties(); - } - this.innerProperties().withTimeBasedImmutability(timeBasedImmutability); - return this; - } - - /** - * Get the timeBasedImmutabilityMode property: The setting for time-based immutability mode for future backup (Value - * can be either Locked or UnLocked. Only effective if TimeBasedImmutability is enabled). Caution: Immutability of - * LTR backup cannot be removed if TimeBasedImmutabilityMode is Locked. - * - * @return the timeBasedImmutabilityMode value. - */ - public TimeBasedImmutabilityMode timeBasedImmutabilityMode() { - return this.innerProperties() == null ? null : this.innerProperties().timeBasedImmutabilityMode(); - } - - /** - * Set the timeBasedImmutabilityMode property: The setting for time-based immutability mode for future backup (Value - * can be either Locked or UnLocked. Only effective if TimeBasedImmutability is enabled). Caution: Immutability of - * LTR backup cannot be removed if TimeBasedImmutabilityMode is Locked. - * - * @param timeBasedImmutabilityMode the timeBasedImmutabilityMode value to set. - * @return the LongTermRetentionPolicyInner object itself. - */ - public LongTermRetentionPolicyInner - withTimeBasedImmutabilityMode(TimeBasedImmutabilityMode timeBasedImmutabilityMode) { - if (this.innerProperties() == null) { - this.innerProperties = new LongTermRetentionPolicyProperties(); - } - this.innerProperties().withTimeBasedImmutabilityMode(timeBasedImmutabilityMode); - return this; - } - /** * Get the weeklyRetention property: The weekly retention policy for an LTR backup in an ISO 8601 format. * @@ -168,7 +98,7 @@ public String weeklyRetention() { */ public LongTermRetentionPolicyInner withWeeklyRetention(String weeklyRetention) { if (this.innerProperties() == null) { - this.innerProperties = new LongTermRetentionPolicyProperties(); + this.innerProperties = new BaseLongTermRetentionPolicyProperties(); } this.innerProperties().withWeeklyRetention(weeklyRetention); return this; @@ -191,7 +121,7 @@ public String monthlyRetention() { */ public LongTermRetentionPolicyInner withMonthlyRetention(String monthlyRetention) { if (this.innerProperties() == null) { - this.innerProperties = new LongTermRetentionPolicyProperties(); + this.innerProperties = new BaseLongTermRetentionPolicyProperties(); } this.innerProperties().withMonthlyRetention(monthlyRetention); return this; @@ -214,7 +144,7 @@ public String yearlyRetention() { */ public LongTermRetentionPolicyInner withYearlyRetention(String yearlyRetention) { if (this.innerProperties() == null) { - this.innerProperties = new LongTermRetentionPolicyProperties(); + this.innerProperties = new BaseLongTermRetentionPolicyProperties(); } this.innerProperties().withYearlyRetention(yearlyRetention); return this; @@ -237,7 +167,7 @@ public Integer weekOfYear() { */ public LongTermRetentionPolicyInner withWeekOfYear(Integer weekOfYear) { if (this.innerProperties() == null) { - this.innerProperties = new LongTermRetentionPolicyProperties(); + this.innerProperties = new BaseLongTermRetentionPolicyProperties(); } this.innerProperties().withWeekOfYear(weekOfYear); return this; @@ -288,9 +218,7 @@ public static LongTermRetentionPolicyInner fromJson(JsonReader jsonReader) throw deserializedLongTermRetentionPolicyInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedLongTermRetentionPolicyInner.innerProperties - = LongTermRetentionPolicyProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedLongTermRetentionPolicyInner.systemData = SystemData.fromJson(reader); + = BaseLongTermRetentionPolicyProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionPolicyProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionPolicyProperties.java deleted file mode 100644 index 864b15d18e73..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionPolicyProperties.java +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.TimeBasedImmutability; -import com.azure.resourcemanager.sql.models.TimeBasedImmutabilityMode; -import java.io.IOException; - -/** - * Properties of a long term retention policy. - */ -@Fluent -public final class LongTermRetentionPolicyProperties implements JsonSerializable { - /* - * The setting for whether to enable time-based immutability for future backups. When set, future backups will have - * TimeBasedImmutability enabled. - */ - private TimeBasedImmutability timeBasedImmutability; - - /* - * The setting for time-based immutability mode for future backup (Value can be either Locked or UnLocked. Only - * effective if TimeBasedImmutability is enabled). Caution: Immutability of LTR backup cannot be removed if - * TimeBasedImmutabilityMode is Locked. - */ - private TimeBasedImmutabilityMode timeBasedImmutabilityMode; - - /* - * The weekly retention policy for an LTR backup in an ISO 8601 format. - */ - private String weeklyRetention; - - /* - * The monthly retention policy for an LTR backup in an ISO 8601 format. - */ - private String monthlyRetention; - - /* - * The yearly retention policy for an LTR backup in an ISO 8601 format. - */ - private String yearlyRetention; - - /* - * The week of year to take the yearly backup in an ISO 8601 format. - */ - private Integer weekOfYear; - - /** - * Creates an instance of LongTermRetentionPolicyProperties class. - */ - public LongTermRetentionPolicyProperties() { - } - - /** - * Get the timeBasedImmutability property: The setting for whether to enable time-based immutability for future - * backups. When set, future backups will have TimeBasedImmutability enabled. - * - * @return the timeBasedImmutability value. - */ - public TimeBasedImmutability timeBasedImmutability() { - return this.timeBasedImmutability; - } - - /** - * Set the timeBasedImmutability property: The setting for whether to enable time-based immutability for future - * backups. When set, future backups will have TimeBasedImmutability enabled. - * - * @param timeBasedImmutability the timeBasedImmutability value to set. - * @return the LongTermRetentionPolicyProperties object itself. - */ - public LongTermRetentionPolicyProperties withTimeBasedImmutability(TimeBasedImmutability timeBasedImmutability) { - this.timeBasedImmutability = timeBasedImmutability; - return this; - } - - /** - * Get the timeBasedImmutabilityMode property: The setting for time-based immutability mode for future backup (Value - * can be either Locked or UnLocked. Only effective if TimeBasedImmutability is enabled). Caution: Immutability of - * LTR backup cannot be removed if TimeBasedImmutabilityMode is Locked. - * - * @return the timeBasedImmutabilityMode value. - */ - public TimeBasedImmutabilityMode timeBasedImmutabilityMode() { - return this.timeBasedImmutabilityMode; - } - - /** - * Set the timeBasedImmutabilityMode property: The setting for time-based immutability mode for future backup (Value - * can be either Locked or UnLocked. Only effective if TimeBasedImmutability is enabled). Caution: Immutability of - * LTR backup cannot be removed if TimeBasedImmutabilityMode is Locked. - * - * @param timeBasedImmutabilityMode the timeBasedImmutabilityMode value to set. - * @return the LongTermRetentionPolicyProperties object itself. - */ - public LongTermRetentionPolicyProperties - withTimeBasedImmutabilityMode(TimeBasedImmutabilityMode timeBasedImmutabilityMode) { - this.timeBasedImmutabilityMode = timeBasedImmutabilityMode; - return this; - } - - /** - * Get the weeklyRetention property: The weekly retention policy for an LTR backup in an ISO 8601 format. - * - * @return the weeklyRetention value. - */ - public String weeklyRetention() { - return this.weeklyRetention; - } - - /** - * Set the weeklyRetention property: The weekly retention policy for an LTR backup in an ISO 8601 format. - * - * @param weeklyRetention the weeklyRetention value to set. - * @return the LongTermRetentionPolicyProperties object itself. - */ - public LongTermRetentionPolicyProperties withWeeklyRetention(String weeklyRetention) { - this.weeklyRetention = weeklyRetention; - return this; - } - - /** - * Get the monthlyRetention property: The monthly retention policy for an LTR backup in an ISO 8601 format. - * - * @return the monthlyRetention value. - */ - public String monthlyRetention() { - return this.monthlyRetention; - } - - /** - * Set the monthlyRetention property: The monthly retention policy for an LTR backup in an ISO 8601 format. - * - * @param monthlyRetention the monthlyRetention value to set. - * @return the LongTermRetentionPolicyProperties object itself. - */ - public LongTermRetentionPolicyProperties withMonthlyRetention(String monthlyRetention) { - this.monthlyRetention = monthlyRetention; - return this; - } - - /** - * Get the yearlyRetention property: The yearly retention policy for an LTR backup in an ISO 8601 format. - * - * @return the yearlyRetention value. - */ - public String yearlyRetention() { - return this.yearlyRetention; - } - - /** - * Set the yearlyRetention property: The yearly retention policy for an LTR backup in an ISO 8601 format. - * - * @param yearlyRetention the yearlyRetention value to set. - * @return the LongTermRetentionPolicyProperties object itself. - */ - public LongTermRetentionPolicyProperties withYearlyRetention(String yearlyRetention) { - this.yearlyRetention = yearlyRetention; - return this; - } - - /** - * Get the weekOfYear property: The week of year to take the yearly backup in an ISO 8601 format. - * - * @return the weekOfYear value. - */ - public Integer weekOfYear() { - return this.weekOfYear; - } - - /** - * Set the weekOfYear property: The week of year to take the yearly backup in an ISO 8601 format. - * - * @param weekOfYear the weekOfYear value to set. - * @return the LongTermRetentionPolicyProperties object itself. - */ - public LongTermRetentionPolicyProperties withWeekOfYear(Integer weekOfYear) { - this.weekOfYear = weekOfYear; - 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("timeBasedImmutability", - this.timeBasedImmutability == null ? null : this.timeBasedImmutability.toString()); - jsonWriter.writeStringField("timeBasedImmutabilityMode", - this.timeBasedImmutabilityMode == null ? null : this.timeBasedImmutabilityMode.toString()); - jsonWriter.writeStringField("weeklyRetention", this.weeklyRetention); - jsonWriter.writeStringField("monthlyRetention", this.monthlyRetention); - jsonWriter.writeStringField("yearlyRetention", this.yearlyRetention); - jsonWriter.writeNumberField("weekOfYear", this.weekOfYear); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LongTermRetentionPolicyProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LongTermRetentionPolicyProperties 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 LongTermRetentionPolicyProperties. - */ - public static LongTermRetentionPolicyProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LongTermRetentionPolicyProperties deserializedLongTermRetentionPolicyProperties - = new LongTermRetentionPolicyProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("timeBasedImmutability".equals(fieldName)) { - deserializedLongTermRetentionPolicyProperties.timeBasedImmutability - = TimeBasedImmutability.fromString(reader.getString()); - } else if ("timeBasedImmutabilityMode".equals(fieldName)) { - deserializedLongTermRetentionPolicyProperties.timeBasedImmutabilityMode - = TimeBasedImmutabilityMode.fromString(reader.getString()); - } else if ("weeklyRetention".equals(fieldName)) { - deserializedLongTermRetentionPolicyProperties.weeklyRetention = reader.getString(); - } else if ("monthlyRetention".equals(fieldName)) { - deserializedLongTermRetentionPolicyProperties.monthlyRetention = reader.getString(); - } else if ("yearlyRetention".equals(fieldName)) { - deserializedLongTermRetentionPolicyProperties.yearlyRetention = reader.getString(); - } else if ("weekOfYear".equals(fieldName)) { - deserializedLongTermRetentionPolicyProperties.weekOfYear = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedLongTermRetentionPolicyProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsInner.java index e8ea6622fc92..a9bd24541a38 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; -import com.azure.core.annotation.Immutable; +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; @@ -17,18 +16,13 @@ /** * Maintenance window options. */ -@Immutable +@Fluent public final class MaintenanceWindowOptionsInner extends ProxyResource { /* * Resource properties. */ private MaintenanceWindowOptionsProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -47,7 +41,7 @@ public final class MaintenanceWindowOptionsInner extends ProxyResource { /** * Creates an instance of MaintenanceWindowOptionsInner class. */ - private MaintenanceWindowOptionsInner() { + public MaintenanceWindowOptionsInner() { } /** @@ -59,15 +53,6 @@ private MaintenanceWindowOptionsProperties 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. * @@ -107,6 +92,20 @@ public Boolean isEnabled() { return this.innerProperties() == null ? null : this.innerProperties().isEnabled(); } + /** + * Set the isEnabled property: Whether maintenance windows are enabled for the database. + * + * @param isEnabled the isEnabled value to set. + * @return the MaintenanceWindowOptionsInner object itself. + */ + public MaintenanceWindowOptionsInner withIsEnabled(Boolean isEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new MaintenanceWindowOptionsProperties(); + } + this.innerProperties().withIsEnabled(isEnabled); + return this; + } + /** * Get the maintenanceWindowCycles property: Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, * 24*60}. @@ -117,6 +116,22 @@ public List maintenanceWindowCycles() { return this.innerProperties() == null ? null : this.innerProperties().maintenanceWindowCycles(); } + /** + * Set the maintenanceWindowCycles property: Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, + * 24*60}. + * + * @param maintenanceWindowCycles the maintenanceWindowCycles value to set. + * @return the MaintenanceWindowOptionsInner object itself. + */ + public MaintenanceWindowOptionsInner + withMaintenanceWindowCycles(List maintenanceWindowCycles) { + if (this.innerProperties() == null) { + this.innerProperties = new MaintenanceWindowOptionsProperties(); + } + this.innerProperties().withMaintenanceWindowCycles(maintenanceWindowCycles); + return this; + } + /** * Get the minDurationInMinutes property: Minimum duration of maintenance window. * @@ -126,6 +141,20 @@ public Integer minDurationInMinutes() { return this.innerProperties() == null ? null : this.innerProperties().minDurationInMinutes(); } + /** + * Set the minDurationInMinutes property: Minimum duration of maintenance window. + * + * @param minDurationInMinutes the minDurationInMinutes value to set. + * @return the MaintenanceWindowOptionsInner object itself. + */ + public MaintenanceWindowOptionsInner withMinDurationInMinutes(Integer minDurationInMinutes) { + if (this.innerProperties() == null) { + this.innerProperties = new MaintenanceWindowOptionsProperties(); + } + this.innerProperties().withMinDurationInMinutes(minDurationInMinutes); + return this; + } + /** * Get the defaultDurationInMinutes property: Default duration for maintenance window. * @@ -135,6 +164,20 @@ public Integer defaultDurationInMinutes() { return this.innerProperties() == null ? null : this.innerProperties().defaultDurationInMinutes(); } + /** + * Set the defaultDurationInMinutes property: Default duration for maintenance window. + * + * @param defaultDurationInMinutes the defaultDurationInMinutes value to set. + * @return the MaintenanceWindowOptionsInner object itself. + */ + public MaintenanceWindowOptionsInner withDefaultDurationInMinutes(Integer defaultDurationInMinutes) { + if (this.innerProperties() == null) { + this.innerProperties = new MaintenanceWindowOptionsProperties(); + } + this.innerProperties().withDefaultDurationInMinutes(defaultDurationInMinutes); + return this; + } + /** * Get the minCycles property: Minimum number of maintenance windows cycles to be set on the database. * @@ -144,6 +187,20 @@ public Integer minCycles() { return this.innerProperties() == null ? null : this.innerProperties().minCycles(); } + /** + * Set the minCycles property: Minimum number of maintenance windows cycles to be set on the database. + * + * @param minCycles the minCycles value to set. + * @return the MaintenanceWindowOptionsInner object itself. + */ + public MaintenanceWindowOptionsInner withMinCycles(Integer minCycles) { + if (this.innerProperties() == null) { + this.innerProperties = new MaintenanceWindowOptionsProperties(); + } + this.innerProperties().withMinCycles(minCycles); + return this; + } + /** * Get the timeGranularityInMinutes property: Time granularity in minutes for maintenance windows. * @@ -153,6 +210,20 @@ public Integer timeGranularityInMinutes() { return this.innerProperties() == null ? null : this.innerProperties().timeGranularityInMinutes(); } + /** + * Set the timeGranularityInMinutes property: Time granularity in minutes for maintenance windows. + * + * @param timeGranularityInMinutes the timeGranularityInMinutes value to set. + * @return the MaintenanceWindowOptionsInner object itself. + */ + public MaintenanceWindowOptionsInner withTimeGranularityInMinutes(Integer timeGranularityInMinutes) { + if (this.innerProperties() == null) { + this.innerProperties = new MaintenanceWindowOptionsProperties(); + } + this.innerProperties().withTimeGranularityInMinutes(timeGranularityInMinutes); + return this; + } + /** * Get the allowMultipleMaintenanceWindowsPerCycle property: Whether we allow multiple maintenance windows per * cycle. @@ -163,6 +234,22 @@ public Boolean allowMultipleMaintenanceWindowsPerCycle() { return this.innerProperties() == null ? null : this.innerProperties().allowMultipleMaintenanceWindowsPerCycle(); } + /** + * Set the allowMultipleMaintenanceWindowsPerCycle property: Whether we allow multiple maintenance windows per + * cycle. + * + * @param allowMultipleMaintenanceWindowsPerCycle the allowMultipleMaintenanceWindowsPerCycle value to set. + * @return the MaintenanceWindowOptionsInner object itself. + */ + public MaintenanceWindowOptionsInner + withAllowMultipleMaintenanceWindowsPerCycle(Boolean allowMultipleMaintenanceWindowsPerCycle) { + if (this.innerProperties() == null) { + this.innerProperties = new MaintenanceWindowOptionsProperties(); + } + this.innerProperties().withAllowMultipleMaintenanceWindowsPerCycle(allowMultipleMaintenanceWindowsPerCycle); + return this; + } + /** * Validates the instance. * @@ -210,8 +297,6 @@ public static MaintenanceWindowOptionsInner fromJson(JsonReader jsonReader) thro } else if ("properties".equals(fieldName)) { deserializedMaintenanceWindowOptionsInner.innerProperties = MaintenanceWindowOptionsProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedMaintenanceWindowOptionsInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsProperties.java index 0920888b7afa..8c495d4a5d8a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.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,7 +16,7 @@ /** * Maintenance window options properties. */ -@Immutable +@Fluent public final class MaintenanceWindowOptionsProperties implements JsonSerializable { /* * Whether maintenance windows are enabled for the database. @@ -56,7 +56,7 @@ public final class MaintenanceWindowOptionsProperties implements JsonSerializabl /** * Creates an instance of MaintenanceWindowOptionsProperties class. */ - private MaintenanceWindowOptionsProperties() { + public MaintenanceWindowOptionsProperties() { } /** @@ -68,6 +68,17 @@ public Boolean isEnabled() { return this.isEnabled; } + /** + * Set the isEnabled property: Whether maintenance windows are enabled for the database. + * + * @param isEnabled the isEnabled value to set. + * @return the MaintenanceWindowOptionsProperties object itself. + */ + public MaintenanceWindowOptionsProperties withIsEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + return this; + } + /** * Get the maintenanceWindowCycles property: Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, * 24*60}. @@ -78,6 +89,19 @@ public List maintenanceWindowCycles() { return this.maintenanceWindowCycles; } + /** + * Set the maintenanceWindowCycles property: Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, + * 24*60}. + * + * @param maintenanceWindowCycles the maintenanceWindowCycles value to set. + * @return the MaintenanceWindowOptionsProperties object itself. + */ + public MaintenanceWindowOptionsProperties + withMaintenanceWindowCycles(List maintenanceWindowCycles) { + this.maintenanceWindowCycles = maintenanceWindowCycles; + return this; + } + /** * Get the minDurationInMinutes property: Minimum duration of maintenance window. * @@ -87,6 +111,17 @@ public Integer minDurationInMinutes() { return this.minDurationInMinutes; } + /** + * Set the minDurationInMinutes property: Minimum duration of maintenance window. + * + * @param minDurationInMinutes the minDurationInMinutes value to set. + * @return the MaintenanceWindowOptionsProperties object itself. + */ + public MaintenanceWindowOptionsProperties withMinDurationInMinutes(Integer minDurationInMinutes) { + this.minDurationInMinutes = minDurationInMinutes; + return this; + } + /** * Get the defaultDurationInMinutes property: Default duration for maintenance window. * @@ -96,6 +131,17 @@ public Integer defaultDurationInMinutes() { return this.defaultDurationInMinutes; } + /** + * Set the defaultDurationInMinutes property: Default duration for maintenance window. + * + * @param defaultDurationInMinutes the defaultDurationInMinutes value to set. + * @return the MaintenanceWindowOptionsProperties object itself. + */ + public MaintenanceWindowOptionsProperties withDefaultDurationInMinutes(Integer defaultDurationInMinutes) { + this.defaultDurationInMinutes = defaultDurationInMinutes; + return this; + } + /** * Get the minCycles property: Minimum number of maintenance windows cycles to be set on the database. * @@ -105,6 +151,17 @@ public Integer minCycles() { return this.minCycles; } + /** + * Set the minCycles property: Minimum number of maintenance windows cycles to be set on the database. + * + * @param minCycles the minCycles value to set. + * @return the MaintenanceWindowOptionsProperties object itself. + */ + public MaintenanceWindowOptionsProperties withMinCycles(Integer minCycles) { + this.minCycles = minCycles; + return this; + } + /** * Get the timeGranularityInMinutes property: Time granularity in minutes for maintenance windows. * @@ -114,6 +171,17 @@ public Integer timeGranularityInMinutes() { return this.timeGranularityInMinutes; } + /** + * Set the timeGranularityInMinutes property: Time granularity in minutes for maintenance windows. + * + * @param timeGranularityInMinutes the timeGranularityInMinutes value to set. + * @return the MaintenanceWindowOptionsProperties object itself. + */ + public MaintenanceWindowOptionsProperties withTimeGranularityInMinutes(Integer timeGranularityInMinutes) { + this.timeGranularityInMinutes = timeGranularityInMinutes; + return this; + } + /** * Get the allowMultipleMaintenanceWindowsPerCycle property: Whether we allow multiple maintenance windows per * cycle. @@ -124,6 +192,19 @@ public Boolean allowMultipleMaintenanceWindowsPerCycle() { return this.allowMultipleMaintenanceWindowsPerCycle; } + /** + * Set the allowMultipleMaintenanceWindowsPerCycle property: Whether we allow multiple maintenance windows per + * cycle. + * + * @param allowMultipleMaintenanceWindowsPerCycle the allowMultipleMaintenanceWindowsPerCycle value to set. + * @return the MaintenanceWindowOptionsProperties object itself. + */ + public MaintenanceWindowOptionsProperties + withAllowMultipleMaintenanceWindowsPerCycle(Boolean allowMultipleMaintenanceWindowsPerCycle) { + this.allowMultipleMaintenanceWindowsPerCycle = allowMultipleMaintenanceWindowsPerCycle; + return this; + } + /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsInner.java index 343730577f6b..eb302d62166b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -24,11 +23,6 @@ public final class MaintenanceWindowsInner extends ProxyResource { */ private MaintenanceWindowsProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -59,15 +53,6 @@ private MaintenanceWindowsProperties 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. * @@ -166,8 +151,6 @@ public static MaintenanceWindowsInner fromJson(JsonReader jsonReader) throws IOE deserializedMaintenanceWindowsInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedMaintenanceWindowsInner.innerProperties = MaintenanceWindowsProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedMaintenanceWindowsInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsProperties.java index 6928be4973d9..c8eb8389167f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyInner.java index 72ffe4fe731e..1d872ad40043 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ public final class ManagedBackupShortTermRetentionPolicyInner extends ProxyResou */ private ManagedBackupShortTermRetentionPolicyProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -57,15 +51,6 @@ private ManagedBackupShortTermRetentionPolicyProperties 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. * @@ -168,8 +153,6 @@ public static ManagedBackupShortTermRetentionPolicyInner fromJson(JsonReader jso } else if ("properties".equals(fieldName)) { deserializedManagedBackupShortTermRetentionPolicyInner.innerProperties = ManagedBackupShortTermRetentionPolicyProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedBackupShortTermRetentionPolicyInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyProperties.java index 20729d8a02f3..806c74ae63ca 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseAdvancedThreatProtectionInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseAdvancedThreatProtectionInner.java deleted file mode 100644 index dd8e15a0bc4d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseAdvancedThreatProtectionInner.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.AdvancedThreatProtectionState; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * A managed database Advanced Threat Protection. - */ -@Fluent -public final class ManagedDatabaseAdvancedThreatProtectionInner extends ProxyResource { - /* - * Resource properties. - */ - private AdvancedThreatProtectionProperties 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 ManagedDatabaseAdvancedThreatProtectionInner class. - */ - public ManagedDatabaseAdvancedThreatProtectionInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private AdvancedThreatProtectionProperties 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 state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled - * or a state has not been applied yet on the specific database or server. - * - * @return the state value. - */ - public AdvancedThreatProtectionState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); - } - - /** - * Set the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled - * or a state has not been applied yet on the specific database or server. - * - * @param state the state value to set. - * @return the ManagedDatabaseAdvancedThreatProtectionInner object itself. - */ - public ManagedDatabaseAdvancedThreatProtectionInner withState(AdvancedThreatProtectionState state) { - if (this.innerProperties() == null) { - this.innerProperties = new AdvancedThreatProtectionProperties(); - } - this.innerProperties().withState(state); - return this; - } - - /** - * Get the creationTime property: Specifies the UTC creation time of the policy. - * - * @return the creationTime value. - */ - public OffsetDateTime creationTime() { - return this.innerProperties() == null ? null : this.innerProperties().creationTime(); - } - - /** - * 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedDatabaseAdvancedThreatProtectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedDatabaseAdvancedThreatProtectionInner 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 ManagedDatabaseAdvancedThreatProtectionInner. - */ - public static ManagedDatabaseAdvancedThreatProtectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedDatabaseAdvancedThreatProtectionInner deserializedManagedDatabaseAdvancedThreatProtectionInner - = new ManagedDatabaseAdvancedThreatProtectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedManagedDatabaseAdvancedThreatProtectionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedManagedDatabaseAdvancedThreatProtectionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedManagedDatabaseAdvancedThreatProtectionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedManagedDatabaseAdvancedThreatProtectionInner.innerProperties - = AdvancedThreatProtectionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedDatabaseAdvancedThreatProtectionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedDatabaseAdvancedThreatProtectionInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseInner.java index d1fa7d97b6c1..b35337f19797 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseInner.java @@ -1,18 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -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.sql.models.CatalogCollationType; import com.azure.resourcemanager.sql.models.ManagedDatabaseCreateMode; -import com.azure.resourcemanager.sql.models.ManagedDatabaseExtendedAccessibilityInfo; import com.azure.resourcemanager.sql.models.ManagedDatabaseStatus; import java.io.IOException; import java.time.OffsetDateTime; @@ -28,11 +26,6 @@ public final class ManagedDatabaseInner extends Resource { */ private ManagedDatabaseProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -63,15 +56,6 @@ private ManagedDatabaseProperties 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. * @@ -314,31 +298,6 @@ public ManagedDatabaseInner withSourceDatabaseId(String sourceDatabaseId) { return this; } - /** - * Get the crossSubscriptionSourceDatabaseId property: The resource identifier of the cross-subscription source - * database associated with create operation of this database. - * - * @return the crossSubscriptionSourceDatabaseId value. - */ - public String crossSubscriptionSourceDatabaseId() { - return this.innerProperties() == null ? null : this.innerProperties().crossSubscriptionSourceDatabaseId(); - } - - /** - * Set the crossSubscriptionSourceDatabaseId property: The resource identifier of the cross-subscription source - * database associated with create operation of this database. - * - * @param crossSubscriptionSourceDatabaseId the crossSubscriptionSourceDatabaseId value to set. - * @return the ManagedDatabaseInner object itself. - */ - public ManagedDatabaseInner withCrossSubscriptionSourceDatabaseId(String crossSubscriptionSourceDatabaseId) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedDatabaseProperties(); - } - this.innerProperties().withCrossSubscriptionSourceDatabaseId(crossSubscriptionSourceDatabaseId); - return this; - } - /** * Get the restorableDroppedDatabaseId property: The restorable dropped database resource id to restore when * creating this database. @@ -365,66 +324,8 @@ public ManagedDatabaseInner withRestorableDroppedDatabaseId(String restorableDro } /** - * Get the crossSubscriptionRestorableDroppedDatabaseId property: The restorable cross-subscription dropped database - * resource id to restore when creating this database. - * - * @return the crossSubscriptionRestorableDroppedDatabaseId value. - */ - public String crossSubscriptionRestorableDroppedDatabaseId() { - return this.innerProperties() == null - ? null - : this.innerProperties().crossSubscriptionRestorableDroppedDatabaseId(); - } - - /** - * Set the crossSubscriptionRestorableDroppedDatabaseId property: The restorable cross-subscription dropped database - * resource id to restore when creating this database. - * - * @param crossSubscriptionRestorableDroppedDatabaseId the crossSubscriptionRestorableDroppedDatabaseId value to - * set. - * @return the ManagedDatabaseInner object itself. - */ - public ManagedDatabaseInner - withCrossSubscriptionRestorableDroppedDatabaseId(String crossSubscriptionRestorableDroppedDatabaseId) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedDatabaseProperties(); - } - this.innerProperties() - .withCrossSubscriptionRestorableDroppedDatabaseId(crossSubscriptionRestorableDroppedDatabaseId); - return this; - } - - /** - * Get the storageContainerIdentity property: Conditional. If createMode is RestoreExternalBackup, this value is - * used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or - * 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed. - * - * @return the storageContainerIdentity value. - */ - public String storageContainerIdentity() { - return this.innerProperties() == null ? null : this.innerProperties().storageContainerIdentity(); - } - - /** - * Set the storageContainerIdentity property: Conditional. If createMode is RestoreExternalBackup, this value is - * used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or - * 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed. - * - * @param storageContainerIdentity the storageContainerIdentity value to set. - * @return the ManagedDatabaseInner object itself. - */ - public ManagedDatabaseInner withStorageContainerIdentity(String storageContainerIdentity) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedDatabaseProperties(); - } - this.innerProperties().withStorageContainerIdentity(storageContainerIdentity); - return this; - } - - /** - * Get the storageContainerSasToken property: Conditional. If createMode is RestoreExternalBackup and - * storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas - * token. + * Get the storageContainerSasToken property: Conditional. If createMode is RestoreExternalBackup, this value is + * required. Specifies the storage container sas token. * * @return the storageContainerSasToken value. */ @@ -433,9 +334,8 @@ public String storageContainerSasToken() { } /** - * Set the storageContainerSasToken property: Conditional. If createMode is RestoreExternalBackup and - * storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas - * token. + * Set the storageContainerSasToken property: Conditional. If createMode is RestoreExternalBackup, this value is + * required. Specifies the storage container sas token. * * @param storageContainerSasToken the storageContainerSasToken value to set. * @return the ManagedDatabaseInner object itself. @@ -554,71 +454,6 @@ public ManagedDatabaseInner withLastBackupName(String lastBackupName) { return this; } - /** - * Get the crossSubscriptionTargetManagedInstanceId property: Target managed instance id used in cross-subscription - * restore. - * - * @return the crossSubscriptionTargetManagedInstanceId value. - */ - public String crossSubscriptionTargetManagedInstanceId() { - return this.innerProperties() == null - ? null - : this.innerProperties().crossSubscriptionTargetManagedInstanceId(); - } - - /** - * Set the crossSubscriptionTargetManagedInstanceId property: Target managed instance id used in cross-subscription - * restore. - * - * @param crossSubscriptionTargetManagedInstanceId the crossSubscriptionTargetManagedInstanceId value to set. - * @return the ManagedDatabaseInner object itself. - */ - public ManagedDatabaseInner - withCrossSubscriptionTargetManagedInstanceId(String crossSubscriptionTargetManagedInstanceId) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedDatabaseProperties(); - } - this.innerProperties().withCrossSubscriptionTargetManagedInstanceId(crossSubscriptionTargetManagedInstanceId); - return this; - } - - /** - * Get the isLedgerOn property: Whether or not this database is a ledger database, which means all tables in the - * database are ledger tables. Note: the value of this property cannot be changed after the database has been - * created. - * - * @return the isLedgerOn value. - */ - public Boolean isLedgerOn() { - return this.innerProperties() == null ? null : this.innerProperties().isLedgerOn(); - } - - /** - * Set the isLedgerOn property: Whether or not this database is a ledger database, which means all tables in the - * database are ledger tables. Note: the value of this property cannot be changed after the database has been - * created. - * - * @param isLedgerOn the isLedgerOn value to set. - * @return the ManagedDatabaseInner object itself. - */ - public ManagedDatabaseInner withIsLedgerOn(Boolean isLedgerOn) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedDatabaseProperties(); - } - this.innerProperties().withIsLedgerOn(isLedgerOn); - return this; - } - - /** - * Get the extendedAccessibilityInfo property: Additional observability and troubleshooting information for - * databases in ‘Inaccessible’ state. - * - * @return the extendedAccessibilityInfo value. - */ - public ManagedDatabaseExtendedAccessibilityInfo extendedAccessibilityInfo() { - return this.innerProperties() == null ? null : this.innerProperties().extendedAccessibilityInfo(); - } - /** * Validates the instance. * @@ -671,8 +506,6 @@ public static ManagedDatabaseInner fromJson(JsonReader jsonReader) throws IOExce deserializedManagedDatabaseInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedManagedDatabaseInner.innerProperties = ManagedDatabaseProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedDatabaseInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseMoveOperationResultInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseMoveOperationResultInner.java deleted file mode 100644 index 8a9b0c26717c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseMoveOperationResultInner.java +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.ManagementOperationState; -import com.azure.resourcemanager.sql.models.MoveOperationMode; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * A managed database move operation. - */ -@Immutable -public final class ManagedDatabaseMoveOperationResultInner extends ProxyResource { - /* - * Resource properties. - */ - private ManagedDatabaseMoveOperationResultProperties 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 ManagedDatabaseMoveOperationResultInner class. - */ - private ManagedDatabaseMoveOperationResultInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private ManagedDatabaseMoveOperationResultProperties 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 operation property: The name of operation. - * - * @return the operation value. - */ - public String operation() { - return this.innerProperties() == null ? null : this.innerProperties().operation(); - } - - /** - * Get the operationFriendlyName property: The friendly name of operation. - * - * @return the operationFriendlyName value. - */ - public String operationFriendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().operationFriendlyName(); - } - - /** - * Get the startTime property: The operation start time. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.innerProperties() == null ? null : this.innerProperties().startTime(); - } - - /** - * Get the state property: The operation state. - * - * @return the state value. - */ - public ManagementOperationState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); - } - - /** - * Get the operationMode property: Operation mode. - * - * @return the operationMode value. - */ - public MoveOperationMode operationMode() { - return this.innerProperties() == null ? null : this.innerProperties().operationMode(); - } - - /** - * Get the sourceManagedInstanceName property: Source Managed Instance name. - * - * @return the sourceManagedInstanceName value. - */ - public String sourceManagedInstanceName() { - return this.innerProperties() == null ? null : this.innerProperties().sourceManagedInstanceName(); - } - - /** - * Get the targetManagedInstanceName property: Target Managed Instance name. - * - * @return the targetManagedInstanceName value. - */ - public String targetManagedInstanceName() { - return this.innerProperties() == null ? null : this.innerProperties().targetManagedInstanceName(); - } - - /** - * Get the sourceManagedInstanceId property: Source Managed Instance resource id. - * - * @return the sourceManagedInstanceId value. - */ - public String sourceManagedInstanceId() { - return this.innerProperties() == null ? null : this.innerProperties().sourceManagedInstanceId(); - } - - /** - * Get the targetManagedInstanceId property: Target Managed instance resource id. - * - * @return the targetManagedInstanceId value. - */ - public String targetManagedInstanceId() { - return this.innerProperties() == null ? null : this.innerProperties().targetManagedInstanceId(); - } - - /** - * Get the sourceDatabaseName property: Source database name. - * - * @return the sourceDatabaseName value. - */ - public String sourceDatabaseName() { - return this.innerProperties() == null ? null : this.innerProperties().sourceDatabaseName(); - } - - /** - * Get the targetDatabaseName property: Target database name. - * - * @return the targetDatabaseName value. - */ - public String targetDatabaseName() { - return this.innerProperties() == null ? null : this.innerProperties().targetDatabaseName(); - } - - /** - * Get the isCancellable property: Is move operation cancellable. - * - * @return the isCancellable value. - */ - public Boolean isCancellable() { - return this.innerProperties() == null ? null : this.innerProperties().isCancellable(); - } - - /** - * Get the errorCode property: The operation error code. - * - * @return the errorCode value. - */ - public Integer errorCode() { - return this.innerProperties() == null ? null : this.innerProperties().errorCode(); - } - - /** - * Get the errorDescription property: The operation error description. - * - * @return the errorDescription value. - */ - public String errorDescription() { - return this.innerProperties() == null ? null : this.innerProperties().errorDescription(); - } - - /** - * Get the errorSeverity property: The operation error severity. - * - * @return the errorSeverity value. - */ - public Integer errorSeverity() { - return this.innerProperties() == null ? null : this.innerProperties().errorSeverity(); - } - - /** - * Get the isUserError property: Whether or not the error is a user error. - * - * @return the isUserError value. - */ - public Boolean isUserError() { - return this.innerProperties() == null ? null : this.innerProperties().isUserError(); - } - - /** - * 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedDatabaseMoveOperationResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedDatabaseMoveOperationResultInner 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 ManagedDatabaseMoveOperationResultInner. - */ - public static ManagedDatabaseMoveOperationResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedDatabaseMoveOperationResultInner deserializedManagedDatabaseMoveOperationResultInner - = new ManagedDatabaseMoveOperationResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultInner.innerProperties - = ManagedDatabaseMoveOperationResultProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedDatabaseMoveOperationResultInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseMoveOperationResultProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseMoveOperationResultProperties.java deleted file mode 100644 index 21a1522ec5c9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseMoveOperationResultProperties.java +++ /dev/null @@ -1,338 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.fluent.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.models.ManagementOperationState; -import com.azure.resourcemanager.sql.models.MoveOperationMode; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Contains the operation result properties for managed database move operation. - */ -@Immutable -public final class ManagedDatabaseMoveOperationResultProperties - implements JsonSerializable { - /* - * The name of operation. - */ - private String operation; - - /* - * The friendly name of operation. - */ - private String operationFriendlyName; - - /* - * The operation start time. - */ - private OffsetDateTime startTime; - - /* - * The operation state. - */ - private ManagementOperationState state; - - /* - * Operation mode. - */ - private MoveOperationMode operationMode; - - /* - * Source Managed Instance name. - */ - private String sourceManagedInstanceName; - - /* - * Target Managed Instance name. - */ - private String targetManagedInstanceName; - - /* - * Source Managed Instance resource id. - */ - private String sourceManagedInstanceId; - - /* - * Target Managed instance resource id. - */ - private String targetManagedInstanceId; - - /* - * Source database name. - */ - private String sourceDatabaseName; - - /* - * Target database name. - */ - private String targetDatabaseName; - - /* - * Is move operation cancellable. - */ - private Boolean isCancellable; - - /* - * The operation error code. - */ - private Integer errorCode; - - /* - * The operation error description. - */ - private String errorDescription; - - /* - * The operation error severity. - */ - private Integer errorSeverity; - - /* - * Whether or not the error is a user error. - */ - private Boolean isUserError; - - /** - * Creates an instance of ManagedDatabaseMoveOperationResultProperties class. - */ - private ManagedDatabaseMoveOperationResultProperties() { - } - - /** - * Get the operation property: The name of operation. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the operationFriendlyName property: The friendly name of operation. - * - * @return the operationFriendlyName value. - */ - public String operationFriendlyName() { - return this.operationFriendlyName; - } - - /** - * Get the startTime property: The operation start time. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the state property: The operation state. - * - * @return the state value. - */ - public ManagementOperationState state() { - return this.state; - } - - /** - * Get the operationMode property: Operation mode. - * - * @return the operationMode value. - */ - public MoveOperationMode operationMode() { - return this.operationMode; - } - - /** - * Get the sourceManagedInstanceName property: Source Managed Instance name. - * - * @return the sourceManagedInstanceName value. - */ - public String sourceManagedInstanceName() { - return this.sourceManagedInstanceName; - } - - /** - * Get the targetManagedInstanceName property: Target Managed Instance name. - * - * @return the targetManagedInstanceName value. - */ - public String targetManagedInstanceName() { - return this.targetManagedInstanceName; - } - - /** - * Get the sourceManagedInstanceId property: Source Managed Instance resource id. - * - * @return the sourceManagedInstanceId value. - */ - public String sourceManagedInstanceId() { - return this.sourceManagedInstanceId; - } - - /** - * Get the targetManagedInstanceId property: Target Managed instance resource id. - * - * @return the targetManagedInstanceId value. - */ - public String targetManagedInstanceId() { - return this.targetManagedInstanceId; - } - - /** - * Get the sourceDatabaseName property: Source database name. - * - * @return the sourceDatabaseName value. - */ - public String sourceDatabaseName() { - return this.sourceDatabaseName; - } - - /** - * Get the targetDatabaseName property: Target database name. - * - * @return the targetDatabaseName value. - */ - public String targetDatabaseName() { - return this.targetDatabaseName; - } - - /** - * Get the isCancellable property: Is move operation cancellable. - * - * @return the isCancellable value. - */ - public Boolean isCancellable() { - return this.isCancellable; - } - - /** - * Get the errorCode property: The operation error code. - * - * @return the errorCode value. - */ - public Integer errorCode() { - return this.errorCode; - } - - /** - * Get the errorDescription property: The operation error description. - * - * @return the errorDescription value. - */ - public String errorDescription() { - return this.errorDescription; - } - - /** - * Get the errorSeverity property: The operation error severity. - * - * @return the errorSeverity value. - */ - public Integer errorSeverity() { - return this.errorSeverity; - } - - /** - * Get the isUserError property: Whether or not the error is a user error. - * - * @return the isUserError value. - */ - public Boolean isUserError() { - return this.isUserError; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedDatabaseMoveOperationResultProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedDatabaseMoveOperationResultProperties 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 ManagedDatabaseMoveOperationResultProperties. - */ - public static ManagedDatabaseMoveOperationResultProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedDatabaseMoveOperationResultProperties deserializedManagedDatabaseMoveOperationResultProperties - = new ManagedDatabaseMoveOperationResultProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("operation".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultProperties.operation = reader.getString(); - } else if ("operationFriendlyName".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultProperties.operationFriendlyName = reader.getString(); - } else if ("startTime".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultProperties.startTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("state".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultProperties.state - = ManagementOperationState.fromString(reader.getString()); - } else if ("operationMode".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultProperties.operationMode - = MoveOperationMode.fromString(reader.getString()); - } else if ("sourceManagedInstanceName".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultProperties.sourceManagedInstanceName - = reader.getString(); - } else if ("targetManagedInstanceName".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultProperties.targetManagedInstanceName - = reader.getString(); - } else if ("sourceManagedInstanceId".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultProperties.sourceManagedInstanceId - = reader.getString(); - } else if ("targetManagedInstanceId".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultProperties.targetManagedInstanceId - = reader.getString(); - } else if ("sourceDatabaseName".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultProperties.sourceDatabaseName = reader.getString(); - } else if ("targetDatabaseName".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultProperties.targetDatabaseName = reader.getString(); - } else if ("isCancellable".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultProperties.isCancellable - = reader.getNullable(JsonReader::getBoolean); - } else if ("errorCode".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultProperties.errorCode - = reader.getNullable(JsonReader::getInt); - } else if ("errorDescription".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultProperties.errorDescription = reader.getString(); - } else if ("errorSeverity".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultProperties.errorSeverity - = reader.getNullable(JsonReader::getInt); - } else if ("isUserError".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationResultProperties.isUserError - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedDatabaseMoveOperationResultProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseProperties.java index 536704c2c24f..cc9a782a96c0 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -12,7 +12,6 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.CatalogCollationType; import com.azure.resourcemanager.sql.models.ManagedDatabaseCreateMode; -import com.azure.resourcemanager.sql.models.ManagedDatabaseExtendedAccessibilityInfo; import com.azure.resourcemanager.sql.models.ManagedDatabaseStatus; import java.io.IOException; import java.time.OffsetDateTime; @@ -81,32 +80,14 @@ public final class ManagedDatabaseProperties implements JsonSerializable { - /* - * Restore type. - */ - private String type; - /* * Restore status. */ private String status; /* - * The reason why restore is in Blocked state. - */ - private String blockReason; - - /* - * Last uploaded file name. - */ - private String lastUploadedFileName; - - /* - * Last uploaded file time. + * Current restoring file name. */ - private OffsetDateTime lastUploadedFileTime; + private String currentRestoringFileName; /* * Last restored file name. @@ -60,91 +43,37 @@ public final class ManagedDatabaseRestoreDetailsProperties /* * Percent completed. */ - private Integer percentCompleted; + private Double percentCompleted; /* - * Current restored size MB. + * List of unrestorable files. */ - private Integer currentRestoredSizeMB; - - /* - * Current restore plan size MB. - */ - private Integer currentRestorePlanSizeMB; - - /* - * Current backup type. - */ - private String currentBackupType; - - /* - * Current restoring file name. - */ - private String currentRestoringFileName; + private List unrestorableFiles; /* * Number of files detected. */ - private Integer numberOfFilesDetected; - - /* - * Number of files queued. - */ - private Integer numberOfFilesQueued; - - /* - * Number of files skipped. - */ - private Integer numberOfFilesSkipped; - - /* - * Number of files restoring. - */ - private Integer numberOfFilesRestoring; - - /* - * Number of files restored. - */ - private Integer numberOfFilesRestored; - - /* - * Number of files unrestorable. - */ - private Integer numberOfFilesUnrestorable; + private Long numberOfFilesDetected; /* - * Full backup sets. - */ - private List fullBackupSets; - - /* - * Diff backup sets. + * Last uploaded file name. */ - private List diffBackupSets; + private String lastUploadedFileName; /* - * Log backup sets. + * Last uploaded file time. */ - private List logBackupSets; + private OffsetDateTime lastUploadedFileTime; /* - * Unrestorable files. + * The reason why restore is in Blocked state. */ - private List unrestorableFiles; + private String blockReason; /** * Creates an instance of ManagedDatabaseRestoreDetailsProperties class. */ - private ManagedDatabaseRestoreDetailsProperties() { - } - - /** - * Get the type property: Restore type. - * - * @return the type value. - */ - public String type() { - return this.type; + public ManagedDatabaseRestoreDetailsProperties() { } /** @@ -157,30 +86,12 @@ public String status() { } /** - * Get the blockReason property: The reason why restore is in Blocked state. - * - * @return the blockReason value. - */ - public String blockReason() { - return this.blockReason; - } - - /** - * Get the lastUploadedFileName property: Last uploaded file name. - * - * @return the lastUploadedFileName value. - */ - public String lastUploadedFileName() { - return this.lastUploadedFileName; - } - - /** - * Get the lastUploadedFileTime property: Last uploaded file time. + * Get the currentRestoringFileName property: Current restoring file name. * - * @return the lastUploadedFileTime value. + * @return the currentRestoringFileName value. */ - public OffsetDateTime lastUploadedFileTime() { - return this.lastUploadedFileTime; + public String currentRestoringFileName() { + return this.currentRestoringFileName; } /** @@ -206,44 +117,17 @@ public OffsetDateTime lastRestoredFileTime() { * * @return the percentCompleted value. */ - public Integer percentCompleted() { + public Double percentCompleted() { return this.percentCompleted; } /** - * Get the currentRestoredSizeMB property: Current restored size MB. - * - * @return the currentRestoredSizeMB value. - */ - public Integer currentRestoredSizeMB() { - return this.currentRestoredSizeMB; - } - - /** - * Get the currentRestorePlanSizeMB property: Current restore plan size MB. - * - * @return the currentRestorePlanSizeMB value. - */ - public Integer currentRestorePlanSizeMB() { - return this.currentRestorePlanSizeMB; - } - - /** - * Get the currentBackupType property: Current backup type. - * - * @return the currentBackupType value. - */ - public String currentBackupType() { - return this.currentBackupType; - } - - /** - * Get the currentRestoringFileName property: Current restoring file name. + * Get the unrestorableFiles property: List of unrestorable files. * - * @return the currentRestoringFileName value. + * @return the unrestorableFiles value. */ - public String currentRestoringFileName() { - return this.currentRestoringFileName; + public List unrestorableFiles() { + return this.unrestorableFiles; } /** @@ -251,89 +135,35 @@ public String currentRestoringFileName() { * * @return the numberOfFilesDetected value. */ - public Integer numberOfFilesDetected() { + public Long numberOfFilesDetected() { return this.numberOfFilesDetected; } /** - * Get the numberOfFilesQueued property: Number of files queued. - * - * @return the numberOfFilesQueued value. - */ - public Integer numberOfFilesQueued() { - return this.numberOfFilesQueued; - } - - /** - * Get the numberOfFilesSkipped property: Number of files skipped. - * - * @return the numberOfFilesSkipped value. - */ - public Integer numberOfFilesSkipped() { - return this.numberOfFilesSkipped; - } - - /** - * Get the numberOfFilesRestoring property: Number of files restoring. - * - * @return the numberOfFilesRestoring value. - */ - public Integer numberOfFilesRestoring() { - return this.numberOfFilesRestoring; - } - - /** - * Get the numberOfFilesRestored property: Number of files restored. - * - * @return the numberOfFilesRestored value. - */ - public Integer numberOfFilesRestored() { - return this.numberOfFilesRestored; - } - - /** - * Get the numberOfFilesUnrestorable property: Number of files unrestorable. - * - * @return the numberOfFilesUnrestorable value. - */ - public Integer numberOfFilesUnrestorable() { - return this.numberOfFilesUnrestorable; - } - - /** - * Get the fullBackupSets property: Full backup sets. - * - * @return the fullBackupSets value. - */ - public List fullBackupSets() { - return this.fullBackupSets; - } - - /** - * Get the diffBackupSets property: Diff backup sets. + * Get the lastUploadedFileName property: Last uploaded file name. * - * @return the diffBackupSets value. + * @return the lastUploadedFileName value. */ - public List diffBackupSets() { - return this.diffBackupSets; + public String lastUploadedFileName() { + return this.lastUploadedFileName; } /** - * Get the logBackupSets property: Log backup sets. + * Get the lastUploadedFileTime property: Last uploaded file time. * - * @return the logBackupSets value. + * @return the lastUploadedFileTime value. */ - public List logBackupSets() { - return this.logBackupSets; + public OffsetDateTime lastUploadedFileTime() { + return this.lastUploadedFileTime; } /** - * Get the unrestorableFiles property: Unrestorable files. + * Get the blockReason property: The reason why restore is in Blocked state. * - * @return the unrestorableFiles value. + * @return the blockReason value. */ - public List unrestorableFiles() { - return this.unrestorableFiles; + public String blockReason() { + return this.blockReason; } /** @@ -342,18 +172,6 @@ public List unrestorabl * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (fullBackupSets() != null) { - fullBackupSets().forEach(e -> e.validate()); - } - if (diffBackupSets() != null) { - diffBackupSets().forEach(e -> e.validate()); - } - if (logBackupSets() != null) { - logBackupSets().forEach(e -> e.validate()); - } - if (unrestorableFiles() != null) { - unrestorableFiles().forEach(e -> e.validate()); - } } /** @@ -381,17 +199,10 @@ public static ManagedDatabaseRestoreDetailsProperties fromJson(JsonReader jsonRe String fieldName = reader.getFieldName(); reader.nextToken(); - if ("type".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsProperties.type = reader.getString(); - } else if ("status".equals(fieldName)) { + if ("status".equals(fieldName)) { deserializedManagedDatabaseRestoreDetailsProperties.status = reader.getString(); - } else if ("blockReason".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsProperties.blockReason = reader.getString(); - } else if ("lastUploadedFileName".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsProperties.lastUploadedFileName = reader.getString(); - } else if ("lastUploadedFileTime".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsProperties.lastUploadedFileTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("currentRestoringFileName".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsProperties.currentRestoringFileName = reader.getString(); } else if ("lastRestoredFileName".equals(fieldName)) { deserializedManagedDatabaseRestoreDetailsProperties.lastRestoredFileName = reader.getString(); } else if ("lastRestoredFileTime".equals(fieldName)) { @@ -399,51 +210,20 @@ public static ManagedDatabaseRestoreDetailsProperties fromJson(JsonReader jsonRe .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("percentCompleted".equals(fieldName)) { deserializedManagedDatabaseRestoreDetailsProperties.percentCompleted - = reader.getNullable(JsonReader::getInt); - } else if ("currentRestoredSizeMB".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsProperties.currentRestoredSizeMB - = reader.getNullable(JsonReader::getInt); - } else if ("currentRestorePlanSizeMB".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsProperties.currentRestorePlanSizeMB - = reader.getNullable(JsonReader::getInt); - } else if ("currentBackupType".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsProperties.currentBackupType = reader.getString(); - } else if ("currentRestoringFileName".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsProperties.currentRestoringFileName = reader.getString(); - } else if ("numberOfFilesDetected".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsProperties.numberOfFilesDetected - = reader.getNullable(JsonReader::getInt); - } else if ("numberOfFilesQueued".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsProperties.numberOfFilesQueued - = reader.getNullable(JsonReader::getInt); - } else if ("numberOfFilesSkipped".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsProperties.numberOfFilesSkipped - = reader.getNullable(JsonReader::getInt); - } else if ("numberOfFilesRestoring".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsProperties.numberOfFilesRestoring - = reader.getNullable(JsonReader::getInt); - } else if ("numberOfFilesRestored".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsProperties.numberOfFilesRestored - = reader.getNullable(JsonReader::getInt); - } else if ("numberOfFilesUnrestorable".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsProperties.numberOfFilesUnrestorable - = reader.getNullable(JsonReader::getInt); - } else if ("fullBackupSets".equals(fieldName)) { - List fullBackupSets = reader - .readArray(reader1 -> ManagedDatabaseRestoreDetailsBackupSetProperties.fromJson(reader1)); - deserializedManagedDatabaseRestoreDetailsProperties.fullBackupSets = fullBackupSets; - } else if ("diffBackupSets".equals(fieldName)) { - List diffBackupSets = reader - .readArray(reader1 -> ManagedDatabaseRestoreDetailsBackupSetProperties.fromJson(reader1)); - deserializedManagedDatabaseRestoreDetailsProperties.diffBackupSets = diffBackupSets; - } else if ("logBackupSets".equals(fieldName)) { - List logBackupSets = reader - .readArray(reader1 -> ManagedDatabaseRestoreDetailsBackupSetProperties.fromJson(reader1)); - deserializedManagedDatabaseRestoreDetailsProperties.logBackupSets = logBackupSets; + = reader.getNullable(JsonReader::getDouble); } else if ("unrestorableFiles".equals(fieldName)) { - List unrestorableFiles = reader.readArray( - reader1 -> ManagedDatabaseRestoreDetailsUnrestorableFileProperties.fromJson(reader1)); + List unrestorableFiles = reader.readArray(reader1 -> reader1.getString()); deserializedManagedDatabaseRestoreDetailsProperties.unrestorableFiles = unrestorableFiles; + } else if ("numberOfFilesDetected".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsProperties.numberOfFilesDetected + = reader.getNullable(JsonReader::getLong); + } else if ("lastUploadedFileName".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsProperties.lastUploadedFileName = reader.getString(); + } else if ("lastUploadedFileTime".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsProperties.lastUploadedFileTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("blockReason".equals(fieldName)) { + deserializedManagedDatabaseRestoreDetailsProperties.blockReason = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseRestoreDetailsResultInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseRestoreDetailsResultInner.java index 088591cc68c0..6d61c3ea316c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseRestoreDetailsResultInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseRestoreDetailsResultInner.java @@ -1,17 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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.sql.models.ManagedDatabaseRestoreDetailsBackupSetProperties; -import com.azure.resourcemanager.sql.models.ManagedDatabaseRestoreDetailsUnrestorableFileProperties; import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; @@ -26,11 +23,6 @@ public final class ManagedDatabaseRestoreDetailsResultInner extends ProxyResourc */ private ManagedDatabaseRestoreDetailsProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -49,7 +41,7 @@ public final class ManagedDatabaseRestoreDetailsResultInner extends ProxyResourc /** * Creates an instance of ManagedDatabaseRestoreDetailsResultInner class. */ - private ManagedDatabaseRestoreDetailsResultInner() { + public ManagedDatabaseRestoreDetailsResultInner() { } /** @@ -61,15 +53,6 @@ private ManagedDatabaseRestoreDetailsProperties 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. * @@ -100,15 +83,6 @@ public String id() { return this.id; } - /** - * Get the type property: Restore type. - * - * @return the type value. - */ - public String typePropertiesType() { - return this.innerProperties() == null ? null : this.innerProperties().type(); - } - /** * Get the status property: Restore status. * @@ -119,30 +93,12 @@ public String status() { } /** - * Get the blockReason property: The reason why restore is in Blocked state. - * - * @return the blockReason value. - */ - public String blockReason() { - return this.innerProperties() == null ? null : this.innerProperties().blockReason(); - } - - /** - * Get the lastUploadedFileName property: Last uploaded file name. - * - * @return the lastUploadedFileName value. - */ - public String lastUploadedFileName() { - return this.innerProperties() == null ? null : this.innerProperties().lastUploadedFileName(); - } - - /** - * Get the lastUploadedFileTime property: Last uploaded file time. + * Get the currentRestoringFileName property: Current restoring file name. * - * @return the lastUploadedFileTime value. + * @return the currentRestoringFileName value. */ - public OffsetDateTime lastUploadedFileTime() { - return this.innerProperties() == null ? null : this.innerProperties().lastUploadedFileTime(); + public String currentRestoringFileName() { + return this.innerProperties() == null ? null : this.innerProperties().currentRestoringFileName(); } /** @@ -168,44 +124,17 @@ public OffsetDateTime lastRestoredFileTime() { * * @return the percentCompleted value. */ - public Integer percentCompleted() { + public Double percentCompleted() { return this.innerProperties() == null ? null : this.innerProperties().percentCompleted(); } /** - * Get the currentRestoredSizeMB property: Current restored size MB. + * Get the unrestorableFiles property: List of unrestorable files. * - * @return the currentRestoredSizeMB value. - */ - public Integer currentRestoredSizeMB() { - return this.innerProperties() == null ? null : this.innerProperties().currentRestoredSizeMB(); - } - - /** - * Get the currentRestorePlanSizeMB property: Current restore plan size MB. - * - * @return the currentRestorePlanSizeMB value. - */ - public Integer currentRestorePlanSizeMB() { - return this.innerProperties() == null ? null : this.innerProperties().currentRestorePlanSizeMB(); - } - - /** - * Get the currentBackupType property: Current backup type. - * - * @return the currentBackupType value. - */ - public String currentBackupType() { - return this.innerProperties() == null ? null : this.innerProperties().currentBackupType(); - } - - /** - * Get the currentRestoringFileName property: Current restoring file name. - * - * @return the currentRestoringFileName value. + * @return the unrestorableFiles value. */ - public String currentRestoringFileName() { - return this.innerProperties() == null ? null : this.innerProperties().currentRestoringFileName(); + public List unrestorableFiles() { + return this.innerProperties() == null ? null : this.innerProperties().unrestorableFiles(); } /** @@ -213,89 +142,35 @@ public String currentRestoringFileName() { * * @return the numberOfFilesDetected value. */ - public Integer numberOfFilesDetected() { + public Long numberOfFilesDetected() { return this.innerProperties() == null ? null : this.innerProperties().numberOfFilesDetected(); } /** - * Get the numberOfFilesQueued property: Number of files queued. - * - * @return the numberOfFilesQueued value. - */ - public Integer numberOfFilesQueued() { - return this.innerProperties() == null ? null : this.innerProperties().numberOfFilesQueued(); - } - - /** - * Get the numberOfFilesSkipped property: Number of files skipped. - * - * @return the numberOfFilesSkipped value. - */ - public Integer numberOfFilesSkipped() { - return this.innerProperties() == null ? null : this.innerProperties().numberOfFilesSkipped(); - } - - /** - * Get the numberOfFilesRestoring property: Number of files restoring. - * - * @return the numberOfFilesRestoring value. - */ - public Integer numberOfFilesRestoring() { - return this.innerProperties() == null ? null : this.innerProperties().numberOfFilesRestoring(); - } - - /** - * Get the numberOfFilesRestored property: Number of files restored. - * - * @return the numberOfFilesRestored value. - */ - public Integer numberOfFilesRestored() { - return this.innerProperties() == null ? null : this.innerProperties().numberOfFilesRestored(); - } - - /** - * Get the numberOfFilesUnrestorable property: Number of files unrestorable. - * - * @return the numberOfFilesUnrestorable value. - */ - public Integer numberOfFilesUnrestorable() { - return this.innerProperties() == null ? null : this.innerProperties().numberOfFilesUnrestorable(); - } - - /** - * Get the fullBackupSets property: Full backup sets. - * - * @return the fullBackupSets value. - */ - public List fullBackupSets() { - return this.innerProperties() == null ? null : this.innerProperties().fullBackupSets(); - } - - /** - * Get the diffBackupSets property: Diff backup sets. + * Get the lastUploadedFileName property: Last uploaded file name. * - * @return the diffBackupSets value. + * @return the lastUploadedFileName value. */ - public List diffBackupSets() { - return this.innerProperties() == null ? null : this.innerProperties().diffBackupSets(); + public String lastUploadedFileName() { + return this.innerProperties() == null ? null : this.innerProperties().lastUploadedFileName(); } /** - * Get the logBackupSets property: Log backup sets. + * Get the lastUploadedFileTime property: Last uploaded file time. * - * @return the logBackupSets value. + * @return the lastUploadedFileTime value. */ - public List logBackupSets() { - return this.innerProperties() == null ? null : this.innerProperties().logBackupSets(); + public OffsetDateTime lastUploadedFileTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastUploadedFileTime(); } /** - * Get the unrestorableFiles property: Unrestorable files. + * Get the blockReason property: The reason why restore is in Blocked state. * - * @return the unrestorableFiles value. + * @return the blockReason value. */ - public List unrestorableFiles() { - return this.innerProperties() == null ? null : this.innerProperties().unrestorableFiles(); + public String blockReason() { + return this.innerProperties() == null ? null : this.innerProperties().blockReason(); } /** @@ -345,8 +220,6 @@ public static ManagedDatabaseRestoreDetailsResultInner fromJson(JsonReader jsonR } else if ("properties".equals(fieldName)) { deserializedManagedDatabaseRestoreDetailsResultInner.innerProperties = ManagedDatabaseRestoreDetailsProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsResultInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseSecurityAlertPolicyInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseSecurityAlertPolicyInner.java index 28af9db452c5..f71b8257229f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseSecurityAlertPolicyInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseSecurityAlertPolicyInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -25,11 +24,6 @@ public final class ManagedDatabaseSecurityAlertPolicyInner extends ProxyResource */ private SecurityAlertPolicyProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -60,15 +54,6 @@ private SecurityAlertPolicyProperties 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. * @@ -324,8 +309,6 @@ public static ManagedDatabaseSecurityAlertPolicyInner fromJson(JsonReader jsonRe } else if ("properties".equals(fieldName)) { deserializedManagedDatabaseSecurityAlertPolicyInner.innerProperties = SecurityAlertPolicyProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedDatabaseSecurityAlertPolicyInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorInner.java index aae4664e3bca..8c275d11ffed 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -24,11 +23,6 @@ public final class ManagedInstanceAdministratorInner extends ProxyResource { */ private ManagedInstanceAdministratorProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -59,15 +53,6 @@ private ManagedInstanceAdministratorProperties 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. * @@ -237,8 +222,6 @@ public static ManagedInstanceAdministratorInner fromJson(JsonReader jsonReader) } else if ("properties".equals(fieldName)) { deserializedManagedInstanceAdministratorInner.innerProperties = ManagedInstanceAdministratorProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedInstanceAdministratorInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorProperties.java index 6891577970ce..887daa1e2c79 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdvancedThreatProtectionInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdvancedThreatProtectionInner.java deleted file mode 100644 index 642ef952057f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdvancedThreatProtectionInner.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.AdvancedThreatProtectionState; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * A managed instance Advanced Threat Protection. - */ -@Fluent -public final class ManagedInstanceAdvancedThreatProtectionInner extends ProxyResource { - /* - * Resource properties. - */ - private AdvancedThreatProtectionProperties 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 ManagedInstanceAdvancedThreatProtectionInner class. - */ - public ManagedInstanceAdvancedThreatProtectionInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private AdvancedThreatProtectionProperties 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 state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled - * or a state has not been applied yet on the specific database or server. - * - * @return the state value. - */ - public AdvancedThreatProtectionState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); - } - - /** - * Set the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled - * or a state has not been applied yet on the specific database or server. - * - * @param state the state value to set. - * @return the ManagedInstanceAdvancedThreatProtectionInner object itself. - */ - public ManagedInstanceAdvancedThreatProtectionInner withState(AdvancedThreatProtectionState state) { - if (this.innerProperties() == null) { - this.innerProperties = new AdvancedThreatProtectionProperties(); - } - this.innerProperties().withState(state); - return this; - } - - /** - * Get the creationTime property: Specifies the UTC creation time of the policy. - * - * @return the creationTime value. - */ - public OffsetDateTime creationTime() { - return this.innerProperties() == null ? null : this.innerProperties().creationTime(); - } - - /** - * 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedInstanceAdvancedThreatProtectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedInstanceAdvancedThreatProtectionInner 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 ManagedInstanceAdvancedThreatProtectionInner. - */ - public static ManagedInstanceAdvancedThreatProtectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedInstanceAdvancedThreatProtectionInner deserializedManagedInstanceAdvancedThreatProtectionInner - = new ManagedInstanceAdvancedThreatProtectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedManagedInstanceAdvancedThreatProtectionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedManagedInstanceAdvancedThreatProtectionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedManagedInstanceAdvancedThreatProtectionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedManagedInstanceAdvancedThreatProtectionInner.innerProperties - = AdvancedThreatProtectionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedInstanceAdvancedThreatProtectionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedInstanceAdvancedThreatProtectionInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthProperties.java index f9339d4dcd15..58ae0212f563 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthenticationInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthenticationInner.java index 08a64637dd60..f5be5d3957c7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthenticationInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthenticationInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ public final class ManagedInstanceAzureADOnlyAuthenticationInner extends ProxyRe */ private ManagedInstanceAzureADOnlyAuthProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -57,15 +51,6 @@ private ManagedInstanceAzureADOnlyAuthProperties 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. * @@ -167,8 +152,6 @@ public static ManagedInstanceAzureADOnlyAuthenticationInner fromJson(JsonReader } else if ("properties".equals(fieldName)) { deserializedManagedInstanceAzureADOnlyAuthenticationInner.innerProperties = ManagedInstanceAzureADOnlyAuthProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedInstanceAzureADOnlyAuthenticationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceDtcInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceDtcInner.java deleted file mode 100644 index 0dce234d0469..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceDtcInner.java +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.ManagedInstanceDtcSecuritySettings; -import com.azure.resourcemanager.sql.models.ProvisioningState; -import java.io.IOException; -import java.util.List; - -/** - * SQL Managed Instance DTC. - */ -@Fluent -public final class ManagedInstanceDtcInner extends ProxyResource { - /* - * Resource properties. - */ - private ManagedInstanceDtcProperties 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 ManagedInstanceDtcInner class. - */ - public ManagedInstanceDtcInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private ManagedInstanceDtcProperties 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 dtcEnabled property: Active status of managed instance DTC. - * - * @return the dtcEnabled value. - */ - public Boolean dtcEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().dtcEnabled(); - } - - /** - * Set the dtcEnabled property: Active status of managed instance DTC. - * - * @param dtcEnabled the dtcEnabled value to set. - * @return the ManagedInstanceDtcInner object itself. - */ - public ManagedInstanceDtcInner withDtcEnabled(Boolean dtcEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceDtcProperties(); - } - this.innerProperties().withDtcEnabled(dtcEnabled); - return this; - } - - /** - * Get the securitySettings property: Security settings of managed instance DTC. - * - * @return the securitySettings value. - */ - public ManagedInstanceDtcSecuritySettings securitySettings() { - return this.innerProperties() == null ? null : this.innerProperties().securitySettings(); - } - - /** - * Set the securitySettings property: Security settings of managed instance DTC. - * - * @param securitySettings the securitySettings value to set. - * @return the ManagedInstanceDtcInner object itself. - */ - public ManagedInstanceDtcInner withSecuritySettings(ManagedInstanceDtcSecuritySettings securitySettings) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceDtcProperties(); - } - this.innerProperties().withSecuritySettings(securitySettings); - return this; - } - - /** - * Get the externalDnsSuffixSearchList property: External dns suffix search list of managed instance DTC. - * - * @return the externalDnsSuffixSearchList value. - */ - public List externalDnsSuffixSearchList() { - return this.innerProperties() == null ? null : this.innerProperties().externalDnsSuffixSearchList(); - } - - /** - * Set the externalDnsSuffixSearchList property: External dns suffix search list of managed instance DTC. - * - * @param externalDnsSuffixSearchList the externalDnsSuffixSearchList value to set. - * @return the ManagedInstanceDtcInner object itself. - */ - public ManagedInstanceDtcInner withExternalDnsSuffixSearchList(List externalDnsSuffixSearchList) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceDtcProperties(); - } - this.innerProperties().withExternalDnsSuffixSearchList(externalDnsSuffixSearchList); - return this; - } - - /** - * Get the dtcHostNameDnsSuffix property: Host name dns suffix of managed instance DTC. - * - * @return the dtcHostNameDnsSuffix value. - */ - public String dtcHostNameDnsSuffix() { - return this.innerProperties() == null ? null : this.innerProperties().dtcHostNameDnsSuffix(); - } - - /** - * Get the fqdnEnabled property: Status of FQDN of managed instance DTC. Toggling this setting might trigger a - * restart of the managed instance. - * - * @return the fqdnEnabled value. - */ - public Boolean fqdnEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().fqdnEnabled(); - } - - /** - * Set the fqdnEnabled property: Status of FQDN of managed instance DTC. Toggling this setting might trigger a - * restart of the managed instance. - * - * @param fqdnEnabled the fqdnEnabled value to set. - * @return the ManagedInstanceDtcInner object itself. - */ - public ManagedInstanceDtcInner withFqdnEnabled(Boolean fqdnEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceDtcProperties(); - } - this.innerProperties().withFqdnEnabled(fqdnEnabled); - return this; - } - - /** - * Get the provisioningState property: Provisioning state of managed instance DTC. - * - * @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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedInstanceDtcInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedInstanceDtcInner 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 ManagedInstanceDtcInner. - */ - public static ManagedInstanceDtcInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedInstanceDtcInner deserializedManagedInstanceDtcInner = new ManagedInstanceDtcInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedManagedInstanceDtcInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedManagedInstanceDtcInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedManagedInstanceDtcInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedManagedInstanceDtcInner.innerProperties = ManagedInstanceDtcProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedInstanceDtcInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedInstanceDtcInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceDtcProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceDtcProperties.java deleted file mode 100644 index 73d98fa0420d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceDtcProperties.java +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.ManagedInstanceDtcSecuritySettings; -import com.azure.resourcemanager.sql.models.ProvisioningState; -import java.io.IOException; -import java.util.List; - -/** - * The properties of managed instance DTC. - */ -@Fluent -public final class ManagedInstanceDtcProperties implements JsonSerializable { - /* - * Active status of managed instance DTC. - */ - private Boolean dtcEnabled; - - /* - * Security settings of managed instance DTC. - */ - private ManagedInstanceDtcSecuritySettings securitySettings; - - /* - * External dns suffix search list of managed instance DTC. - */ - private List externalDnsSuffixSearchList; - - /* - * Host name dns suffix of managed instance DTC. - */ - private String dtcHostNameDnsSuffix; - - /* - * Status of FQDN of managed instance DTC. Toggling this setting might trigger a restart of the managed instance. - */ - private Boolean fqdnEnabled; - - /* - * Provisioning state of managed instance DTC. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of ManagedInstanceDtcProperties class. - */ - public ManagedInstanceDtcProperties() { - } - - /** - * Get the dtcEnabled property: Active status of managed instance DTC. - * - * @return the dtcEnabled value. - */ - public Boolean dtcEnabled() { - return this.dtcEnabled; - } - - /** - * Set the dtcEnabled property: Active status of managed instance DTC. - * - * @param dtcEnabled the dtcEnabled value to set. - * @return the ManagedInstanceDtcProperties object itself. - */ - public ManagedInstanceDtcProperties withDtcEnabled(Boolean dtcEnabled) { - this.dtcEnabled = dtcEnabled; - return this; - } - - /** - * Get the securitySettings property: Security settings of managed instance DTC. - * - * @return the securitySettings value. - */ - public ManagedInstanceDtcSecuritySettings securitySettings() { - return this.securitySettings; - } - - /** - * Set the securitySettings property: Security settings of managed instance DTC. - * - * @param securitySettings the securitySettings value to set. - * @return the ManagedInstanceDtcProperties object itself. - */ - public ManagedInstanceDtcProperties withSecuritySettings(ManagedInstanceDtcSecuritySettings securitySettings) { - this.securitySettings = securitySettings; - return this; - } - - /** - * Get the externalDnsSuffixSearchList property: External dns suffix search list of managed instance DTC. - * - * @return the externalDnsSuffixSearchList value. - */ - public List externalDnsSuffixSearchList() { - return this.externalDnsSuffixSearchList; - } - - /** - * Set the externalDnsSuffixSearchList property: External dns suffix search list of managed instance DTC. - * - * @param externalDnsSuffixSearchList the externalDnsSuffixSearchList value to set. - * @return the ManagedInstanceDtcProperties object itself. - */ - public ManagedInstanceDtcProperties withExternalDnsSuffixSearchList(List externalDnsSuffixSearchList) { - this.externalDnsSuffixSearchList = externalDnsSuffixSearchList; - return this; - } - - /** - * Get the dtcHostNameDnsSuffix property: Host name dns suffix of managed instance DTC. - * - * @return the dtcHostNameDnsSuffix value. - */ - public String dtcHostNameDnsSuffix() { - return this.dtcHostNameDnsSuffix; - } - - /** - * Get the fqdnEnabled property: Status of FQDN of managed instance DTC. Toggling this setting might trigger a - * restart of the managed instance. - * - * @return the fqdnEnabled value. - */ - public Boolean fqdnEnabled() { - return this.fqdnEnabled; - } - - /** - * Set the fqdnEnabled property: Status of FQDN of managed instance DTC. Toggling this setting might trigger a - * restart of the managed instance. - * - * @param fqdnEnabled the fqdnEnabled value to set. - * @return the ManagedInstanceDtcProperties object itself. - */ - public ManagedInstanceDtcProperties withFqdnEnabled(Boolean fqdnEnabled) { - this.fqdnEnabled = fqdnEnabled; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of managed instance DTC. - * - * @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() { - if (securitySettings() != null) { - securitySettings().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("dtcEnabled", this.dtcEnabled); - jsonWriter.writeJsonField("securitySettings", this.securitySettings); - jsonWriter.writeArrayField("externalDnsSuffixSearchList", this.externalDnsSuffixSearchList, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("fqdnEnabled", this.fqdnEnabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedInstanceDtcProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedInstanceDtcProperties 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 ManagedInstanceDtcProperties. - */ - public static ManagedInstanceDtcProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedInstanceDtcProperties deserializedManagedInstanceDtcProperties = new ManagedInstanceDtcProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("dtcEnabled".equals(fieldName)) { - deserializedManagedInstanceDtcProperties.dtcEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("securitySettings".equals(fieldName)) { - deserializedManagedInstanceDtcProperties.securitySettings - = ManagedInstanceDtcSecuritySettings.fromJson(reader); - } else if ("externalDnsSuffixSearchList".equals(fieldName)) { - List externalDnsSuffixSearchList = reader.readArray(reader1 -> reader1.getString()); - deserializedManagedInstanceDtcProperties.externalDnsSuffixSearchList = externalDnsSuffixSearchList; - } else if ("dtcHostNameDnsSuffix".equals(fieldName)) { - deserializedManagedInstanceDtcProperties.dtcHostNameDnsSuffix = reader.getString(); - } else if ("fqdnEnabled".equals(fieldName)) { - deserializedManagedInstanceDtcProperties.fqdnEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("provisioningState".equals(fieldName)) { - deserializedManagedInstanceDtcProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedInstanceDtcProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorInner.java index a350f235f120..39324b65e7c6 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -18,20 +17,15 @@ */ @Fluent public final class ManagedInstanceEncryptionProtectorInner extends ProxyResource { - /* - * Resource properties. - */ - private ManagedInstanceEncryptionProtectorProperties innerProperties; - /* * Kind of encryption protector. This is metadata used for the Azure portal experience. */ private String kind; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private ManagedInstanceEncryptionProtectorProperties innerProperties; /* * The type of the resource. @@ -54,15 +48,6 @@ public final class ManagedInstanceEncryptionProtectorInner extends ProxyResource public ManagedInstanceEncryptionProtectorInner() { } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private ManagedInstanceEncryptionProtectorProperties innerProperties() { - return this.innerProperties; - } - /** * Get the kind property: Kind of encryption protector. This is metadata used for the Azure portal experience. * @@ -73,12 +58,12 @@ public String kind() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private ManagedInstanceEncryptionProtectorProperties innerProperties() { + return this.innerProperties; } /** @@ -242,13 +227,11 @@ public static ManagedInstanceEncryptionProtectorInner fromJson(JsonReader jsonRe deserializedManagedInstanceEncryptionProtectorInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedManagedInstanceEncryptionProtectorInner.type = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedManagedInstanceEncryptionProtectorInner.kind = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedManagedInstanceEncryptionProtectorInner.innerProperties = ManagedInstanceEncryptionProtectorProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedManagedInstanceEncryptionProtectorInner.kind = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedManagedInstanceEncryptionProtectorInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorProperties.java index 41f3a961545f..153b2ffd9360 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceInner.java index 3d840a871b98..da558177ac28 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceInner.java @@ -1,29 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -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.sql.models.AuthMetadataLookupModes; -import com.azure.resourcemanager.sql.models.AvailabilityZoneType; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.azure.resourcemanager.sql.models.ExternalGovernanceStatus; -import com.azure.resourcemanager.sql.models.HybridSecondaryUsage; -import com.azure.resourcemanager.sql.models.HybridSecondaryUsageDetected; -import com.azure.resourcemanager.sql.models.ManagedInstanceDatabaseFormat; import com.azure.resourcemanager.sql.models.ManagedInstanceExternalAdministrator; import com.azure.resourcemanager.sql.models.ManagedInstanceLicenseType; import com.azure.resourcemanager.sql.models.ManagedInstancePecProperty; +import com.azure.resourcemanager.sql.models.ManagedInstancePropertiesProvisioningState; import com.azure.resourcemanager.sql.models.ManagedInstanceProxyOverride; import com.azure.resourcemanager.sql.models.ManagedServerCreateMode; -import com.azure.resourcemanager.sql.models.PricingModel; -import com.azure.resourcemanager.sql.models.ProvisioningState; import com.azure.resourcemanager.sql.models.ResourceIdentity; import com.azure.resourcemanager.sql.models.ServicePrincipal; import com.azure.resourcemanager.sql.models.Sku; @@ -37,28 +29,20 @@ */ @Fluent public final class ManagedInstanceInner extends Resource { - /* - * Resource properties. - */ - private ManagedInstanceProperties innerProperties; - /* * The Azure Active Directory identity of the managed instance. */ private ResourceIdentity identity; /* - * Managed instance SKU. Allowed values for sku.name: GP_Gen5 (General Purpose, Standard-series); GP_G8IM (General - * Purpose, Premium-series); GP_G8IH (General Purpose, Premium-series memory optimized); BC_Gen5 (Business Critical, - * Standard-Series); BC_G8IM (Business Critical, Premium-series); BC_G8IH (Business Critical, Premium-series memory - * optimized). + * Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH */ private Sku sku; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private ManagedInstanceProperties innerProperties; /* * The type of the resource. @@ -81,15 +65,6 @@ public final class ManagedInstanceInner extends Resource { public ManagedInstanceInner() { } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private ManagedInstanceProperties innerProperties() { - return this.innerProperties; - } - /** * Get the identity property: The Azure Active Directory identity of the managed instance. * @@ -111,10 +86,8 @@ public ManagedInstanceInner withIdentity(ResourceIdentity identity) { } /** - * Get the sku property: Managed instance SKU. Allowed values for sku.name: GP_Gen5 (General Purpose, - * Standard-series); GP_G8IM (General Purpose, Premium-series); GP_G8IH (General Purpose, Premium-series memory - * optimized); BC_Gen5 (Business Critical, Standard-Series); BC_G8IM (Business Critical, Premium-series); BC_G8IH - * (Business Critical, Premium-series memory optimized). + * Get the sku property: Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, + * BC_G8IM, BC_G8IH. * * @return the sku value. */ @@ -123,10 +96,8 @@ public Sku sku() { } /** - * Set the sku property: Managed instance SKU. Allowed values for sku.name: GP_Gen5 (General Purpose, - * Standard-series); GP_G8IM (General Purpose, Premium-series); GP_G8IH (General Purpose, Premium-series memory - * optimized); BC_Gen5 (Business Critical, Standard-Series); BC_G8IM (Business Critical, Premium-series); BC_G8IH - * (Business Critical, Premium-series memory optimized). + * Set the sku property: Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, + * BC_G8IM, BC_G8IH. * * @param sku the sku value to set. * @return the ManagedInstanceInner object itself. @@ -137,12 +108,12 @@ public ManagedInstanceInner withSku(Sku sku) { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private ManagedInstanceProperties innerProperties() { + return this.innerProperties; } /** @@ -194,11 +165,11 @@ public ManagedInstanceInner withTags(Map tags) { } /** - * Get the provisioningState property: Provisioning state of managed instance. + * Get the provisioningState property: The provisioningState property. * * @return the provisioningState value. */ - public ProvisioningState provisioningState() { + public ManagedInstancePropertiesProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } @@ -244,29 +215,6 @@ public String fullyQualifiedDomainName() { return this.innerProperties() == null ? null : this.innerProperties().fullyQualifiedDomainName(); } - /** - * Get the isGeneralPurposeV2 property: Whether or not this is a GPv2 variant of General Purpose edition. - * - * @return the isGeneralPurposeV2 value. - */ - public Boolean isGeneralPurposeV2() { - return this.innerProperties() == null ? null : this.innerProperties().isGeneralPurposeV2(); - } - - /** - * Set the isGeneralPurposeV2 property: Whether or not this is a GPv2 variant of General Purpose edition. - * - * @param isGeneralPurposeV2 the isGeneralPurposeV2 value to set. - * @return the ManagedInstanceInner object itself. - */ - public ManagedInstanceInner withIsGeneralPurposeV2(Boolean isGeneralPurposeV2) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withIsGeneralPurposeV2(isGeneralPurposeV2); - return this; - } - /** * Get the administratorLogin property: Administrator username for the managed instance. Can only be specified when * the managed instance is being created (and is required for creation). @@ -375,44 +323,7 @@ public ManagedInstanceInner withLicenseType(ManagedInstanceLicenseType licenseTy } /** - * Get the hybridSecondaryUsage property: Hybrid secondary usage. Possible values are 'Active' (default value) and - * 'Passive' (customer uses the secondary as Passive DR). - * - * @return the hybridSecondaryUsage value. - */ - public HybridSecondaryUsage hybridSecondaryUsage() { - return this.innerProperties() == null ? null : this.innerProperties().hybridSecondaryUsage(); - } - - /** - * Set the hybridSecondaryUsage property: Hybrid secondary usage. Possible values are 'Active' (default value) and - * 'Passive' (customer uses the secondary as Passive DR). - * - * @param hybridSecondaryUsage the hybridSecondaryUsage value to set. - * @return the ManagedInstanceInner object itself. - */ - public ManagedInstanceInner withHybridSecondaryUsage(HybridSecondaryUsage hybridSecondaryUsage) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withHybridSecondaryUsage(hybridSecondaryUsage); - return this; - } - - /** - * Get the hybridSecondaryUsageDetected property: Hybrid secondary usage detected. Possible values are 'Active' - * (customer does not meet the requirements to use the secondary as Passive DR) and 'Passive' (customer meets the - * requirements to use the secondary as Passive DR). - * - * @return the hybridSecondaryUsageDetected value. - */ - public HybridSecondaryUsageDetected hybridSecondaryUsageDetected() { - return this.innerProperties() == null ? null : this.innerProperties().hybridSecondaryUsageDetected(); - } - - /** - * Get the vCores property: The number of vCores. Allowed values: 4, 6, 8, 10, 12, 16, 20, 24, 32, 40, 48, 56, 64, - * 80, 96, 128. Supported vCores depends on the selected hardware family and service tier. + * Get the vCores property: The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. * * @return the vCores value. */ @@ -421,8 +332,7 @@ public Integer vCores() { } /** - * Set the vCores property: The number of vCores. Allowed values: 4, 6, 8, 10, 12, 16, 20, 24, 32, 40, 48, 56, 64, - * 80, 96, 128. Supported vCores depends on the selected hardware family and service tier. + * Set the vCores property: The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. * * @param vCores the vCores value to set. * @return the ManagedInstanceInner object itself. @@ -436,7 +346,7 @@ public ManagedInstanceInner withVCores(Integer vCores) { } /** - * Get the storageSizeInGB property: Storage size in GB. Minimum value: 32. Maximum value: 32768. Increments of 32 + * Get the storageSizeInGB property: Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 * GB allowed only. Maximum value depends on the selected hardware family and number of vCores. * * @return the storageSizeInGB value. @@ -446,7 +356,7 @@ public Integer storageSizeInGB() { } /** - * Set the storageSizeInGB property: Storage size in GB. Minimum value: 32. Maximum value: 32768. Increments of 32 + * Set the storageSizeInGB property: Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 * GB allowed only. Maximum value depends on the selected hardware family and number of vCores. * * @param storageSizeInGB the storageSizeInGB value to set. @@ -460,83 +370,6 @@ public ManagedInstanceInner withStorageSizeInGB(Integer storageSizeInGB) { return this; } - /** - * Get the storageIOps property: Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps - * allowed only. Maximum value depends on the selected hardware family and number of vCores. - * - * @return the storageIOps value. - */ - public Integer storageIOps() { - return this.innerProperties() == null ? null : this.innerProperties().storageIOps(); - } - - /** - * Set the storageIOps property: Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps - * allowed only. Maximum value depends on the selected hardware family and number of vCores. - * - * @param storageIOps the storageIOps value to set. - * @return the ManagedInstanceInner object itself. - */ - public ManagedInstanceInner withStorageIOps(Integer storageIOps) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withStorageIOps(storageIOps); - return this; - } - - /** - * Get the storageThroughputMBps property: Storage throughput MBps parameter is not supported in the instance - * create/update operation. - * - * @return the storageThroughputMBps value. - */ - public Integer storageThroughputMBps() { - return this.innerProperties() == null ? null : this.innerProperties().storageThroughputMBps(); - } - - /** - * Set the storageThroughputMBps property: Storage throughput MBps parameter is not supported in the instance - * create/update operation. - * - * @param storageThroughputMBps the storageThroughputMBps value to set. - * @return the ManagedInstanceInner object itself. - */ - public ManagedInstanceInner withStorageThroughputMBps(Integer storageThroughputMBps) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withStorageThroughputMBps(storageThroughputMBps); - return this; - } - - /** - * Get the memorySizeInGB property: Memory size in GB. Minimum value: 28. Maximum value: 870. Minimum and maximum - * value depend on the number of vCores and service tier. Read more about resource limits: - * https://aka.ms/mi-resource-limits-api. - * - * @return the memorySizeInGB value. - */ - public Integer memorySizeInGB() { - return this.innerProperties() == null ? null : this.innerProperties().memorySizeInGB(); - } - - /** - * Set the memorySizeInGB property: Memory size in GB. Minimum value: 28. Maximum value: 870. Minimum and maximum - * value depend on the number of vCores and service tier. Read more about resource limits: - * https://aka.ms/mi-resource-limits-api. - * - * @param memorySizeInGB the memorySizeInGB value to set. - * @return the ManagedInstanceInner object itself. - */ - public ManagedInstanceInner withMemorySizeInGB(Integer memorySizeInGB) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withMemorySizeInGB(memorySizeInGB); - return this; - } - /** * Get the collation property: Collation of the managed instance. * @@ -843,7 +676,7 @@ public BackupStorageRedundancy requestedBackupStorageRedundancy() { } /** - * Get the zoneRedundant property: Whether or not the zone-redundancy is enabled. + * Get the zoneRedundant property: Whether or not the multi-az is enabled. * * @return the zoneRedundant value. */ @@ -852,7 +685,7 @@ public Boolean zoneRedundant() { } /** - * Set the zoneRedundant property: Whether or not the zone-redundancy is enabled. + * Set the zoneRedundant property: Whether or not the multi-az is enabled. * * @param zoneRedundant the zoneRedundant value to set. * @return the ManagedInstanceInner object itself. @@ -914,9 +747,7 @@ public ManagedInstanceInner withKeyId(String keyId) { } /** - * Get the administrators property: The Azure Active Directory administrator can be utilized during instance - * creation and for instance updates, except for the azureADOnlyAuthentication property. To update the - * azureADOnlyAuthentication property, individual API must be used. + * Get the administrators property: The Azure Active Directory administrator of the server. * * @return the administrators value. */ @@ -925,9 +756,7 @@ public ManagedInstanceExternalAdministrator administrators() { } /** - * Set the administrators property: The Azure Active Directory administrator can be utilized during instance - * creation and for instance updates, except for the azureADOnlyAuthentication property. To update the - * azureADOnlyAuthentication property, individual API must be used. + * Set the administrators property: The Azure Active Directory administrator of the server. * * @param administrators the administrators value to set. * @return the ManagedInstanceInner object itself. @@ -963,145 +792,21 @@ public ManagedInstanceInner withServicePrincipal(ServicePrincipal servicePrincip return this; } - /** - * Get the virtualClusterId property: Virtual cluster resource id for the Managed Instance. - * - * @return the virtualClusterId value. - */ - public String virtualClusterId() { - return this.innerProperties() == null ? null : this.innerProperties().virtualClusterId(); - } - - /** - * Get the externalGovernanceStatus property: Status of external governance. - * - * @return the externalGovernanceStatus value. - */ - public ExternalGovernanceStatus externalGovernanceStatus() { - return this.innerProperties() == null ? null : this.innerProperties().externalGovernanceStatus(); - } - - /** - * Get the pricingModel property: Pricing model of Managed Instance. - * - * @return the pricingModel value. - */ - public PricingModel pricingModel() { - return this.innerProperties() == null ? null : this.innerProperties().pricingModel(); - } - - /** - * Set the pricingModel property: Pricing model of Managed Instance. - * - * @param pricingModel the pricingModel value to set. - * @return the ManagedInstanceInner object itself. - */ - public ManagedInstanceInner withPricingModel(PricingModel pricingModel) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withPricingModel(pricingModel); - return this; - } - - /** - * Get the createTime property: Specifies the point in time (ISO8601 format) of the Managed Instance creation. - * - * @return the createTime value. - */ - public OffsetDateTime createTime() { - return this.innerProperties() == null ? null : this.innerProperties().createTime(); - } - - /** - * Get the authenticationMetadata property: The managed instance's authentication metadata lookup mode. - * - * @return the authenticationMetadata value. - */ - public AuthMetadataLookupModes authenticationMetadata() { - return this.innerProperties() == null ? null : this.innerProperties().authenticationMetadata(); - } - - /** - * Set the authenticationMetadata property: The managed instance's authentication metadata lookup mode. - * - * @param authenticationMetadata the authenticationMetadata value to set. - * @return the ManagedInstanceInner object itself. - */ - public ManagedInstanceInner withAuthenticationMetadata(AuthMetadataLookupModes authenticationMetadata) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withAuthenticationMetadata(authenticationMetadata); - return this; - } - - /** - * Get the databaseFormat property: Specifies the internal format of instance databases specific to the SQL engine - * version. - * - * @return the databaseFormat value. - */ - public ManagedInstanceDatabaseFormat databaseFormat() { - return this.innerProperties() == null ? null : this.innerProperties().databaseFormat(); - } - - /** - * Set the databaseFormat property: Specifies the internal format of instance databases specific to the SQL engine - * version. - * - * @param databaseFormat the databaseFormat value to set. - * @return the ManagedInstanceInner object itself. - */ - public ManagedInstanceInner withDatabaseFormat(ManagedInstanceDatabaseFormat databaseFormat) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withDatabaseFormat(databaseFormat); - return this; - } - - /** - * Get the requestedLogicalAvailabilityZone property: Specifies the logical availability zone Managed Instance is - * pinned to. - * - * @return the requestedLogicalAvailabilityZone value. - */ - public AvailabilityZoneType requestedLogicalAvailabilityZone() { - return this.innerProperties() == null ? null : this.innerProperties().requestedLogicalAvailabilityZone(); - } - - /** - * Set the requestedLogicalAvailabilityZone property: Specifies the logical availability zone Managed Instance is - * pinned to. - * - * @param requestedLogicalAvailabilityZone the requestedLogicalAvailabilityZone value to set. - * @return the ManagedInstanceInner object itself. - */ - public ManagedInstanceInner - withRequestedLogicalAvailabilityZone(AvailabilityZoneType requestedLogicalAvailabilityZone) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withRequestedLogicalAvailabilityZone(requestedLogicalAvailabilityZone); - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } if (identity() != null) { identity().validate(); } if (sku() != null) { sku().validate(); } + if (innerProperties() != null) { + innerProperties().validate(); + } } /** @@ -1112,9 +817,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeJsonField("identity", this.identity); jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } @@ -1145,14 +850,12 @@ public static ManagedInstanceInner fromJson(JsonReader jsonReader) throws IOExce } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedManagedInstanceInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedManagedInstanceInner.innerProperties = ManagedInstanceProperties.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedManagedInstanceInner.identity = ResourceIdentity.fromJson(reader); } else if ("sku".equals(fieldName)) { deserializedManagedInstanceInner.sku = Sku.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedInstanceInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedManagedInstanceInner.innerProperties = ManagedInstanceProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyInner.java index 659304047918..fa75cd056c02 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -19,20 +18,15 @@ */ @Fluent public final class ManagedInstanceKeyInner extends ProxyResource { - /* - * Resource properties. - */ - private ManagedInstanceKeyProperties innerProperties; - /* * Kind of encryption protector. This is metadata used for the Azure portal experience. */ private String kind; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private ManagedInstanceKeyProperties innerProperties; /* * The type of the resource. @@ -55,15 +49,6 @@ public final class ManagedInstanceKeyInner extends ProxyResource { public ManagedInstanceKeyInner() { } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private ManagedInstanceKeyProperties innerProperties() { - return this.innerProperties; - } - /** * Get the kind property: Kind of encryption protector. This is metadata used for the Azure portal experience. * @@ -74,12 +59,12 @@ public String kind() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private ManagedInstanceKeyProperties innerProperties() { + return this.innerProperties; } /** @@ -228,12 +213,10 @@ public static ManagedInstanceKeyInner fromJson(JsonReader jsonReader) throws IOE deserializedManagedInstanceKeyInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedManagedInstanceKeyInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedManagedInstanceKeyInner.innerProperties = ManagedInstanceKeyProperties.fromJson(reader); } else if ("kind".equals(fieldName)) { deserializedManagedInstanceKeyInner.kind = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedManagedInstanceKeyInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedManagedInstanceKeyInner.innerProperties = ManagedInstanceKeyProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyProperties.java index 1ae877c989fb..7454889ab962 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupInner.java index 30c9c94b6056..1ec6b8b18f80 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupInner.java @@ -1,16 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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.sql.models.BackupStorageAccessTier; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; import java.io.IOException; import java.time.OffsetDateTime; @@ -25,11 +23,6 @@ public final class ManagedInstanceLongTermRetentionBackupInner extends ProxyReso */ private ManagedInstanceLongTermRetentionBackupProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -48,7 +41,7 @@ public final class ManagedInstanceLongTermRetentionBackupInner extends ProxyReso /** * Creates an instance of ManagedInstanceLongTermRetentionBackupInner class. */ - private ManagedInstanceLongTermRetentionBackupInner() { + public ManagedInstanceLongTermRetentionBackupInner() { } /** @@ -60,15 +53,6 @@ private ManagedInstanceLongTermRetentionBackupProperties 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. * @@ -162,15 +146,6 @@ public BackupStorageRedundancy backupStorageRedundancy() { return this.innerProperties() == null ? null : this.innerProperties().backupStorageRedundancy(); } - /** - * Get the backupStorageAccessTier property: The BackupStorageAccessTier for the LTR backup. - * - * @return the backupStorageAccessTier value. - */ - public BackupStorageAccessTier backupStorageAccessTier() { - return this.innerProperties() == null ? null : this.innerProperties().backupStorageAccessTier(); - } - /** * Validates the instance. * @@ -218,8 +193,6 @@ public static ManagedInstanceLongTermRetentionBackupInner fromJson(JsonReader js } else if ("properties".equals(fieldName)) { deserializedManagedInstanceLongTermRetentionBackupInner.innerProperties = ManagedInstanceLongTermRetentionBackupProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedInstanceLongTermRetentionBackupInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupProperties.java index 564b7ce0bddb..d428f811b445 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -10,7 +10,6 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.sql.models.BackupStorageAccessTier; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; import java.io.IOException; import java.time.OffsetDateTime; @@ -56,15 +55,10 @@ public final class ManagedInstanceLongTermRetentionBackupProperties */ private BackupStorageRedundancy backupStorageRedundancy; - /* - * The BackupStorageAccessTier for the LTR backup - */ - private BackupStorageAccessTier backupStorageAccessTier; - /** * Creates an instance of ManagedInstanceLongTermRetentionBackupProperties class. */ - private ManagedInstanceLongTermRetentionBackupProperties() { + public ManagedInstanceLongTermRetentionBackupProperties() { } /** @@ -130,15 +124,6 @@ public BackupStorageRedundancy backupStorageRedundancy() { return this.backupStorageRedundancy; } - /** - * Get the backupStorageAccessTier property: The BackupStorageAccessTier for the LTR backup. - * - * @return the backupStorageAccessTier value. - */ - public BackupStorageAccessTier backupStorageAccessTier() { - return this.backupStorageAccessTier; - } - /** * Validates the instance. * @@ -192,9 +177,6 @@ public static ManagedInstanceLongTermRetentionBackupProperties fromJson(JsonRead } else if ("backupStorageRedundancy".equals(fieldName)) { deserializedManagedInstanceLongTermRetentionBackupProperties.backupStorageRedundancy = BackupStorageRedundancy.fromString(reader.getString()); - } else if ("backupStorageAccessTier".equals(fieldName)) { - deserializedManagedInstanceLongTermRetentionBackupProperties.backupStorageAccessTier - = BackupStorageAccessTier.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionPolicyInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionPolicyInner.java index 3d353e5e3e6b..2c20d585a6ef 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionPolicyInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionPolicyInner.java @@ -1,16 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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.sql.models.BackupStorageAccessTier; import java.io.IOException; /** @@ -21,12 +19,7 @@ public final class ManagedInstanceLongTermRetentionPolicyInner extends ProxyReso /* * Resource properties. */ - private ManagedInstanceLongTermRetentionPolicyProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; + private BaseLongTermRetentionPolicyProperties innerProperties; /* * The type of the resource. @@ -54,19 +47,10 @@ public ManagedInstanceLongTermRetentionPolicyInner() { * * @return the innerProperties value. */ - private ManagedInstanceLongTermRetentionPolicyProperties innerProperties() { + private BaseLongTermRetentionPolicyProperties 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. * @@ -97,30 +81,6 @@ public String id() { return this.id; } - /** - * Get the backupStorageAccessTier property: The BackupStorageAccessTier for the LTR backups. - * - * @return the backupStorageAccessTier value. - */ - public BackupStorageAccessTier backupStorageAccessTier() { - return this.innerProperties() == null ? null : this.innerProperties().backupStorageAccessTier(); - } - - /** - * Set the backupStorageAccessTier property: The BackupStorageAccessTier for the LTR backups. - * - * @param backupStorageAccessTier the backupStorageAccessTier value to set. - * @return the ManagedInstanceLongTermRetentionPolicyInner object itself. - */ - public ManagedInstanceLongTermRetentionPolicyInner - withBackupStorageAccessTier(BackupStorageAccessTier backupStorageAccessTier) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceLongTermRetentionPolicyProperties(); - } - this.innerProperties().withBackupStorageAccessTier(backupStorageAccessTier); - return this; - } - /** * Get the weeklyRetention property: The weekly retention policy for an LTR backup in an ISO 8601 format. * @@ -138,7 +98,7 @@ public String weeklyRetention() { */ public ManagedInstanceLongTermRetentionPolicyInner withWeeklyRetention(String weeklyRetention) { if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceLongTermRetentionPolicyProperties(); + this.innerProperties = new BaseLongTermRetentionPolicyProperties(); } this.innerProperties().withWeeklyRetention(weeklyRetention); return this; @@ -161,7 +121,7 @@ public String monthlyRetention() { */ public ManagedInstanceLongTermRetentionPolicyInner withMonthlyRetention(String monthlyRetention) { if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceLongTermRetentionPolicyProperties(); + this.innerProperties = new BaseLongTermRetentionPolicyProperties(); } this.innerProperties().withMonthlyRetention(monthlyRetention); return this; @@ -184,7 +144,7 @@ public String yearlyRetention() { */ public ManagedInstanceLongTermRetentionPolicyInner withYearlyRetention(String yearlyRetention) { if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceLongTermRetentionPolicyProperties(); + this.innerProperties = new BaseLongTermRetentionPolicyProperties(); } this.innerProperties().withYearlyRetention(yearlyRetention); return this; @@ -207,7 +167,7 @@ public Integer weekOfYear() { */ public ManagedInstanceLongTermRetentionPolicyInner withWeekOfYear(Integer weekOfYear) { if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceLongTermRetentionPolicyProperties(); + this.innerProperties = new BaseLongTermRetentionPolicyProperties(); } this.innerProperties().withWeekOfYear(weekOfYear); return this; @@ -259,9 +219,7 @@ public static ManagedInstanceLongTermRetentionPolicyInner fromJson(JsonReader js deserializedManagedInstanceLongTermRetentionPolicyInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedManagedInstanceLongTermRetentionPolicyInner.innerProperties - = ManagedInstanceLongTermRetentionPolicyProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedInstanceLongTermRetentionPolicyInner.systemData = SystemData.fromJson(reader); + = BaseLongTermRetentionPolicyProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationInner.java index f9341d834184..556edd5a7899 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -26,11 +25,6 @@ public final class ManagedInstanceOperationInner extends ProxyResource { */ private ManagedInstanceOperationProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -49,7 +43,7 @@ public final class ManagedInstanceOperationInner extends ProxyResource { /** * Creates an instance of ManagedInstanceOperationInner class. */ - private ManagedInstanceOperationInner() { + public ManagedInstanceOperationInner() { } /** @@ -61,15 +55,6 @@ private ManagedInstanceOperationProperties 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. * @@ -282,8 +267,6 @@ public static ManagedInstanceOperationInner fromJson(JsonReader jsonReader) thro } else if ("properties".equals(fieldName)) { deserializedManagedInstanceOperationInner.innerProperties = ManagedInstanceOperationProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedInstanceOperationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationProperties.java index 70f38c2e1b98..150cbc0ec79c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -99,7 +99,7 @@ public final class ManagedInstanceOperationProperties implements JsonSerializabl /** * Creates an instance of ManagedInstanceOperationProperties class. */ - private ManagedInstanceOperationProperties() { + public ManagedInstanceOperationProperties() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionInner.java index 285ff83bf89a..e1d5e95d1064 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -24,11 +23,6 @@ public final class ManagedInstancePrivateEndpointConnectionInner extends ProxyRe */ private ManagedInstancePrivateEndpointConnectionProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -59,15 +53,6 @@ private ManagedInstancePrivateEndpointConnectionProperties 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. * @@ -202,8 +187,6 @@ public static ManagedInstancePrivateEndpointConnectionInner fromJson(JsonReader } else if ("properties".equals(fieldName)) { deserializedManagedInstancePrivateEndpointConnectionInner.innerProperties = ManagedInstancePrivateEndpointConnectionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedInstancePrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionProperties.java index f080a9602b60..1ccf99918cd5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateLinkInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateLinkInner.java index 13aa7afa0ca2..3e93b998bf33 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateLinkInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateLinkInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -23,11 +22,6 @@ public final class ManagedInstancePrivateLinkInner extends ProxyResource { */ private ManagedInstancePrivateLinkProperties properties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -46,7 +40,7 @@ public final class ManagedInstancePrivateLinkInner extends ProxyResource { /** * Creates an instance of ManagedInstancePrivateLinkInner class. */ - private ManagedInstancePrivateLinkInner() { + public ManagedInstancePrivateLinkInner() { } /** @@ -58,15 +52,6 @@ public ManagedInstancePrivateLinkProperties properties() { return this.properties; } - /** - * 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. * @@ -143,8 +128,6 @@ public static ManagedInstancePrivateLinkInner fromJson(JsonReader jsonReader) th } else if ("properties".equals(fieldName)) { deserializedManagedInstancePrivateLinkInner.properties = ManagedInstancePrivateLinkProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedInstancePrivateLinkInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceProperties.java index ba1d3af0dd7f..dd2914542dc1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -10,20 +10,13 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.sql.models.AuthMetadataLookupModes; -import com.azure.resourcemanager.sql.models.AvailabilityZoneType; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.azure.resourcemanager.sql.models.ExternalGovernanceStatus; -import com.azure.resourcemanager.sql.models.HybridSecondaryUsage; -import com.azure.resourcemanager.sql.models.HybridSecondaryUsageDetected; -import com.azure.resourcemanager.sql.models.ManagedInstanceDatabaseFormat; import com.azure.resourcemanager.sql.models.ManagedInstanceExternalAdministrator; import com.azure.resourcemanager.sql.models.ManagedInstanceLicenseType; import com.azure.resourcemanager.sql.models.ManagedInstancePecProperty; +import com.azure.resourcemanager.sql.models.ManagedInstancePropertiesProvisioningState; import com.azure.resourcemanager.sql.models.ManagedInstanceProxyOverride; import com.azure.resourcemanager.sql.models.ManagedServerCreateMode; -import com.azure.resourcemanager.sql.models.PricingModel; -import com.azure.resourcemanager.sql.models.ProvisioningState; import com.azure.resourcemanager.sql.models.ServicePrincipal; import java.io.IOException; import java.time.OffsetDateTime; @@ -36,9 +29,9 @@ @Fluent public final class ManagedInstanceProperties implements JsonSerializable { /* - * Provisioning state of managed instance. + * The provisioningState property. */ - private ProvisioningState provisioningState; + private ManagedInstancePropertiesProvisioningState provisioningState; /* * Specifies the mode of database creation. @@ -55,11 +48,6 @@ public final class ManagedInstanceProperties implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("authenticationMetadata".equals(fieldName)) { - deserializedManagedInstanceProperties.authenticationMetadata - = AuthMetadataLookupModes.fromString(reader.getString()); - } else if ("databaseFormat".equals(fieldName)) { - deserializedManagedInstanceProperties.databaseFormat - = ManagedInstanceDatabaseFormat.fromString(reader.getString()); - } else if ("requestedLogicalAvailabilityZone".equals(fieldName)) { - deserializedManagedInstanceProperties.requestedLogicalAvailabilityZone - = AvailabilityZoneType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceQueryInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceQueryInner.java index 18776370041c..c0c86ca3b834 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceQueryInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceQueryInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; -import com.azure.core.annotation.Immutable; +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; @@ -15,18 +14,13 @@ /** * Database query. */ -@Immutable +@Fluent public final class ManagedInstanceQueryInner extends ProxyResource { /* * Resource properties. */ private QueryProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -45,7 +39,7 @@ public final class ManagedInstanceQueryInner extends ProxyResource { /** * Creates an instance of ManagedInstanceQueryInner class. */ - private ManagedInstanceQueryInner() { + public ManagedInstanceQueryInner() { } /** @@ -57,15 +51,6 @@ private QueryProperties 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. * @@ -105,6 +90,20 @@ public String queryText() { return this.innerProperties() == null ? null : this.innerProperties().queryText(); } + /** + * Set the queryText property: Query text. + * + * @param queryText the queryText value to set. + * @return the ManagedInstanceQueryInner object itself. + */ + public ManagedInstanceQueryInner withQueryText(String queryText) { + if (this.innerProperties() == null) { + this.innerProperties = new QueryProperties(); + } + this.innerProperties().withQueryText(queryText); + return this; + } + /** * Validates the instance. * @@ -150,8 +149,6 @@ public static ManagedInstanceQueryInner fromJson(JsonReader jsonReader) throws I deserializedManagedInstanceQueryInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedManagedInstanceQueryInner.innerProperties = QueryProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedInstanceQueryInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentInner.java index 2522bd949914..cb0c03feae06 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -23,11 +22,6 @@ public final class ManagedInstanceVulnerabilityAssessmentInner extends ProxyReso */ private ManagedInstanceVulnerabilityAssessmentProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -58,15 +52,6 @@ private ManagedInstanceVulnerabilityAssessmentProperties 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. * @@ -247,8 +232,6 @@ public static ManagedInstanceVulnerabilityAssessmentInner fromJson(JsonReader js } else if ("properties".equals(fieldName)) { deserializedManagedInstanceVulnerabilityAssessmentInner.innerProperties = ManagedInstanceVulnerabilityAssessmentProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedInstanceVulnerabilityAssessmentInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentProperties.java index 5b8ad664f7aa..45697d849cf6 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedLedgerDigestUploadsInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedLedgerDigestUploadsInner.java deleted file mode 100644 index da82a844697c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedLedgerDigestUploadsInner.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.ManagedLedgerDigestUploadsState; -import java.io.IOException; - -/** - * Azure SQL Database ledger digest upload settings. - */ -@Fluent -public final class ManagedLedgerDigestUploadsInner extends ProxyResource { - /* - * Resource properties. - */ - private ManagedLedgerDigestUploadsProperties 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 ManagedLedgerDigestUploadsInner class. - */ - public ManagedLedgerDigestUploadsInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private ManagedLedgerDigestUploadsProperties 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 digestStorageEndpoint property: The digest storage endpoint, which must be either an Azure blob storage - * endpoint or an URI for Azure Confidential Ledger. - * - * @return the digestStorageEndpoint value. - */ - public String digestStorageEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().digestStorageEndpoint(); - } - - /** - * Set the digestStorageEndpoint property: The digest storage endpoint, which must be either an Azure blob storage - * endpoint or an URI for Azure Confidential Ledger. - * - * @param digestStorageEndpoint the digestStorageEndpoint value to set. - * @return the ManagedLedgerDigestUploadsInner object itself. - */ - public ManagedLedgerDigestUploadsInner withDigestStorageEndpoint(String digestStorageEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedLedgerDigestUploadsProperties(); - } - this.innerProperties().withDigestStorageEndpoint(digestStorageEndpoint); - return this; - } - - /** - * Get the state property: Specifies the state of ledger digest upload. - * - * @return the state value. - */ - public ManagedLedgerDigestUploadsState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); - } - - /** - * 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedLedgerDigestUploadsInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedLedgerDigestUploadsInner 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 ManagedLedgerDigestUploadsInner. - */ - public static ManagedLedgerDigestUploadsInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedLedgerDigestUploadsInner deserializedManagedLedgerDigestUploadsInner - = new ManagedLedgerDigestUploadsInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedManagedLedgerDigestUploadsInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedManagedLedgerDigestUploadsInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedManagedLedgerDigestUploadsInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedManagedLedgerDigestUploadsInner.innerProperties - = ManagedLedgerDigestUploadsProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedLedgerDigestUploadsInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedLedgerDigestUploadsInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedLedgerDigestUploadsProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedLedgerDigestUploadsProperties.java deleted file mode 100644 index f16414454ed6..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedLedgerDigestUploadsProperties.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.ManagedLedgerDigestUploadsState; -import java.io.IOException; - -/** - * The properties of a database ledger digest upload settings. - */ -@Fluent -public final class ManagedLedgerDigestUploadsProperties - implements JsonSerializable { - /* - * The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential - * Ledger. - */ - private String digestStorageEndpoint; - - /* - * Specifies the state of ledger digest upload. - */ - private ManagedLedgerDigestUploadsState state; - - /** - * Creates an instance of ManagedLedgerDigestUploadsProperties class. - */ - public ManagedLedgerDigestUploadsProperties() { - } - - /** - * Get the digestStorageEndpoint property: The digest storage endpoint, which must be either an Azure blob storage - * endpoint or an URI for Azure Confidential Ledger. - * - * @return the digestStorageEndpoint value. - */ - public String digestStorageEndpoint() { - return this.digestStorageEndpoint; - } - - /** - * Set the digestStorageEndpoint property: The digest storage endpoint, which must be either an Azure blob storage - * endpoint or an URI for Azure Confidential Ledger. - * - * @param digestStorageEndpoint the digestStorageEndpoint value to set. - * @return the ManagedLedgerDigestUploadsProperties object itself. - */ - public ManagedLedgerDigestUploadsProperties withDigestStorageEndpoint(String digestStorageEndpoint) { - this.digestStorageEndpoint = digestStorageEndpoint; - return this; - } - - /** - * Get the state property: Specifies the state of ledger digest upload. - * - * @return the state value. - */ - public ManagedLedgerDigestUploadsState state() { - return this.state; - } - - /** - * 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("digestStorageEndpoint", this.digestStorageEndpoint); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedLedgerDigestUploadsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedLedgerDigestUploadsProperties 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 ManagedLedgerDigestUploadsProperties. - */ - public static ManagedLedgerDigestUploadsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedLedgerDigestUploadsProperties deserializedManagedLedgerDigestUploadsProperties - = new ManagedLedgerDigestUploadsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("digestStorageEndpoint".equals(fieldName)) { - deserializedManagedLedgerDigestUploadsProperties.digestStorageEndpoint = reader.getString(); - } else if ("state".equals(fieldName)) { - deserializedManagedLedgerDigestUploadsProperties.state - = ManagedLedgerDigestUploadsState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedLedgerDigestUploadsProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasInner.java index 5b5b90f298f2..bb82b7597de5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ public final class ManagedServerDnsAliasInner extends ProxyResource { */ private ManagedServerDnsAliasProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -45,7 +39,7 @@ public final class ManagedServerDnsAliasInner extends ProxyResource { /** * Creates an instance of ManagedServerDnsAliasInner class. */ - private ManagedServerDnsAliasInner() { + public ManagedServerDnsAliasInner() { } /** @@ -57,15 +51,6 @@ private ManagedServerDnsAliasProperties 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. * @@ -160,8 +145,6 @@ public static ManagedServerDnsAliasInner fromJson(JsonReader jsonReader) throws } else if ("properties".equals(fieldName)) { deserializedManagedServerDnsAliasInner.innerProperties = ManagedServerDnsAliasProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedServerDnsAliasInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasProperties.java index bfed2508527c..4383a1e0d260 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -29,7 +29,7 @@ public final class ManagedServerDnsAliasProperties implements JsonSerializable disabledAlerts() { */ public ManagedServerSecurityAlertPolicyInner withDisabledAlerts(List disabledAlerts) { if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertsPolicyProperties(); + this.innerProperties = new SecurityAlertsPolicyPropertiesAutoGenerated(); } this.innerProperties().withDisabledAlerts(disabledAlerts); return this; @@ -166,7 +166,7 @@ public List emailAddresses() { */ public ManagedServerSecurityAlertPolicyInner withEmailAddresses(List emailAddresses) { if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertsPolicyProperties(); + this.innerProperties = new SecurityAlertsPolicyPropertiesAutoGenerated(); } this.innerProperties().withEmailAddresses(emailAddresses); return this; @@ -189,7 +189,7 @@ public Boolean emailAccountAdmins() { */ public ManagedServerSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccountAdmins) { if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertsPolicyProperties(); + this.innerProperties = new SecurityAlertsPolicyPropertiesAutoGenerated(); } this.innerProperties().withEmailAccountAdmins(emailAccountAdmins); return this; @@ -214,7 +214,7 @@ public String storageEndpoint() { */ public ManagedServerSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoint) { if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertsPolicyProperties(); + this.innerProperties = new SecurityAlertsPolicyPropertiesAutoGenerated(); } this.innerProperties().withStorageEndpoint(storageEndpoint); return this; @@ -239,7 +239,7 @@ public String storageAccountAccessKey() { */ public ManagedServerSecurityAlertPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) { if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertsPolicyProperties(); + this.innerProperties = new SecurityAlertsPolicyPropertiesAutoGenerated(); } this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); return this; @@ -262,7 +262,7 @@ public Integer retentionDays() { */ public ManagedServerSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) { if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertsPolicyProperties(); + this.innerProperties = new SecurityAlertsPolicyPropertiesAutoGenerated(); } this.innerProperties().withRetentionDays(retentionDays); return this; @@ -321,11 +321,11 @@ public static ManagedServerSecurityAlertPolicyInner fromJson(JsonReader jsonRead deserializedManagedServerSecurityAlertPolicyInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedManagedServerSecurityAlertPolicyInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedManagedServerSecurityAlertPolicyInner.innerProperties - = SecurityAlertsPolicyProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedManagedServerSecurityAlertPolicyInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedManagedServerSecurityAlertPolicyInner.innerProperties + = SecurityAlertsPolicyPropertiesAutoGenerated.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionInner.java index 0350f948edce..f2cebb1fa9a6 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -23,11 +22,6 @@ public final class ManagedTransparentDataEncryptionInner extends ProxyResource { */ private ManagedTransparentDataEncryptionProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -58,15 +52,6 @@ private ManagedTransparentDataEncryptionProperties 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. * @@ -167,8 +152,6 @@ public static ManagedTransparentDataEncryptionInner fromJson(JsonReader jsonRead } else if ("properties".equals(fieldName)) { deserializedManagedTransparentDataEncryptionInner.innerProperties = ManagedTransparentDataEncryptionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedTransparentDataEncryptionInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionProperties.java index 7c1a63b74593..77198d2fac9c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/NetworkSecurityPerimeterConfigurationInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/NetworkSecurityPerimeterConfigurationInner.java deleted file mode 100644 index fb99d55b5837..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/NetworkSecurityPerimeterConfigurationInner.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.NSPConfigAssociation; -import com.azure.resourcemanager.sql.models.NSPConfigPerimeter; -import com.azure.resourcemanager.sql.models.NSPConfigProfile; -import com.azure.resourcemanager.sql.models.NSPProvisioningIssue; -import java.io.IOException; -import java.util.List; - -/** - * NSP Configuration for a server. - */ -@Immutable -public final class NetworkSecurityPerimeterConfigurationInner extends ProxyResource { - /* - * Resource properties. - */ - private NetworkSecurityPerimeterConfigurationProperties 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 NetworkSecurityPerimeterConfigurationInner class. - */ - private NetworkSecurityPerimeterConfigurationInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private NetworkSecurityPerimeterConfigurationProperties 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 provisioningState property: The provisioningState property. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the networkSecurityPerimeter property: The networkSecurityPerimeter property. - * - * @return the networkSecurityPerimeter value. - */ - public NSPConfigPerimeter networkSecurityPerimeter() { - return this.innerProperties() == null ? null : this.innerProperties().networkSecurityPerimeter(); - } - - /** - * Get the resourceAssociation property: The resourceAssociation property. - * - * @return the resourceAssociation value. - */ - public NSPConfigAssociation resourceAssociation() { - return this.innerProperties() == null ? null : this.innerProperties().resourceAssociation(); - } - - /** - * Get the profile property: The profile property. - * - * @return the profile value. - */ - public NSPConfigProfile profile() { - return this.innerProperties() == null ? null : this.innerProperties().profile(); - } - - /** - * Get the provisioningIssues property: The provisioningIssues property. - * - * @return the provisioningIssues value. - */ - public List provisioningIssues() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningIssues(); - } - - /** - * 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkSecurityPerimeterConfigurationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkSecurityPerimeterConfigurationInner 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 NetworkSecurityPerimeterConfigurationInner. - */ - public static NetworkSecurityPerimeterConfigurationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkSecurityPerimeterConfigurationInner deserializedNetworkSecurityPerimeterConfigurationInner - = new NetworkSecurityPerimeterConfigurationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationInner.innerProperties - = NetworkSecurityPerimeterConfigurationProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkSecurityPerimeterConfigurationInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java deleted file mode 100644 index 9cf0f69f7fa0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.fluent.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.sql.models.NSPConfigAssociation; -import com.azure.resourcemanager.sql.models.NSPConfigPerimeter; -import com.azure.resourcemanager.sql.models.NSPConfigProfile; -import com.azure.resourcemanager.sql.models.NSPProvisioningIssue; -import java.io.IOException; -import java.util.List; - -/** - * The properties of an NSP config. - */ -@Immutable -public final class NetworkSecurityPerimeterConfigurationProperties - implements JsonSerializable { - /* - * The provisioningState property. - */ - private String provisioningState; - - /* - * The networkSecurityPerimeter property. - */ - private NSPConfigPerimeter networkSecurityPerimeter; - - /* - * The resourceAssociation property. - */ - private NSPConfigAssociation resourceAssociation; - - /* - * The profile property. - */ - private NSPConfigProfile profile; - - /* - * The provisioningIssues property. - */ - private List provisioningIssues; - - /** - * Creates an instance of NetworkSecurityPerimeterConfigurationProperties class. - */ - private NetworkSecurityPerimeterConfigurationProperties() { - } - - /** - * Get the provisioningState property: The provisioningState property. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the networkSecurityPerimeter property: The networkSecurityPerimeter property. - * - * @return the networkSecurityPerimeter value. - */ - public NSPConfigPerimeter networkSecurityPerimeter() { - return this.networkSecurityPerimeter; - } - - /** - * Get the resourceAssociation property: The resourceAssociation property. - * - * @return the resourceAssociation value. - */ - public NSPConfigAssociation resourceAssociation() { - return this.resourceAssociation; - } - - /** - * Get the profile property: The profile property. - * - * @return the profile value. - */ - public NSPConfigProfile profile() { - return this.profile; - } - - /** - * Get the provisioningIssues property: The provisioningIssues property. - * - * @return the provisioningIssues value. - */ - public List provisioningIssues() { - return this.provisioningIssues; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (networkSecurityPerimeter() != null) { - networkSecurityPerimeter().validate(); - } - if (resourceAssociation() != null) { - resourceAssociation().validate(); - } - if (profile() != null) { - profile().validate(); - } - if (provisioningIssues() != null) { - provisioningIssues().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("networkSecurityPerimeter", this.networkSecurityPerimeter); - jsonWriter.writeJsonField("resourceAssociation", this.resourceAssociation); - jsonWriter.writeJsonField("profile", this.profile); - jsonWriter.writeArrayField("provisioningIssues", this.provisioningIssues, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkSecurityPerimeterConfigurationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkSecurityPerimeterConfigurationProperties 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 NetworkSecurityPerimeterConfigurationProperties. - */ - public static NetworkSecurityPerimeterConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkSecurityPerimeterConfigurationProperties deserializedNetworkSecurityPerimeterConfigurationProperties - = new NetworkSecurityPerimeterConfigurationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationProperties.provisioningState = reader.getString(); - } else if ("networkSecurityPerimeter".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationProperties.networkSecurityPerimeter - = NSPConfigPerimeter.fromJson(reader); - } else if ("resourceAssociation".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationProperties.resourceAssociation - = NSPConfigAssociation.fromJson(reader); - } else if ("profile".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationProperties.profile - = NSPConfigProfile.fromJson(reader); - } else if ("provisioningIssues".equals(fieldName)) { - List provisioningIssues - = reader.readArray(reader1 -> NSPProvisioningIssue.fromJson(reader1)); - deserializedNetworkSecurityPerimeterConfigurationProperties.provisioningIssues = provisioningIssues; - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkSecurityPerimeterConfigurationProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OperationInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OperationInner.java index afa9db5c241d..0434e0781753 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OperationInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OperationInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -42,7 +42,7 @@ public final class OperationInner implements JsonSerializable { /** * Creates an instance of OperationInner class. */ - private OperationInner() { + public OperationInner() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundEnvironmentEndpointInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundEnvironmentEndpointInner.java index 1776cdd8ff8b..584ca7320698 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundEnvironmentEndpointInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundEnvironmentEndpointInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -31,7 +31,7 @@ public final class OutboundEnvironmentEndpointInner implements JsonSerializable< /** * Creates an instance of OutboundEnvironmentEndpointInner class. */ - private OutboundEnvironmentEndpointInner() { + public OutboundEnvironmentEndpointInner() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleInner.java index 9fdefe549758..10ce0739b92a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ public final class OutboundFirewallRuleInner extends ProxyResource { */ private OutboundFirewallRuleProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -45,7 +39,7 @@ public final class OutboundFirewallRuleInner extends ProxyResource { /** * Creates an instance of OutboundFirewallRuleInner class. */ - private OutboundFirewallRuleInner() { + public OutboundFirewallRuleInner() { } /** @@ -57,15 +51,6 @@ private OutboundFirewallRuleProperties 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. * @@ -151,8 +136,6 @@ public static OutboundFirewallRuleInner fromJson(JsonReader jsonReader) throws I } else if ("properties".equals(fieldName)) { deserializedOutboundFirewallRuleInner.innerProperties = OutboundFirewallRuleProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedOutboundFirewallRuleInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleProperties.java index 02976a94fe77..8fa9f8e437dc 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -24,7 +24,7 @@ public final class OutboundFirewallRuleProperties implements JsonSerializable { /* * Query text. @@ -24,7 +24,7 @@ public final class QueryProperties implements JsonSerializable /** * Creates an instance of QueryProperties class. */ - private QueryProperties() { + public QueryProperties() { } /** @@ -36,6 +36,17 @@ public String queryText() { return this.queryText; } + /** + * Set the queryText property: Query text. + * + * @param queryText the queryText value to set. + * @return the QueryProperties object itself. + */ + public QueryProperties withQueryText(String queryText) { + this.queryText = queryText; + return this; + } + /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsInner.java index 243cf5099c95..2c755a163497 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; -import com.azure.core.annotation.Immutable; +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; @@ -17,18 +16,13 @@ /** * The QueryStatistics model. */ -@Immutable +@Fluent public final class QueryStatisticsInner extends ProxyResource { /* * Resource properties. */ private QueryStatisticsProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -47,7 +41,7 @@ public final class QueryStatisticsInner extends ProxyResource { /** * Creates an instance of QueryStatisticsInner class. */ - private QueryStatisticsInner() { + public QueryStatisticsInner() { } /** @@ -59,15 +53,6 @@ private QueryStatisticsProperties 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. * @@ -143,6 +128,20 @@ public List intervals() { return this.innerProperties() == null ? null : this.innerProperties().intervals(); } + /** + * Set the intervals property: List of intervals with appropriate metric data. + * + * @param intervals the intervals value to set. + * @return the QueryStatisticsInner object itself. + */ + public QueryStatisticsInner withIntervals(List intervals) { + if (this.innerProperties() == null) { + this.innerProperties = new QueryStatisticsProperties(); + } + this.innerProperties().withIntervals(intervals); + return this; + } + /** * Validates the instance. * @@ -188,8 +187,6 @@ public static QueryStatisticsInner fromJson(JsonReader jsonReader) throws IOExce deserializedQueryStatisticsInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedQueryStatisticsInner.innerProperties = QueryStatisticsProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedQueryStatisticsInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsProperties.java index 4ef22e460b52..f31923b9896f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.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,7 +16,7 @@ /** * Properties of a query execution statistics. */ -@Immutable +@Fluent public final class QueryStatisticsProperties implements JsonSerializable { /* * Database name of the database in which this query was executed. @@ -46,7 +46,7 @@ public final class QueryStatisticsProperties implements JsonSerializable intervals() { return this.intervals; } + /** + * Set the intervals property: List of intervals with appropriate metric data. + * + * @param intervals the intervals value to set. + * @return the QueryStatisticsProperties object itself. + */ + public QueryStatisticsProperties withIntervals(List intervals) { + this.intervals = intervals; + return this; + } + /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionInner.java index 91a2122280d8..58f3bd8af812 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -27,11 +26,6 @@ */ @Fluent public final class RecommendedActionInner extends ProxyResource { - /* - * Resource properties. - */ - private RecommendedActionProperties innerProperties; - /* * Resource kind. */ @@ -43,9 +37,9 @@ public final class RecommendedActionInner extends ProxyResource { private String location; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private RecommendedActionProperties innerProperties; /* * The type of the resource. @@ -68,15 +62,6 @@ public final class RecommendedActionInner extends ProxyResource { public RecommendedActionInner() { } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private RecommendedActionProperties innerProperties() { - return this.innerProperties; - } - /** * Get the kind property: Resource kind. * @@ -96,12 +81,12 @@ public String location() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private RecommendedActionProperties innerProperties() { + return this.innerProperties; } /** @@ -364,7 +349,7 @@ public List linkedObjects() { * * @return the details value. */ - public Map details() { + public Map details() { return this.innerProperties() == null ? null : this.innerProperties().details(); } @@ -411,14 +396,12 @@ public static RecommendedActionInner fromJson(JsonReader jsonReader) throws IOEx deserializedRecommendedActionInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedRecommendedActionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedRecommendedActionInner.innerProperties = RecommendedActionProperties.fromJson(reader); } else if ("kind".equals(fieldName)) { deserializedRecommendedActionInner.kind = reader.getString(); } else if ("location".equals(fieldName)) { deserializedRecommendedActionInner.location = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedRecommendedActionInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedRecommendedActionInner.innerProperties = RecommendedActionProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionProperties.java index 1dcbb63b3217..f7c3481ac633 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -146,7 +146,7 @@ public final class RecommendedActionProperties implements JsonSerializable details; + private Map details; /** * Creates an instance of RecommendedActionProperties class. @@ -381,7 +381,7 @@ public List linkedObjects() { * * @return the details value. */ - public Map details() { + public Map details() { return this.details; } @@ -509,7 +509,7 @@ public static RecommendedActionProperties fromJson(JsonReader jsonReader) throws List linkedObjects = reader.readArray(reader1 -> reader1.getString()); deserializedRecommendedActionProperties.linkedObjects = linkedObjects; } else if ("details".equals(fieldName)) { - Map details = reader.readMap(reader1 -> reader1.getString()); + Map details = reader.readMap(reader1 -> reader1.readUntyped()); deserializedRecommendedActionProperties.details = details; } else { reader.skipChildren(); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedSensitivityLabelUpdateProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedSensitivityLabelUpdateProperties.java index 57db95cdbe71..ad27198f4ee2 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedSensitivityLabelUpdateProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedSensitivityLabelUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseInner.java index 0aecc879da0a..005d3245d334 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseInner.java @@ -1,19 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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.sql.models.DatabaseKey; import java.io.IOException; import java.time.OffsetDateTime; -import java.util.Map; /** * A recoverable database resource. @@ -25,11 +22,6 @@ public final class RecoverableDatabaseInner extends ProxyResource { */ private RecoverableDatabaseProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -48,7 +40,7 @@ public final class RecoverableDatabaseInner extends ProxyResource { /** * Creates an instance of RecoverableDatabaseInner class. */ - private RecoverableDatabaseInner() { + public RecoverableDatabaseInner() { } /** @@ -60,15 +52,6 @@ private RecoverableDatabaseProperties 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. * @@ -135,15 +118,6 @@ public OffsetDateTime lastAvailableBackupDate() { return this.innerProperties() == null ? null : this.innerProperties().lastAvailableBackupDate(); } - /** - * Get the keys property: The resource ids of the user assigned identities to use. - * - * @return the keys value. - */ - public Map keys() { - return this.innerProperties() == null ? null : this.innerProperties().keys(); - } - /** * Validates the instance. * @@ -190,8 +164,6 @@ public static RecoverableDatabaseInner fromJson(JsonReader jsonReader) throws IO } else if ("properties".equals(fieldName)) { deserializedRecoverableDatabaseInner.innerProperties = RecoverableDatabaseProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedRecoverableDatabaseInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseProperties.java index 65310ae9b4bf..5aa31804e2a1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -10,10 +10,8 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.sql.models.DatabaseKey; import java.io.IOException; import java.time.OffsetDateTime; -import java.util.Map; /** * The recoverable database's properties. @@ -40,15 +38,10 @@ public final class RecoverableDatabaseProperties implements JsonSerializable keys; - /** * Creates an instance of RecoverableDatabaseProperties class. */ - private RecoverableDatabaseProperties() { + public RecoverableDatabaseProperties() { } /** @@ -87,28 +80,12 @@ public OffsetDateTime lastAvailableBackupDate() { return this.lastAvailableBackupDate; } - /** - * Get the keys property: The resource ids of the user assigned identities to use. - * - * @return the keys value. - */ - public Map keys() { - return this.keys; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (keys() != null) { - keys().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } } /** @@ -117,7 +94,6 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("keys", this.keys, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -146,9 +122,6 @@ public static RecoverableDatabaseProperties fromJson(JsonReader jsonReader) thro } else if ("lastAvailableBackupDate".equals(fieldName)) { deserializedRecoverableDatabaseProperties.lastAvailableBackupDate = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("keys".equals(fieldName)) { - Map keys = reader.readMap(reader1 -> DatabaseKey.fromJson(reader1)); - deserializedRecoverableDatabaseProperties.keys = keys; } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseInner.java index 8612a7fceaae..4ca9129d186c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ public final class RecoverableManagedDatabaseInner extends ProxyResource { */ private RecoverableManagedDatabaseProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -45,7 +39,7 @@ public final class RecoverableManagedDatabaseInner extends ProxyResource { /** * Creates an instance of RecoverableManagedDatabaseInner class. */ - private RecoverableManagedDatabaseInner() { + public RecoverableManagedDatabaseInner() { } /** @@ -57,15 +51,6 @@ private RecoverableManagedDatabaseProperties 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. * @@ -152,8 +137,6 @@ public static RecoverableManagedDatabaseInner fromJson(JsonReader jsonReader) th } else if ("properties".equals(fieldName)) { deserializedRecoverableManagedDatabaseInner.innerProperties = RecoverableManagedDatabaseProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedRecoverableManagedDatabaseInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseProperties.java index a09595efe90e..eddc039a126b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -25,7 +25,7 @@ public final class RecoverableManagedDatabaseProperties /** * Creates an instance of RecoverableManagedDatabaseProperties class. */ - private RecoverableManagedDatabaseProperties() { + public RecoverableManagedDatabaseProperties() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultInner.java deleted file mode 100644 index 346d784a8587..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultInner.java +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; -import java.util.UUID; - -/** - * An RefreshExternalGovernanceStatus operation result resource. - */ -@Immutable -public final class RefreshExternalGovernanceStatusOperationResultInner extends ProxyResource { - /* - * Resource properties. - */ - private RefreshExternalGovernanceStatusOperationResultProperties 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 RefreshExternalGovernanceStatusOperationResultInner class. - */ - private RefreshExternalGovernanceStatusOperationResultInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private RefreshExternalGovernanceStatusOperationResultProperties 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 requestId property: Request Id. - * - * @return the requestId value. - */ - public UUID requestId() { - return this.innerProperties() == null ? null : this.innerProperties().requestId(); - } - - /** - * Get the requestType property: Request type. - * - * @return the requestType value. - */ - public String requestType() { - return this.innerProperties() == null ? null : this.innerProperties().requestType(); - } - - /** - * Get the queuedTime property: Queued time. - * - * @return the queuedTime value. - */ - public String queuedTime() { - return this.innerProperties() == null ? null : this.innerProperties().queuedTime(); - } - - /** - * Get the serverName property: Server name. - * - * @return the serverName value. - */ - public String serverName() { - return this.innerProperties() == null ? null : this.innerProperties().serverName(); - } - - /** - * Get the status property: Operation status. - * - * @return the status value. - */ - public String status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Get the errorMessage property: Error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.innerProperties() == null ? null : this.innerProperties().errorMessage(); - } - - /** - * 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RefreshExternalGovernanceStatusOperationResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RefreshExternalGovernanceStatusOperationResultInner 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 RefreshExternalGovernanceStatusOperationResultInner. - */ - public static RefreshExternalGovernanceStatusOperationResultInner fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - RefreshExternalGovernanceStatusOperationResultInner deserializedRefreshExternalGovernanceStatusOperationResultInner - = new RefreshExternalGovernanceStatusOperationResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultInner.innerProperties - = RefreshExternalGovernanceStatusOperationResultProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultInner.systemData - = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRefreshExternalGovernanceStatusOperationResultInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultMIInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultMIInner.java deleted file mode 100644 index 7e360fa31b3b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultMIInner.java +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; -import java.util.UUID; - -/** - * An RefreshExternalGovernanceStatus operation result resource. - */ -@Immutable -public final class RefreshExternalGovernanceStatusOperationResultMIInner extends ProxyResource { - /* - * Resource properties. - */ - private RefreshExternalGovernanceStatusOperationResultPropertiesMI 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 RefreshExternalGovernanceStatusOperationResultMIInner class. - */ - private RefreshExternalGovernanceStatusOperationResultMIInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private RefreshExternalGovernanceStatusOperationResultPropertiesMI 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 requestId property: Request Id. - * - * @return the requestId value. - */ - public UUID requestId() { - return this.innerProperties() == null ? null : this.innerProperties().requestId(); - } - - /** - * Get the requestType property: Request type. - * - * @return the requestType value. - */ - public String requestType() { - return this.innerProperties() == null ? null : this.innerProperties().requestType(); - } - - /** - * Get the queuedTime property: Queued time. - * - * @return the queuedTime value. - */ - public String queuedTime() { - return this.innerProperties() == null ? null : this.innerProperties().queuedTime(); - } - - /** - * Get the managedInstanceName property: Managed instance name. - * - * @return the managedInstanceName value. - */ - public String managedInstanceName() { - return this.innerProperties() == null ? null : this.innerProperties().managedInstanceName(); - } - - /** - * Get the status property: Operation status. - * - * @return the status value. - */ - public String status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Get the errorMessage property: Error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.innerProperties() == null ? null : this.innerProperties().errorMessage(); - } - - /** - * 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RefreshExternalGovernanceStatusOperationResultMIInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RefreshExternalGovernanceStatusOperationResultMIInner 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 RefreshExternalGovernanceStatusOperationResultMIInner. - */ - public static RefreshExternalGovernanceStatusOperationResultMIInner fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - RefreshExternalGovernanceStatusOperationResultMIInner deserializedRefreshExternalGovernanceStatusOperationResultMIInner - = new RefreshExternalGovernanceStatusOperationResultMIInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultMIInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultMIInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultMIInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultMIInner.innerProperties - = RefreshExternalGovernanceStatusOperationResultPropertiesMI.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultMIInner.systemData - = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRefreshExternalGovernanceStatusOperationResultMIInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultProperties.java deleted file mode 100644 index 940c8c11d638..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultProperties.java +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.fluent.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 java.io.IOException; -import java.util.UUID; - -/** - * Contains the operation result properties for refresh external governance status operation. - */ -@Immutable -public final class RefreshExternalGovernanceStatusOperationResultProperties - implements JsonSerializable { - /* - * Request Id. - */ - private UUID requestId; - - /* - * Request type. - */ - private String requestType; - - /* - * Queued time. - */ - private String queuedTime; - - /* - * Server name. - */ - private String serverName; - - /* - * Operation status. - */ - private String status; - - /* - * Error message. - */ - private String errorMessage; - - /** - * Creates an instance of RefreshExternalGovernanceStatusOperationResultProperties class. - */ - private RefreshExternalGovernanceStatusOperationResultProperties() { - } - - /** - * Get the requestId property: Request Id. - * - * @return the requestId value. - */ - public UUID requestId() { - return this.requestId; - } - - /** - * Get the requestType property: Request type. - * - * @return the requestType value. - */ - public String requestType() { - return this.requestType; - } - - /** - * Get the queuedTime property: Queued time. - * - * @return the queuedTime value. - */ - public String queuedTime() { - return this.queuedTime; - } - - /** - * Get the serverName property: Server name. - * - * @return the serverName value. - */ - public String serverName() { - return this.serverName; - } - - /** - * Get the status property: Operation status. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Get the errorMessage property: Error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RefreshExternalGovernanceStatusOperationResultProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RefreshExternalGovernanceStatusOperationResultProperties 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 - * RefreshExternalGovernanceStatusOperationResultProperties. - */ - public static RefreshExternalGovernanceStatusOperationResultProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - RefreshExternalGovernanceStatusOperationResultProperties deserializedRefreshExternalGovernanceStatusOperationResultProperties - = new RefreshExternalGovernanceStatusOperationResultProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("requestId".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultProperties.requestId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("requestType".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultProperties.requestType - = reader.getString(); - } else if ("queuedTime".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultProperties.queuedTime - = reader.getString(); - } else if ("serverName".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultProperties.serverName - = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultProperties.status = reader.getString(); - } else if ("errorMessage".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultProperties.errorMessage - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRefreshExternalGovernanceStatusOperationResultProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultPropertiesMI.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultPropertiesMI.java deleted file mode 100644 index dc57d7da554c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultPropertiesMI.java +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.fluent.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 java.io.IOException; -import java.util.UUID; - -/** - * Contains the operation result properties for refresh external governance status operation. - */ -@Immutable -public final class RefreshExternalGovernanceStatusOperationResultPropertiesMI - implements JsonSerializable { - /* - * Request Id. - */ - private UUID requestId; - - /* - * Request type. - */ - private String requestType; - - /* - * Queued time. - */ - private String queuedTime; - - /* - * Managed instance name. - */ - private String managedInstanceName; - - /* - * Operation status. - */ - private String status; - - /* - * Error message. - */ - private String errorMessage; - - /** - * Creates an instance of RefreshExternalGovernanceStatusOperationResultPropertiesMI class. - */ - private RefreshExternalGovernanceStatusOperationResultPropertiesMI() { - } - - /** - * Get the requestId property: Request Id. - * - * @return the requestId value. - */ - public UUID requestId() { - return this.requestId; - } - - /** - * Get the requestType property: Request type. - * - * @return the requestType value. - */ - public String requestType() { - return this.requestType; - } - - /** - * Get the queuedTime property: Queued time. - * - * @return the queuedTime value. - */ - public String queuedTime() { - return this.queuedTime; - } - - /** - * Get the managedInstanceName property: Managed instance name. - * - * @return the managedInstanceName value. - */ - public String managedInstanceName() { - return this.managedInstanceName; - } - - /** - * Get the status property: Operation status. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Get the errorMessage property: Error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RefreshExternalGovernanceStatusOperationResultPropertiesMI from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RefreshExternalGovernanceStatusOperationResultPropertiesMI 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 - * RefreshExternalGovernanceStatusOperationResultPropertiesMI. - */ - public static RefreshExternalGovernanceStatusOperationResultPropertiesMI fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - RefreshExternalGovernanceStatusOperationResultPropertiesMI deserializedRefreshExternalGovernanceStatusOperationResultPropertiesMI - = new RefreshExternalGovernanceStatusOperationResultPropertiesMI(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("requestId".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultPropertiesMI.requestId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("requestType".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultPropertiesMI.requestType - = reader.getString(); - } else if ("queuedTime".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultPropertiesMI.queuedTime - = reader.getString(); - } else if ("managedInstanceName".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultPropertiesMI.managedInstanceName - = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultPropertiesMI.status = reader.getString(); - } else if ("errorMessage".equals(fieldName)) { - deserializedRefreshExternalGovernanceStatusOperationResultPropertiesMI.errorMessage - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRefreshExternalGovernanceStatusOperationResultPropertiesMI; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkInner.java index b2024babb63e..7c7bd295c447 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; -import com.azure.core.annotation.Fluent; +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; @@ -19,18 +18,13 @@ /** * A replication link. */ -@Fluent +@Immutable public final class ReplicationLinkInner extends ProxyResource { /* * Resource properties. */ private ReplicationLinkProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -61,15 +55,6 @@ private ReplicationLinkProperties 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. * @@ -118,15 +103,6 @@ public String partnerDatabase() { return this.innerProperties() == null ? null : this.innerProperties().partnerDatabase(); } - /** - * Get the partnerDatabaseId property: Resource partner database Id. - * - * @return the partnerDatabaseId value. - */ - public String partnerDatabaseId() { - return this.innerProperties() == null ? null : this.innerProperties().partnerDatabaseId(); - } - /** * Get the partnerLocation property: Resource partner location. * @@ -200,7 +176,7 @@ public Boolean isTerminationAllowed() { } /** - * Get the linkType property: Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED. + * Get the linkType property: Link type (GEO, NAMED, STANDBY). * * @return the linkType value. */ @@ -208,20 +184,6 @@ public ReplicationLinkType linkType() { return this.innerProperties() == null ? null : this.innerProperties().linkType(); } - /** - * Set the linkType property: Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED. - * - * @param linkType the linkType value to set. - * @return the ReplicationLinkInner object itself. - */ - public ReplicationLinkInner withLinkType(ReplicationLinkType linkType) { - if (this.innerProperties() == null) { - this.innerProperties = new ReplicationLinkProperties(); - } - this.innerProperties().withLinkType(linkType); - return this; - } - /** * Validates the instance. * @@ -267,8 +229,6 @@ public static ReplicationLinkInner fromJson(JsonReader jsonReader) throws IOExce deserializedReplicationLinkInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedReplicationLinkInner.innerProperties = ReplicationLinkProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedReplicationLinkInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkProperties.java index 29dcd362218e..50f9990cc6c2 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -19,7 +19,7 @@ /** * Properties of a replication link. */ -@Fluent +@Immutable public final class ReplicationLinkProperties implements JsonSerializable { /* * Resource partner server. @@ -31,11 +31,6 @@ public final class ReplicationLinkProperties implements JsonSerializable { - /* - * Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED. - */ - private ReplicationLinkType linkType; - - /** - * Creates an instance of ReplicationLinkUpdateProperties class. - */ - public ReplicationLinkUpdateProperties() { - } - - /** - * Get the linkType property: Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED. - * - * @return the linkType value. - */ - public ReplicationLinkType linkType() { - return this.linkType; - } - - /** - * Set the linkType property: Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED. - * - * @param linkType the linkType value to set. - * @return the ReplicationLinkUpdateProperties object itself. - */ - public ReplicationLinkUpdateProperties withLinkType(ReplicationLinkType linkType) { - this.linkType = linkType; - 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("linkType", this.linkType == null ? null : this.linkType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationLinkUpdateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationLinkUpdateProperties 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 ReplicationLinkUpdateProperties. - */ - public static ReplicationLinkUpdateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationLinkUpdateProperties deserializedReplicationLinkUpdateProperties - = new ReplicationLinkUpdateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("linkType".equals(fieldName)) { - deserializedReplicationLinkUpdateProperties.linkType - = ReplicationLinkType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationLinkUpdateProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseInner.java index 6b6b6121a1e1..8e8e269c2fd4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseInner.java @@ -1,17 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; -import com.azure.core.annotation.Immutable; +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.sql.models.BackupStorageRedundancy; -import com.azure.resourcemanager.sql.models.DatabaseKey; import com.azure.resourcemanager.sql.models.Sku; import java.io.IOException; import java.time.OffsetDateTime; @@ -20,17 +18,12 @@ /** * A restorable dropped database resource. */ -@Immutable +@Fluent public final class RestorableDroppedDatabaseInner extends ProxyResource { /* - * Resource properties. - */ - private RestorableDroppedDatabaseProperties innerProperties; - - /* - * Resource tags. + * The name and tier of the SKU. */ - private Map tags; + private Sku sku; /* * Resource location. @@ -38,14 +31,14 @@ public final class RestorableDroppedDatabaseInner extends ProxyResource { private String location; /* - * The name and tier of the SKU. + * Resource tags. */ - private Sku sku; + private Map tags; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private RestorableDroppedDatabaseProperties innerProperties; /* * The type of the resource. @@ -65,25 +58,27 @@ public final class RestorableDroppedDatabaseInner extends ProxyResource { /** * Creates an instance of RestorableDroppedDatabaseInner class. */ - private RestorableDroppedDatabaseInner() { + public RestorableDroppedDatabaseInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the sku property: The name and tier of the SKU. * - * @return the innerProperties value. + * @return the sku value. */ - private RestorableDroppedDatabaseProperties innerProperties() { - return this.innerProperties; + public Sku sku() { + return this.sku; } /** - * Get the tags property: Resource tags. + * Set the sku property: The name and tier of the SKU. * - * @return the tags value. + * @param sku the sku value to set. + * @return the RestorableDroppedDatabaseInner object itself. */ - public Map tags() { - return this.tags; + public RestorableDroppedDatabaseInner withSku(Sku sku) { + this.sku = sku; + return this; } /** @@ -96,21 +91,43 @@ public String location() { } /** - * Get the sku property: The name and tier of the SKU. + * Set the location property: Resource location. * - * @return the sku value. + * @param location the location value to set. + * @return the RestorableDroppedDatabaseInner object itself. */ - public Sku sku() { - return this.sku; + public RestorableDroppedDatabaseInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Set the tags property: Resource tags. * - * @return the systemData value. + * @param tags the tags value to set. + * @return the RestorableDroppedDatabaseInner object itself. */ - public SystemData systemData() { - return this.systemData; + public RestorableDroppedDatabaseInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private RestorableDroppedDatabaseProperties innerProperties() { + return this.innerProperties; } /** @@ -197,27 +214,18 @@ public BackupStorageRedundancy backupStorageRedundancy() { return this.innerProperties() == null ? null : this.innerProperties().backupStorageRedundancy(); } - /** - * Get the keys property: The resource ids of the user assigned identities to use. - * - * @return the keys value. - */ - public Map keys() { - return this.innerProperties() == null ? null : this.innerProperties().keys(); - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } if (sku() != null) { sku().validate(); } + if (innerProperties() != null) { + innerProperties().validate(); + } } /** @@ -226,10 +234,10 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("location", this.location); jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } @@ -256,18 +264,16 @@ public static RestorableDroppedDatabaseInner fromJson(JsonReader jsonReader) thr deserializedRestorableDroppedDatabaseInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedRestorableDroppedDatabaseInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedRestorableDroppedDatabaseInner.innerProperties - = RestorableDroppedDatabaseProperties.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedRestorableDroppedDatabaseInner.sku = Sku.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedRestorableDroppedDatabaseInner.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedRestorableDroppedDatabaseInner.tags = tags; - } else if ("location".equals(fieldName)) { - deserializedRestorableDroppedDatabaseInner.location = reader.getString(); - } else if ("sku".equals(fieldName)) { - deserializedRestorableDroppedDatabaseInner.sku = Sku.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedRestorableDroppedDatabaseInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedRestorableDroppedDatabaseInner.innerProperties + = RestorableDroppedDatabaseProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseProperties.java index 299a1245063c..4b384080fbb7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -11,10 +11,8 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.azure.resourcemanager.sql.models.DatabaseKey; import java.io.IOException; import java.time.OffsetDateTime; -import java.util.Map; /** * The restorable dropped database's properties. @@ -52,15 +50,10 @@ public final class RestorableDroppedDatabaseProperties */ private BackupStorageRedundancy backupStorageRedundancy; - /* - * The resource ids of the user assigned identities to use - */ - private Map keys; - /** * Creates an instance of RestorableDroppedDatabaseProperties class. */ - private RestorableDroppedDatabaseProperties() { + public RestorableDroppedDatabaseProperties() { } /** @@ -117,28 +110,12 @@ public BackupStorageRedundancy backupStorageRedundancy() { return this.backupStorageRedundancy; } - /** - * Get the keys property: The resource ids of the user assigned identities to use. - * - * @return the keys value. - */ - public Map keys() { - return this.keys; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (keys() != null) { - keys().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } } /** @@ -147,7 +124,6 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("keys", this.keys, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -184,9 +160,6 @@ public static RestorableDroppedDatabaseProperties fromJson(JsonReader jsonReader } else if ("backupStorageRedundancy".equals(fieldName)) { deserializedRestorableDroppedDatabaseProperties.backupStorageRedundancy = BackupStorageRedundancy.fromString(reader.getString()); - } else if ("keys".equals(fieldName)) { - Map keys = reader.readMap(reader1 -> DatabaseKey.fromJson(reader1)); - deserializedRestorableDroppedDatabaseProperties.keys = keys; } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseInner.java index e34967246b89..b91752a4b00d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -17,18 +16,13 @@ /** * A restorable dropped managed database resource. */ -@Immutable +@Fluent public final class RestorableDroppedManagedDatabaseInner extends Resource { /* * Resource properties. */ private RestorableDroppedManagedDatabaseProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -47,7 +41,7 @@ public final class RestorableDroppedManagedDatabaseInner extends Resource { /** * Creates an instance of RestorableDroppedManagedDatabaseInner class. */ - private RestorableDroppedManagedDatabaseInner() { + public RestorableDroppedManagedDatabaseInner() { } /** @@ -59,15 +53,6 @@ private RestorableDroppedManagedDatabaseProperties 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. * @@ -98,6 +83,24 @@ public String id() { return this.id; } + /** + * {@inheritDoc} + */ + @Override + public RestorableDroppedManagedDatabaseInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public RestorableDroppedManagedDatabaseInner withTags(Map tags) { + super.withTags(tags); + return this; + } + /** * Get the databaseName property: The name of the database. * @@ -188,8 +191,6 @@ public static RestorableDroppedManagedDatabaseInner fromJson(JsonReader jsonRead } else if ("properties".equals(fieldName)) { deserializedRestorableDroppedManagedDatabaseInner.innerProperties = RestorableDroppedManagedDatabaseProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedRestorableDroppedManagedDatabaseInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseProperties.java index f3e8fbef004b..afdefc70b71b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -42,7 +42,7 @@ public final class RestorableDroppedManagedDatabaseProperties /** * Creates an instance of RestorableDroppedManagedDatabaseProperties class. */ - private RestorableDroppedManagedDatabaseProperties() { + public RestorableDroppedManagedDatabaseProperties() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointInner.java index 0ae6a20ce002..e7bb2113dc1a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -19,20 +18,15 @@ */ @Immutable public final class RestorePointInner extends ProxyResource { - /* - * Resource properties. - */ - private RestorePointProperties innerProperties; - /* * Resource location. */ private String location; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private RestorePointProperties innerProperties; /* * The type of the resource. @@ -52,16 +46,7 @@ public final class RestorePointInner extends ProxyResource { /** * Creates an instance of RestorePointInner class. */ - private RestorePointInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private RestorePointProperties innerProperties() { - return this.innerProperties; + public RestorePointInner() { } /** @@ -74,12 +59,12 @@ public String location() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private RestorePointProperties innerProperties() { + return this.innerProperties; } /** @@ -191,12 +176,10 @@ public static RestorePointInner fromJson(JsonReader jsonReader) throws IOExcepti deserializedRestorePointInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedRestorePointInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedRestorePointInner.innerProperties = RestorePointProperties.fromJson(reader); } else if ("location".equals(fieldName)) { deserializedRestorePointInner.location = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedRestorePointInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedRestorePointInner.innerProperties = RestorePointProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointProperties.java index f193e8f598ba..067fcee0cc0f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -42,7 +42,7 @@ public final class RestorePointProperties implements JsonSerializable { + /* + * Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the + * specific database. + */ + private SecurityAlertPolicyState state; + + /* + * Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + * Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force + */ + private List disabledAlerts; + + /* + * Specifies an array of e-mail addresses to which the alert is sent. + */ + private List emailAddresses; + + /* + * Specifies that the alert is sent to the account administrators. + */ + private Boolean emailAccountAdmins; + + /* + * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold + * all Threat Detection audit logs. + */ + private String storageEndpoint; + + /* + * Specifies the identifier key of the Threat Detection audit storage account. + */ + private String storageAccountAccessKey; + + /* + * Specifies the number of days to keep in the Threat Detection audit logs. + */ + private Integer retentionDays; + + /* + * Specifies the UTC creation time of the policy. + */ + private OffsetDateTime creationTime; + + /** + * Creates an instance of SecurityAlertsPolicyPropertiesAutoGenerated class. + */ + public SecurityAlertsPolicyPropertiesAutoGenerated() { + } + + /** + * Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not + * been applied yet on the specific database. + * + * @return the state value. + */ + public SecurityAlertPolicyState state() { + return this.state; + } + + /** + * Set the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not + * been applied yet on the specific database. + * + * @param state the state value to set. + * @return the SecurityAlertsPolicyPropertiesAutoGenerated object itself. + */ + public SecurityAlertsPolicyPropertiesAutoGenerated withState(SecurityAlertPolicyState state) { + this.state = state; + return this; + } + + /** + * Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: + * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force. + * + * @return the disabledAlerts value. + */ + public List disabledAlerts() { + return this.disabledAlerts; + } + + /** + * Set the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: + * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force. + * + * @param disabledAlerts the disabledAlerts value to set. + * @return the SecurityAlertsPolicyPropertiesAutoGenerated object itself. + */ + public SecurityAlertsPolicyPropertiesAutoGenerated withDisabledAlerts(List disabledAlerts) { + this.disabledAlerts = disabledAlerts; + return this; + } + + /** + * Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. + * + * @return the emailAddresses value. + */ + public List emailAddresses() { + return this.emailAddresses; + } + + /** + * Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. + * + * @param emailAddresses the emailAddresses value to set. + * @return the SecurityAlertsPolicyPropertiesAutoGenerated object itself. + */ + public SecurityAlertsPolicyPropertiesAutoGenerated withEmailAddresses(List emailAddresses) { + this.emailAddresses = emailAddresses; + return this; + } + + /** + * Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. + * + * @return the emailAccountAdmins value. + */ + public Boolean emailAccountAdmins() { + return this.emailAccountAdmins; + } + + /** + * Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. + * + * @param emailAccountAdmins the emailAccountAdmins value to set. + * @return the SecurityAlertsPolicyPropertiesAutoGenerated object itself. + */ + public SecurityAlertsPolicyPropertiesAutoGenerated withEmailAccountAdmins(Boolean emailAccountAdmins) { + this.emailAccountAdmins = emailAccountAdmins; + return this; + } + + /** + * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. + * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. + * + * @return the storageEndpoint value. + */ + public String storageEndpoint() { + return this.storageEndpoint; + } + + /** + * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. + * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. + * + * @param storageEndpoint the storageEndpoint value to set. + * @return the SecurityAlertsPolicyPropertiesAutoGenerated object itself. + */ + public SecurityAlertsPolicyPropertiesAutoGenerated withStorageEndpoint(String storageEndpoint) { + this.storageEndpoint = storageEndpoint; + return this; + } + + /** + * Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage + * account. + * + * @return the storageAccountAccessKey value. + */ + public String storageAccountAccessKey() { + return this.storageAccountAccessKey; + } + + /** + * Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage + * account. + * + * @param storageAccountAccessKey the storageAccountAccessKey value to set. + * @return the SecurityAlertsPolicyPropertiesAutoGenerated object itself. + */ + public SecurityAlertsPolicyPropertiesAutoGenerated withStorageAccountAccessKey(String storageAccountAccessKey) { + this.storageAccountAccessKey = storageAccountAccessKey; + return this; + } + + /** + * Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. + * + * @return the retentionDays value. + */ + public Integer retentionDays() { + return this.retentionDays; + } + + /** + * Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. + * + * @param retentionDays the retentionDays value to set. + * @return the SecurityAlertsPolicyPropertiesAutoGenerated object itself. + */ + public SecurityAlertsPolicyPropertiesAutoGenerated withRetentionDays(Integer retentionDays) { + this.retentionDays = retentionDays; + return this; + } + + /** + * Get the creationTime property: Specifies the UTC creation time of the policy. + * + * @return the creationTime value. + */ + public OffsetDateTime creationTime() { + return this.creationTime; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (state() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property state in model SecurityAlertsPolicyPropertiesAutoGenerated")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SecurityAlertsPolicyPropertiesAutoGenerated.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeArrayField("disabledAlerts", this.disabledAlerts, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("emailAddresses", this.emailAddresses, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("emailAccountAdmins", this.emailAccountAdmins); + jsonWriter.writeStringField("storageEndpoint", this.storageEndpoint); + jsonWriter.writeStringField("storageAccountAccessKey", this.storageAccountAccessKey); + jsonWriter.writeNumberField("retentionDays", this.retentionDays); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecurityAlertsPolicyPropertiesAutoGenerated from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecurityAlertsPolicyPropertiesAutoGenerated 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 SecurityAlertsPolicyPropertiesAutoGenerated. + */ + public static SecurityAlertsPolicyPropertiesAutoGenerated fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecurityAlertsPolicyPropertiesAutoGenerated deserializedSecurityAlertsPolicyPropertiesAutoGenerated + = new SecurityAlertsPolicyPropertiesAutoGenerated(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedSecurityAlertsPolicyPropertiesAutoGenerated.state + = SecurityAlertPolicyState.fromString(reader.getString()); + } else if ("disabledAlerts".equals(fieldName)) { + List disabledAlerts = reader.readArray(reader1 -> reader1.getString()); + deserializedSecurityAlertsPolicyPropertiesAutoGenerated.disabledAlerts = disabledAlerts; + } else if ("emailAddresses".equals(fieldName)) { + List emailAddresses = reader.readArray(reader1 -> reader1.getString()); + deserializedSecurityAlertsPolicyPropertiesAutoGenerated.emailAddresses = emailAddresses; + } else if ("emailAccountAdmins".equals(fieldName)) { + deserializedSecurityAlertsPolicyPropertiesAutoGenerated.emailAccountAdmins + = reader.getNullable(JsonReader::getBoolean); + } else if ("storageEndpoint".equals(fieldName)) { + deserializedSecurityAlertsPolicyPropertiesAutoGenerated.storageEndpoint = reader.getString(); + } else if ("storageAccountAccessKey".equals(fieldName)) { + deserializedSecurityAlertsPolicyPropertiesAutoGenerated.storageAccountAccessKey + = reader.getString(); + } else if ("retentionDays".equals(fieldName)) { + deserializedSecurityAlertsPolicyPropertiesAutoGenerated.retentionDays + = reader.getNullable(JsonReader::getInt); + } else if ("creationTime".equals(fieldName)) { + deserializedSecurityAlertsPolicyPropertiesAutoGenerated.creationTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedSecurityAlertsPolicyPropertiesAutoGenerated; + }); + } +} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventInner.java index abb18fdca6af..d95436b22aed 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -25,11 +24,6 @@ public final class SecurityEventInner extends ProxyResource { */ private SecurityEventProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -48,7 +42,7 @@ public final class SecurityEventInner extends ProxyResource { /** * Creates an instance of SecurityEventInner class. */ - private SecurityEventInner() { + public SecurityEventInner() { } /** @@ -60,15 +54,6 @@ private SecurityEventProperties 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. * @@ -228,8 +213,6 @@ public static SecurityEventInner fromJson(JsonReader jsonReader) throws IOExcept deserializedSecurityEventInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedSecurityEventInner.innerProperties = SecurityEventProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedSecurityEventInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventProperties.java index c8a68a3d8018..d1ad0427d65c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -68,7 +68,7 @@ public final class SecurityEventProperties implements JsonSerializable { - ServerConfigurationOptionInner deserializedServerConfigurationOptionInner - = new ServerConfigurationOptionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedServerConfigurationOptionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedServerConfigurationOptionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedServerConfigurationOptionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedServerConfigurationOptionInner.innerProperties - = ServerConfigurationOptionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedServerConfigurationOptionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedServerConfigurationOptionInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConfigurationOptionProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConfigurationOptionProperties.java deleted file mode 100644 index 8df90b0aff80..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConfigurationOptionProperties.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.ProvisioningState; -import java.io.IOException; - -/** - * The properties of server configuration option. - */ -@Fluent -public final class ServerConfigurationOptionProperties - implements JsonSerializable { - /* - * Value of the server configuration option. - */ - private int serverConfigurationOptionValue; - - /* - * Provisioning state of server configuration option. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of ServerConfigurationOptionProperties class. - */ - public ServerConfigurationOptionProperties() { - } - - /** - * Get the serverConfigurationOptionValue property: Value of the server configuration option. - * - * @return the serverConfigurationOptionValue value. - */ - public int serverConfigurationOptionValue() { - return this.serverConfigurationOptionValue; - } - - /** - * Set the serverConfigurationOptionValue property: Value of the server configuration option. - * - * @param serverConfigurationOptionValue the serverConfigurationOptionValue value to set. - * @return the ServerConfigurationOptionProperties object itself. - */ - public ServerConfigurationOptionProperties withServerConfigurationOptionValue(int serverConfigurationOptionValue) { - this.serverConfigurationOptionValue = serverConfigurationOptionValue; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of server configuration option. - * - * @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.writeIntField("serverConfigurationOptionValue", this.serverConfigurationOptionValue); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServerConfigurationOptionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServerConfigurationOptionProperties 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 ServerConfigurationOptionProperties. - */ - public static ServerConfigurationOptionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServerConfigurationOptionProperties deserializedServerConfigurationOptionProperties - = new ServerConfigurationOptionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serverConfigurationOptionValue".equals(fieldName)) { - deserializedServerConfigurationOptionProperties.serverConfigurationOptionValue = reader.getInt(); - } else if ("provisioningState".equals(fieldName)) { - deserializedServerConfigurationOptionProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedServerConfigurationOptionProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyInner.java index 9059ac1ffc1c..77a487138a53 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -18,11 +17,6 @@ */ @Fluent public final class ServerConnectionPolicyInner extends ProxyResource { - /* - * Resource properties. - */ - private ServerConnectionPolicyProperties innerProperties; - /* * Resource location. */ @@ -34,9 +28,9 @@ public final class ServerConnectionPolicyInner extends ProxyResource { private String kind; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private ServerConnectionPolicyProperties innerProperties; /* * The type of the resource. @@ -59,15 +53,6 @@ public final class ServerConnectionPolicyInner extends ProxyResource { public ServerConnectionPolicyInner() { } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private ServerConnectionPolicyProperties innerProperties() { - return this.innerProperties; - } - /** * Get the location property: Resource location. * @@ -87,12 +72,12 @@ public String kind() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private ServerConnectionPolicyProperties innerProperties() { + return this.innerProperties; } /** @@ -191,15 +176,13 @@ public static ServerConnectionPolicyInner fromJson(JsonReader jsonReader) throws deserializedServerConnectionPolicyInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedServerConnectionPolicyInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedServerConnectionPolicyInner.innerProperties - = ServerConnectionPolicyProperties.fromJson(reader); } else if ("location".equals(fieldName)) { deserializedServerConnectionPolicyInner.location = reader.getString(); } else if ("kind".equals(fieldName)) { deserializedServerConnectionPolicyInner.kind = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedServerConnectionPolicyInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedServerConnectionPolicyInner.innerProperties + = ServerConnectionPolicyProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyProperties.java index 3b3b2bcc6377..9c11fff96a49 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditSettingsProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditSettingsProperties.java index fc07a3786193..54dfb5c4e418 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditSettingsProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditSettingsProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -40,11 +40,6 @@ public final class ServerDevOpsAuditSettingsProperties */ private Boolean isAzureMonitorTargetEnabled; - /* - * Specifies whether Managed Identity is used to access blob storage - */ - private Boolean isManagedIdentityInUse; - /* * Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are * required. @@ -125,26 +120,6 @@ public ServerDevOpsAuditSettingsProperties withIsAzureMonitorTargetEnabled(Boole return this; } - /** - * Get the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * - * @return the isManagedIdentityInUse value. - */ - public Boolean isManagedIdentityInUse() { - return this.isManagedIdentityInUse; - } - - /** - * Set the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * - * @param isManagedIdentityInUse the isManagedIdentityInUse value to set. - * @return the ServerDevOpsAuditSettingsProperties object itself. - */ - public ServerDevOpsAuditSettingsProperties withIsManagedIdentityInUse(Boolean isManagedIdentityInUse) { - this.isManagedIdentityInUse = isManagedIdentityInUse; - return this; - } - /** * Get the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. @@ -270,7 +245,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); jsonWriter.writeBooleanField("isAzureMonitorTargetEnabled", this.isAzureMonitorTargetEnabled); - jsonWriter.writeBooleanField("isManagedIdentityInUse", this.isManagedIdentityInUse); jsonWriter.writeStringField("storageEndpoint", this.storageEndpoint); jsonWriter.writeStringField("storageAccountAccessKey", this.storageAccountAccessKey); jsonWriter.writeStringField("storageAccountSubscriptionId", @@ -301,9 +275,6 @@ public static ServerDevOpsAuditSettingsProperties fromJson(JsonReader jsonReader } else if ("isAzureMonitorTargetEnabled".equals(fieldName)) { deserializedServerDevOpsAuditSettingsProperties.isAzureMonitorTargetEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("isManagedIdentityInUse".equals(fieldName)) { - deserializedServerDevOpsAuditSettingsProperties.isManagedIdentityInUse - = reader.getNullable(JsonReader::getBoolean); } else if ("storageEndpoint".equals(fieldName)) { deserializedServerDevOpsAuditSettingsProperties.storageEndpoint = reader.getString(); } else if ("storageAccountAccessKey".equals(fieldName)) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditingSettingsInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditingSettingsInner.java index 91dcae83883e..1990afd2b9c5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditingSettingsInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditingSettingsInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -20,14 +20,14 @@ @Fluent public final class ServerDevOpsAuditingSettingsInner extends ProxyResource { /* - * Resource properties. + * SystemData of ServerDevOpsAuditSettingsResource. */ - private ServerDevOpsAuditSettingsProperties innerProperties; + private SystemData systemData; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private ServerDevOpsAuditSettingsProperties innerProperties; /* * The type of the resource. @@ -51,21 +51,21 @@ public ServerDevOpsAuditingSettingsInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the systemData property: SystemData of ServerDevOpsAuditSettingsResource. * - * @return the innerProperties value. + * @return the systemData value. */ - private ServerDevOpsAuditSettingsProperties innerProperties() { - return this.innerProperties; + public SystemData systemData() { + return this.systemData; } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private ServerDevOpsAuditSettingsProperties innerProperties() { + return this.innerProperties; } /** @@ -145,29 +145,6 @@ public ServerDevOpsAuditingSettingsInner withIsAzureMonitorTargetEnabled(Boolean return this; } - /** - * Get the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * - * @return the isManagedIdentityInUse value. - */ - public Boolean isManagedIdentityInUse() { - return this.innerProperties() == null ? null : this.innerProperties().isManagedIdentityInUse(); - } - - /** - * Set the isManagedIdentityInUse property: Specifies whether Managed Identity is used to access blob storage. - * - * @param isManagedIdentityInUse the isManagedIdentityInUse value to set. - * @return the ServerDevOpsAuditingSettingsInner object itself. - */ - public ServerDevOpsAuditingSettingsInner withIsManagedIdentityInUse(Boolean isManagedIdentityInUse) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerDevOpsAuditSettingsProperties(); - } - this.innerProperties().withIsManagedIdentityInUse(isManagedIdentityInUse); - return this; - } - /** * Get the state property: Specifies the state of the audit. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. @@ -326,11 +303,11 @@ public static ServerDevOpsAuditingSettingsInner fromJson(JsonReader jsonReader) deserializedServerDevOpsAuditingSettingsInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedServerDevOpsAuditingSettingsInner.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedServerDevOpsAuditingSettingsInner.systemData = SystemData.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedServerDevOpsAuditingSettingsInner.innerProperties = ServerDevOpsAuditSettingsProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedServerDevOpsAuditingSettingsInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasInner.java index e02e442bef37..fd1d17abbe8d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ public final class ServerDnsAliasInner extends ProxyResource { */ private ServerDnsAliasProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -57,15 +51,6 @@ private ServerDnsAliasProperties 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. * @@ -150,8 +135,6 @@ public static ServerDnsAliasInner fromJson(JsonReader jsonReader) throws IOExcep deserializedServerDnsAliasInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedServerDnsAliasInner.innerProperties = ServerDnsAliasProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedServerDnsAliasInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasProperties.java index dff58c4491f3..5d2f78902266 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerFirewallRuleProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerFirewallRuleProperties.java index 3949a5934d9d..8c70fab72b6d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerFirewallRuleProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerFirewallRuleProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerInner.java index 533d312f76e9..c0bcfd8926f6 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerInner.java @@ -1,18 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -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.sql.models.ExternalGovernanceStatus; import com.azure.resourcemanager.sql.models.ResourceIdentity; -import com.azure.resourcemanager.sql.models.ServerCreateMode; import com.azure.resourcemanager.sql.models.ServerExternalAdministrator; import com.azure.resourcemanager.sql.models.ServerNetworkAccessFlag; import com.azure.resourcemanager.sql.models.ServerPrivateEndpointConnection; @@ -27,11 +24,6 @@ */ @Fluent public final class ServerInner extends Resource { - /* - * Resource properties. - */ - private ServerProperties innerProperties; - /* * The Azure Active Directory identity of the server. */ @@ -43,9 +35,9 @@ public final class ServerInner extends Resource { private String kind; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private ServerProperties innerProperties; /* * The type of the resource. @@ -68,15 +60,6 @@ public final class ServerInner extends Resource { public ServerInner() { } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private ServerProperties innerProperties() { - return this.innerProperties; - } - /** * Get the identity property: The Azure Active Directory identity of the server. * @@ -107,12 +90,12 @@ public String kind() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private ServerProperties innerProperties() { + return this.innerProperties; } /** @@ -260,7 +243,7 @@ public List privateEndpointConnections() { } /** - * Get the minimalTlsVersion property: Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'. + * Get the minimalTlsVersion property: Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'. * * @return the minimalTlsVersion value. */ @@ -269,7 +252,7 @@ public String minimalTlsVersion() { } /** - * Set the minimalTlsVersion property: Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'. + * Set the minimalTlsVersion property: Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'. * * @param minimalTlsVersion the minimalTlsVersion value to set. * @return the ServerInner object itself. @@ -284,7 +267,7 @@ public ServerInner withMinimalTlsVersion(String minimalTlsVersion) { /** * Get the publicNetworkAccess property: Whether or not public endpoint access is allowed for this server. Value is - * optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'. + * optional but if passed in, must be 'Enabled' or 'Disabled'. * * @return the publicNetworkAccess value. */ @@ -294,7 +277,7 @@ public ServerNetworkAccessFlag publicNetworkAccess() { /** * Set the publicNetworkAccess property: Whether or not public endpoint access is allowed for this server. Value is - * optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'. + * optional but if passed in, must be 'Enabled' or 'Disabled'. * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the ServerInner object itself. @@ -389,9 +372,7 @@ public ServerInner withKeyId(String keyId) { } /** - * Get the administrators property: The Azure Active Directory administrator can be utilized during server creation - * and for server updates, except for the azureADOnlyAuthentication property. To update the - * azureADOnlyAuthentication property, individual API must be used. + * Get the administrators property: The Azure Active Directory administrator of the server. * * @return the administrators value. */ @@ -400,9 +381,7 @@ public ServerExternalAdministrator administrators() { } /** - * Set the administrators property: The Azure Active Directory administrator can be utilized during server creation - * and for server updates, except for the azureADOnlyAuthentication property. To update the - * azureADOnlyAuthentication property, individual API must be used. + * Set the administrators property: The Azure Active Directory administrator of the server. * * @param administrators the administrators value to set. * @return the ServerInner object itself. @@ -440,98 +419,18 @@ public ServerInner withRestrictOutboundNetworkAccess(ServerNetworkAccessFlag res return this; } - /** - * Get the isIPv6Enabled property: Whether or not to enable IPv6 support for this server. Value is optional but if - * passed in, must be 'Enabled' or 'Disabled'. - * - * @return the isIPv6Enabled value. - */ - public ServerNetworkAccessFlag isIPv6Enabled() { - return this.innerProperties() == null ? null : this.innerProperties().isIPv6Enabled(); - } - - /** - * Set the isIPv6Enabled property: Whether or not to enable IPv6 support for this server. Value is optional but if - * passed in, must be 'Enabled' or 'Disabled'. - * - * @param isIPv6Enabled the isIPv6Enabled value to set. - * @return the ServerInner object itself. - */ - public ServerInner withIsIPv6Enabled(ServerNetworkAccessFlag isIPv6Enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerProperties(); - } - this.innerProperties().withIsIPv6Enabled(isIPv6Enabled); - return this; - } - - /** - * Get the externalGovernanceStatus property: Status of external governance. - * - * @return the externalGovernanceStatus value. - */ - public ExternalGovernanceStatus externalGovernanceStatus() { - return this.innerProperties() == null ? null : this.innerProperties().externalGovernanceStatus(); - } - - /** - * Get the retentionDays property: Number of days this server will stay soft-deleted. - * - * @return the retentionDays value. - */ - public Integer retentionDays() { - return this.innerProperties() == null ? null : this.innerProperties().retentionDays(); - } - - /** - * Set the retentionDays property: Number of days this server will stay soft-deleted. - * - * @param retentionDays the retentionDays value to set. - * @return the ServerInner object itself. - */ - public ServerInner withRetentionDays(Integer retentionDays) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerProperties(); - } - this.innerProperties().withRetentionDays(retentionDays); - return this; - } - - /** - * Get the createMode property: Create mode for server, only valid values for this are Normal and Restore. - * - * @return the createMode value. - */ - public ServerCreateMode createMode() { - return this.innerProperties() == null ? null : this.innerProperties().createMode(); - } - - /** - * Set the createMode property: Create mode for server, only valid values for this are Normal and Restore. - * - * @param createMode the createMode value to set. - * @return the ServerInner object itself. - */ - public ServerInner withCreateMode(ServerCreateMode createMode) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerProperties(); - } - this.innerProperties().withCreateMode(createMode); - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } if (identity() != null) { identity().validate(); } + if (innerProperties() != null) { + innerProperties().validate(); + } } /** @@ -542,8 +441,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } @@ -574,14 +473,12 @@ public static ServerInner fromJson(JsonReader jsonReader) throws IOException { } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedServerInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedServerInner.innerProperties = ServerProperties.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedServerInner.identity = ResourceIdentity.fromJson(reader); } else if ("kind".equals(fieldName)) { deserializedServerInner.kind = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedServerInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedServerInner.innerProperties = ServerProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyInner.java index 0733bdc9b4c6..ee888f7f2922 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -19,11 +18,6 @@ */ @Fluent public final class ServerKeyInner extends ProxyResource { - /* - * Resource properties. - */ - private ServerKeyProperties innerProperties; - /* * Kind of encryption protector. This is metadata used for the Azure portal experience. */ @@ -35,9 +29,9 @@ public final class ServerKeyInner extends ProxyResource { private String location; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private ServerKeyProperties innerProperties; /* * The type of the resource. @@ -60,15 +54,6 @@ public final class ServerKeyInner extends ProxyResource { public ServerKeyInner() { } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private ServerKeyProperties innerProperties() { - return this.innerProperties; - } - /** * Get the kind property: Kind of encryption protector. This is metadata used for the Azure portal experience. * @@ -88,12 +73,12 @@ public String location() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private ServerKeyProperties innerProperties() { + return this.innerProperties; } /** @@ -161,8 +146,7 @@ public ServerKeyInner withServerKeyType(ServerKeyType serverKeyType) { /** * Get the uri property: The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. * The AKV URI is required to be in this format: - * 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion' or can be - * 'https://YourVaultName.vault.azure.net/keys/YourKeyName'. + * 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion'. * * @return the uri value. */ @@ -173,8 +157,7 @@ public String uri() { /** * Set the uri property: The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. * The AKV URI is required to be in this format: - * 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion' or can be - * 'https://YourVaultName.vault.azure.net/keys/YourKeyName'. + * 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion'. * * @param uri the uri value to set. * @return the ServerKeyInner object itself. @@ -214,15 +197,6 @@ public Boolean autoRotationEnabled() { return this.innerProperties() == null ? null : this.innerProperties().autoRotationEnabled(); } - /** - * Get the keyVersion property: The version of the server key. - * - * @return the keyVersion value. - */ - public String keyVersion() { - return this.innerProperties() == null ? null : this.innerProperties().keyVersion(); - } - /** * Validates the instance. * @@ -266,14 +240,12 @@ public static ServerKeyInner fromJson(JsonReader jsonReader) throws IOException deserializedServerKeyInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedServerKeyInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedServerKeyInner.innerProperties = ServerKeyProperties.fromJson(reader); } else if ("kind".equals(fieldName)) { deserializedServerKeyInner.kind = reader.getString(); } else if ("location".equals(fieldName)) { deserializedServerKeyInner.location = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedServerKeyInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedServerKeyInner.innerProperties = ServerKeyProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyProperties.java index 6efdd13dcc64..582a02d902c0 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -32,8 +32,7 @@ public final class ServerKeyProperties implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("autoRotationEnabled".equals(fieldName)) { deserializedServerKeyProperties.autoRotationEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("keyVersion".equals(fieldName)) { - deserializedServerKeyProperties.keyVersion = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationInner.java index b8ff751e5656..6ea45477dbfe 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -24,11 +23,6 @@ public final class ServerOperationInner extends ProxyResource { */ private ServerOperationProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -47,7 +41,7 @@ public final class ServerOperationInner extends ProxyResource { /** * Creates an instance of ServerOperationInner class. */ - private ServerOperationInner() { + public ServerOperationInner() { } /** @@ -59,15 +53,6 @@ private ServerOperationProperties 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. * @@ -260,8 +245,6 @@ public static ServerOperationInner fromJson(JsonReader jsonReader) throws IOExce deserializedServerOperationInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedServerOperationInner.innerProperties = ServerOperationProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedServerOperationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationProperties.java index ea28ded8ebe7..b02610e724b4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -87,7 +87,7 @@ public final class ServerOperationProperties implements JsonSerializable privateEndpointConnections; /* - * Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3' + * Minimal TLS version. Allowed values: '1.0', '1.1', '1.2' */ private String minimalTlsVersion; /* * Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be - * 'Enabled' or 'Disabled' or 'SecuredByPerimeter' + * 'Enabled' or 'Disabled' */ private ServerNetworkAccessFlag publicNetworkAccess; @@ -87,9 +85,7 @@ public final class ServerProperties implements JsonSerializable privateEndpointConnections() { } /** - * Get the minimalTlsVersion property: Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'. + * Get the minimalTlsVersion property: Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'. * * @return the minimalTlsVersion value. */ @@ -223,7 +198,7 @@ public String minimalTlsVersion() { } /** - * Set the minimalTlsVersion property: Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'. + * Set the minimalTlsVersion property: Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'. * * @param minimalTlsVersion the minimalTlsVersion value to set. * @return the ServerProperties object itself. @@ -235,7 +210,7 @@ public ServerProperties withMinimalTlsVersion(String minimalTlsVersion) { /** * Get the publicNetworkAccess property: Whether or not public endpoint access is allowed for this server. Value is - * optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'. + * optional but if passed in, must be 'Enabled' or 'Disabled'. * * @return the publicNetworkAccess value. */ @@ -245,7 +220,7 @@ public ServerNetworkAccessFlag publicNetworkAccess() { /** * Set the publicNetworkAccess property: Whether or not public endpoint access is allowed for this server. Value is - * optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'. + * optional but if passed in, must be 'Enabled' or 'Disabled'. * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the ServerProperties object itself. @@ -328,9 +303,7 @@ public ServerProperties withKeyId(String keyId) { } /** - * Get the administrators property: The Azure Active Directory administrator can be utilized during server creation - * and for server updates, except for the azureADOnlyAuthentication property. To update the - * azureADOnlyAuthentication property, individual API must be used. + * Get the administrators property: The Azure Active Directory administrator of the server. * * @return the administrators value. */ @@ -339,9 +312,7 @@ public ServerExternalAdministrator administrators() { } /** - * Set the administrators property: The Azure Active Directory administrator can be utilized during server creation - * and for server updates, except for the azureADOnlyAuthentication property. To update the - * azureADOnlyAuthentication property, individual API must be used. + * Set the administrators property: The Azure Active Directory administrator of the server. * * @param administrators the administrators value to set. * @return the ServerProperties object itself. @@ -373,77 +344,6 @@ public ServerProperties withRestrictOutboundNetworkAccess(ServerNetworkAccessFla return this; } - /** - * Get the isIPv6Enabled property: Whether or not to enable IPv6 support for this server. Value is optional but if - * passed in, must be 'Enabled' or 'Disabled'. - * - * @return the isIPv6Enabled value. - */ - public ServerNetworkAccessFlag isIPv6Enabled() { - return this.isIPv6Enabled; - } - - /** - * Set the isIPv6Enabled property: Whether or not to enable IPv6 support for this server. Value is optional but if - * passed in, must be 'Enabled' or 'Disabled'. - * - * @param isIPv6Enabled the isIPv6Enabled value to set. - * @return the ServerProperties object itself. - */ - public ServerProperties withIsIPv6Enabled(ServerNetworkAccessFlag isIPv6Enabled) { - this.isIPv6Enabled = isIPv6Enabled; - return this; - } - - /** - * Get the externalGovernanceStatus property: Status of external governance. - * - * @return the externalGovernanceStatus value. - */ - public ExternalGovernanceStatus externalGovernanceStatus() { - return this.externalGovernanceStatus; - } - - /** - * Get the retentionDays property: Number of days this server will stay soft-deleted. - * - * @return the retentionDays value. - */ - public Integer retentionDays() { - return this.retentionDays; - } - - /** - * Set the retentionDays property: Number of days this server will stay soft-deleted. - * - * @param retentionDays the retentionDays value to set. - * @return the ServerProperties object itself. - */ - public ServerProperties withRetentionDays(Integer retentionDays) { - this.retentionDays = retentionDays; - return this; - } - - /** - * Get the createMode property: Create mode for server, only valid values for this are Normal and Restore. - * - * @return the createMode value. - */ - public ServerCreateMode createMode() { - return this.createMode; - } - - /** - * Set the createMode property: Create mode for server, only valid values for this are Normal and Restore. - * - * @param createMode the createMode value to set. - * @return the ServerProperties object itself. - */ - public ServerProperties withCreateMode(ServerCreateMode createMode) { - this.createMode = createMode; - return this; - } - /** * Validates the instance. * @@ -476,9 +376,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("administrators", this.administrators); jsonWriter.writeStringField("restrictOutboundNetworkAccess", this.restrictOutboundNetworkAccess == null ? null : this.restrictOutboundNetworkAccess.toString()); - jsonWriter.writeStringField("isIPv6Enabled", this.isIPv6Enabled == null ? null : this.isIPv6Enabled.toString()); - jsonWriter.writeNumberField("retentionDays", this.retentionDays); - jsonWriter.writeStringField("createMode", this.createMode == null ? null : this.createMode.toString()); return jsonWriter.writeEndObject(); } @@ -531,15 +428,6 @@ public static ServerProperties fromJson(JsonReader jsonReader) throws IOExceptio } else if ("restrictOutboundNetworkAccess".equals(fieldName)) { deserializedServerProperties.restrictOutboundNetworkAccess = ServerNetworkAccessFlag.fromString(reader.getString()); - } else if ("isIPv6Enabled".equals(fieldName)) { - deserializedServerProperties.isIPv6Enabled = ServerNetworkAccessFlag.fromString(reader.getString()); - } else if ("externalGovernanceStatus".equals(fieldName)) { - deserializedServerProperties.externalGovernanceStatus - = ExternalGovernanceStatus.fromString(reader.getString()); - } else if ("retentionDays".equals(fieldName)) { - deserializedServerProperties.retentionDays = reader.getNullable(JsonReader::getInt); - } else if ("createMode".equals(fieldName)) { - deserializedServerProperties.createMode = ServerCreateMode.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerSecurityAlertPolicyInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerSecurityAlertPolicyInner.java index 202f35d7febf..cf7b7259060c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerSecurityAlertPolicyInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerSecurityAlertPolicyInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -21,14 +21,14 @@ @Fluent public final class ServerSecurityAlertPolicyInner extends ProxyResource { /* - * Resource properties. + * SystemData of SecurityAlertPolicyResource. */ - private SecurityAlertsPolicyProperties innerProperties; + private SystemData systemData; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource properties. */ - private SystemData systemData; + private SecurityAlertsPolicyProperties innerProperties; /* * The type of the resource. @@ -52,21 +52,21 @@ public ServerSecurityAlertPolicyInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the systemData property: SystemData of SecurityAlertPolicyResource. * - * @return the innerProperties value. + * @return the systemData value. */ - private SecurityAlertsPolicyProperties innerProperties() { - return this.innerProperties; + public SystemData systemData() { + return this.systemData; } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the innerProperties property: Resource properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private SecurityAlertsPolicyProperties innerProperties() { + return this.innerProperties; } /** @@ -321,11 +321,11 @@ public static ServerSecurityAlertPolicyInner fromJson(JsonReader jsonReader) thr deserializedServerSecurityAlertPolicyInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedServerSecurityAlertPolicyInner.type = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedServerSecurityAlertPolicyInner.systemData = SystemData.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedServerSecurityAlertPolicyInner.innerProperties = SecurityAlertsPolicyProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedServerSecurityAlertPolicyInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateInner.java index edc5fc9d1779..52f56e155c11 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ public final class ServerTrustCertificateInner extends ProxyResource { */ private ServerTrustCertificateProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -57,15 +51,6 @@ private ServerTrustCertificateProperties 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. * @@ -183,8 +168,6 @@ public static ServerTrustCertificateInner fromJson(JsonReader jsonReader) throws } else if ("properties".equals(fieldName)) { deserializedServerTrustCertificateInner.innerProperties = ServerTrustCertificateProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedServerTrustCertificateInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateProperties.java index fae266ce1018..674a3af41f2a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupInner.java index 5c260903e703..565c321208f8 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -25,11 +24,6 @@ public final class ServerTrustGroupInner extends ProxyResource { */ private ServerTrustGroupProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -60,15 +54,6 @@ private ServerTrustGroupProperties 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. * @@ -190,8 +175,6 @@ public static ServerTrustGroupInner fromJson(JsonReader jsonReader) throws IOExc deserializedServerTrustGroupInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedServerTrustGroupInner.innerProperties = ServerTrustGroupProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedServerTrustGroupInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupProperties.java index 40aecf76645f..c38af49d0b12 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageInner.java index 23a7928998a2..1baa43fc09cd 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ public final class ServerUsageInner extends ProxyResource { */ private ServerUsageProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -45,7 +39,7 @@ public final class ServerUsageInner extends ProxyResource { /** * Creates an instance of ServerUsageInner class. */ - private ServerUsageInner() { + public ServerUsageInner() { } /** @@ -57,15 +51,6 @@ private ServerUsageProperties 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. * @@ -177,8 +162,6 @@ public static ServerUsageInner fromJson(JsonReader jsonReader) throws IOExceptio deserializedServerUsageInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedServerUsageInner.innerProperties = ServerUsageProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedServerUsageInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageProperties.java index dcb54dab5288..bc039e38aac5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -39,7 +39,7 @@ public final class ServerUsageProperties implements JsonSerializable { - SqlVulnerabilityAssessmentInner deserializedSqlVulnerabilityAssessmentInner - = new SqlVulnerabilityAssessmentInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentInner.innerProperties - = SqlVulnerabilityAssessmentPolicyProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSqlVulnerabilityAssessmentInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentPolicyProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentPolicyProperties.java deleted file mode 100644 index b2f76ff04df2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentPolicyProperties.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.SqlVulnerabilityAssessmentState; -import java.io.IOException; - -/** - * The SqlVulnerabilityAssessmentPolicyProperties model. - */ -@Fluent -public final class SqlVulnerabilityAssessmentPolicyProperties - implements JsonSerializable { - /* - * Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not - * been applied yet on the specific database or server. - */ - private SqlVulnerabilityAssessmentState state; - - /** - * Creates an instance of SqlVulnerabilityAssessmentPolicyProperties class. - */ - public SqlVulnerabilityAssessmentPolicyProperties() { - } - - /** - * Get the state property: Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or - * disabled or a state has not been applied yet on the specific database or server. - * - * @return the state value. - */ - public SqlVulnerabilityAssessmentState state() { - return this.state; - } - - /** - * Set the state property: Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or - * disabled or a state has not been applied yet on the specific database or server. - * - * @param state the state value to set. - * @return the SqlVulnerabilityAssessmentPolicyProperties object itself. - */ - public SqlVulnerabilityAssessmentPolicyProperties withState(SqlVulnerabilityAssessmentState state) { - this.state = state; - 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("state", this.state == null ? null : this.state.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SqlVulnerabilityAssessmentPolicyProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SqlVulnerabilityAssessmentPolicyProperties 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 SqlVulnerabilityAssessmentPolicyProperties. - */ - public static SqlVulnerabilityAssessmentPolicyProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SqlVulnerabilityAssessmentPolicyProperties deserializedSqlVulnerabilityAssessmentPolicyProperties - = new SqlVulnerabilityAssessmentPolicyProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("state".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentPolicyProperties.state - = SqlVulnerabilityAssessmentState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSqlVulnerabilityAssessmentPolicyProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanRecordInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanRecordInner.java deleted file mode 100644 index fd7b017ce22c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanRecordInner.java +++ /dev/null @@ -1,314 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.SqlVulnerabilityAssessmentScanError; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentScanState; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentScanTriggerType; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * A vulnerability assessment scan record. - */ -@Immutable -public final class SqlVulnerabilityAssessmentScanRecordInner extends ProxyResource { - /* - * Resource properties. - */ - private SqlVulnerabilityAssessmentScanRecordProperties 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 SqlVulnerabilityAssessmentScanRecordInner class. - */ - private SqlVulnerabilityAssessmentScanRecordInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private SqlVulnerabilityAssessmentScanRecordProperties 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 scanId property: The scan ID. - * - * @return the scanId value. - */ - public String scanId() { - return this.innerProperties() == null ? null : this.innerProperties().scanId(); - } - - /** - * Get the triggerType property: The scan trigger type. - * - * @return the triggerType value. - */ - public VulnerabilityAssessmentScanTriggerType triggerType() { - return this.innerProperties() == null ? null : this.innerProperties().triggerType(); - } - - /** - * Get the state property: The scan status. - * - * @return the state value. - */ - public VulnerabilityAssessmentScanState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); - } - - /** - * Get the startTime property: The scan start time (UTC). - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.innerProperties() == null ? null : this.innerProperties().startTime(); - } - - /** - * Get the endTime property: The scan end time (UTC). - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.innerProperties() == null ? null : this.innerProperties().endTime(); - } - - /** - * Get the errors property: The scan errors. - * - * @return the errors value. - */ - public List errors() { - return this.innerProperties() == null ? null : this.innerProperties().errors(); - } - - /** - * Get the server property: The server name. - * - * @return the server value. - */ - public String server() { - return this.innerProperties() == null ? null : this.innerProperties().server(); - } - - /** - * Get the database property: The database name. - * - * @return the database value. - */ - public String database() { - return this.innerProperties() == null ? null : this.innerProperties().database(); - } - - /** - * Get the sqlVersion property: The SQL version. - * - * @return the sqlVersion value. - */ - public String sqlVersion() { - return this.innerProperties() == null ? null : this.innerProperties().sqlVersion(); - } - - /** - * Get the highSeverityFailedRulesCount property: The number of failed rules with high severity. - * - * @return the highSeverityFailedRulesCount value. - */ - public Integer highSeverityFailedRulesCount() { - return this.innerProperties() == null ? null : this.innerProperties().highSeverityFailedRulesCount(); - } - - /** - * Get the mediumSeverityFailedRulesCount property: The number of failed rules with medium severity. - * - * @return the mediumSeverityFailedRulesCount value. - */ - public Integer mediumSeverityFailedRulesCount() { - return this.innerProperties() == null ? null : this.innerProperties().mediumSeverityFailedRulesCount(); - } - - /** - * Get the lowSeverityFailedRulesCount property: The number of failed rules with low severity. - * - * @return the lowSeverityFailedRulesCount value. - */ - public Integer lowSeverityFailedRulesCount() { - return this.innerProperties() == null ? null : this.innerProperties().lowSeverityFailedRulesCount(); - } - - /** - * Get the totalPassedRulesCount property: The number of total passed rules. - * - * @return the totalPassedRulesCount value. - */ - public Integer totalPassedRulesCount() { - return this.innerProperties() == null ? null : this.innerProperties().totalPassedRulesCount(); - } - - /** - * Get the totalFailedRulesCount property: The number of total failed rules. - * - * @return the totalFailedRulesCount value. - */ - public Integer totalFailedRulesCount() { - return this.innerProperties() == null ? null : this.innerProperties().totalFailedRulesCount(); - } - - /** - * Get the totalRulesCount property: The number of total rules assessed. - * - * @return the totalRulesCount value. - */ - public Integer totalRulesCount() { - return this.innerProperties() == null ? null : this.innerProperties().totalRulesCount(); - } - - /** - * Get the isBaselineApplied property: Baseline created for this database, and has one or more rules. - * - * @return the isBaselineApplied value. - */ - public Boolean isBaselineApplied() { - return this.innerProperties() == null ? null : this.innerProperties().isBaselineApplied(); - } - - /** - * Get the lastScanTime property: The last scan time. - * - * @return the lastScanTime value. - */ - public OffsetDateTime lastScanTime() { - return this.innerProperties() == null ? null : this.innerProperties().lastScanTime(); - } - - /** - * 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SqlVulnerabilityAssessmentScanRecordInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SqlVulnerabilityAssessmentScanRecordInner 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 SqlVulnerabilityAssessmentScanRecordInner. - */ - public static SqlVulnerabilityAssessmentScanRecordInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SqlVulnerabilityAssessmentScanRecordInner deserializedSqlVulnerabilityAssessmentScanRecordInner - = new SqlVulnerabilityAssessmentScanRecordInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordInner.innerProperties - = SqlVulnerabilityAssessmentScanRecordProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSqlVulnerabilityAssessmentScanRecordInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanRecordProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanRecordProperties.java deleted file mode 100644 index 24f24c2fd1a8..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanRecordProperties.java +++ /dev/null @@ -1,362 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.fluent.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.models.SqlVulnerabilityAssessmentScanError; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentScanState; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentScanTriggerType; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Properties of a vulnerability assessment scan record. - */ -@Immutable -public final class SqlVulnerabilityAssessmentScanRecordProperties - implements JsonSerializable { - /* - * The scan ID. - */ - private String scanId; - - /* - * The scan trigger type. - */ - private VulnerabilityAssessmentScanTriggerType triggerType; - - /* - * The scan status. - */ - private VulnerabilityAssessmentScanState state; - - /* - * The scan start time (UTC). - */ - private OffsetDateTime startTime; - - /* - * The scan end time (UTC). - */ - private OffsetDateTime endTime; - - /* - * The scan errors. - */ - private List errors; - - /* - * The server name. - */ - private String server; - - /* - * The database name. - */ - private String database; - - /* - * The SQL version. - */ - private String sqlVersion; - - /* - * The number of failed rules with high severity. - */ - private Integer highSeverityFailedRulesCount; - - /* - * The number of failed rules with medium severity. - */ - private Integer mediumSeverityFailedRulesCount; - - /* - * The number of failed rules with low severity. - */ - private Integer lowSeverityFailedRulesCount; - - /* - * The number of total passed rules. - */ - private Integer totalPassedRulesCount; - - /* - * The number of total failed rules. - */ - private Integer totalFailedRulesCount; - - /* - * The number of total rules assessed. - */ - private Integer totalRulesCount; - - /* - * Baseline created for this database, and has one or more rules. - */ - private Boolean isBaselineApplied; - - /* - * The last scan time. - */ - private OffsetDateTime lastScanTime; - - /** - * Creates an instance of SqlVulnerabilityAssessmentScanRecordProperties class. - */ - private SqlVulnerabilityAssessmentScanRecordProperties() { - } - - /** - * Get the scanId property: The scan ID. - * - * @return the scanId value. - */ - public String scanId() { - return this.scanId; - } - - /** - * Get the triggerType property: The scan trigger type. - * - * @return the triggerType value. - */ - public VulnerabilityAssessmentScanTriggerType triggerType() { - return this.triggerType; - } - - /** - * Get the state property: The scan status. - * - * @return the state value. - */ - public VulnerabilityAssessmentScanState state() { - return this.state; - } - - /** - * Get the startTime property: The scan start time (UTC). - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the endTime property: The scan end time (UTC). - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Get the errors property: The scan errors. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Get the server property: The server name. - * - * @return the server value. - */ - public String server() { - return this.server; - } - - /** - * Get the database property: The database name. - * - * @return the database value. - */ - public String database() { - return this.database; - } - - /** - * Get the sqlVersion property: The SQL version. - * - * @return the sqlVersion value. - */ - public String sqlVersion() { - return this.sqlVersion; - } - - /** - * Get the highSeverityFailedRulesCount property: The number of failed rules with high severity. - * - * @return the highSeverityFailedRulesCount value. - */ - public Integer highSeverityFailedRulesCount() { - return this.highSeverityFailedRulesCount; - } - - /** - * Get the mediumSeverityFailedRulesCount property: The number of failed rules with medium severity. - * - * @return the mediumSeverityFailedRulesCount value. - */ - public Integer mediumSeverityFailedRulesCount() { - return this.mediumSeverityFailedRulesCount; - } - - /** - * Get the lowSeverityFailedRulesCount property: The number of failed rules with low severity. - * - * @return the lowSeverityFailedRulesCount value. - */ - public Integer lowSeverityFailedRulesCount() { - return this.lowSeverityFailedRulesCount; - } - - /** - * Get the totalPassedRulesCount property: The number of total passed rules. - * - * @return the totalPassedRulesCount value. - */ - public Integer totalPassedRulesCount() { - return this.totalPassedRulesCount; - } - - /** - * Get the totalFailedRulesCount property: The number of total failed rules. - * - * @return the totalFailedRulesCount value. - */ - public Integer totalFailedRulesCount() { - return this.totalFailedRulesCount; - } - - /** - * Get the totalRulesCount property: The number of total rules assessed. - * - * @return the totalRulesCount value. - */ - public Integer totalRulesCount() { - return this.totalRulesCount; - } - - /** - * Get the isBaselineApplied property: Baseline created for this database, and has one or more rules. - * - * @return the isBaselineApplied value. - */ - public Boolean isBaselineApplied() { - return this.isBaselineApplied; - } - - /** - * Get the lastScanTime property: The last scan time. - * - * @return the lastScanTime value. - */ - public OffsetDateTime lastScanTime() { - return this.lastScanTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (errors() != null) { - errors().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SqlVulnerabilityAssessmentScanRecordProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SqlVulnerabilityAssessmentScanRecordProperties 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 SqlVulnerabilityAssessmentScanRecordProperties. - */ - public static SqlVulnerabilityAssessmentScanRecordProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SqlVulnerabilityAssessmentScanRecordProperties deserializedSqlVulnerabilityAssessmentScanRecordProperties - = new SqlVulnerabilityAssessmentScanRecordProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scanId".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordProperties.scanId = reader.getString(); - } else if ("triggerType".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordProperties.triggerType - = VulnerabilityAssessmentScanTriggerType.fromString(reader.getString()); - } else if ("state".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordProperties.state - = VulnerabilityAssessmentScanState.fromString(reader.getString()); - } else if ("startTime".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordProperties.startTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("endTime".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordProperties.endTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("errors".equals(fieldName)) { - List errors - = reader.readArray(reader1 -> SqlVulnerabilityAssessmentScanError.fromJson(reader1)); - deserializedSqlVulnerabilityAssessmentScanRecordProperties.errors = errors; - } else if ("server".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordProperties.server = reader.getString(); - } else if ("database".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordProperties.database = reader.getString(); - } else if ("sqlVersion".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordProperties.sqlVersion = reader.getString(); - } else if ("highSeverityFailedRulesCount".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordProperties.highSeverityFailedRulesCount - = reader.getNullable(JsonReader::getInt); - } else if ("mediumSeverityFailedRulesCount".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordProperties.mediumSeverityFailedRulesCount - = reader.getNullable(JsonReader::getInt); - } else if ("lowSeverityFailedRulesCount".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordProperties.lowSeverityFailedRulesCount - = reader.getNullable(JsonReader::getInt); - } else if ("totalPassedRulesCount".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordProperties.totalPassedRulesCount - = reader.getNullable(JsonReader::getInt); - } else if ("totalFailedRulesCount".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordProperties.totalFailedRulesCount - = reader.getNullable(JsonReader::getInt); - } else if ("totalRulesCount".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordProperties.totalRulesCount - = reader.getNullable(JsonReader::getInt); - } else if ("isBaselineApplied".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordProperties.isBaselineApplied - = reader.getNullable(JsonReader::getBoolean); - } else if ("lastScanTime".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordProperties.lastScanTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedSqlVulnerabilityAssessmentScanRecordProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanResultProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanResultProperties.java deleted file mode 100644 index 51c456f642d3..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanResultProperties.java +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.fluent.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.sql.models.BaselineAdjustedResult; -import com.azure.resourcemanager.sql.models.Remediation; -import com.azure.resourcemanager.sql.models.RuleStatus; -import com.azure.resourcemanager.sql.models.VaRule; -import java.io.IOException; -import java.util.List; - -/** - * SQL Vulnerability Assessment scan result properties for a single rule. - */ -@Immutable -public final class SqlVulnerabilityAssessmentScanResultProperties - implements JsonSerializable { - /* - * SQL Vulnerability Assessment rule Id. - */ - private String ruleId; - - /* - * SQL Vulnerability Assessment rule result status. - */ - private RuleStatus status; - - /* - * SQL Vulnerability Assessment error message. - */ - private String errorMessage; - - /* - * SQL Vulnerability Assessment is the query results trimmed. - */ - private Boolean isTrimmed; - - /* - * SQL Vulnerability Assessment query results that was run. - */ - private List> queryResults; - - /* - * SQL Vulnerability Assessment the remediation details. - */ - private Remediation remediation; - - /* - * SQL Vulnerability Assessment rule result adjusted with baseline. - */ - private BaselineAdjustedResult baselineAdjustedResult; - - /* - * SQL Vulnerability Assessment rule metadata. - */ - private VaRule ruleMetadata; - - /** - * Creates an instance of SqlVulnerabilityAssessmentScanResultProperties class. - */ - private SqlVulnerabilityAssessmentScanResultProperties() { - } - - /** - * Get the ruleId property: SQL Vulnerability Assessment rule Id. - * - * @return the ruleId value. - */ - public String ruleId() { - return this.ruleId; - } - - /** - * Get the status property: SQL Vulnerability Assessment rule result status. - * - * @return the status value. - */ - public RuleStatus status() { - return this.status; - } - - /** - * Get the errorMessage property: SQL Vulnerability Assessment error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Get the isTrimmed property: SQL Vulnerability Assessment is the query results trimmed. - * - * @return the isTrimmed value. - */ - public Boolean isTrimmed() { - return this.isTrimmed; - } - - /** - * Get the queryResults property: SQL Vulnerability Assessment query results that was run. - * - * @return the queryResults value. - */ - public List> queryResults() { - return this.queryResults; - } - - /** - * Get the remediation property: SQL Vulnerability Assessment the remediation details. - * - * @return the remediation value. - */ - public Remediation remediation() { - return this.remediation; - } - - /** - * Get the baselineAdjustedResult property: SQL Vulnerability Assessment rule result adjusted with baseline. - * - * @return the baselineAdjustedResult value. - */ - public BaselineAdjustedResult baselineAdjustedResult() { - return this.baselineAdjustedResult; - } - - /** - * Get the ruleMetadata property: SQL Vulnerability Assessment rule metadata. - * - * @return the ruleMetadata value. - */ - public VaRule ruleMetadata() { - return this.ruleMetadata; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (remediation() != null) { - remediation().validate(); - } - if (baselineAdjustedResult() != null) { - baselineAdjustedResult().validate(); - } - if (ruleMetadata() != null) { - ruleMetadata().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SqlVulnerabilityAssessmentScanResultProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SqlVulnerabilityAssessmentScanResultProperties 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 SqlVulnerabilityAssessmentScanResultProperties. - */ - public static SqlVulnerabilityAssessmentScanResultProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SqlVulnerabilityAssessmentScanResultProperties deserializedSqlVulnerabilityAssessmentScanResultProperties - = new SqlVulnerabilityAssessmentScanResultProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ruleId".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanResultProperties.ruleId = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanResultProperties.status - = RuleStatus.fromString(reader.getString()); - } else if ("errorMessage".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanResultProperties.errorMessage = reader.getString(); - } else if ("isTrimmed".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanResultProperties.isTrimmed - = reader.getNullable(JsonReader::getBoolean); - } else if ("queryResults".equals(fieldName)) { - List> queryResults - = reader.readArray(reader1 -> reader1.readArray(reader2 -> reader2.getString())); - deserializedSqlVulnerabilityAssessmentScanResultProperties.queryResults = queryResults; - } else if ("remediation".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanResultProperties.remediation - = Remediation.fromJson(reader); - } else if ("baselineAdjustedResult".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanResultProperties.baselineAdjustedResult - = BaselineAdjustedResult.fromJson(reader); - } else if ("ruleMetadata".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanResultProperties.ruleMetadata = VaRule.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSqlVulnerabilityAssessmentScanResultProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanResultsInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanResultsInner.java deleted file mode 100644 index 005d5a80ccce..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanResultsInner.java +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.BaselineAdjustedResult; -import com.azure.resourcemanager.sql.models.Remediation; -import com.azure.resourcemanager.sql.models.RuleStatus; -import com.azure.resourcemanager.sql.models.VaRule; -import java.io.IOException; -import java.util.List; - -/** - * Concrete proxy resource types can be created by aliasing this type using a specific property type. - */ -@Immutable -public final class SqlVulnerabilityAssessmentScanResultsInner extends ProxyResource { - /* - * Resource properties. - */ - private SqlVulnerabilityAssessmentScanResultProperties 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 SqlVulnerabilityAssessmentScanResultsInner class. - */ - private SqlVulnerabilityAssessmentScanResultsInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private SqlVulnerabilityAssessmentScanResultProperties 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 ruleId property: SQL Vulnerability Assessment rule Id. - * - * @return the ruleId value. - */ - public String ruleId() { - return this.innerProperties() == null ? null : this.innerProperties().ruleId(); - } - - /** - * Get the status property: SQL Vulnerability Assessment rule result status. - * - * @return the status value. - */ - public RuleStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Get the errorMessage property: SQL Vulnerability Assessment error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.innerProperties() == null ? null : this.innerProperties().errorMessage(); - } - - /** - * Get the isTrimmed property: SQL Vulnerability Assessment is the query results trimmed. - * - * @return the isTrimmed value. - */ - public Boolean isTrimmed() { - return this.innerProperties() == null ? null : this.innerProperties().isTrimmed(); - } - - /** - * Get the queryResults property: SQL Vulnerability Assessment query results that was run. - * - * @return the queryResults value. - */ - public List> queryResults() { - return this.innerProperties() == null ? null : this.innerProperties().queryResults(); - } - - /** - * Get the remediation property: SQL Vulnerability Assessment the remediation details. - * - * @return the remediation value. - */ - public Remediation remediation() { - return this.innerProperties() == null ? null : this.innerProperties().remediation(); - } - - /** - * Get the baselineAdjustedResult property: SQL Vulnerability Assessment rule result adjusted with baseline. - * - * @return the baselineAdjustedResult value. - */ - public BaselineAdjustedResult baselineAdjustedResult() { - return this.innerProperties() == null ? null : this.innerProperties().baselineAdjustedResult(); - } - - /** - * Get the ruleMetadata property: SQL Vulnerability Assessment rule metadata. - * - * @return the ruleMetadata value. - */ - public VaRule ruleMetadata() { - return this.innerProperties() == null ? null : this.innerProperties().ruleMetadata(); - } - - /** - * 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SqlVulnerabilityAssessmentScanResultsInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SqlVulnerabilityAssessmentScanResultsInner 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 SqlVulnerabilityAssessmentScanResultsInner. - */ - public static SqlVulnerabilityAssessmentScanResultsInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SqlVulnerabilityAssessmentScanResultsInner deserializedSqlVulnerabilityAssessmentScanResultsInner - = new SqlVulnerabilityAssessmentScanResultsInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanResultsInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanResultsInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanResultsInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanResultsInner.innerProperties - = SqlVulnerabilityAssessmentScanResultProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanResultsInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSqlVulnerabilityAssessmentScanResultsInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/StartStopManagedInstanceScheduleInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/StartStopManagedInstanceScheduleInner.java deleted file mode 100644 index 4d679fa52f99..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/StartStopManagedInstanceScheduleInner.java +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.models.ScheduleItem; -import java.io.IOException; -import java.util.List; - -/** - * Managed instance's Start/Stop schedule. - */ -@Fluent -public final class StartStopManagedInstanceScheduleInner extends ProxyResource { - /* - * Resource properties. - */ - private StartStopManagedInstanceScheduleProperties 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 StartStopManagedInstanceScheduleInner class. - */ - public StartStopManagedInstanceScheduleInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private StartStopManagedInstanceScheduleProperties 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 description property: The description of the schedule. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The description of the schedule. - * - * @param description the description value to set. - * @return the StartStopManagedInstanceScheduleInner object itself. - */ - public StartStopManagedInstanceScheduleInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new StartStopManagedInstanceScheduleProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the timeZoneId property: The time zone of the schedule. - * - * @return the timeZoneId value. - */ - public String timeZoneId() { - return this.innerProperties() == null ? null : this.innerProperties().timeZoneId(); - } - - /** - * Set the timeZoneId property: The time zone of the schedule. - * - * @param timeZoneId the timeZoneId value to set. - * @return the StartStopManagedInstanceScheduleInner object itself. - */ - public StartStopManagedInstanceScheduleInner withTimeZoneId(String timeZoneId) { - if (this.innerProperties() == null) { - this.innerProperties = new StartStopManagedInstanceScheduleProperties(); - } - this.innerProperties().withTimeZoneId(timeZoneId); - return this; - } - - /** - * Get the scheduleList property: Schedule list. - * - * @return the scheduleList value. - */ - public List scheduleList() { - return this.innerProperties() == null ? null : this.innerProperties().scheduleList(); - } - - /** - * Set the scheduleList property: Schedule list. - * - * @param scheduleList the scheduleList value to set. - * @return the StartStopManagedInstanceScheduleInner object itself. - */ - public StartStopManagedInstanceScheduleInner withScheduleList(List scheduleList) { - if (this.innerProperties() == null) { - this.innerProperties = new StartStopManagedInstanceScheduleProperties(); - } - this.innerProperties().withScheduleList(scheduleList); - return this; - } - - /** - * Get the nextRunAction property: Next action to be executed (Start or Stop). - * - * @return the nextRunAction value. - */ - public String nextRunAction() { - return this.innerProperties() == null ? null : this.innerProperties().nextRunAction(); - } - - /** - * Get the nextExecutionTime property: Timestamp when the next action will be executed in the corresponding schedule - * time zone. - * - * @return the nextExecutionTime value. - */ - public String nextExecutionTime() { - return this.innerProperties() == null ? null : this.innerProperties().nextExecutionTime(); - } - - /** - * 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StartStopManagedInstanceScheduleInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StartStopManagedInstanceScheduleInner 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 StartStopManagedInstanceScheduleInner. - */ - public static StartStopManagedInstanceScheduleInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StartStopManagedInstanceScheduleInner deserializedStartStopManagedInstanceScheduleInner - = new StartStopManagedInstanceScheduleInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedStartStopManagedInstanceScheduleInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedStartStopManagedInstanceScheduleInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedStartStopManagedInstanceScheduleInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedStartStopManagedInstanceScheduleInner.innerProperties - = StartStopManagedInstanceScheduleProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedStartStopManagedInstanceScheduleInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedStartStopManagedInstanceScheduleInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/StartStopManagedInstanceScheduleProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/StartStopManagedInstanceScheduleProperties.java deleted file mode 100644 index d8836c3b732b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/StartStopManagedInstanceScheduleProperties.java +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.fluent.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 com.azure.resourcemanager.sql.models.ScheduleItem; -import java.io.IOException; -import java.util.List; - -/** - * Properties of managed instance's Start/Stop schedule. - */ -@Fluent -public final class StartStopManagedInstanceScheduleProperties - implements JsonSerializable { - /* - * The description of the schedule. - */ - private String description; - - /* - * The time zone of the schedule. - */ - private String timeZoneId; - - /* - * Schedule list. - */ - private List scheduleList; - - /* - * Next action to be executed (Start or Stop) - */ - private String nextRunAction; - - /* - * Timestamp when the next action will be executed in the corresponding schedule time zone. - */ - private String nextExecutionTime; - - /** - * Creates an instance of StartStopManagedInstanceScheduleProperties class. - */ - public StartStopManagedInstanceScheduleProperties() { - } - - /** - * Get the description property: The description of the schedule. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the schedule. - * - * @param description the description value to set. - * @return the StartStopManagedInstanceScheduleProperties object itself. - */ - public StartStopManagedInstanceScheduleProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the timeZoneId property: The time zone of the schedule. - * - * @return the timeZoneId value. - */ - public String timeZoneId() { - return this.timeZoneId; - } - - /** - * Set the timeZoneId property: The time zone of the schedule. - * - * @param timeZoneId the timeZoneId value to set. - * @return the StartStopManagedInstanceScheduleProperties object itself. - */ - public StartStopManagedInstanceScheduleProperties withTimeZoneId(String timeZoneId) { - this.timeZoneId = timeZoneId; - return this; - } - - /** - * Get the scheduleList property: Schedule list. - * - * @return the scheduleList value. - */ - public List scheduleList() { - return this.scheduleList; - } - - /** - * Set the scheduleList property: Schedule list. - * - * @param scheduleList the scheduleList value to set. - * @return the StartStopManagedInstanceScheduleProperties object itself. - */ - public StartStopManagedInstanceScheduleProperties withScheduleList(List scheduleList) { - this.scheduleList = scheduleList; - return this; - } - - /** - * Get the nextRunAction property: Next action to be executed (Start or Stop). - * - * @return the nextRunAction value. - */ - public String nextRunAction() { - return this.nextRunAction; - } - - /** - * Get the nextExecutionTime property: Timestamp when the next action will be executed in the corresponding schedule - * time zone. - * - * @return the nextExecutionTime value. - */ - public String nextExecutionTime() { - return this.nextExecutionTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scheduleList() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property scheduleList in model StartStopManagedInstanceScheduleProperties")); - } else { - scheduleList().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(StartStopManagedInstanceScheduleProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("scheduleList", this.scheduleList, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("timeZoneId", this.timeZoneId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StartStopManagedInstanceScheduleProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StartStopManagedInstanceScheduleProperties 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 StartStopManagedInstanceScheduleProperties. - */ - public static StartStopManagedInstanceScheduleProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StartStopManagedInstanceScheduleProperties deserializedStartStopManagedInstanceScheduleProperties - = new StartStopManagedInstanceScheduleProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scheduleList".equals(fieldName)) { - List scheduleList = reader.readArray(reader1 -> ScheduleItem.fromJson(reader1)); - deserializedStartStopManagedInstanceScheduleProperties.scheduleList = scheduleList; - } else if ("description".equals(fieldName)) { - deserializedStartStopManagedInstanceScheduleProperties.description = reader.getString(); - } else if ("timeZoneId".equals(fieldName)) { - deserializedStartStopManagedInstanceScheduleProperties.timeZoneId = reader.getString(); - } else if ("nextRunAction".equals(fieldName)) { - deserializedStartStopManagedInstanceScheduleProperties.nextRunAction = reader.getString(); - } else if ("nextExecutionTime".equals(fieldName)) { - deserializedStartStopManagedInstanceScheduleProperties.nextExecutionTime = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedStartStopManagedInstanceScheduleProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageInner.java index 7eb4d0e351c6..c3d6c98d8f34 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ public final class SubscriptionUsageInner extends ProxyResource { */ private SubscriptionUsageProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -45,7 +39,7 @@ public final class SubscriptionUsageInner extends ProxyResource { /** * Creates an instance of SubscriptionUsageInner class. */ - private SubscriptionUsageInner() { + public SubscriptionUsageInner() { } /** @@ -57,15 +51,6 @@ private SubscriptionUsageProperties 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. * @@ -177,8 +162,6 @@ public static SubscriptionUsageInner fromJson(JsonReader jsonReader) throws IOEx deserializedSubscriptionUsageInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedSubscriptionUsageInner.innerProperties = SubscriptionUsageProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedSubscriptionUsageInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageProperties.java index 0e370aa5606e..450c1bc065e1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -39,7 +39,7 @@ public final class SubscriptionUsageProperties implements JsonSerializable workspaces() { - return this.innerProperties() == null ? null : this.innerProperties().workspaces(); - } - - /** - * 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SynapseLinkWorkspaceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SynapseLinkWorkspaceInner 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 SynapseLinkWorkspaceInner. - */ - public static SynapseLinkWorkspaceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SynapseLinkWorkspaceInner deserializedSynapseLinkWorkspaceInner = new SynapseLinkWorkspaceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedSynapseLinkWorkspaceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedSynapseLinkWorkspaceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedSynapseLinkWorkspaceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedSynapseLinkWorkspaceInner.innerProperties - = SynapseLinkWorkspaceProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedSynapseLinkWorkspaceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSynapseLinkWorkspaceInner; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SynapseLinkWorkspaceProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SynapseLinkWorkspaceProperties.java deleted file mode 100644 index 6270537f5267..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SynapseLinkWorkspaceProperties.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.fluent.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.sql.models.SynapseLinkWorkspaceInfoProperties; -import java.io.IOException; -import java.util.List; - -/** - * Properties of a Synapse link workspaces. - */ -@Immutable -public final class SynapseLinkWorkspaceProperties implements JsonSerializable { - /* - * List of all synapselink workspaces - */ - private List workspaces; - - /** - * Creates an instance of SynapseLinkWorkspaceProperties class. - */ - private SynapseLinkWorkspaceProperties() { - } - - /** - * Get the workspaces property: List of all synapselink workspaces. - * - * @return the workspaces value. - */ - public List workspaces() { - return this.workspaces; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (workspaces() != null) { - workspaces().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("workspaces", this.workspaces, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SynapseLinkWorkspaceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SynapseLinkWorkspaceProperties 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 SynapseLinkWorkspaceProperties. - */ - public static SynapseLinkWorkspaceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SynapseLinkWorkspaceProperties deserializedSynapseLinkWorkspaceProperties - = new SynapseLinkWorkspaceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("workspaces".equals(fieldName)) { - List workspaces - = reader.readArray(reader1 -> SynapseLinkWorkspaceInfoProperties.fromJson(reader1)); - deserializedSynapseLinkWorkspaceProperties.workspaces = workspaces; - } else { - reader.skipChildren(); - } - } - - return deserializedSynapseLinkWorkspaceProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentInner.java index 87eb6459464d..c8362e930dff 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -24,11 +23,6 @@ public final class SyncAgentInner extends ProxyResource { */ private SyncAgentProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -59,15 +53,6 @@ private SyncAgentProperties 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. * @@ -220,8 +205,6 @@ public static SyncAgentInner fromJson(JsonReader jsonReader) throws IOException deserializedSyncAgentInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedSyncAgentInner.innerProperties = SyncAgentProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedSyncAgentInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentKeyPropertiesInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentKeyPropertiesInner.java index 42c74af8525d..e3491f32c6cc 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentKeyPropertiesInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentKeyPropertiesInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -24,7 +24,7 @@ public final class SyncAgentKeyPropertiesInner implements JsonSerializable { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberInner.java index 117317b581c1..1dcc9e63094e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberInner.java @@ -1,16 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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.sql.models.DataSyncParticipantIdentity; import com.azure.resourcemanager.sql.models.SyncDirection; import com.azure.resourcemanager.sql.models.SyncMemberDbType; import com.azure.resourcemanager.sql.models.SyncMemberState; @@ -27,16 +25,6 @@ public final class SyncMemberInner extends ProxyResource { */ private SyncMemberProperties innerProperties; - /* - * Sync member authentication information. - */ - private DataSyncParticipantIdentity identity; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -67,35 +55,6 @@ private SyncMemberProperties innerProperties() { return this.innerProperties; } - /** - * Get the identity property: Sync member authentication information. - * - * @return the identity value. - */ - public DataSyncParticipantIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Sync member authentication information. - * - * @param identity the identity value to set. - * @return the SyncMemberInner object itself. - */ - public SyncMemberInner withIdentity(DataSyncParticipantIdentity identity) { - this.identity = identity; - return this; - } - - /** - * 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. * @@ -386,9 +345,6 @@ public void validate() { if (innerProperties() != null) { innerProperties().validate(); } - if (identity() != null) { - identity().validate(); - } } /** @@ -398,7 +354,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -426,10 +381,6 @@ public static SyncMemberInner fromJson(JsonReader jsonReader) throws IOException deserializedSyncMemberInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedSyncMemberInner.innerProperties = SyncMemberProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedSyncMemberInner.identity = DataSyncParticipantIdentity.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedSyncMemberInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberProperties.java index 53338e46fa0f..c6c15867f234 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -17,7 +17,7 @@ import java.util.UUID; /** - * Properties of a sync member with support to MI. + * Properties of a sync member. */ @Fluent public final class SyncMemberProperties implements JsonSerializable { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TdeCertificateProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TdeCertificateProperties.java index 4fee7acbf6ce..8f3a98a48976 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TdeCertificateProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TdeCertificateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneInner.java index 028a2dcf2991..5709b081fcd7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ public final class TimeZoneInner extends ProxyResource { */ private TimeZoneProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -45,7 +39,7 @@ public final class TimeZoneInner extends ProxyResource { /** * Creates an instance of TimeZoneInner class. */ - private TimeZoneInner() { + public TimeZoneInner() { } /** @@ -57,15 +51,6 @@ private TimeZoneProperties 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. * @@ -159,8 +144,6 @@ public static TimeZoneInner fromJson(JsonReader jsonReader) throws IOException { deserializedTimeZoneInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedTimeZoneInner.innerProperties = TimeZoneProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedTimeZoneInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneProperties.java index eef526d0c66b..f42413a265ba 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -29,7 +29,7 @@ public final class TimeZoneProperties implements JsonSerializable { /* * Requested number of top queries. @@ -56,7 +56,7 @@ public final class TopQueriesInner implements JsonSerializable /** * Creates an instance of TopQueriesInner class. */ - private TopQueriesInner() { + public TopQueriesInner() { } /** @@ -122,6 +122,17 @@ public List queries() { return this.queries; } + /** + * Set the queries property: List of top resource consuming queries with appropriate metric data. + * + * @param queries the queries value to set. + * @return the TopQueriesInner object itself. + */ + public TopQueriesInner withQueries(List queries) { + this.queries = queries; + return this; + } + /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TransparentDataEncryptionProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TransparentDataEncryptionProperties.java index f02976fe8882..55c7dbdf868b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TransparentDataEncryptionProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/TransparentDataEncryptionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -10,12 +10,11 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.sql.models.TransparentDataEncryptionScanState; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionState; import java.io.IOException; /** - * Properties of a transparent data encryption scan. + * Properties of a transparent data encryption. */ @Fluent public final class TransparentDataEncryptionProperties @@ -25,11 +24,6 @@ public final class TransparentDataEncryptionProperties */ private TransparentDataEncryptionState state; - /* - * Specifies the encryption scan state of the transparent data encryption. - */ - private TransparentDataEncryptionScanState scanState; - /** * Creates an instance of TransparentDataEncryptionProperties class. */ @@ -56,26 +50,6 @@ public TransparentDataEncryptionProperties withState(TransparentDataEncryptionSt return this; } - /** - * Get the scanState property: Specifies the encryption scan state of the transparent data encryption. - * - * @return the scanState value. - */ - public TransparentDataEncryptionScanState scanState() { - return this.scanState; - } - - /** - * Set the scanState property: Specifies the encryption scan state of the transparent data encryption. - * - * @param scanState the scanState value to set. - * @return the TransparentDataEncryptionProperties object itself. - */ - public TransparentDataEncryptionProperties withScanState(TransparentDataEncryptionScanState scanState) { - this.scanState = scanState; - return this; - } - /** * Validates the instance. * @@ -98,7 +72,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); - jsonWriter.writeStringField("scanState", this.scanState == null ? null : this.scanState.toString()); return jsonWriter.writeEndObject(); } @@ -122,9 +95,6 @@ public static TransparentDataEncryptionProperties fromJson(JsonReader jsonReader if ("state".equals(fieldName)) { deserializedTransparentDataEncryptionProperties.state = TransparentDataEncryptionState.fromString(reader.getString()); - } else if ("scanState".equals(fieldName)) { - deserializedTransparentDataEncryptionProperties.scanState - = TransparentDataEncryptionScanState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateLongTermRetentionBackupParametersProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateLongTermRetentionBackupParametersProperties.java index 54171cc99e41..af31a8b34d0e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateLongTermRetentionBackupParametersProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateLongTermRetentionBackupParametersProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateVirtualClusterDnsServersOperationInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateManagedInstanceDnsServersOperationInner.java similarity index 58% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateVirtualClusterDnsServersOperationInner.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateManagedInstanceDnsServersOperationInner.java index 5fb186617d40..5945e2e0fdef 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateVirtualClusterDnsServersOperationInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateManagedInstanceDnsServersOperationInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -14,19 +13,14 @@ import java.io.IOException; /** - * A refresh DNS servers operation. + * A recoverable managed database resource. */ @Immutable -public final class UpdateVirtualClusterDnsServersOperationInner extends ProxyResource { +public final class UpdateManagedInstanceDnsServersOperationInner extends ProxyResource { /* * Resource properties. */ - private VirtualClusterDnsServersProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; + private DnsRefreshConfigurationProperties innerProperties; /* * The type of the resource. @@ -44,9 +38,9 @@ public final class UpdateVirtualClusterDnsServersOperationInner extends ProxyRes private String id; /** - * Creates an instance of UpdateVirtualClusterDnsServersOperationInner class. + * Creates an instance of UpdateManagedInstanceDnsServersOperationInner class. */ - private UpdateVirtualClusterDnsServersOperationInner() { + public UpdateManagedInstanceDnsServersOperationInner() { } /** @@ -54,19 +48,10 @@ private UpdateVirtualClusterDnsServersOperationInner() { * * @return the innerProperties value. */ - private VirtualClusterDnsServersProperties innerProperties() { + private DnsRefreshConfigurationProperties 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. * @@ -128,39 +113,37 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of UpdateVirtualClusterDnsServersOperationInner from the JsonReader. + * Reads an instance of UpdateManagedInstanceDnsServersOperationInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of UpdateVirtualClusterDnsServersOperationInner if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. + * @return An instance of UpdateManagedInstanceDnsServersOperationInner 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 UpdateVirtualClusterDnsServersOperationInner. + * @throws IOException If an error occurs while reading the UpdateManagedInstanceDnsServersOperationInner. */ - public static UpdateVirtualClusterDnsServersOperationInner fromJson(JsonReader jsonReader) throws IOException { + public static UpdateManagedInstanceDnsServersOperationInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - UpdateVirtualClusterDnsServersOperationInner deserializedUpdateVirtualClusterDnsServersOperationInner - = new UpdateVirtualClusterDnsServersOperationInner(); + UpdateManagedInstanceDnsServersOperationInner deserializedUpdateManagedInstanceDnsServersOperationInner + = new UpdateManagedInstanceDnsServersOperationInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedUpdateVirtualClusterDnsServersOperationInner.id = reader.getString(); + deserializedUpdateManagedInstanceDnsServersOperationInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedUpdateVirtualClusterDnsServersOperationInner.name = reader.getString(); + deserializedUpdateManagedInstanceDnsServersOperationInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedUpdateVirtualClusterDnsServersOperationInner.type = reader.getString(); + deserializedUpdateManagedInstanceDnsServersOperationInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedUpdateVirtualClusterDnsServersOperationInner.innerProperties - = VirtualClusterDnsServersProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedUpdateVirtualClusterDnsServersOperationInner.systemData = SystemData.fromJson(reader); + deserializedUpdateManagedInstanceDnsServersOperationInner.innerProperties + = DnsRefreshConfigurationProperties.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedUpdateVirtualClusterDnsServersOperationInner; + return deserializedUpdateManagedInstanceDnsServersOperationInner; }); } } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UsageInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UsageInner.java index 73d93775b7fc..6043f87665dc 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UsageInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/UsageInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -55,7 +55,7 @@ public final class UsageInner implements JsonSerializable { /** * Creates an instance of UsageInner class. */ - private UsageInner() { + public UsageInner() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterInner.java index 4ff72a53612d..5a0372d1dce5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -24,11 +23,6 @@ public final class VirtualClusterInner extends Resource { */ private VirtualClusterProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -59,15 +53,6 @@ private VirtualClusterProperties 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. * @@ -126,25 +111,27 @@ public String subnetId() { } /** - * Get the version property: Virtual cluster version. + * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be + * captured here. * - * @return the version value. + * @return the family value. */ - public String version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); + public String family() { + return this.innerProperties() == null ? null : this.innerProperties().family(); } /** - * Set the version property: Virtual cluster version. + * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be + * captured here. * - * @param version the version value to set. + * @param family the family value to set. * @return the VirtualClusterInner object itself. */ - public VirtualClusterInner withVersion(String version) { + public VirtualClusterInner withFamily(String family) { if (this.innerProperties() == null) { this.innerProperties = new VirtualClusterProperties(); } - this.innerProperties().withVersion(version); + this.innerProperties().withFamily(family); return this; } @@ -157,6 +144,31 @@ public List childResources() { return this.innerProperties() == null ? null : this.innerProperties().childResources(); } + /** + * Get the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this virtual + * cluster. + * + * @return the maintenanceConfigurationId value. + */ + public String maintenanceConfigurationId() { + return this.innerProperties() == null ? null : this.innerProperties().maintenanceConfigurationId(); + } + + /** + * Set the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this virtual + * cluster. + * + * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. + * @return the VirtualClusterInner object itself. + */ + public VirtualClusterInner withMaintenanceConfigurationId(String maintenanceConfigurationId) { + if (this.innerProperties() == null) { + this.innerProperties = new VirtualClusterProperties(); + } + this.innerProperties().withMaintenanceConfigurationId(maintenanceConfigurationId); + return this; + } + /** * Validates the instance. * @@ -209,8 +221,6 @@ public static VirtualClusterInner fromJson(JsonReader jsonReader) throws IOExcep deserializedVirtualClusterInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedVirtualClusterInner.innerProperties = VirtualClusterProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedVirtualClusterInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterProperties.java index ebc82e385937..752c1df4e78f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -23,15 +23,20 @@ public final class VirtualClusterProperties implements JsonSerializable childResources; + /* + * Specifies maintenance configuration id to apply to this virtual cluster. + */ + private String maintenanceConfigurationId; + /** * Creates an instance of VirtualClusterProperties class. */ @@ -48,22 +53,24 @@ public String subnetId() { } /** - * Get the version property: Virtual cluster version. + * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be + * captured here. * - * @return the version value. + * @return the family value. */ - public String version() { - return this.version; + public String family() { + return this.family; } /** - * Set the version property: Virtual cluster version. + * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be + * captured here. * - * @param version the version value to set. + * @param family the family value to set. * @return the VirtualClusterProperties object itself. */ - public VirtualClusterProperties withVersion(String version) { - this.version = version; + public VirtualClusterProperties withFamily(String family) { + this.family = family; return this; } @@ -76,6 +83,28 @@ public List childResources() { return this.childResources; } + /** + * Get the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this virtual + * cluster. + * + * @return the maintenanceConfigurationId value. + */ + public String maintenanceConfigurationId() { + return this.maintenanceConfigurationId; + } + + /** + * Set the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this virtual + * cluster. + * + * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. + * @return the VirtualClusterProperties object itself. + */ + public VirtualClusterProperties withMaintenanceConfigurationId(String maintenanceConfigurationId) { + this.maintenanceConfigurationId = maintenanceConfigurationId; + return this; + } + /** * Validates the instance. * @@ -90,7 +119,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("version", this.version); + jsonWriter.writeStringField("family", this.family); + jsonWriter.writeStringField("maintenanceConfigurationId", this.maintenanceConfigurationId); return jsonWriter.writeEndObject(); } @@ -111,11 +141,13 @@ public static VirtualClusterProperties fromJson(JsonReader jsonReader) throws IO if ("subnetId".equals(fieldName)) { deserializedVirtualClusterProperties.subnetId = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedVirtualClusterProperties.version = reader.getString(); + } else if ("family".equals(fieldName)) { + deserializedVirtualClusterProperties.family = reader.getString(); } else if ("childResources".equals(fieldName)) { List childResources = reader.readArray(reader1 -> reader1.getString()); deserializedVirtualClusterProperties.childResources = childResources; + } else if ("maintenanceConfigurationId".equals(fieldName)) { + deserializedVirtualClusterProperties.maintenanceConfigurationId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleInner.java index fd7758c71d64..657835567bb8 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -23,11 +22,6 @@ public final class VirtualNetworkRuleInner extends ProxyResource { */ private VirtualNetworkRuleProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -58,15 +52,6 @@ private VirtualNetworkRuleProperties 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. * @@ -199,8 +184,6 @@ public static VirtualNetworkRuleInner fromJson(JsonReader jsonReader) throws IOE deserializedVirtualNetworkRuleInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedVirtualNetworkRuleInner.innerProperties = VirtualNetworkRuleProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedVirtualNetworkRuleInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleProperties.java index 1992b1f434a1..fc36e4ec0406 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordInner.java index efac5c57a2a5..a77e7373df05 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -27,11 +26,6 @@ public final class VulnerabilityAssessmentScanRecordInner extends ProxyResource */ private VulnerabilityAssessmentScanRecordProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -50,7 +44,7 @@ public final class VulnerabilityAssessmentScanRecordInner extends ProxyResource /** * Creates an instance of VulnerabilityAssessmentScanRecordInner class. */ - private VulnerabilityAssessmentScanRecordInner() { + public VulnerabilityAssessmentScanRecordInner() { } /** @@ -62,15 +56,6 @@ private VulnerabilityAssessmentScanRecordProperties 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. * @@ -220,8 +205,6 @@ public static VulnerabilityAssessmentScanRecordInner fromJson(JsonReader jsonRea } else if ("properties".equals(fieldName)) { deserializedVulnerabilityAssessmentScanRecordInner.innerProperties = VulnerabilityAssessmentScanRecordProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedVulnerabilityAssessmentScanRecordInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordProperties.java index e266a199a075..0e739fbff67f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; @@ -66,7 +66,7 @@ public final class VulnerabilityAssessmentScanRecordProperties /** * Creates an instance of VulnerabilityAssessmentScanRecordProperties class. */ - private VulnerabilityAssessmentScanRecordProperties() { + public VulnerabilityAssessmentScanRecordProperties() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierInner.java index 15e74d43092b..00a2b055149b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ public final class WorkloadClassifierInner extends ProxyResource { */ private WorkloadClassifierProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -57,15 +51,6 @@ private WorkloadClassifierProperties 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. * @@ -279,8 +264,6 @@ public static WorkloadClassifierInner fromJson(JsonReader jsonReader) throws IOE deserializedWorkloadClassifierInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedWorkloadClassifierInner.innerProperties = WorkloadClassifierProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedWorkloadClassifierInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierProperties.java index 93d0c5ae305d..998ef763d15f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupInner.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupInner.java index b455bdfaa5f6..9126caae3bd4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupInner.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -22,11 +21,6 @@ public final class WorkloadGroupInner extends ProxyResource { */ private WorkloadGroupProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -57,15 +51,6 @@ private WorkloadGroupProperties 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. * @@ -279,8 +264,6 @@ public static WorkloadGroupInner fromJson(JsonReader jsonReader) throws IOExcept deserializedWorkloadGroupInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedWorkloadGroupInner.innerProperties = WorkloadGroupProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedWorkloadGroupInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupProperties.java index afcfa410e557..72c6c91b62e7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/package-info.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/package-info.java index e0bb4e09809c..33b76c89c6c4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/package-info.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/package-info.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for SqlServer. - * The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database - * services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, - * and other entities. + * Package containing the inner data models for SqlManagementClient. + * The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database + * services to manage your databases. The API enables you to create, retrieve, update, and delete databases. */ package com.azure.resourcemanager.sql.fluent.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/package-info.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/package-info.java index 1a12e41fb031..8ade8e445304 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/package-info.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/package-info.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for SqlServer. - * The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database - * services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, - * and other entities. + * Package containing the service clients for SqlManagementClient. + * The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database + * services to manage your databases. The API enables you to create, retrieve, update, and delete databases. */ package com.azure.resourcemanager.sql.fluent; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/BackupShortTermRetentionPoliciesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/BackupShortTermRetentionPoliciesClientImpl.java index 86470419fc5e..16668c0dde5b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/BackupShortTermRetentionPoliciesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/BackupShortTermRetentionPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.BackupShortTermRetentionPoliciesClient; import com.azure.resourcemanager.sql.fluent.models.BackupShortTermRetentionPolicyInner; -import com.azure.resourcemanager.sql.implementation.models.BackupShortTermRetentionPolicyListResult; +import com.azure.resourcemanager.sql.models.BackupShortTermRetentionPolicyListResult; import com.azure.resourcemanager.sql.models.ShortTermRetentionPolicyName; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -68,84 +68,247 @@ public final class BackupShortTermRetentionPoliciesClientImpl implements BackupS * The interface defining all the services for SqlManagementClientBackupShortTermRetentionPolicies to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientBackupShortTermRetentionPolicies") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientB") public interface BackupShortTermRetentionPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, - @PathParam("policyName") ShortTermRetentionPolicyName policyName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("policyName") ShortTermRetentionPolicyName policyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("policyName") ShortTermRetentionPolicyName policyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") BackupShortTermRetentionPolicyInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BackupShortTermRetentionPolicyInner parameters, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("policyName") ShortTermRetentionPolicyName policyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") BackupShortTermRetentionPolicyInner parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BackupShortTermRetentionPolicyInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's short term retention policy along with {@link Response} on successful completion of + * @return a database's short term retention policy along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, ShortTermRetentionPolicyName policyName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; + return FluxUtil + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a database's short term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a database's short term retention policy along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String serverName, String databaseName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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 + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a database's short term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a database's short term retention policy as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * Gets a database's short term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a database's short term retention policy as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a database's short term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a database's short term retention policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); + } + + /** + * Gets a database's short term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a database's short term retention policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + } + + /** + * Gets a database's short term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param policyName The policy name. Should always be "default". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a database's short term retention policy along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, ShortTermRetentionPolicyName policyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -159,19 +322,25 @@ public Mono> getWithResponseAsync( if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, policyName, accept, context)) + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @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. @@ -186,10 +355,6 @@ private Mono> getWithResponseAsync 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.")); @@ -203,19 +368,24 @@ private Mono> getWithResponseAsync if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, policyName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, policyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -231,10 +401,11 @@ public Mono getAsync(String resourceGroupNa /** * Gets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @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. @@ -250,10 +421,11 @@ public Response getWithResponse(String reso /** * Gets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -268,10 +440,11 @@ public BackupShortTermRetentionPolicyInner get(String resourceGroupName, String /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -285,10 +458,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -302,27 +471,31 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, policyName, contentType, - accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -338,10 +511,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -355,26 +524,29 @@ private Mono>> createOrUpdateWithResponseAsync(String if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, policyName, contentType, - accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -395,10 +567,11 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -421,10 +594,11 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -442,10 +616,11 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -465,10 +640,11 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -485,10 +661,11 @@ public Mono createOrUpdateAsync(String reso /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -508,10 +685,11 @@ private Mono createOrUpdateAsync(String res /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -527,10 +705,11 @@ public BackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupNa /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -549,10 +728,11 @@ public BackupShortTermRetentionPolicyInner createOrUpdate(String resourceGroupNa /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -566,10 +746,6 @@ public Mono>> updateWithResponseAsync(String resourceG 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.")); @@ -583,27 +759,31 @@ public Mono>> updateWithResponseAsync(String resourceG if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, policyName, contentType, - accept, parameters, context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -619,10 +799,6 @@ private Mono>> updateWithResponseAsync(String resource 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.")); @@ -636,25 +812,29 @@ private Mono>> updateWithResponseAsync(String resource if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, policyName, contentType, accept, parameters, context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, policyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -675,10 +855,11 @@ private Mono>> updateWithResponseAsync(String resource /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -701,10 +882,11 @@ private Mono>> updateWithResponseAsync(String resource /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -722,10 +904,11 @@ public SyncPoller, BackupShortTe /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -744,10 +927,11 @@ public SyncPoller, BackupShortTe /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -764,10 +948,11 @@ public Mono updateAsync(String resourceGrou /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -786,10 +971,11 @@ private Mono updateAsync(String resourceGro /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -805,10 +991,11 @@ public BackupShortTermRetentionPolicyInner update(String resourceGroupName, Stri /** * Updates a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be default. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -822,164 +1009,6 @@ public BackupShortTermRetentionPolicyInner update(String resourceGroupName, Stri return updateAsync(resourceGroupName, serverName, databaseName, policyName, parameters, context).block(); } - /** - * Gets a database's short term retention policy. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's short term retention policy along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, 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 a database's short term retention policy. - * - * @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 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 database's short term retention policy along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a database's short term retention policy. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's short term retention policy as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, - String serverName, String databaseName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Gets a database's short term retention policy. - * - * @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 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 database's short term retention policy as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, - String serverName, String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a database's short term retention policy. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's short term retention policy as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String serverName, String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); - } - - /** - * Gets a database's short term retention policy. - * - * @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 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 database's short term retention policy as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String serverName, String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); - } - /** * Get the next page of items. * @@ -987,7 +1016,7 @@ public PagedIterable listByDatabase(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 database's short term retention policy along with {@link PagedResponse} on successful completion of + * @return a list of short term retention policies along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1016,7 +1045,7 @@ public PagedIterable listByDatabase(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 database's short term retention policy along with {@link PagedResponse} on successful completion of + * @return a list of short term retention policies along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/CapabilitiesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/CapabilitiesClientImpl.java index 272e5860d877..67024c4cb97d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/CapabilitiesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/CapabilitiesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -55,16 +55,16 @@ public final class CapabilitiesClientImpl implements CapabilitiesClient { * The interface defining all the services for SqlManagementClientCapabilities to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientCapabilities") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientC") public interface CapabilitiesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/capabilities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByLocation(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @QueryParam("include") CapabilityGroup include, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } @@ -86,17 +86,17 @@ public Mono> listByLocationWithResponseAsync return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName 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.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, include, accept, context)) + .withContext(context -> service.listByLocation(this.client.getEndpoint(), locationName, include, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -119,17 +119,17 @@ private Mono> listByLocationWithResponseAsyn return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName 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.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, include, accept, context); + return service.listByLocation(this.client.getEndpoint(), locationName, include, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingPoliciesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingPoliciesClientImpl.java index d0643cc5cd24..4648b6892ea2 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingPoliciesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -57,36 +57,38 @@ public final class DataMaskingPoliciesClientImpl implements DataMaskingPoliciesC * The interface defining all the services for SqlManagementClientDataMaskingPolicies to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDataMaskingPolicies") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DataMaskingPoliciesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("dataMaskingPolicyName") DataMaskingPolicyName dataMaskingPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("dataMaskingPolicyName") DataMaskingPolicyName dataMaskingPolicyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") DataMaskingPolicyInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DataMaskingPolicyInner parameters, @HeaderParam("Accept") String accept, + Context context); } /** * Gets the database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -102,10 +104,6 @@ public Mono> getWithResponseAsync(String resour 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.")); @@ -120,18 +118,22 @@ public Mono> getWithResponseAsync(String resour return Mono .error(new IllegalArgumentException("Parameter dataMaskingPolicyName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, dataMaskingPolicyName, - accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + dataMaskingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -148,10 +150,6 @@ private Mono> getWithResponseAsync(String resou 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.")); @@ -166,16 +164,21 @@ private Mono> getWithResponseAsync(String resou return Mono .error(new IllegalArgumentException("Parameter dataMaskingPolicyName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, dataMaskingPolicyName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + dataMaskingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets the database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -194,7 +197,8 @@ public Mono getAsync(String resourceGroupName, String se /** * Gets the database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -214,7 +218,8 @@ public Response getWithResponse(String resourceGroupName /** * Gets the database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -233,7 +238,8 @@ public DataMaskingPolicyInner get(String resourceGroupName, String serverName, S /** * Creates or updates a database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -251,10 +257,6 @@ public Mono> createOrUpdateWithResponseAsync(St 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.")); @@ -269,24 +271,28 @@ public Mono> createOrUpdateWithResponseAsync(St return Mono .error(new IllegalArgumentException("Parameter dataMaskingPolicyName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, dataMaskingPolicyName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, dataMaskingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -305,10 +311,6 @@ private Mono> createOrUpdateWithResponseAsync(S 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.")); @@ -323,23 +325,27 @@ private Mono> createOrUpdateWithResponseAsync(S return Mono .error(new IllegalArgumentException("Parameter dataMaskingPolicyName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, dataMaskingPolicyName, - contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + dataMaskingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Creates or updates a database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -359,7 +365,8 @@ public Mono createOrUpdateAsync(String resourceGroupName /** * Creates or updates a database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -381,7 +388,8 @@ public Response createOrUpdateWithResponse(String resour /** * Creates or updates a database data masking policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingRulesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingRulesClientImpl.java index dfa23d95b43a..bcdbecab21cf 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingRulesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingRulesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -29,8 +29,8 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.DataMaskingRulesClient; import com.azure.resourcemanager.sql.fluent.models.DataMaskingRuleInner; -import com.azure.resourcemanager.sql.implementation.models.DataMaskingRuleListResult; import com.azure.resourcemanager.sql.models.DataMaskingPolicyName; +import com.azure.resourcemanager.sql.models.DataMaskingRuleListResult; import reactor.core.publisher.Mono; /** @@ -62,49 +62,50 @@ public final class DataMaskingRulesClientImpl implements DataMaskingRulesClient * The interface defining all the services for SqlManagementClientDataMaskingRules to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDataMaskingRules") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DataMaskingRulesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("dataMaskingPolicyName") DataMaskingPolicyName dataMaskingPolicyName, - @QueryParam("$skip") Long skip, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("dataMaskingPolicyName") DataMaskingPolicyName dataMaskingPolicyName, @PathParam("dataMaskingRuleName") String dataMaskingRuleName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") DataMaskingRuleInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DataMaskingRuleInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of database data masking rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. - * @param skip The number of elements in the collection to skip. + * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -113,15 +114,11 @@ Mono> listByDatabaseNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName, Long skip) { + String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName) { 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.")); @@ -136,11 +133,15 @@ private Mono> listByDatabaseSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter dataMaskingPolicyName 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"; return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, dataMaskingPolicyName, - skip, accept, context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, dataMaskingPolicyName, this.client.getSubscriptionId(), 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())); @@ -149,11 +150,11 @@ private Mono> listByDatabaseSinglePageAsync( /** * Gets a list of database data masking rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. - * @param skip The number of elements in the collection to skip. + * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. * @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. @@ -163,16 +164,11 @@ private Mono> listByDatabaseSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName, Long skip, - Context context) { + String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName, 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.")); @@ -187,11 +183,15 @@ private Mono> listByDatabaseSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter dataMaskingPolicyName 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 - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, dataMaskingPolicyName, skip, accept, context) + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + dataMaskingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -199,30 +199,11 @@ private Mono> listByDatabaseSinglePageAsync( /** * Gets a list of database data masking rules. * - * @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 dataMaskingPolicyName The name of the database for which the data masking policy applies. - * @param skip The number of elements in the collection to skip. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 database data masking rules as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, DataMaskingPolicyName dataMaskingPolicyName, Long skip) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, - dataMaskingPolicyName, skip), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of database data masking rules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. + * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -231,19 +212,19 @@ public PagedFlux listByDatabaseAsync(String resourceGroupN @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName) { - final Long skip = null; - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, - dataMaskingPolicyName, skip), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, dataMaskingPolicyName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** * Gets a list of database data masking rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. - * @param skip The number of elements in the collection to skip. + * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. * @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. @@ -252,18 +233,19 @@ public PagedFlux listByDatabaseAsync(String resourceGroupN */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, DataMaskingPolicyName dataMaskingPolicyName, Long skip, Context context) { + String databaseName, DataMaskingPolicyName dataMaskingPolicyName, Context context) { return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, - dataMaskingPolicyName, skip, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + dataMaskingPolicyName, context), nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** * Gets a list of database data masking rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. + * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -272,19 +254,18 @@ private PagedFlux listByDatabaseAsync(String resourceGroup @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDatabase(String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyName dataMaskingPolicyName) { - final Long skip = null; return new PagedIterable<>( - listByDatabaseAsync(resourceGroupName, serverName, databaseName, dataMaskingPolicyName, skip)); + listByDatabaseAsync(resourceGroupName, serverName, databaseName, dataMaskingPolicyName)); } /** * Gets a list of database data masking rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. - * @param skip The number of elements in the collection to skip. + * @param dataMaskingPolicyName The name of the database for which the data masking rule applies. * @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. @@ -293,15 +274,16 @@ public PagedIterable listByDatabase(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, DataMaskingPolicyName dataMaskingPolicyName, Long skip, Context context) { + String databaseName, DataMaskingPolicyName dataMaskingPolicyName, Context context) { return new PagedIterable<>( - listByDatabaseAsync(resourceGroupName, serverName, databaseName, dataMaskingPolicyName, skip, context)); + listByDatabaseAsync(resourceGroupName, serverName, databaseName, dataMaskingPolicyName, context)); } /** * Creates or updates a database data masking rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -320,10 +302,6 @@ public Mono> createOrUpdateWithResponseAsync(Stri 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.")); @@ -342,24 +320,28 @@ public Mono> createOrUpdateWithResponseAsync(Stri return Mono .error(new IllegalArgumentException("Parameter dataMaskingRuleName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, dataMaskingPolicyName, - dataMaskingRuleName, contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, dataMaskingPolicyName, dataMaskingRuleName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a database data masking rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -379,10 +361,6 @@ private Mono> createOrUpdateWithResponseAsync(Str 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.")); @@ -401,23 +379,27 @@ private Mono> createOrUpdateWithResponseAsync(Str return Mono .error(new IllegalArgumentException("Parameter dataMaskingRuleName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, dataMaskingPolicyName, - dataMaskingRuleName, contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + dataMaskingPolicyName, dataMaskingRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context); } /** * Creates or updates a database data masking rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -439,7 +421,8 @@ public Mono createOrUpdateAsync(String resourceGroupName, /** * Creates or updates a database data masking rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -462,7 +445,8 @@ public Response createOrUpdateWithResponse(String resource /** * Creates or updates a database data masking rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param dataMaskingPolicyName The name of the database for which the data masking policy applies. @@ -487,7 +471,7 @@ public DataMaskingRuleInner createOrUpdate(String resourceGroupName, String serv * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 database data masking rules along with {@link PagedResponse} on successful completion of + * @return the list of database data masking rules along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -515,7 +499,7 @@ private Mono> listByDatabaseNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 database data masking rules along with {@link PagedResponse} on successful completion of + * @return the list of database data masking rules along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataWarehouseUserActivitiesOperationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataWarehouseUserActivitiesOperationsClientImpl.java index 4bc848079e7d..5983fbfb13fa 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataWarehouseUserActivitiesOperationsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DataWarehouseUserActivitiesOperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.DataWarehouseUserActivitiesOperationsClient; import com.azure.resourcemanager.sql.fluent.models.DataWarehouseUserActivitiesInner; -import com.azure.resourcemanager.sql.implementation.models.DataWarehouseUserActivitiesListResult; +import com.azure.resourcemanager.sql.models.DataWarehouseUserActivitiesListResult; import com.azure.resourcemanager.sql.models.DataWarehouseUserActivityName; import reactor.core.publisher.Mono; @@ -62,62 +62,58 @@ public final class DataWarehouseUserActivitiesOperationsClientImpl * The interface defining all the services for SqlManagementClientDataWarehouseUserActivitiesOperations to be used * by the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDataWarehouseUserActivitiesOperations") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DataWarehouseUserActivitiesOperationsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities/{dataWarehouseUserActivityName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("dataWarehouseUserActivityName") DataWarehouseUserActivityName dataWarehouseUserActivityName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities/{dataWarehouseUserActivityName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, + @PathParam("dataWarehouseUserActivityName") DataWarehouseUserActivityName dataWarehouseUserActivityName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets the user activities of a data warehouse which includes running and suspended queries. + * List the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user activities of a data warehouse which includes running and suspended queries along with - * {@link Response} on successful completion of {@link Mono}. + * @return user activities of a data warehouse along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { 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.")); @@ -128,44 +124,40 @@ public Mono> getWithResponseAsync(Str if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (dataWarehouseUserActivityName == null) { + if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( - "Parameter dataWarehouseUserActivityName is required and cannot be null.")); + "Parameter this.client.getSubscriptionId() 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, databaseName, - dataWarehouseUserActivityName, accept, context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), 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())); } /** - * Gets the user activities of a data warehouse which includes running and suspended queries. + * List the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @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 user activities of a data warehouse which includes running and suspended queries along with - * {@link Response} on successful completion of {@link Mono}. + * @return user activities of a data warehouse along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName, - Context context) { + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String serverName, String databaseName, 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.")); @@ -176,99 +168,117 @@ private Mono> getWithResponseAsync(St if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (dataWarehouseUserActivityName == null) { + if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( - "Parameter dataWarehouseUserActivityName is required and cannot be null.")); + "Parameter this.client.getSubscriptionId() 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, serverName, databaseName, dataWarehouseUserActivityName, accept, context); + return service + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets the user activities of a data warehouse which includes running and suspended queries. + * List the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user activities of a data warehouse which includes running and suspended queries on successful - * completion of {@link Mono}. + * @return user activities of a data warehouse as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, dataWarehouseUserActivityName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** - * Gets the user activities of a data warehouse which includes running and suspended queries. + * List the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @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 user activities of a data warehouse which includes running and suspended queries along with - * {@link Response}. + * @return user activities of a data warehouse as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, dataWarehouseUserActivityName, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Gets the user activities of a data warehouse which includes running and suspended queries. + * List the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user activities of a data warehouse which includes running and suspended queries. + * @return user activities of a data warehouse as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataWarehouseUserActivitiesInner get(String resourceGroupName, String serverName, String databaseName, - DataWarehouseUserActivityName dataWarehouseUserActivityName) { - return getWithResponse(resourceGroupName, serverName, databaseName, dataWarehouseUserActivityName, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** * List the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 user activities of a data warehouse as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + } + + /** + * Gets the user activities of a data warehouse which includes running and suspended queries. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DataWarehouseUserActivities list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the user activities of a data warehouse which includes running and suspended queries along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName) { 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.")); @@ -279,39 +289,45 @@ public DataWarehouseUserActivitiesInner get(String resourceGroupName, String ser if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (dataWarehouseUserActivityName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter dataWarehouseUserActivityName 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"; return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + dataWarehouseUserActivityName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List the user activities of a data warehouse which includes running and suspended queries. + * Gets the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @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 DataWarehouseUserActivities list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the user activities of a data warehouse which includes running and suspended queries along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName, + 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.")); @@ -322,90 +338,82 @@ private Mono> listByDatabaseSing if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (dataWarehouseUserActivityName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter dataWarehouseUserActivityName 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 - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + dataWarehouseUserActivityName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** - * List the user activities of a data warehouse which includes running and suspended queries. + * Gets the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DataWarehouseUserActivities list operation as paginated response with - * {@link PagedFlux}. + * @return the user activities of a data warehouse which includes running and suspended queries on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, dataWarehouseUserActivityName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List the user activities of a data warehouse which includes running and suspended queries. + * Gets the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @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 DataWarehouseUserActivities list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * List the user activities of a data warehouse which includes running and suspended queries. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DataWarehouseUserActivities list operation as paginated response with - * {@link PagedIterable}. + * @return the user activities of a data warehouse which includes running and suspended queries along with + * {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, DataWarehouseUserActivityName dataWarehouseUserActivityName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, dataWarehouseUserActivityName, context) + .block(); } /** - * List the user activities of a data warehouse which includes running and suspended queries. + * Gets the user activities of a data warehouse which includes running and suspended queries. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param context The context to associate with this operation. + * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DataWarehouseUserActivities list operation as paginated response with - * {@link PagedIterable}. + * @return the user activities of a data warehouse which includes running and suspended queries. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DataWarehouseUserActivitiesInner get(String resourceGroupName, String serverName, String databaseName, + DataWarehouseUserActivityName dataWarehouseUserActivityName) { + return getWithResponse(resourceGroupName, serverName, databaseName, dataWarehouseUserActivityName, Context.NONE) + .getValue(); } /** @@ -415,8 +423,8 @@ public PagedIterable listByDatabase(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 response of a DataWarehouseUserActivities list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return user activities of a data warehouse along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -443,8 +451,8 @@ private Mono> listByDatabaseNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DataWarehouseUserActivities list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return user activities of a data warehouse along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvancedThreatProtectionSettingsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvancedThreatProtectionSettingsClientImpl.java index e3505ebf4bed..b1f724fe39ba 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvancedThreatProtectionSettingsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvancedThreatProtectionSettingsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -29,8 +29,8 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.DatabaseAdvancedThreatProtectionSettingsClient; import com.azure.resourcemanager.sql.fluent.models.DatabaseAdvancedThreatProtectionInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseAdvancedThreatProtectionListResult; import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; +import com.azure.resourcemanager.sql.models.DatabaseAdvancedThreatProtectionListResult; import reactor.core.publisher.Mono; /** @@ -64,74 +64,70 @@ public final class DatabaseAdvancedThreatProtectionSettingsClientImpl * The interface defining all the services for SqlManagementClientDatabaseAdvancedThreatProtectionSettings to be * used by the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseAdvancedThreatProtectionSettings") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseAdvancedThreatProtectionSettingsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") DatabaseAdvancedThreatProtectionInner parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DatabaseAdvancedThreatProtectionInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a database's Advanced Threat Protection state. + * Gets a list of database's Advanced Threat Protection states. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced 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 database's Advanced Threat Protection state along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of database's Advanced Threat Protection states along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { 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.")); @@ -142,44 +138,40 @@ public Mono> getWithResponseAsyn if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (advancedThreatProtectionName == null) { - return Mono.error( - new IllegalArgumentException("Parameter advancedThreatProtectionName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - advancedThreatProtectionName, accept, context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), 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())); } /** - * Gets a database's Advanced Threat Protection state. + * Gets a list of database's Advanced Threat Protection states. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced 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 database's Advanced Threat Protection state along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of database's Advanced Threat Protection states along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, - Context context) { + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String serverName, String databaseName, 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.")); @@ -190,100 +182,117 @@ private Mono> getWithResponseAsy if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (advancedThreatProtectionName == null) { - return Mono.error( - new IllegalArgumentException("Parameter advancedThreatProtectionName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, advancedThreatProtectionName, accept, context); + return service + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a database's Advanced Threat Protection state. + * Gets a list of database's Advanced Threat Protection states. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced 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 database's Advanced Threat Protection state on successful completion of {@link Mono}. + * @return a list of database's Advanced Threat Protection states as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, advancedThreatProtectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** - * Gets a database's Advanced Threat Protection state. + * Gets a list of database's Advanced Threat Protection states. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced 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 database's Advanced Threat Protection state along with {@link Response}. + * @return a list of database's Advanced Threat Protection states as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, advancedThreatProtectionName, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Gets a database's Advanced Threat Protection state. + * Gets a list of database's Advanced Threat Protection states. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced 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 database's Advanced Threat Protection state. + * @return a list of database's Advanced Threat Protection states as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseAdvancedThreatProtectionInner get(String resourceGroupName, String serverName, String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName) { - return getWithResponse(resourceGroupName, serverName, databaseName, advancedThreatProtectionName, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** - * Creates or updates a database's Advanced Threat Protection state. + * Gets a list of database's Advanced Threat Protection states. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a list of database's Advanced Threat Protection states as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + } + + /** + * Gets a database's Advanced Threat Protection state. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The database Advanced 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 database Advanced Threat Protection along with {@link Response} on successful completion of + * @return a database's Advanced Threat Protection state along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, DatabaseAdvancedThreatProtectionInner parameters) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName) { 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.")); @@ -298,48 +307,41 @@ public Mono> createOrUpdateWithR return Mono.error( new IllegalArgumentException("Parameter advancedThreatProtectionName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - advancedThreatProtectionName, contentType, accept, parameters, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + advancedThreatProtectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates a database's Advanced Threat Protection state. + * Gets a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The database Advanced 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 database Advanced Threat Protection along with {@link Response} on successful completion of + * @return a database's Advanced Threat Protection state along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, DatabaseAdvancedThreatProtectionInner parameters, + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, 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.")); @@ -354,106 +356,101 @@ private Mono> createOrUpdateWith return Mono.error( new IllegalArgumentException("Parameter advancedThreatProtectionName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, advancedThreatProtectionName, - contentType, accept, parameters, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + advancedThreatProtectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** - * Creates or updates a database's Advanced Threat Protection state. + * Gets a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The database Advanced 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 database Advanced Threat Protection on successful completion of {@link Mono}. + * @return a database's Advanced Threat Protection state on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String serverName, - String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, - DatabaseAdvancedThreatProtectionInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, - advancedThreatProtectionName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, advancedThreatProtectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates or updates a database's Advanced Threat Protection state. + * Gets a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The database Advanced 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 database Advanced Threat Protection along with {@link Response}. + * @return a database's Advanced Threat Protection state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String serverName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, - DatabaseAdvancedThreatProtectionInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, - advancedThreatProtectionName, parameters, context).block(); + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, advancedThreatProtectionName, context) + .block(); } /** - * Creates or updates a database's Advanced Threat Protection state. + * Gets a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The database Advanced 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 database Advanced Threat Protection. + * @return a database's Advanced Threat Protection state. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, String serverName, - String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, - DatabaseAdvancedThreatProtectionInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, advancedThreatProtectionName, - parameters, Context.NONE).getValue(); + public DatabaseAdvancedThreatProtectionInner get(String resourceGroupName, String serverName, String databaseName, + AdvancedThreatProtectionName advancedThreatProtectionName) { + return getWithResponse(resourceGroupName, serverName, databaseName, advancedThreatProtectionName, Context.NONE) + .getValue(); } /** - * Gets a list of database's Advanced Threat Protection states. + * Creates or updates a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The database Advanced 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 list of database's Advanced Threat Protection states along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a database Advanced Threat Protection along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String serverName, String databaseName, + AdvancedThreatProtectionName advancedThreatProtectionName, DatabaseAdvancedThreatProtectionInner 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.")); @@ -464,39 +461,52 @@ public DatabaseAdvancedThreatProtectionInner createOrUpdate(String resourceGroup if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (advancedThreatProtectionName == null) { + return Mono.error( + new IllegalArgumentException("Parameter advancedThreatProtectionName 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.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, advancedThreatProtectionName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of database's Advanced Threat Protection states. + * Creates or updates a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The database Advanced 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 list of database's Advanced Threat Protection states along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a database Advanced Threat Protection along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String serverName, String databaseName, + AdvancedThreatProtectionName advancedThreatProtectionName, DatabaseAdvancedThreatProtectionInner 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.")); @@ -507,86 +517,91 @@ private Mono> listByDatabas if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (advancedThreatProtectionName == null) { + return Mono.error( + new IllegalArgumentException("Parameter advancedThreatProtectionName 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"; context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + advancedThreatProtectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** - * Gets a list of database's Advanced Threat Protection states. + * Creates or updates a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The database Advanced 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 list of database's Advanced Threat Protection states as paginated response with {@link PagedFlux}. + * @return a database Advanced Threat Protection on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, - String serverName, String databaseName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, + DatabaseAdvancedThreatProtectionInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, + advancedThreatProtectionName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of database's Advanced Threat Protection states. + * Creates or updates a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The database Advanced 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 list of database's Advanced Threat Protection states as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, - String serverName, String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of database's Advanced Threat Protection states. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 database's Advanced Threat Protection states as paginated response with {@link PagedIterable}. + * @return a database Advanced Threat Protection along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String serverName, String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, + String serverName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, + DatabaseAdvancedThreatProtectionInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, + advancedThreatProtectionName, parameters, context).block(); } /** - * Gets a list of database's Advanced Threat Protection states. + * Creates or updates a database's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param context The context to associate with this operation. + * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The database Advanced 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 list of database's Advanced Threat Protection states as paginated response with {@link PagedIterable}. + * @return a database Advanced Threat Protection. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String serverName, String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, + DatabaseAdvancedThreatProtectionInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, advancedThreatProtectionName, + parameters, Context.NONE).getValue(); } /** @@ -596,8 +611,8 @@ public PagedIterable listByDatabase(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 database's Advanced Threat Protection states along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of the database's Advanced Threat Protection configurations along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -625,8 +640,8 @@ public PagedIterable listByDatabase(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 database's Advanced Threat Protection states along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of the database's Advanced Threat Protection configurations along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvisorsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvisorsClientImpl.java index 71cc278e1efa..cbc97010bb3e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvisorsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvisorsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -57,63 +57,61 @@ public final class DatabaseAdvisorsClientImpl implements DatabaseAdvisorsClient * The interface defining all the services for SqlManagementClientDatabaseAdvisors to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseAdvisors") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseAdvisorsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @PathParam("advisorName") String advisorName, + @PathParam("databaseName") String databaseName, @QueryParam("$expand") String expand, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}") + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("advisorName") String advisorName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") AdvisorInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @QueryParam("$expand") String expand, - @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("advisorName") String advisorName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AdvisorInner parameters, @HeaderParam("Accept") String accept, + Context context); } /** - * Gets a database advisor. + * Gets a list of database advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param advisorName The name of the Database Advisor. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database advisor along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database advisors along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String advisorName) { + public Mono>> listByDatabaseWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String expand) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -124,39 +122,38 @@ public Mono> getWithResponseAsync(String resourceGroupNam if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (advisorName == null) { - return Mono.error(new IllegalArgumentException("Parameter advisorName 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"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, advisorName, accept, context)) + return FluxUtil + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, expand, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a database advisor. + * Gets a list of database advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param advisorName The name of the Database Advisor. + * @param expand The child resources to include in the response. * @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 database advisor along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database advisors along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String advisorName, Context context) { + private Mono>> listByDatabaseWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String expand, 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.")); @@ -167,95 +164,94 @@ private Mono> getWithResponseAsync(String resourceGroupNa if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (advisorName == null) { - return Mono.error(new IllegalArgumentException("Parameter advisorName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, advisorName, accept, context); + return service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, expand, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Gets a database advisor. + * Gets a list of database advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param advisorName The name of the Database Advisor. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database advisor on successful completion of {@link Mono}. + * @return a list of database advisors on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String databaseName, - String advisorName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName) + public Mono> listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + final String expand = null; + return listByDatabaseWithResponseAsync(resourceGroupName, serverName, databaseName, expand) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a database advisor. + * Gets a list of database advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param advisorName The name of the Database Advisor. + * @param expand The child resources to include in the response. * @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 database advisor along with {@link Response}. + * @return a list of database advisors along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - String advisorName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, context).block(); + public Response> listByDatabaseWithResponse(String resourceGroupName, String serverName, + String databaseName, String expand, Context context) { + return listByDatabaseWithResponseAsync(resourceGroupName, serverName, databaseName, expand, context).block(); } /** - * Gets a database advisor. + * Gets a list of database advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param advisorName The name of the Database Advisor. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database advisor. + * @return a list of database advisors. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AdvisorInner get(String resourceGroupName, String serverName, String databaseName, String advisorName) { - return getWithResponse(resourceGroupName, serverName, databaseName, advisorName, Context.NONE).getValue(); + public List listByDatabase(String resourceGroupName, String serverName, String databaseName) { + final String expand = null; + return listByDatabaseWithResponse(resourceGroupName, serverName, databaseName, expand, Context.NONE).getValue(); } /** - * Updates a database advisor. + * Gets a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of - * {@link Mono}. + * @return a database advisor along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String advisorName, AdvisorInner parameters) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName) { 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.")); @@ -269,46 +265,38 @@ public Mono> updateWithResponseAsync(String resourceGroup if (advisorName == null) { return Mono.error(new IllegalArgumentException("Parameter advisorName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, advisorName, contentType, - accept, parameters, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + advisorName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a database advisor. + * Gets a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of - * {@link Mono}. + * @return a database advisor along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String advisorName, AdvisorInner parameters, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, 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.")); @@ -322,102 +310,96 @@ private Mono> updateWithResponseAsync(String resourceGrou if (advisorName == null) { return Mono.error(new IllegalArgumentException("Parameter advisorName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, advisorName, contentType, accept, parameters, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, advisorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Updates a database advisor. + * Gets a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor on successful completion of {@link Mono}. + * @return a database advisor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, - String advisorName, AdvisorInner parameters) { - return updateWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, parameters) + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String advisorName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Updates a database advisor. + * Gets a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor along with {@link Response}. + * @return a database advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String serverName, String databaseName, - String advisorName, AdvisorInner parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, parameters, context) - .block(); + public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String advisorName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, context).block(); } /** - * Updates a database advisor. + * Gets a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor. + * @return a database advisor. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AdvisorInner update(String resourceGroupName, String serverName, String databaseName, String advisorName, - AdvisorInner parameters) { - return updateWithResponse(resourceGroupName, serverName, databaseName, advisorName, parameters, Context.NONE) - .getValue(); + public AdvisorInner get(String resourceGroupName, String serverName, String databaseName, String advisorName) { + return getWithResponse(resourceGroupName, serverName, databaseName, advisorName, Context.NONE).getValue(); } /** - * Gets a list of database advisors. + * Updates a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param expand The child resources to include in the response. + * @param advisorName The name of the Database Advisor. + * @param parameters The requested advisor resource 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 list of database advisors along with {@link Response} on successful completion of {@link Mono}. + * @return database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> listByDatabaseWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, String expand) { + public Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, AdvisorInner 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.")); @@ -428,37 +410,49 @@ public Mono>> listByDatabaseWithResponseAsync(String if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (advisorName == null) { + return Mono.error(new IllegalArgumentException("Parameter advisorName 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.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, expand, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, advisorName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of database advisors. + * Updates a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param expand The child resources to include in the response. + * @param advisorName The name of the Database Advisor. + * @param parameters The requested advisor resource 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 list of database advisors along with {@link Response} on successful completion of {@link Mono}. + * @return database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listByDatabaseWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, String expand, Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, AdvisorInner 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.")); @@ -469,64 +463,85 @@ private Mono>> listByDatabaseWithResponseAsync(Strin if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (advisorName == null) { + return Mono.error(new IllegalArgumentException("Parameter advisorName 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"; context = this.client.mergeContext(context); - return service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, expand, accept, context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, advisorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Gets a list of database advisors. + * Updates a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param advisorName The name of the Database Advisor. + * @param parameters The requested advisor resource 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 list of database advisors on successful completion of {@link Mono}. + * @return database, Server or Elastic Pool Advisor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName) { - final String expand = null; - return listByDatabaseWithResponseAsync(resourceGroupName, serverName, databaseName, expand) + public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String advisorName, AdvisorInner parameters) { + return updateWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of database advisors. + * Updates a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param expand The child resources to include in the response. + * @param advisorName The name of the Database Advisor. + * @param parameters The requested advisor resource 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 list of database advisors along with {@link Response}. + * @return database, Server or Elastic Pool Advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listByDatabaseWithResponse(String resourceGroupName, String serverName, - String databaseName, String expand, Context context) { - return listByDatabaseWithResponseAsync(resourceGroupName, serverName, databaseName, expand, context).block(); + public Response updateWithResponse(String resourceGroupName, String serverName, String databaseName, + String advisorName, AdvisorInner parameters, Context context) { + return updateWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, parameters, context) + .block(); } /** - * Gets a list of database advisors. + * Updates a database advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param advisorName The name of the Database Advisor. + * @param parameters The requested advisor resource 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 list of database advisors. + * @return database, Server or Elastic Pool Advisor. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List listByDatabase(String resourceGroupName, String serverName, String databaseName) { - final String expand = null; - return listByDatabaseWithResponse(resourceGroupName, serverName, databaseName, expand, Context.NONE).getValue(); + public AdvisorInner update(String resourceGroupName, String serverName, String databaseName, String advisorName, + AdvisorInner parameters) { + return updateWithResponse(resourceGroupName, serverName, databaseName, advisorName, parameters, Context.NONE) + .getValue(); } } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAutomaticTuningsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAutomaticTuningsClientImpl.java index 472d930e7291..9c6d8d777163 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAutomaticTuningsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAutomaticTuningsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -56,33 +56,35 @@ public final class DatabaseAutomaticTuningsClientImpl implements DatabaseAutomat * The interface defining all the services for SqlManagementClientDatabaseAutomaticTunings to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseAutomaticTunings") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseAutomaticTuningsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") DatabaseAutomaticTuningInner parameters, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DatabaseAutomaticTuningInner parameters, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a database's automatic tuning. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -97,10 +99,6 @@ public Mono> getWithResponseAsync(String 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.")); @@ -111,17 +109,22 @@ public Mono> getWithResponseAsync(String if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's automatic tuning. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -137,10 +140,6 @@ private Mono> getWithResponseAsync(String 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.")); @@ -151,16 +150,21 @@ private Mono> getWithResponseAsync(String if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a database's automatic tuning. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -178,7 +182,8 @@ public Mono getAsync(String resourceGroupName, Str /** * Gets a database's automatic tuning. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -196,7 +201,8 @@ public Response getWithResponse(String resourceGro /** * Gets a database's automatic tuning. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -212,7 +218,8 @@ public DatabaseAutomaticTuningInner get(String resourceGroupName, String serverN /** * Update automatic tuning properties for target database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. @@ -228,10 +235,6 @@ public Mono> updateWithResponseAsync(Stri 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.")); @@ -242,24 +245,28 @@ public Mono> updateWithResponseAsync(Stri if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, contentType, accept, - parameters, context)) + .withContext( + context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update automatic tuning properties for target database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. @@ -276,10 +283,6 @@ private Mono> updateWithResponseAsync(Str 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.")); @@ -290,22 +293,26 @@ private Mono> updateWithResponseAsync(Str if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, contentType, accept, parameters, context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Update automatic tuning properties for target database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. @@ -324,7 +331,8 @@ public Mono updateAsync(String resourceGroupName, /** * Update automatic tuning properties for target database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. @@ -343,7 +351,8 @@ public Response updateWithResponse(String resource /** * Update automatic tuning properties for target database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested automatic tuning resource state. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseBlobAuditingPoliciesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseBlobAuditingPoliciesClientImpl.java index 52c93ecf72f1..f9a02994e978 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseBlobAuditingPoliciesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseBlobAuditingPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -29,8 +29,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.DatabaseBlobAuditingPoliciesClient; import com.azure.resourcemanager.sql.fluent.models.DatabaseBlobAuditingPolicyInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseBlobAuditingPolicyListResult; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyName; +import com.azure.resourcemanager.sql.models.DatabaseBlobAuditingPolicyListResult; import reactor.core.publisher.Mono; /** @@ -62,72 +61,70 @@ public final class DatabaseBlobAuditingPoliciesClientImpl implements DatabaseBlo * The interface defining all the services for SqlManagementClientDatabaseBlobAuditingPolicies to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseBlobAuditingPolicies") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseBlobAuditingPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, - @PathParam("blobAuditingPolicyName") BlobAuditingPolicyName blobAuditingPolicyName, + @PathParam("blobAuditingPolicyName") String blobAuditingPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, - @PathParam("blobAuditingPolicyName") BlobAuditingPolicyName blobAuditingPolicyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") DatabaseBlobAuditingPolicyInner parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("blobAuditingPolicyName") String blobAuditingPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DatabaseBlobAuditingPolicyInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a database's blob auditing policy. + * Lists auditing settings of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's blob auditing policy along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, BlobAuditingPolicyName blobAuditingPolicyName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName) { 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.")); @@ -138,42 +135,40 @@ public Mono> getWithResponseAsync(Stri if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (blobAuditingPolicyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter blobAuditingPolicyName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, blobAuditingPolicyName, - accept, context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), 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())); } /** - * Gets a database's blob auditing policy. + * Lists auditing settings of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @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 database's blob auditing policy along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, 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.")); @@ -184,99 +179,115 @@ private Mono> getWithResponseAsync(Str if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (blobAuditingPolicyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter blobAuditingPolicyName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, blobAuditingPolicyName, accept, context); + return service + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a database's blob auditing policy. + * Lists auditing settings of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's blob auditing policy on successful completion of {@link Mono}. + * @return a list of database auditing settings as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - String databaseName, BlobAuditingPolicyName blobAuditingPolicyName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, blobAuditingPolicyName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** - * Gets a database's blob auditing policy. + * Lists auditing settings of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @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 database's blob auditing policy along with {@link Response}. + * @return a list of database auditing settings as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, blobAuditingPolicyName, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Gets a database's blob auditing policy. + * Lists auditing settings of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's blob auditing policy. + * @return a list of database auditing settings as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseBlobAuditingPolicyInner get(String resourceGroupName, String serverName, String databaseName, - BlobAuditingPolicyName blobAuditingPolicyName) { - return getWithResponse(resourceGroupName, serverName, databaseName, blobAuditingPolicyName, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** - * Creates or updates a database's blob auditing policy. + * Lists auditing settings of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. - * @param parameters The database blob auditing policy. + * @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 database blob auditing policy along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database auditing settings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + } + + /** + * Gets a database's blob auditing policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a database's blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, - DatabaseBlobAuditingPolicyInner parameters) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName) { 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.")); @@ -287,50 +298,38 @@ public Mono> createOrUpdateWithRespons if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (blobAuditingPolicyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter blobAuditingPolicyName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; + final String blobAuditingPolicyName = "default"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, blobAuditingPolicyName, - contentType, accept, parameters, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates a database's blob auditing policy. + * Gets a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. - * @param parameters The database blob auditing policy. * @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 database blob auditing policy along with {@link Response} on successful completion of {@link Mono}. + * @return a database's blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, - DatabaseBlobAuditingPolicyInner parameters, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, 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.")); @@ -341,110 +340,92 @@ private Mono> createOrUpdateWithRespon if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (blobAuditingPolicyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter blobAuditingPolicyName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; + final String blobAuditingPolicyName = "default"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, blobAuditingPolicyName, - contentType, accept, parameters, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Creates or updates a database's blob auditing policy. + * Gets a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. - * @param parameters The database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database blob auditing policy on successful completion of {@link Mono}. + * @return a database's blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String serverName, - String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, - DatabaseBlobAuditingPolicyInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, blobAuditingPolicyName, - parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates or updates a database's blob auditing policy. + * Gets a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. - * @param parameters The database blob auditing policy. * @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 database blob auditing policy along with {@link Response}. + * @return a database's blob auditing policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String serverName, String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, - DatabaseBlobAuditingPolicyInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, blobAuditingPolicyName, - parameters, context).block(); + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, context).block(); } /** - * Creates or updates a database's blob auditing policy. + * Gets a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. - * @param parameters The database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database blob auditing policy. + * @return a database's blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, - String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, - DatabaseBlobAuditingPolicyInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, blobAuditingPolicyName, - parameters, Context.NONE).getValue(); + public DatabaseBlobAuditingPolicyInner get(String resourceGroupName, String serverName, String databaseName) { + return getWithResponse(resourceGroupName, serverName, databaseName, Context.NONE).getValue(); } /** - * Lists auditing settings of a database. + * Creates or updates a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseBlobAuditingPolicy list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a database blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseBlobAuditingPolicyInner 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.")); @@ -455,39 +436,45 @@ private Mono> listByDatabaseSingl if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 blobAuditingPolicyName = "default"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists auditing settings of a database. + * Creates or updates a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The database blob auditing policy. * @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 DatabaseBlobAuditingPolicy list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a database blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseBlobAuditingPolicyInner 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.")); @@ -498,88 +485,82 @@ private Mono> listByDatabaseSingl if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 blobAuditingPolicyName = "default"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** - * Lists auditing settings of a database. + * Creates or updates a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseBlobAuditingPolicy list operation as paginated response with {@link PagedFlux}. + * @return a database blob auditing policy on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseBlobAuditingPolicyInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists auditing settings of a database. + * Creates or updates a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The database blob auditing policy. * @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 DatabaseBlobAuditingPolicy list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists auditing settings of a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseBlobAuditingPolicy list operation as paginated response with - * {@link PagedIterable}. + * @return a database blob auditing policy along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, + String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context) + .block(); } /** - * Lists auditing settings of a database. + * Creates or updates a database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param context The context to associate with this operation. + * @param parameters The database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseBlobAuditingPolicy list operation as paginated response with - * {@link PagedIterable}. + * @return a database blob auditing policy. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, DatabaseBlobAuditingPolicyInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, parameters, Context.NONE) + .getValue(); } /** @@ -589,8 +570,8 @@ public PagedIterable listByDatabase(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 the response of a DatabaseBlobAuditingPolicy list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of database auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -617,8 +598,8 @@ private Mono> listByDatabaseNextS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseBlobAuditingPolicy list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of database auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseColumnsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseColumnsClientImpl.java index cab4bb165269..d2cd62f7204a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseColumnsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseColumnsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.DatabaseColumnsClient; import com.azure.resourcemanager.sql.fluent.models.DatabaseColumnInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseColumnListResult; +import com.azure.resourcemanager.sql.models.DatabaseColumnListResult; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -63,87 +63,87 @@ public final class DatabaseColumnsClientImpl implements DatabaseColumnsClient { * The interface defining all the services for SqlManagementClientDatabaseColumns to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseColumns") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseColumnsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/columns") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, + @QueryParam(value = "schema", multipleQueryParams = true) List schema, + @QueryParam(value = "table", multipleQueryParams = true) List table, + @QueryParam(value = "column", multipleQueryParams = true) List column, + @QueryParam(value = "orderBy", multipleQueryParams = true) List orderBy, + @QueryParam("$skiptoken") String skiptoken, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByTable(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByTable(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, @PathParam("tableName") String tableName, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/columns") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @QueryParam(value = "schema", multipleQueryParams = true) List schema, - @QueryParam(value = "table", multipleQueryParams = true) List table, - @QueryParam(value = "column", multipleQueryParams = true) List column, - @QueryParam(value = "orderBy", multipleQueryParams = true) List orderBy, - @QueryParam("$skiptoken") String skiptoken, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByTableNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByDatabaseNext( + @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> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByTableNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Get database column. + * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. + * @param skiptoken An opaque token that identifies a starting point in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database column along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, List schema, List table, List column, + List orderBy, String skiptoken) { 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.")); @@ -154,49 +154,58 @@ public Mono> getWithResponseAsync(String resourceG if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (schemaName == null) { - return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); - } - if (tableName == null) { - return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); - } - if (columnName == null) { - return Mono.error(new IllegalArgumentException("Parameter columnName 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"; + List schemaConverted = (schema == null) + ? new ArrayList<>() + : schema.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List tableConverted = (table == null) + ? new ArrayList<>() + : table.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List columnConverted = (column == null) + ? new ArrayList<>() + : column.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, schemaName, tableName, - columnName, accept, context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, schemaConverted, tableConverted, columnConverted, orderByConverted, skiptoken, + this.client.getSubscriptionId(), 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())); } /** - * Get database column. + * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. + * @param skiptoken An opaque token that identifies a starting point in the collection. * @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 database column along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, List schema, List table, List column, + List orderBy, String skiptoken, 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.")); @@ -207,89 +216,163 @@ private Mono> getWithResponseAsync(String resource if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (schemaName == null) { - return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); - } - if (tableName == null) { - return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); - } - if (columnName == null) { - return Mono.error(new IllegalArgumentException("Parameter columnName 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"; + List schemaConverted = (schema == null) + ? new ArrayList<>() + : schema.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List tableConverted = (table == null) + ? new ArrayList<>() + : table.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List columnConverted = (column == null) + ? new ArrayList<>() + : column.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, accept, context); + return service + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, schemaConverted, + tableConverted, columnConverted, orderByConverted, skiptoken, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Get database column. + * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. + * @param skiptoken An opaque token that identifies a starting point in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database column on successful completion of {@link Mono}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, List schema, List table, List column, List orderBy, + String skiptoken) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, schema, + table, column, orderBy, skiptoken), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** - * Get database column. + * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 database columns as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + final List schema = null; + final List table = null; + final List column = null; + final List orderBy = null; + final String skiptoken = null; + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, schema, + table, column, orderBy, skiptoken), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * List database columns. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. + * @param skiptoken An opaque token that identifies a starting point in the collection. * @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 database column along with {@link Response}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, - context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, List schema, List table, List column, List orderBy, + String skiptoken, Context context) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, schema, + table, column, orderBy, skiptoken, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Get database column. + * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database column. + * @return a list of database columns as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseColumnInner get(String resourceGroupName, String serverName, String databaseName, String schemaName, - String tableName, String columnName) { - return getWithResponse(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, - Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { + final List schema = null; + final List table = null; + final List column = null; + final List orderBy = null; + final String skiptoken = null; + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, schema, table, + column, orderBy, skiptoken)); + } + + /** + * List database columns. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. + * @param skiptoken An opaque token that identifies a starting point in the collection. + * @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 database columns as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, List schema, List table, List column, List orderBy, + String skiptoken, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, schema, table, + column, orderBy, skiptoken, context)); } /** * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -298,8 +381,7 @@ public DatabaseColumnInner get(String resourceGroupName, String serverName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByTableSinglePageAsync(String resourceGroupName, @@ -308,10 +390,6 @@ private Mono> listByTableSinglePageAsync(Stri 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.")); @@ -328,11 +406,15 @@ private Mono> listByTableSinglePageAsync(Stri if (tableName == null) { return Mono.error(new IllegalArgumentException("Parameter tableName 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"; return FluxUtil - .withContext(context -> service.listByTable(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, schemaName, tableName, - filter, accept, context)) + .withContext(context -> service.listByTable(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, schemaName, tableName, filter, this.client.getSubscriptionId(), + 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())); @@ -341,7 +423,8 @@ private Mono> listByTableSinglePageAsync(Stri /** * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -351,8 +434,7 @@ private Mono> listByTableSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByTableSinglePageAsync(String resourceGroupName, @@ -361,10 +443,6 @@ private Mono> listByTableSinglePageAsync(Stri 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.")); @@ -381,11 +459,15 @@ private Mono> listByTableSinglePageAsync(Stri if (tableName == null) { return Mono.error(new IllegalArgumentException("Parameter tableName 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 - .listByTable(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, schemaName, tableName, filter, accept, context) + .listByTable(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, schemaName, tableName, + filter, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -393,7 +475,8 @@ private Mono> listByTableSinglePageAsync(Stri /** * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -402,7 +485,7 @@ private Mono> listByTableSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation as paginated response with {@link PagedFlux}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByTableAsync(String resourceGroupName, String serverName, @@ -414,7 +497,8 @@ public PagedFlux listByTableAsync(String resourceGroupName, /** * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -422,7 +506,7 @@ public PagedFlux listByTableAsync(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 the response of a DatabaseColumn list operation as paginated response with {@link PagedFlux}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByTableAsync(String resourceGroupName, String serverName, @@ -435,7 +519,8 @@ public PagedFlux listByTableAsync(String resourceGroupName, /** * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -445,7 +530,7 @@ public PagedFlux listByTableAsync(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 the response of a DatabaseColumn list operation as paginated response with {@link PagedFlux}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByTableAsync(String resourceGroupName, String serverName, @@ -457,7 +542,8 @@ private PagedFlux listByTableAsync(String resourceGroupName /** * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -465,7 +551,7 @@ private PagedFlux listByTableAsync(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 the response of a DatabaseColumn list operation as paginated response with {@link PagedIterable}. + * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByTable(String resourceGroupName, String serverName, @@ -478,7 +564,8 @@ public PagedIterable listByTable(String resourceGroupName, /** * List database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -488,7 +575,7 @@ public PagedIterable listByTable(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 the response of a DatabaseColumn list operation as paginated response with {@link PagedIterable}. + * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByTable(String resourceGroupName, String serverName, @@ -498,34 +585,27 @@ public PagedIterable listByTable(String resourceGroupName, } /** - * List database columns. + * Get database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schema The schema parameter. - * @param table The table parameter. - * @param column The column parameter. - * @param orderBy The orderBy parameter. - * @param skiptoken An opaque token that identifies a starting point in the collection. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return database column along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, List schema, List table, List column, - List orderBy, String skiptoken) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName) { 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.")); @@ -536,58 +616,50 @@ private Mono> listByDatabaseSinglePageAsync(S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (schemaName == null) { + return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); + } + if (tableName == null) { + return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); + } + if (columnName == null) { + return Mono.error(new IllegalArgumentException("Parameter columnName 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"; - List schemaConverted = (schema == null) - ? new ArrayList<>() - : schema.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List tableConverted = (table == null) - ? new ArrayList<>() - : table.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List columnConverted = (column == null) - ? new ArrayList<>() - : column.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List orderByConverted = (orderBy == null) - ? new ArrayList<>() - : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, schemaConverted, - tableConverted, columnConverted, orderByConverted, skiptoken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + schemaName, tableName, columnName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List database columns. + * Get database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schema The schema parameter. - * @param table The table parameter. - * @param column The column parameter. - * @param orderBy The orderBy parameter. - * @param skiptoken An opaque token that identifies a starting point in the collection. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @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 DatabaseColumn list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return database column along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, List schema, List table, List column, - List orderBy, String skiptoken, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, 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.")); @@ -598,147 +670,90 @@ private Mono> listByDatabaseSinglePageAsync(S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (schemaName == null) { + return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); + } + if (tableName == null) { + return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); + } + if (columnName == null) { + return Mono.error(new IllegalArgumentException("Parameter columnName 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"; - List schemaConverted = (schema == null) - ? new ArrayList<>() - : schema.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List tableConverted = (table == null) - ? new ArrayList<>() - : table.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List columnConverted = (column == null) - ? new ArrayList<>() - : column.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List orderByConverted = (orderBy == null) - ? new ArrayList<>() - : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, schemaConverted, tableConverted, columnConverted, - orderByConverted, skiptoken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List database columns. - * - * @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 schema The schema parameter. - * @param table The table parameter. - * @param column The column parameter. - * @param orderBy The orderBy parameter. - * @param skiptoken An opaque token that identifies a starting point in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseColumn list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, List schema, List table, List column, List orderBy, - String skiptoken) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, schema, - table, column, orderBy, skiptoken), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, schemaName, + tableName, columnName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * List database columns. + * Get database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation as paginated response with {@link PagedFlux}. + * @return database column on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName) { - final List schema = null; - final List table = null; - final List column = null; - final List orderBy = null; - final String skiptoken = null; - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, schema, - table, column, orderBy, skiptoken), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName, String columnName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List database columns. + * Get database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schema The schema parameter. - * @param table The table parameter. - * @param column The column parameter. - * @param orderBy The orderBy parameter. - * @param skiptoken An opaque token that identifies a starting point in the collection. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @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 DatabaseColumn list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, List schema, List table, List column, List orderBy, - String skiptoken, Context context) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, schema, - table, column, orderBy, skiptoken, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * List database columns. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseColumn list operation as paginated response with {@link PagedIterable}. + * @return database column along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName) { - final List schema = null; - final List table = null; - final List column = null; - final List orderBy = null; - final String skiptoken = null; - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, schema, table, - column, orderBy, skiptoken)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, String columnName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, + context).block(); } /** - * List database columns. + * Get database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schema The schema parameter. - * @param table The table parameter. - * @param column The column parameter. - * @param orderBy The orderBy parameter. - * @param skiptoken An opaque token that identifies a starting point in the collection. - * @param context The context to associate with this operation. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation as paginated response with {@link PagedIterable}. + * @return database column. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, List schema, List table, List column, List orderBy, - String skiptoken, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, schema, table, - column, orderBy, skiptoken, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseColumnInner get(String resourceGroupName, String serverName, String databaseName, String schemaName, + String tableName, String columnName) { + return getWithResponse(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, + Context.NONE).getValue(); } /** @@ -748,11 +763,10 @@ public PagedIterable listByDatabase(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 the response of a DatabaseColumn list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByTableNextSinglePageAsync(String nextLink) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -762,7 +776,7 @@ private Mono> listByTableNextSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByTableNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByDatabaseNext(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())); @@ -776,11 +790,11 @@ private Mono> listByTableNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByTableNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -790,7 +804,7 @@ private Mono> listByTableNextSinglePageAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByTableNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -802,11 +816,10 @@ private Mono> listByTableNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { + private Mono> listByTableNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -816,7 +829,7 @@ private Mono> listByDatabaseNextSinglePageAsy } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByTableNext(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())); @@ -830,12 +843,10 @@ private Mono> listByDatabaseNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync(String nextLink, - Context context) { + private Mono> listByTableNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -845,7 +856,7 @@ private Mono> listByDatabaseNextSinglePageAsy } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByTableNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseEncryptionProtectorsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseEncryptionProtectorsClientImpl.java deleted file mode 100644 index a7a12675f0a5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseEncryptionProtectorsClientImpl.java +++ /dev/null @@ -1,574 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation; - -import com.azure.core.annotation.ExpectedResponses; -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.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.fluent.DatabaseEncryptionProtectorsClient; -import com.azure.resourcemanager.sql.models.EncryptionProtectorName; -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 DatabaseEncryptionProtectorsClient. - */ -public final class DatabaseEncryptionProtectorsClientImpl implements DatabaseEncryptionProtectorsClient { - /** - * The proxy service used to perform REST calls. - */ - private final DatabaseEncryptionProtectorsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of DatabaseEncryptionProtectorsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DatabaseEncryptionProtectorsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(DatabaseEncryptionProtectorsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientDatabaseEncryptionProtectors to be used by the - * proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseEncryptionProtectors") - public interface DatabaseEncryptionProtectorsService { - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/encryptionProtector/{encryptionProtectorName}/revalidate") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> revalidate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/encryptionProtector/{encryptionProtectorName}/revert") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> revert(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, Context context); - } - - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> revalidateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, EncryptionProtectorName encryptionProtectorName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (encryptionProtectorName == null) { - return Mono.error( - new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.revalidate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, encryptionProtectorName, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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 Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> revalidateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, EncryptionProtectorName encryptionProtectorName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (encryptionProtectorName == null) { - return Mono.error( - new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.revalidate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, encryptionProtectorName, - context); - } - - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginRevalidateAsync(String resourceGroupName, String serverName, - String databaseName, EncryptionProtectorName encryptionProtectorName) { - Mono>> mono - = revalidateWithResponseAsync(resourceGroupName, serverName, databaseName, encryptionProtectorName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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> beginRevalidateAsync(String resourceGroupName, String serverName, - String databaseName, EncryptionProtectorName encryptionProtectorName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = revalidateWithResponseAsync(resourceGroupName, serverName, databaseName, - encryptionProtectorName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRevalidate(String resourceGroupName, String serverName, - String databaseName, EncryptionProtectorName encryptionProtectorName) { - return this.beginRevalidateAsync(resourceGroupName, serverName, databaseName, encryptionProtectorName) - .getSyncPoller(); - } - - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRevalidate(String resourceGroupName, String serverName, - String databaseName, EncryptionProtectorName encryptionProtectorName, Context context) { - return this.beginRevalidateAsync(resourceGroupName, serverName, databaseName, encryptionProtectorName, context) - .getSyncPoller(); - } - - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono revalidateAsync(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName) { - return beginRevalidateAsync(resourceGroupName, serverName, databaseName, encryptionProtectorName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono revalidateAsync(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName, Context context) { - return beginRevalidateAsync(resourceGroupName, serverName, databaseName, encryptionProtectorName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void revalidate(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName) { - revalidateAsync(resourceGroupName, serverName, databaseName, encryptionProtectorName).block(); - } - - /** - * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void revalidate(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName, Context context) { - revalidateAsync(resourceGroupName, serverName, databaseName, encryptionProtectorName, context).block(); - } - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> revertWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, EncryptionProtectorName encryptionProtectorName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (encryptionProtectorName == null) { - return Mono.error( - new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.revert(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, encryptionProtectorName, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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 Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> revertWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, EncryptionProtectorName encryptionProtectorName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (encryptionProtectorName == null) { - return Mono.error( - new IllegalArgumentException("Parameter encryptionProtectorName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.revert(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, encryptionProtectorName, context); - } - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginRevertAsync(String resourceGroupName, String serverName, - String databaseName, EncryptionProtectorName encryptionProtectorName) { - Mono>> mono - = revertWithResponseAsync(resourceGroupName, serverName, databaseName, encryptionProtectorName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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> beginRevertAsync(String resourceGroupName, String serverName, - String databaseName, EncryptionProtectorName encryptionProtectorName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = revertWithResponseAsync(resourceGroupName, serverName, databaseName, encryptionProtectorName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRevert(String resourceGroupName, String serverName, - String databaseName, EncryptionProtectorName encryptionProtectorName) { - return this.beginRevertAsync(resourceGroupName, serverName, databaseName, encryptionProtectorName) - .getSyncPoller(); - } - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRevert(String resourceGroupName, String serverName, - String databaseName, EncryptionProtectorName encryptionProtectorName, Context context) { - return this.beginRevertAsync(resourceGroupName, serverName, databaseName, encryptionProtectorName, context) - .getSyncPoller(); - } - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono revertAsync(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName) { - return beginRevertAsync(resourceGroupName, serverName, databaseName, encryptionProtectorName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono revertAsync(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName, Context context) { - return beginRevertAsync(resourceGroupName, serverName, databaseName, encryptionProtectorName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void revert(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName) { - revertAsync(resourceGroupName, serverName, databaseName, encryptionProtectorName).block(); - } - - /** - * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void revert(String resourceGroupName, String serverName, String databaseName, - EncryptionProtectorName encryptionProtectorName, Context context) { - revertAsync(resourceGroupName, serverName, databaseName, encryptionProtectorName, context).block(); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseExtensionsOperationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseExtensionsOperationsClientImpl.java index e5ef8b1c7a98..f17fe7e59f20 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseExtensionsOperationsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseExtensionsOperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -32,8 +32,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.DatabaseExtensionsOperationsClient; import com.azure.resourcemanager.sql.fluent.models.ImportExportExtensionsOperationResultInner; -import com.azure.resourcemanager.sql.implementation.models.ImportExportExtensionsOperationListResult; import com.azure.resourcemanager.sql.models.DatabaseExtensions; +import com.azure.resourcemanager.sql.models.ImportExportExtensionsOperationListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,51 +67,218 @@ public final class DatabaseExtensionsOperationsClientImpl implements DatabaseExt * The interface defining all the services for SqlManagementClientDatabaseExtensionsOperations to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseExtensionsOperations") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseExtensionsOperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("extensionName") String extensionName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("extensionName") String extensionName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") DatabaseExtensions parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DatabaseExtensions parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * List database extension. This will return an empty list as it is not supported. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 import export operation extensions list along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; + return FluxUtil + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), 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())); + } + + /** + * List database extension. This will return an empty list as it is not supported. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 import export operation extensions list along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String serverName, String databaseName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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 + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List database extension. This will return an empty list as it is not supported. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 import export operation extensions list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * List database extension. This will return an empty list as it is not supported. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 import export operation extensions list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + } + + /** + * List database extension. This will return an empty list as it is not supported. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 import export operation extensions list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); + } + + /** + * List database extension. This will return an empty list as it is not supported. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 import export operation extensions list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + } + /** * Gets a database extension. This will return resource not found as it is not supported. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -127,10 +294,6 @@ public Mono> getWithResponseAsync(String resourceGroupName, Strin 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.")); @@ -144,16 +307,21 @@ public Mono> getWithResponseAsync(String resourceGroupName, Strin if (extensionName == null) { return Mono.error(new IllegalArgumentException("Parameter extensionName 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.")); + } return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, extensionName, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + extensionName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database extension. This will return resource not found as it is not supported. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -170,10 +338,6 @@ private Mono> getWithResponseAsync(String resourceGroupName, Stri 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.")); @@ -187,15 +351,20 @@ private Mono> getWithResponseAsync(String resourceGroupName, Stri if (extensionName == null) { return Mono.error(new IllegalArgumentException("Parameter extensionName 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.")); + } context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, extensionName, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, extensionName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Gets a database extension. This will return resource not found as it is not supported. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -213,7 +382,8 @@ public Mono getAsync(String resourceGroupName, String serverName, String d /** * Gets a database extension. This will return resource not found as it is not supported. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -232,7 +402,8 @@ public Response getWithResponse(String resourceGroupName, String serverNam /** * Gets a database extension. This will return resource not found as it is not supported. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -248,7 +419,8 @@ public void get(String resourceGroupName, String serverName, String databaseName /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -266,10 +438,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -283,24 +451,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (extensionName == null) { return Mono.error(new IllegalArgumentException("Parameter extensionName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, extensionName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, extensionName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -319,10 +491,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -336,23 +504,26 @@ private Mono>> createOrUpdateWithResponseAsync(String if (extensionName == null) { return Mono.error(new IllegalArgumentException("Parameter extensionName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, extensionName, contentType, - accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + extensionName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -378,7 +549,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -406,7 +578,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -428,7 +601,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -452,7 +626,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -472,7 +647,8 @@ public Mono createOrUpdateAsync(Stri /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -494,7 +670,8 @@ private Mono createOrUpdateAsync(Str /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -513,7 +690,8 @@ public ImportExportExtensionsOperationResultInner createOrUpdate(String resource /** * Perform a database extension operation, like database import, database export, or polybase import. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param extensionName The extensionName parameter. @@ -531,165 +709,6 @@ public ImportExportExtensionsOperationResultInner createOrUpdate(String resource .block(); } - /** - * List database extension. This will return an empty list as it is not supported. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return import export operation extensions list along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, 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 database extension. This will return an empty list as it is not supported. - * - * @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 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 import export operation extensions list along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List database extension. This will return an empty list as it is not supported. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return import export operation extensions list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, - String serverName, String databaseName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * List database extension. This will return an empty list as it is not supported. - * - * @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 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 import export operation extensions list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, - String serverName, String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * List database extension. This will return an empty list as it is not supported. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return import export operation extensions list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String serverName, String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); - } - - /** - * List database extension. This will return an empty list as it is not supported. - * - * @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 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 import export operation extensions list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String serverName, String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); - } - /** * Get the next page of items. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseOperationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseOperationsClientImpl.java index e5f4813f7e29..ffee2cabfae9 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseOperationsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseOperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -28,7 +28,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.DatabaseOperationsClient; import com.azure.resourcemanager.sql.fluent.models.DatabaseOperationInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseOperationListResult; +import com.azure.resourcemanager.sql.models.DatabaseOperationListResult; import java.util.UUID; import reactor.core.publisher.Mono; @@ -61,26 +61,26 @@ public final class DatabaseOperationsClientImpl implements DatabaseOperationsCli * The interface defining all the services for SqlManagementClientDatabaseOperations to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseOperations") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseOperationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> cancel(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> cancel(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("operationId") UUID operationId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @@ -88,14 +88,15 @@ Mono> cancel(@HostParam("endpoint") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of operations performed on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -111,10 +112,6 @@ private Mono> listByDatabaseSinglePageAsyn 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.")); @@ -125,10 +122,14 @@ private Mono> listByDatabaseSinglePageAsyn if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, accept, context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), 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())); @@ -137,7 +138,8 @@ private Mono> listByDatabaseSinglePageAsyn /** * Gets a list of operations performed on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -154,10 +156,6 @@ private Mono> listByDatabaseSinglePageAsyn 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.")); @@ -168,11 +166,15 @@ private Mono> listByDatabaseSinglePageAsyn if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -180,7 +182,8 @@ private Mono> listByDatabaseSinglePageAsyn /** * Gets a list of operations performed on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -198,7 +201,8 @@ public PagedFlux listByDatabaseAsync(String resourceGrou /** * Gets a list of operations performed on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -218,7 +222,8 @@ private PagedFlux listByDatabaseAsync(String resourceGro /** * Gets a list of operations performed on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -235,7 +240,8 @@ public PagedIterable listByDatabase(String resourceGroup /** * Gets a list of operations performed on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -253,7 +259,8 @@ public PagedIterable listByDatabase(String resourceGroup /** * Cancels the asynchronous operation on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. @@ -269,10 +276,6 @@ public Mono> cancelWithResponseAsync(String resourceGroupName, St 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.")); @@ -286,16 +289,21 @@ public Mono> cancelWithResponseAsync(String resourceGroupName, St if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId 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.")); + } return FluxUtil - .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, operationId, context)) + .withContext(context -> service.cancel(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, operationId, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Cancels the asynchronous operation on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. @@ -312,10 +320,6 @@ private Mono> cancelWithResponseAsync(String resourceGroupName, S 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.")); @@ -329,15 +333,20 @@ private Mono> cancelWithResponseAsync(String resourceGroupName, S if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId 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.")); + } context = this.client.mergeContext(context); - return service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, operationId, context); + return service.cancel(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, operationId, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Cancels the asynchronous operation on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. @@ -355,7 +364,8 @@ public Mono cancelAsync(String resourceGroupName, String serverName, Strin /** * Cancels the asynchronous operation on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. @@ -374,7 +384,8 @@ public Response cancelWithResponse(String resourceGroupName, String server /** * Cancels the asynchronous operation on the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param operationId The operation identifier. @@ -394,8 +405,8 @@ public void cancel(String resourceGroupName, String serverName, String databaseN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 operations performed on the database along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response to a list database operations request along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -422,8 +433,8 @@ private Mono> listByDatabaseNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 operations performed on the database along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response to a list database operations request along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseRecommendedActionsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseRecommendedActionsClientImpl.java index f6e50d094d28..fac3c9a8e96e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseRecommendedActionsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseRecommendedActionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -57,66 +57,64 @@ public final class DatabaseRecommendedActionsClientImpl implements DatabaseRecom * The interface defining all the services for SqlManagementClientDatabaseRecommendedActions to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseRecommendedActions") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseRecommendedActionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> listByDatabaseAdvisor(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("advisorName") String advisorName, - @PathParam("recommendedActionName") String recommendedActionName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}") + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("advisorName") String advisorName, @PathParam("recommendedActionName") String recommendedActionName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") RecommendedActionInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> listByDatabaseAdvisor(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("advisorName") String advisorName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("recommendedActionName") String recommendedActionName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RecommendedActionInner parameters, @HeaderParam("Accept") String accept, + Context context); } /** - * Gets a database recommended action. + * Gets list of Database Recommended Actions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param recommendedActionName The name of Database Recommended Action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database recommended action along with {@link Response} on successful completion of {@link Mono}. + * @return list of Database Recommended Actions along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String advisorName, String recommendedActionName) { + public Mono>> listByDatabaseAdvisorWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String advisorName) { 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.")); @@ -130,43 +128,40 @@ public Mono> getWithResponseAsync(String resour if (advisorName == null) { return Mono.error(new IllegalArgumentException("Parameter advisorName is required and cannot be null.")); } - if (recommendedActionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recommendedActionName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, advisorName, - recommendedActionName, accept, context)) + .withContext(context -> service.listByDatabaseAdvisor(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, advisorName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a database recommended action. + * Gets list of Database Recommended Actions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param recommendedActionName The name of Database Recommended Action. * @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 database recommended action along with {@link Response} on successful completion of {@link Mono}. + * @return list of Database Recommended Actions along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String advisorName, String recommendedActionName, Context context) { + private Mono>> listByDatabaseAdvisorWithResponseAsync( + String resourceGroupName, String serverName, String databaseName, String advisorName, 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.")); @@ -180,103 +175,98 @@ private Mono> getWithResponseAsync(String resou if (advisorName == null) { return Mono.error(new IllegalArgumentException("Parameter advisorName is required and cannot be null.")); } - if (recommendedActionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter recommendedActionName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, accept, context); + return service.listByDatabaseAdvisor(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + advisorName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Gets a database recommended action. + * Gets list of Database Recommended Actions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param recommendedActionName The name of Database Recommended Action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database recommended action on successful completion of {@link Mono}. + * @return list of Database Recommended Actions on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String databaseName, - String advisorName, String recommendedActionName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName) + public Mono> listByDatabaseAdvisorAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName) { + return listByDatabaseAdvisorWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a database recommended action. + * Gets list of Database Recommended Actions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param recommendedActionName The name of Database Recommended Action. * @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 database recommended action along with {@link Response}. + * @return list of Database Recommended Actions along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, String advisorName, String recommendedActionName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, - context).block(); + public Response> listByDatabaseAdvisorWithResponse(String resourceGroupName, + String serverName, String databaseName, String advisorName, Context context) { + return listByDatabaseAdvisorWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, context) + .block(); } /** - * Gets a database recommended action. + * Gets list of Database Recommended Actions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. - * @param recommendedActionName The name of Database Recommended Action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database recommended action. + * @return list of Database Recommended Actions. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RecommendedActionInner get(String resourceGroupName, String serverName, String databaseName, - String advisorName, String recommendedActionName) { - return getWithResponse(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, - Context.NONE).getValue(); + public List listByDatabaseAdvisor(String resourceGroupName, String serverName, + String databaseName, String advisorName) { + return listByDatabaseAdvisorWithResponse(resourceGroupName, serverName, databaseName, advisorName, Context.NONE) + .getValue(); } /** - * Updates a database recommended action. + * Gets a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. * @param recommendedActionName The name of Database Recommended Action. - * @param parameters The requested recommended action resource 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 database, Server or Elastic Pool Recommended Action along with {@link Response} on successful completion - * of {@link Mono}. + * @return a database recommended action along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String advisorName, String recommendedActionName, RecommendedActionInner parameters) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName) { 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.")); @@ -294,48 +284,40 @@ public Mono> updateWithResponseAsync(String res return Mono .error(new IllegalArgumentException("Parameter recommendedActionName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, advisorName, - recommendedActionName, contentType, accept, parameters, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + advisorName, recommendedActionName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a database recommended action. + * Gets a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. * @param recommendedActionName The name of Database Recommended Action. - * @param parameters The requested recommended action resource 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 database, Server or Elastic Pool Recommended Action along with {@link Response} on successful completion - * of {@link Mono}. + * @return a database recommended action along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String advisorName, String recommendedActionName, RecommendedActionInner parameters, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName, 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.")); @@ -353,108 +335,103 @@ private Mono> updateWithResponseAsync(String re return Mono .error(new IllegalArgumentException("Parameter recommendedActionName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, contentType, accept, - parameters, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, advisorName, + recommendedActionName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Updates a database recommended action. + * Gets a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. * @param recommendedActionName The name of Database Recommended Action. - * @param parameters The requested recommended action resource 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 database, Server or Elastic Pool Recommended Action on successful completion of {@link Mono}. + * @return a database recommended action on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, - String advisorName, String recommendedActionName, RecommendedActionInner parameters) { - return updateWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, - parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String advisorName, String recommendedActionName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Updates a database recommended action. + * Gets a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. * @param recommendedActionName The name of Database Recommended Action. - * @param parameters The requested recommended action resource 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 database, Server or Elastic Pool Recommended Action along with {@link Response}. + * @return a database recommended action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String serverName, - String databaseName, String advisorName, String recommendedActionName, RecommendedActionInner parameters, - Context context) { - return updateWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, - parameters, context).block(); + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, + context).block(); } /** - * Updates a database recommended action. + * Gets a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. * @param recommendedActionName The name of Database Recommended Action. - * @param parameters The requested recommended action resource 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 database, Server or Elastic Pool Recommended Action. + * @return a database recommended action. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RecommendedActionInner update(String resourceGroupName, String serverName, String databaseName, - String advisorName, String recommendedActionName, RecommendedActionInner parameters) { - return updateWithResponse(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, - parameters, Context.NONE).getValue(); + public RecommendedActionInner get(String resourceGroupName, String serverName, String databaseName, + String advisorName, String recommendedActionName) { + return getWithResponse(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, + Context.NONE).getValue(); } /** - * Gets list of Database Recommended Actions. + * Updates a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. + * @param recommendedActionName The name of Database Recommended Action. + * @param parameters The requested recommended action resource 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 list of Database Recommended Actions along with {@link Response} on successful completion of - * {@link Mono}. + * @return database, Server or Elastic Pool Recommended Action along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> listByDatabaseAdvisorWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, String advisorName) { + public Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName, RecommendedActionInner 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.")); @@ -468,39 +445,52 @@ public Mono>> listByDatabaseAdvisorWithRes if (advisorName == null) { return Mono.error(new IllegalArgumentException("Parameter advisorName is required and cannot be null.")); } + if (recommendedActionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter recommendedActionName 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.listByDatabaseAdvisor(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, - databaseName, advisorName, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, advisorName, recommendedActionName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets list of Database Recommended Actions. + * Updates a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. + * @param recommendedActionName The name of Database Recommended Action. + * @param parameters The requested recommended action resource 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 list of Database Recommended Actions along with {@link Response} on successful completion of - * {@link Mono}. + * @return database, Server or Elastic Pool Recommended Action along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listByDatabaseAdvisorWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, String advisorName, Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName, RecommendedActionInner 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.")); @@ -514,67 +504,91 @@ private Mono>> listByDatabaseAdvisorWithRe if (advisorName == null) { return Mono.error(new IllegalArgumentException("Parameter advisorName is required and cannot be null.")); } + if (recommendedActionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter recommendedActionName 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"; context = this.client.mergeContext(context); - return service.listByDatabaseAdvisor(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, advisorName, accept, context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, advisorName, + recommendedActionName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** - * Gets list of Database Recommended Actions. + * Updates a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. + * @param recommendedActionName The name of Database Recommended Action. + * @param parameters The requested recommended action resource 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 list of Database Recommended Actions on successful completion of {@link Mono}. + * @return database, Server or Elastic Pool Recommended Action on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listByDatabaseAdvisorAsync(String resourceGroupName, String serverName, - String databaseName, String advisorName) { - return listByDatabaseAdvisorWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String advisorName, String recommendedActionName, RecommendedActionInner parameters) { + return updateWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, + parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets list of Database Recommended Actions. + * Updates a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. + * @param recommendedActionName The name of Database Recommended Action. + * @param parameters The requested recommended action resource 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 list of Database Recommended Actions along with {@link Response}. + * @return database, Server or Elastic Pool Recommended Action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listByDatabaseAdvisorWithResponse(String resourceGroupName, - String serverName, String databaseName, String advisorName, Context context) { - return listByDatabaseAdvisorWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, context) - .block(); + public Response updateWithResponse(String resourceGroupName, String serverName, + String databaseName, String advisorName, String recommendedActionName, RecommendedActionInner parameters, + Context context) { + return updateWithResponseAsync(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, + parameters, context).block(); } /** - * Gets list of Database Recommended Actions. + * Updates a database recommended action. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param advisorName The name of the Database Advisor. + * @param recommendedActionName The name of Database Recommended Action. + * @param parameters The requested recommended action resource 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 list of Database Recommended Actions. + * @return database, Server or Elastic Pool Recommended Action. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List listByDatabaseAdvisor(String resourceGroupName, String serverName, - String databaseName, String advisorName) { - return listByDatabaseAdvisorWithResponse(resourceGroupName, serverName, databaseName, advisorName, Context.NONE) - .getValue(); + public RecommendedActionInner update(String resourceGroupName, String serverName, String databaseName, + String advisorName, String recommendedActionName, RecommendedActionInner parameters) { + return updateWithResponse(resourceGroupName, serverName, databaseName, advisorName, recommendedActionName, + parameters, Context.NONE).getValue(); } } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSchemasClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSchemasClientImpl.java index f11a86e571fc..92e6b950a2d1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSchemasClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSchemasClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.DatabaseSchemasClient; import com.azure.resourcemanager.sql.fluent.models.DatabaseSchemaInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseSchemaListResult; +import com.azure.resourcemanager.sql.models.DatabaseSchemaListResult; import reactor.core.publisher.Mono; /** @@ -59,27 +59,27 @@ public final class DatabaseSchemasClientImpl implements DatabaseSchemasClient { * The interface defining all the services for SqlManagementClientDatabaseSchemas to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseSchemas") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseSchemasService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("databaseName") String databaseName, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @QueryParam("$filter") String filter, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -87,33 +87,30 @@ Mono> listByDatabase(@HostParam("endpoint") S @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Get database schema. + * List database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database schema along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database schemas along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String filter) { 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.")); @@ -124,39 +121,40 @@ public Mono> getWithResponseAsync(String resourceG if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (schemaName == null) { - return Mono.error(new IllegalArgumentException("Parameter schemaName 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"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, schemaName, accept, context)) + return FluxUtil + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, filter, this.client.getSubscriptionId(), 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())); } /** - * Get database schema. + * List database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. + * @param filter An OData filter expression that filters elements in the collection. * @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 database schema along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database schemas along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String filter, 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.")); @@ -167,95 +165,140 @@ private Mono> getWithResponseAsync(String resource if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (schemaName == null) { - return Mono.error(new IllegalArgumentException("Parameter schemaName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, schemaName, accept, context); + return service + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, filter, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Get database schema. + * List database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database schema on successful completion of {@link Mono}. + * @return a list of database schemas as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String databaseName, - String schemaName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, String filter) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** - * Get database schema. + * List database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 database schemas as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + final String filter = null; + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * List database schemas. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param filter An OData filter expression that filters elements in the collection. * @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 database schema along with {@link Response}. + * @return a list of database schemas as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, String schemaName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, String filter, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Get database schema. + * List database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param schemaName The name of the schema. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database schema. + * @return a list of database schemas as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseSchemaInner get(String resourceGroupName, String serverName, String databaseName, - String schemaName) { - return getWithResponse(resourceGroupName, serverName, databaseName, schemaName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { + final String filter = null; + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, filter)); } /** * List database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. + * @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 DatabaseSchema list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database schemas as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, String filter, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, filter, context)); + } + + /** + * Get database schema. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return database schema along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, String filter) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName) { 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.")); @@ -266,40 +309,41 @@ private Mono> listByDatabaseSinglePageAsync(S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (schemaName == null) { + return Mono.error(new IllegalArgumentException("Parameter schemaName 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"; return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, filter, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + schemaName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List database schemas. + * Get database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param filter An OData filter expression that filters elements in the collection. + * @param schemaName The name of the schema. * @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 DatabaseSchema list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return database schema along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, String filter, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, 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.")); @@ -310,109 +354,76 @@ private Mono> listByDatabaseSinglePageAsync(S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (schemaName == null) { + return Mono.error(new IllegalArgumentException("Parameter schemaName 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 - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List database schemas. - * - * @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 filter An OData filter expression that filters elements in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseSchema list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, String filter) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, schemaName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * List database schemas. + * Get database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param schemaName The name of the schema. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseSchema list operation as paginated response with {@link PagedFlux}. + * @return database schema on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName) { - final String filter = null; - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List database schemas. + * Get database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param filter An OData filter expression that filters elements in the collection. + * @param schemaName The name of the schema. * @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 DatabaseSchema list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, String filter, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * List database schemas. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseSchema list operation as paginated response with {@link PagedIterable}. + * @return database schema along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName) { - final String filter = null; - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, filter)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, String schemaName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, context).block(); } /** - * List database schemas. + * Get database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param filter An OData filter expression that filters elements in the collection. - * @param context The context to associate with this operation. + * @param schemaName The name of the schema. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseSchema list operation as paginated response with {@link PagedIterable}. + * @return database schema. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, String filter, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, filter, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseSchemaInner get(String resourceGroupName, String serverName, String databaseName, + String schemaName) { + return getWithResponse(resourceGroupName, serverName, databaseName, schemaName, Context.NONE).getValue(); } /** @@ -422,8 +433,7 @@ public PagedIterable listByDatabase(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 the response of a DatabaseSchema list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database schemas along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -450,8 +460,7 @@ private Mono> listByDatabaseNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseSchema list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database schemas along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSecurityAlertPoliciesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSecurityAlertPoliciesClientImpl.java index 4065b0b9fc9f..9ca40319385b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSecurityAlertPoliciesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSecurityAlertPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -29,7 +29,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.DatabaseSecurityAlertPoliciesClient; import com.azure.resourcemanager.sql.fluent.models.DatabaseSecurityAlertPolicyInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseSecurityAlertListResult; +import com.azure.resourcemanager.sql.models.DatabaseSecurityAlertListResult; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; import reactor.core.publisher.Mono; @@ -62,55 +62,221 @@ public final class DatabaseSecurityAlertPoliciesClientImpl implements DatabaseSe * The interface defining all the services for SqlManagementClientDatabaseSecurityAlertPolicies to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseSecurityAlertPolicies") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseSecurityAlertPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("securityAlertPolicyName") SecurityAlertPolicyName securityAlertPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("securityAlertPolicyName") SecurityAlertPolicyName securityAlertPolicyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") DatabaseSecurityAlertPolicyInner parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DatabaseSecurityAlertPolicyInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the security alert policy is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 database's security alert policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; + return FluxUtil + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the security alert policy is defined. + * @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 database's security alert policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String serverName, String databaseName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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 + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the security alert policy is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 database's security alert policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the security alert policy is defined. + * @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 database's security alert policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the security alert policy is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 database's security alert policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); + } + + /** + * Gets a list of database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the security alert policy is defined. + * @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 database's security alert policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + } + /** * Gets a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -124,10 +290,6 @@ public Mono> getWithResponseAsync(Str 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.")); @@ -142,20 +304,24 @@ public Mono> getWithResponseAsync(Str return Mono.error( new IllegalArgumentException("Parameter securityAlertPolicyName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, securityAlertPolicyName, - accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -170,10 +336,6 @@ private Mono> getWithResponseAsync(St 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.")); @@ -188,18 +350,23 @@ private Mono> getWithResponseAsync(St return Mono.error( new IllegalArgumentException("Parameter securityAlertPolicyName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, securityAlertPolicyName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -216,9 +383,10 @@ public Mono getAsync(String resourceGroupName, /** * Gets a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -236,9 +404,10 @@ public Response getWithResponse(String resourc /** * Gets a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -255,9 +424,10 @@ public DatabaseSecurityAlertPolicyInner get(String resourceGroupName, String ser /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -273,10 +443,6 @@ public Mono> createOrUpdateWithRespon 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.")); @@ -291,26 +457,30 @@ public Mono> createOrUpdateWithRespon return Mono.error( new IllegalArgumentException("Parameter securityAlertPolicyName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, securityAlertPolicyName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @param context The context to associate with this operation. @@ -327,10 +497,6 @@ private Mono> createOrUpdateWithRespo 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.")); @@ -345,25 +511,29 @@ private Mono> createOrUpdateWithRespo return Mono.error( new IllegalArgumentException("Parameter securityAlertPolicyName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, securityAlertPolicyName, - contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -382,9 +552,10 @@ public Mono createOrUpdateAsync(String resourc /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @param context The context to associate with this operation. @@ -404,9 +575,10 @@ public Response createOrUpdateWithResponse(Str /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -422,164 +594,6 @@ public DatabaseSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, parameters, Context.NONE).getValue(); } - /** - * Gets a list of database's security alert policies. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 database's security alert policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, 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 a list of database's security alert policies. - * - * @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 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 database's security alert policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of database's security alert policies. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 database's security alert policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of database's security alert policies. - * - * @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 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 database's security alert policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of database's security alert policies. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 database's security alert policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); - } - - /** - * Gets a list of database's security alert policies. - * - * @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 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 database's security alert policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); - } - /** * Get the next page of items. * @@ -587,8 +601,8 @@ public PagedIterable listByDatabase(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 a list of database's security alert policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of the database's security alert policies along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -615,8 +629,8 @@ private Mono> listByDatabaseNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 database's security alert policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of the database's security alert policies along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentBaselinesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentBaselinesClientImpl.java deleted file mode 100644 index f5887a4f14d5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentBaselinesClientImpl.java +++ /dev/null @@ -1,717 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.sql.fluent.DatabaseSqlVulnerabilityAssessmentBaselinesClient; -import com.azure.resourcemanager.sql.fluent.models.DatabaseSqlVulnerabilityAssessmentBaselineSetInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseSqlVulnerabilityAssessmentBaselineSetListResult; -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * DatabaseSqlVulnerabilityAssessmentBaselinesClient. - */ -public final class DatabaseSqlVulnerabilityAssessmentBaselinesClientImpl - implements DatabaseSqlVulnerabilityAssessmentBaselinesClient { - /** - * The proxy service used to perform REST calls. - */ - private final DatabaseSqlVulnerabilityAssessmentBaselinesService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of DatabaseSqlVulnerabilityAssessmentBaselinesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DatabaseSqlVulnerabilityAssessmentBaselinesClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(DatabaseSqlVulnerabilityAssessmentBaselinesService.class, - client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientDatabaseSqlVulnerabilityAssessmentBaselines to be - * used by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseSqlVulnerabilityAssessmentBaselines") - public interface DatabaseSqlVulnerabilityAssessmentBaselinesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("baselineName") BaselineName baselineName, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("baselineName") BaselineName baselineName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput parameters, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySqlVulnerabilityAssessment( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySqlVulnerabilityAssessmentNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName 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, databaseName, - vulnerabilityAssessmentName, baselineName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName 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, serverName, databaseName, vulnerabilityAssessmentName, baselineName, accept, context); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - baselineName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - baselineName, context).block(); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseSqlVulnerabilityAssessmentBaselineSetInner get(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName) { - return getWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, baselineName, - Context.NONE).getValue(); - } - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment baseline set along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, baselineName, contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment baseline set along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - baselineName, contentType, accept, parameters, context); - } - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment baseline set on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - baselineName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment baseline set along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - baselineName, parameters, context).block(); - } - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment baseline set. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseSqlVulnerabilityAssessmentBaselineSetInner createOrUpdate(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput parameters) { - return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - baselineName, parameters, Context.NONE).getValue(); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 database's sql vulnerability assessment rule baselines along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySqlVulnerabilityAssessmentSinglePageAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listBySqlVulnerabilityAssessment(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, - databaseName, vulnerabilityAssessmentName, 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 a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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 database's sql vulnerability assessment rule baselines along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySqlVulnerabilityAssessmentSinglePageAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listBySqlVulnerabilityAssessment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBySqlVulnerabilityAssessmentAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { - return new PagedFlux<>( - () -> listBySqlVulnerabilityAssessmentSinglePageAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName), - nextLink -> listBySqlVulnerabilityAssessmentNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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 database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySqlVulnerabilityAssessmentAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { - return new PagedFlux<>( - () -> listBySqlVulnerabilityAssessmentSinglePageAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, context), - nextLink -> listBySqlVulnerabilityAssessmentNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySqlVulnerabilityAssessment( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { - return new PagedIterable<>(listBySqlVulnerabilityAssessmentAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName)); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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 database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySqlVulnerabilityAssessment( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { - return new PagedIterable<>(listBySqlVulnerabilityAssessmentAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, 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 database's sql vulnerability assessment rule baselines along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySqlVulnerabilityAssessmentNextSinglePageAsync(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.listBySqlVulnerabilityAssessmentNext(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. - * @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 database's sql vulnerability assessment rule baselines along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySqlVulnerabilityAssessmentNextSinglePageAsync(String nextLink, Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listBySqlVulnerabilityAssessmentNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentExecuteScansClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentExecuteScansClientImpl.java deleted file mode 100644 index 2815a10b7731..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentExecuteScansClientImpl.java +++ /dev/null @@ -1,322 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation; - -import com.azure.core.annotation.ExpectedResponses; -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.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.fluent.DatabaseSqlVulnerabilityAssessmentExecuteScansClient; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -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 - * DatabaseSqlVulnerabilityAssessmentExecuteScansClient. - */ -public final class DatabaseSqlVulnerabilityAssessmentExecuteScansClientImpl - implements DatabaseSqlVulnerabilityAssessmentExecuteScansClient { - /** - * The proxy service used to perform REST calls. - */ - private final DatabaseSqlVulnerabilityAssessmentExecuteScansService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of DatabaseSqlVulnerabilityAssessmentExecuteScansClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DatabaseSqlVulnerabilityAssessmentExecuteScansClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(DatabaseSqlVulnerabilityAssessmentExecuteScansService.class, - client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientDatabaseSqlVulnerabilityAssessmentExecuteScans to - * be used by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseSqlVulnerabilityAssessmentExecuteScans") - public interface DatabaseSqlVulnerabilityAssessmentExecuteScansService { - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/initiateScan") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> execute(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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>> executeWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.execute(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> executeWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.execute(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, context); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginExecuteAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { - Mono>> mono - = executeWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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> beginExecuteAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = executeWithResponseAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginExecute(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { - return this.beginExecuteAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName) - .getSyncPoller(); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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> beginExecute(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { - return this.beginExecuteAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, context) - .getSyncPoller(); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 executeAsync(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { - return beginExecuteAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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 executeAsync(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { - return beginExecuteAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 execute(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { - executeAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName).block(); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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 execute(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { - executeAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, context).block(); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentRuleBaselinesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentRuleBaselinesClientImpl.java deleted file mode 100644 index b16a2a131609..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentRuleBaselinesClientImpl.java +++ /dev/null @@ -1,931 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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; -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.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.resourcemanager.sql.fluent.DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient; -import com.azure.resourcemanager.sql.fluent.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult; -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInput; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient. - */ -public final class DatabaseSqlVulnerabilityAssessmentRuleBaselinesClientImpl - implements DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient { - /** - * The proxy service used to perform REST calls. - */ - private final DatabaseSqlVulnerabilityAssessmentRuleBaselinesService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of DatabaseSqlVulnerabilityAssessmentRuleBaselinesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DatabaseSqlVulnerabilityAssessmentRuleBaselinesClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(DatabaseSqlVulnerabilityAssessmentRuleBaselinesService.class, - client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientDatabaseSqlVulnerabilityAssessmentRuleBaselines to - * be used by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseSqlVulnerabilityAssessmentRuleBaselines") - public interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("baselineName") BaselineName baselineName, @PathParam("ruleId") String ruleId, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("baselineName") BaselineName baselineName, @PathParam("ruleId") String ruleId, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") DatabaseSqlVulnerabilityAssessmentRuleBaselineInput parameters, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("baselineName") BaselineName baselineName, @PathParam("ruleId") String ruleId, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByBaseline( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("baselineName") BaselineName baselineName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByBaselineNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a database's sql vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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 a database's sql vulnerability assessment rule baseline along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId 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, databaseName, - vulnerabilityAssessmentName, baselineName, ruleId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a database's sql vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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 a database's sql vulnerability assessment rule baseline along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId 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, serverName, databaseName, vulnerabilityAssessmentName, baselineName, ruleId, accept, - context); - } - - /** - * Gets a database's sql vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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 a database's sql vulnerability assessment rule baseline on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, String ruleId) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - baselineName, ruleId).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a database's sql vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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 a database's sql vulnerability assessment rule baseline along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, String ruleId, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - baselineName, ruleId, context).block(); - } - - /** - * Gets a database's sql vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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 a database's sql vulnerability assessment rule baseline. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseSqlVulnerabilityAssessmentRuleBaselineInner get(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - String ruleId) { - return getWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, baselineName, - ruleId, Context.NONE).getValue(); - } - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment rule baseline along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - DatabaseSqlVulnerabilityAssessmentRuleBaselineInput 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, baselineName, ruleId, contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment rule baseline along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - DatabaseSqlVulnerabilityAssessmentRuleBaselineInput 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - baselineName, ruleId, contentType, accept, parameters, context); - } - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment rule baseline on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, String ruleId, DatabaseSqlVulnerabilityAssessmentRuleBaselineInput parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - baselineName, ruleId, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment rule baseline along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - DatabaseSqlVulnerabilityAssessmentRuleBaselineInput parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - baselineName, ruleId, parameters, context).block(); - } - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment rule baseline. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseSqlVulnerabilityAssessmentRuleBaselineInner createOrUpdate(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, String ruleId, DatabaseSqlVulnerabilityAssessmentRuleBaselineInput parameters) { - return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - baselineName, ruleId, parameters, Context.NONE).getValue(); - } - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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 the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - String ruleId) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, baselineName, ruleId, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - String ruleId, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, baselineName, ruleId, context); - } - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId) { - return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - baselineName, ruleId).flatMap(ignored -> Mono.empty()); - } - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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 {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - Context context) { - return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - baselineName, ruleId, context).block(); - } - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId) { - deleteWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, baselineName, - ruleId, Context.NONE); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByBaselineSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByBaseline(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, baselineName, 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 a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByBaselineSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByBaseline(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, baselineName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByBaselineAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName) { - return new PagedFlux<>(() -> listByBaselineSinglePageAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, baselineName), nextLink -> listByBaselineNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByBaselineAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, Context context) { - return new PagedFlux<>( - () -> listByBaselineSinglePageAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, baselineName, context), - nextLink -> listByBaselineNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByBaseline(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName) { - return new PagedIterable<>(listByBaselineAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, baselineName)); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName 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 list of database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByBaseline(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, Context context) { - return new PagedIterable<>(listByBaselineAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, baselineName, 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 database's sql vulnerability assessment rule baselines along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByBaselineNextSinglePageAsync(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.listByBaselineNext(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. - * @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 database's sql vulnerability assessment rule baselines along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByBaselineNextSinglePageAsync(String nextLink, Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listByBaselineNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentScanResultsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentScanResultsClientImpl.java deleted file mode 100644 index 9d9713be0af4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentScanResultsClientImpl.java +++ /dev/null @@ -1,527 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.resourcemanager.sql.fluent.DatabaseSqlVulnerabilityAssessmentScanResultsClient; -import com.azure.resourcemanager.sql.fluent.models.SqlVulnerabilityAssessmentScanResultsInner; -import com.azure.resourcemanager.sql.implementation.models.SQLVulnerabilityAssessmentScanListResult; -import com.azure.resourcemanager.sql.models.SqlVulnerabilityAssessmentName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * DatabaseSqlVulnerabilityAssessmentScanResultsClient. - */ -public final class DatabaseSqlVulnerabilityAssessmentScanResultsClientImpl - implements DatabaseSqlVulnerabilityAssessmentScanResultsClient { - /** - * The proxy service used to perform REST calls. - */ - private final DatabaseSqlVulnerabilityAssessmentScanResultsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of DatabaseSqlVulnerabilityAssessmentScanResultsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DatabaseSqlVulnerabilityAssessmentScanResultsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(DatabaseSqlVulnerabilityAssessmentScanResultsService.class, - client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientDatabaseSqlVulnerabilityAssessmentScanResults to - * be used by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseSqlVulnerabilityAssessmentScanResults") - public interface DatabaseSqlVulnerabilityAssessmentScanResultsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults/{scanResultId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("vulnerabilityAssessmentName") SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, @PathParam("scanResultId") String scanResultId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByScan(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("vulnerabilityAssessmentName") SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByScanNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, String scanResultId) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (scanId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); - } - if (scanResultId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanResultId 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, databaseName, - vulnerabilityAssessmentName, scanId, scanResultId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @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 vulnerability assessment scan record of a database along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, String scanResultId, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (scanId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); - } - if (scanResultId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanResultId 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, serverName, databaseName, vulnerabilityAssessmentName, scanId, scanResultId, accept, - context); - } - - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - String scanResultId) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, - scanResultId).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @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 vulnerability assessment scan record of a database along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String serverName, String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, String scanResultId, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, - scanResultId, context).block(); - } - - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SqlVulnerabilityAssessmentScanResultsInner get(String resourceGroupName, String serverName, - String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - String scanResultId) { - return getWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, - scanResultId, Context.NONE).getValue(); - } - - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByScanSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (scanId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByScan(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, scanId, 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 a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @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 vulnerability assessment scan record of a database along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByScanSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (scanId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByScan(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByScanAsync(String resourceGroupName, - String serverName, String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { - return new PagedFlux<>(() -> listByScanSinglePageAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, scanId), nextLink -> listByScanNextSinglePageAsync(nextLink)); - } - - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @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 vulnerability assessment scan record of a database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByScanAsync(String resourceGroupName, - String serverName, String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, Context context) { - return new PagedFlux<>(() -> listByScanSinglePageAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, scanId, context), - nextLink -> listByScanNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByScan(String resourceGroupName, - String serverName, String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { - return new PagedIterable<>( - listByScanAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId)); - } - - /** - * Gets a vulnerability assessment scan record of a 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @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 vulnerability assessment scan record of a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByScan(String resourceGroupName, - String serverName, String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, Context context) { - return new PagedIterable<>( - listByScanAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, 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 vulnerability assessment scan record of a database along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByScanNextSinglePageAsync(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.listByScanNext(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. - * @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 vulnerability assessment scan record of a database along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByScanNextSinglePageAsync(String nextLink, Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listByScanNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentScansClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentScansClientImpl.java deleted file mode 100644 index b59cfa54f9a0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentScansClientImpl.java +++ /dev/null @@ -1,510 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.resourcemanager.sql.fluent.DatabaseSqlVulnerabilityAssessmentScansClient; -import com.azure.resourcemanager.sql.fluent.models.SqlVulnerabilityAssessmentScanRecordInner; -import com.azure.resourcemanager.sql.implementation.models.SqlVulnerabilityAssessmentScanRecordListResult; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * DatabaseSqlVulnerabilityAssessmentScansClient. - */ -public final class DatabaseSqlVulnerabilityAssessmentScansClientImpl - implements DatabaseSqlVulnerabilityAssessmentScansClient { - /** - * The proxy service used to perform REST calls. - */ - private final DatabaseSqlVulnerabilityAssessmentScansService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of DatabaseSqlVulnerabilityAssessmentScansClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DatabaseSqlVulnerabilityAssessmentScansClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(DatabaseSqlVulnerabilityAssessmentScansService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientDatabaseSqlVulnerabilityAssessmentScans to be used - * by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseSqlVulnerabilityAssessmentScans") - public interface DatabaseSqlVulnerabilityAssessmentScansService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySqlVulnerabilityAssessments( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySqlVulnerabilityAssessmentsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a database vulnerability assessment scan result. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database vulnerability assessment scan result along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (scanId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanId 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, databaseName, - vulnerabilityAssessmentName, scanId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a database vulnerability assessment scan result. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. - * @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 database vulnerability assessment scan result along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (scanId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanId 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, serverName, databaseName, vulnerabilityAssessmentName, scanId, accept, context); - } - - /** - * Get a database vulnerability assessment scan result. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database vulnerability assessment scan result on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a database vulnerability assessment scan result. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. - * @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 database vulnerability assessment scan result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, - context).block(); - } - - /** - * Get a database vulnerability assessment scan result. - * - * @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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database vulnerability assessment scan result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SqlVulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { - return getWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, - Context.NONE).getValue(); - } - - /** - * Lists the vulnerability assessment scans of a 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 SqlVulnerabilityAssessmentScanRecord list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySqlVulnerabilityAssessmentsSinglePageAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listBySqlVulnerabilityAssessments(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, - databaseName, vulnerabilityAssessmentName, 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 vulnerability assessment scans of a 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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 SqlVulnerabilityAssessmentScanRecord list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySqlVulnerabilityAssessmentsSinglePageAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listBySqlVulnerabilityAssessments(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the vulnerability assessment scans of a 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 SqlVulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBySqlVulnerabilityAssessmentsAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { - return new PagedFlux<>( - () -> listBySqlVulnerabilityAssessmentsSinglePageAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName), - nextLink -> listBySqlVulnerabilityAssessmentsNextSinglePageAsync(nextLink)); - } - - /** - * Lists the vulnerability assessment scans of a 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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 SqlVulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySqlVulnerabilityAssessmentsAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { - return new PagedFlux<>( - () -> listBySqlVulnerabilityAssessmentsSinglePageAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, context), - nextLink -> listBySqlVulnerabilityAssessmentsNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the vulnerability assessment scans of a 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 SqlVulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySqlVulnerabilityAssessments( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { - return new PagedIterable<>(listBySqlVulnerabilityAssessmentsAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName)); - } - - /** - * Lists the vulnerability assessment scans of a 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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 SqlVulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySqlVulnerabilityAssessments( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { - return new PagedIterable<>(listBySqlVulnerabilityAssessmentsAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, 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 the response of a SqlVulnerabilityAssessmentScanRecord list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySqlVulnerabilityAssessmentsNextSinglePageAsync(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.listBySqlVulnerabilityAssessmentsNext(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. - * @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 SqlVulnerabilityAssessmentScanRecord list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySqlVulnerabilityAssessmentsNextSinglePageAsync(String nextLink, Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listBySqlVulnerabilityAssessmentsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentsSettingsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentsSettingsClientImpl.java deleted file mode 100644 index e54275c34888..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentsSettingsClientImpl.java +++ /dev/null @@ -1,461 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.resourcemanager.sql.fluent.DatabaseSqlVulnerabilityAssessmentsSettingsClient; -import com.azure.resourcemanager.sql.fluent.models.SqlVulnerabilityAssessmentInner; -import com.azure.resourcemanager.sql.implementation.models.SqlVulnerabilityAssessmentListResult; -import com.azure.resourcemanager.sql.models.SqlVulnerabilityAssessmentName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * DatabaseSqlVulnerabilityAssessmentsSettingsClient. - */ -public final class DatabaseSqlVulnerabilityAssessmentsSettingsClientImpl - implements DatabaseSqlVulnerabilityAssessmentsSettingsClient { - /** - * The proxy service used to perform REST calls. - */ - private final DatabaseSqlVulnerabilityAssessmentsSettingsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of DatabaseSqlVulnerabilityAssessmentsSettingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DatabaseSqlVulnerabilityAssessmentsSettingsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(DatabaseSqlVulnerabilityAssessmentsSettingsService.class, - client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientDatabaseSqlVulnerabilityAssessmentsSettings to be - * used by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseSqlVulnerabilityAssessmentsSettings") - public interface DatabaseSqlVulnerabilityAssessmentsSettingsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("vulnerabilityAssessmentName") SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets SQL Vulnerability Assessment policy for 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sQL Vulnerability Assessment policy for database along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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, databaseName, - vulnerabilityAssessmentName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets SQL Vulnerability Assessment policy for 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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 sQL Vulnerability Assessment policy for database along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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, serverName, databaseName, vulnerabilityAssessmentName, accept, context); - } - - /** - * Gets SQL Vulnerability Assessment policy for 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sQL Vulnerability Assessment policy for database on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets SQL Vulnerability Assessment policy for 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @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 sQL Vulnerability Assessment policy for database along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, context) - .block(); - } - - /** - * Gets SQL Vulnerability Assessment policy for 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sQL Vulnerability Assessment policy for database. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SqlVulnerabilityAssessmentInner get(String resourceGroupName, String serverName, String databaseName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName) { - return getWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, Context.NONE) - .getValue(); - } - - /** - * Lists SQL Vulnerability Assessment policies associated with a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 SqlVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, 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 SQL Vulnerability Assessment policies associated with a 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 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 SqlVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists SQL Vulnerability Assessment policies associated with a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 SqlVulnerabilityAssessment list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Lists SQL Vulnerability Assessment policies associated with a 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 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 SqlVulnerabilityAssessment list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists SQL Vulnerability Assessment policies associated with a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 SqlVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); - } - - /** - * Lists SQL Vulnerability Assessment policies associated with a 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 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 SqlVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, 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 the response of a SqlVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync(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.listByDatabaseNext(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. - * @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 SqlVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync(String nextLink, - Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseTablesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseTablesClientImpl.java index 4b78af437105..65634f16032a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseTablesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseTablesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.DatabaseTablesClient; import com.azure.resourcemanager.sql.fluent.models.DatabaseTableInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseTableListResult; +import com.azure.resourcemanager.sql.models.DatabaseTableListResult; import reactor.core.publisher.Mono; /** @@ -59,62 +59,59 @@ public final class DatabaseTablesClientImpl implements DatabaseTablesClient { * The interface defining all the services for SqlManagementClientDatabaseTables to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseTables") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseTablesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listBySchema(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySchema(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, - @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); + @PathParam("tableName") String tableName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySchemaNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Get database table. + * List database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database table along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database tables along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName) { + private Mono> listBySchemaSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String schemaName, String filter) { 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.")); @@ -128,42 +125,42 @@ public Mono> getWithResponseAsync(String resourceGr if (schemaName == null) { return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); } - if (tableName == null) { - return Mono.error(new IllegalArgumentException("Parameter tableName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, schemaName, tableName, - accept, context)) + .withContext( + context -> service.listBySchema(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + schemaName, filter, this.client.getSubscriptionId(), 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())); } /** - * Get database table. + * List database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. + * @param filter An OData filter expression that filters elements in the collection. * @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 database table along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database tables along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, Context context) { + private Mono> listBySchemaSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String schemaName, String filter, 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.")); @@ -177,101 +174,149 @@ private Mono> getWithResponseAsync(String resourceG if (schemaName == null) { return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); } - if (tableName == null) { - return Mono.error(new IllegalArgumentException("Parameter tableName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, schemaName, tableName, accept, context); + return service + .listBySchema(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, schemaName, filter, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Get database table. + * List database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database table on successful completion of {@link Mono}. + * @return a list of database tables as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listBySchemaAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String filter) { + return new PagedFlux<>( + () -> listBySchemaSinglePageAsync(resourceGroupName, serverName, databaseName, schemaName, filter), + nextLink -> listBySchemaNextSinglePageAsync(nextLink)); } /** - * Get database table. + * List database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 database tables as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listBySchemaAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName) { + final String filter = null; + return new PagedFlux<>( + () -> listBySchemaSinglePageAsync(resourceGroupName, serverName, databaseName, schemaName, filter), + nextLink -> listBySchemaNextSinglePageAsync(nextLink)); + } + + /** + * List database tables. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param filter An OData filter expression that filters elements in the collection. * @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 database table along with {@link Response}. + * @return a list of database tables as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySchemaAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String filter, Context context) { + return new PagedFlux<>( + () -> listBySchemaSinglePageAsync(resourceGroupName, serverName, databaseName, schemaName, filter, context), + nextLink -> listBySchemaNextSinglePageAsync(nextLink, context)); } /** - * Get database table. + * List database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database table. + * @return a list of database tables as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseTableInner get(String resourceGroupName, String serverName, String databaseName, String schemaName, - String tableName) { - return getWithResponse(resourceGroupName, serverName, databaseName, schemaName, tableName, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySchema(String resourceGroupName, String serverName, + String databaseName, String schemaName) { + final String filter = null; + return new PagedIterable<>(listBySchemaAsync(resourceGroupName, serverName, databaseName, schemaName, filter)); } /** * List database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param filter An OData filter expression that filters elements in the collection. + * @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 database tables as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySchema(String resourceGroupName, String serverName, + String databaseName, String schemaName, String filter, Context context) { + return new PagedIterable<>( + listBySchemaAsync(resourceGroupName, serverName, databaseName, schemaName, filter, context)); + } + + /** + * Get database table. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseTable list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return database table along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySchemaSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, String schemaName, String filter) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName) { 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.")); @@ -285,42 +330,42 @@ private Mono> listBySchemaSinglePageAsync(Stri if (schemaName == null) { return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); } + if (tableName == null) { + return Mono.error(new IllegalArgumentException("Parameter tableName 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"; return FluxUtil - .withContext(context -> service.listBySchema(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, schemaName, filter, - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + schemaName, tableName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List database tables. + * Get database table. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param filter An OData filter expression that filters elements in the collection. + * @param tableName The name of the table. * @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 DatabaseTable list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return database table along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySchemaSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, String schemaName, String filter, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, 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.")); @@ -334,117 +379,81 @@ private Mono> listBySchemaSinglePageAsync(Stri if (schemaName == null) { return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); } + if (tableName == null) { + return Mono.error(new IllegalArgumentException("Parameter tableName 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 - .listBySchema(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, schemaName, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List database tables. - * - * @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 schemaName The name of the schema. - * @param filter An OData filter expression that filters elements in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseTable list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBySchemaAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String filter) { - return new PagedFlux<>( - () -> listBySchemaSinglePageAsync(resourceGroupName, serverName, databaseName, schemaName, filter), - nextLink -> listBySchemaNextSinglePageAsync(nextLink)); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, schemaName, + tableName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * List database tables. + * Get database table. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. + * @param tableName The name of the table. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseTable list operation as paginated response with {@link PagedFlux}. + * @return database table on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBySchemaAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName) { - final String filter = null; - return new PagedFlux<>( - () -> listBySchemaSinglePageAsync(resourceGroupName, serverName, databaseName, schemaName, filter), - nextLink -> listBySchemaNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String schemaName, String tableName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List database tables. + * Get database table. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param filter An OData filter expression that filters elements in the collection. + * @param tableName The name of the table. * @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 DatabaseTable list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySchemaAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String filter, Context context) { - return new PagedFlux<>( - () -> listBySchemaSinglePageAsync(resourceGroupName, serverName, databaseName, schemaName, filter, context), - nextLink -> listBySchemaNextSinglePageAsync(nextLink, context)); - } - - /** - * List database tables. - * - * @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 schemaName The name of the schema. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseTable list operation as paginated response with {@link PagedIterable}. + * @return database table along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySchema(String resourceGroupName, String serverName, - String databaseName, String schemaName) { - final String filter = null; - return new PagedIterable<>(listBySchemaAsync(resourceGroupName, serverName, databaseName, schemaName, filter)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, String schemaName, String tableName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, context) + .block(); } /** - * List database tables. + * Get database table. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param filter An OData filter expression that filters elements in the collection. - * @param context The context to associate with this operation. + * @param tableName The name of the table. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseTable list operation as paginated response with {@link PagedIterable}. + * @return database table. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySchema(String resourceGroupName, String serverName, - String databaseName, String schemaName, String filter, Context context) { - return new PagedIterable<>( - listBySchemaAsync(resourceGroupName, serverName, databaseName, schemaName, filter, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseTableInner get(String resourceGroupName, String serverName, String databaseName, String schemaName, + String tableName) { + return getWithResponse(resourceGroupName, serverName, databaseName, schemaName, tableName, Context.NONE) + .getValue(); } /** @@ -454,8 +463,7 @@ public PagedIterable listBySchema(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 the response of a DatabaseTable list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database tables along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySchemaNextSinglePageAsync(String nextLink) { @@ -482,8 +490,7 @@ private Mono> listBySchemaNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseTable list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database tables along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySchemaNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseUsagesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseUsagesClientImpl.java index af0fb57ef93b..73b85bc0d23a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseUsagesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseUsagesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.DatabaseUsagesClient; import com.azure.resourcemanager.sql.fluent.models.DatabaseUsageInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseUsageListResult; +import com.azure.resourcemanager.sql.models.DatabaseUsageListResult; import reactor.core.publisher.Mono; /** @@ -59,31 +59,32 @@ public final class DatabaseUsagesClientImpl implements DatabaseUsagesClient { * The interface defining all the services for SqlManagementClientDatabaseUsages to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseUsages") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseUsagesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets database usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -98,10 +99,6 @@ private Mono> listByDatabaseSinglePageAsync(St 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.")); @@ -112,10 +109,14 @@ private Mono> listByDatabaseSinglePageAsync(St if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, accept, context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), 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())); @@ -124,7 +125,8 @@ private Mono> listByDatabaseSinglePageAsync(St /** * Gets database usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -140,10 +142,6 @@ private Mono> listByDatabaseSinglePageAsync(St 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.")); @@ -154,11 +152,15 @@ private Mono> listByDatabaseSinglePageAsync(St if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -166,7 +168,8 @@ private Mono> listByDatabaseSinglePageAsync(St /** * Gets database usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -184,7 +187,8 @@ public PagedFlux listByDatabaseAsync(String resourceGroupNam /** * Gets database usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -204,7 +208,8 @@ private PagedFlux listByDatabaseAsync(String resourceGroupNa /** * Gets database usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -221,7 +226,8 @@ public PagedIterable listByDatabase(String resourceGroupName /** * Gets database usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -243,7 +249,8 @@ public PagedIterable listByDatabase(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 database usages along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of database usage metrics along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -270,7 +277,8 @@ private Mono> listByDatabaseNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database usages along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of database usage metrics along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java index 2fb9482741d8..b02f2d62b6cc 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -61,54 +61,55 @@ public final class DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl * The interface defining all the services for SqlManagementClientDatabaseVulnerabilityAssessmentRuleBaselines to be * used by the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseVulnerabilityAssessmentRuleBaselines") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseVulnerabilityAssessmentRuleBaselinesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, @PathParam("ruleId") String ruleId, @PathParam("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, @PathParam("ruleId") String ruleId, @PathParam("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, @PathParam("ruleId") String ruleId, - @PathParam("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, Context context); + @PathParam("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); } /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -130,10 +131,6 @@ public Mono> getWithR 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.")); @@ -154,18 +151,23 @@ public Mono> getWithR if (baselineName == null) { return Mono.error(new IllegalArgumentException("Parameter baselineName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, ruleId, baselineName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -188,10 +190,6 @@ private Mono> getWith 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.")); @@ -212,17 +210,22 @@ private Mono> getWith if (baselineName == null) { return Mono.error(new IllegalArgumentException("Parameter baselineName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, ruleId, baselineName, accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); } /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -245,7 +248,8 @@ public Mono getAsync(String re /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -269,7 +273,8 @@ public Response getWithRespons /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -292,7 +297,8 @@ public DatabaseVulnerabilityAssessmentRuleBaselineInner get(String resourceGroup /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -316,10 +322,6 @@ public Mono> createOr 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.")); @@ -340,24 +342,28 @@ public Mono> createOr if (baselineName == null) { return Mono.error(new IllegalArgumentException("Parameter baselineName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, ruleId, baselineName, contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -382,10 +388,6 @@ private Mono> createO 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.")); @@ -406,23 +408,27 @@ private Mono> createO if (baselineName == null) { return Mono.error(new IllegalArgumentException("Parameter baselineName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - ruleId, baselineName, contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -447,7 +453,8 @@ public Mono createOrUpdateAsyn /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -474,7 +481,8 @@ public Response createOrUpdate /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -499,7 +507,8 @@ public DatabaseVulnerabilityAssessmentRuleBaselineInner createOrUpdate(String re /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -519,10 +528,6 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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.")); @@ -543,17 +548,22 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St if (baselineName == null) { return Mono.error(new IllegalArgumentException("Parameter baselineName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, ruleId, baselineName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -574,10 +584,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -598,15 +604,21 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (baselineName == null) { return Mono.error(new IllegalArgumentException("Parameter baselineName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, ruleId, baselineName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -629,7 +641,8 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -653,7 +666,8 @@ public Response deleteWithResponse(String resourceGroupName, String server /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentScansClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentScansClientImpl.java index 25bf9e6c1963..855e225b7e7d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentScansClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentScansClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -32,8 +32,8 @@ import com.azure.resourcemanager.sql.fluent.DatabaseVulnerabilityAssessmentScansClient; import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentScansExportInner; import com.azure.resourcemanager.sql.fluent.models.VulnerabilityAssessmentScanRecordInner; -import com.azure.resourcemanager.sql.implementation.models.VulnerabilityAssessmentScanRecordListResult; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; +import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentScanRecordListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -69,89 +69,84 @@ public final class DatabaseVulnerabilityAssessmentScansClientImpl * The interface defining all the services for SqlManagementClientDatabaseVulnerabilityAssessmentScans to be used by * the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseVulnerabilityAssessmentScans") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseVulnerabilityAssessmentScansService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("scanId") String scanId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> export(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> export(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, @HeaderParam("Accept") String accept, Context context); + @PathParam("scanId") String scanId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> initiateScan(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> initiateScan(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, Context context); + @PathParam("scanId") String scanId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database along with {@link Response} on successful completion + * @return a list of vulnerability assessment scan records along with {@link PagedResponse} on successful completion * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName) { 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.")); @@ -166,44 +161,43 @@ public Mono> getWithResponseAsy return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } - if (scanId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanId 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, scanId, accept, context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, vulnerabilityAssessmentName, this.client.getSubscriptionId(), 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())); } /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @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 vulnerability assessment scan record of a database along with {@link Response} on successful completion + * @return a list of vulnerability assessment scan records along with {@link PagedResponse} on successful completion * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - Context context) { + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, 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.")); @@ -218,101 +212,127 @@ private Mono> getWithResponseAs return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } - if (scanId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanId 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, accept, context); + return service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database on successful completion of {@link Mono}. + * @return a list of vulnerability assessment scan records as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @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 vulnerability assessment scan record of a database along with {@link Response}. + * @return a list of vulnerability assessment scan records as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, - context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database. + * @return a list of vulnerability assessment scan records as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { - return getWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, - Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + return new PagedIterable<>( + listByDatabaseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName)); } /** * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @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 VulnerabilityAssessmentScanRecord list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of vulnerability assessment scan records as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + Context context) { + return new PagedIterable<>( + listByDatabaseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, context)); + } + + /** + * Gets a vulnerability assessment scan record of a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a vulnerability assessment scan record of a database along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String scanId) { 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.")); @@ -327,42 +347,45 @@ private Mono> listByDataba return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } + if (scanId == null) { + return Mono.error(new IllegalArgumentException("Parameter scanId 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"; return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists the vulnerability assessment scans of a database. + * Gets a vulnerability assessment scan record of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @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 VulnerabilityAssessmentScanRecord list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a vulnerability assessment scan record of a database along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, + 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.")); @@ -377,109 +400,93 @@ private Mono> listByDataba return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } + if (scanId == null) { + return Mono.error(new IllegalArgumentException("Parameter scanId 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 - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** - * Lists the vulnerability assessment scans of a database. + * Gets a vulnerability assessment scan record of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedFlux}. + * @return a vulnerability assessment scan record of a database on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists the vulnerability assessment scans of a database. + * Gets a vulnerability assessment scan record of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @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 VulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the vulnerability assessment scans of a 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 VulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedIterable}. + * @return a vulnerability assessment scan record of a database along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { - return new PagedIterable<>( - listByDatabaseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, + context).block(); } /** - * Lists the vulnerability assessment scans of a database. + * Gets a vulnerability assessment scan record of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param context The context to associate with this operation. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedIterable}. + * @return a vulnerability assessment scan record of a database. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String serverName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { - return new PagedIterable<>( - listByDatabaseAsync(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public VulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String serverName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { + return getWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, + Context.NONE).getValue(); } /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -494,10 +501,6 @@ public Mono> exportWit 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.")); @@ -515,22 +518,27 @@ public Mono> exportWit if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId 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"; return FluxUtil - .withContext(context -> service.export(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, scanId, accept, context)) + .withContext(context -> service.export(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -546,10 +554,6 @@ private Mono> exportWi 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.")); @@ -567,20 +571,26 @@ private Mono> exportWi if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId 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.export(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, scanId, accept, context); + return service.export(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -597,11 +607,12 @@ public Mono exportAsync(String /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -619,11 +630,12 @@ public Response exportWithRespo /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -639,7 +651,8 @@ public DatabaseVulnerabilityAssessmentScansExportInner export(String resourceGro /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -656,10 +669,6 @@ public Mono>> initiateScanWithResponseAsync(String res 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.")); @@ -677,17 +686,22 @@ public Mono>> initiateScanWithResponseAsync(String res if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId 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.")); + } return FluxUtil - .withContext(context -> service.initiateScan(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, scanId, context)) + .withContext(context -> service.initiateScan(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), + this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -705,10 +719,6 @@ private Mono>> initiateScanWithResponseAsync(String re 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.")); @@ -726,16 +736,20 @@ private Mono>> initiateScanWithResponseAsync(String re if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId 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.")); + } context = this.client.mergeContext(context); - return service.initiateScan(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - scanId, context); + return service.initiateScan(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -757,7 +771,8 @@ public PollerFlux, Void> beginInitiateScanAsync(String resource /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -781,7 +796,8 @@ private PollerFlux, Void> beginInitiateScanAsync(String resourc /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -802,7 +818,8 @@ public SyncPoller, Void> beginInitiateScan(String resourceGroup /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -825,7 +842,8 @@ public SyncPoller, Void> beginInitiateScan(String resourceGroup /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -846,7 +864,8 @@ public Mono initiateScanAsync(String resourceGroupName, String serverName, /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -867,7 +886,8 @@ private Mono initiateScanAsync(String resourceGroupName, String serverName /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -885,7 +905,8 @@ public void initiateScan(String resourceGroupName, String serverName, String dat /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -909,8 +930,8 @@ public void initiateScan(String resourceGroupName, String serverName, String dat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VulnerabilityAssessmentScanRecord list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of vulnerability assessment scan records along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -938,8 +959,8 @@ public void initiateScan(String resourceGroupName, String serverName, String dat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VulnerabilityAssessmentScanRecord list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of vulnerability assessment scan records along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentsClientImpl.java index 9145b0311b05..f2ff8fe8ea37 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.DatabaseVulnerabilityAssessmentsClient; import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseVulnerabilityAssessmentListResult; +import com.azure.resourcemanager.sql.models.DatabaseVulnerabilityAssessmentListResult; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import reactor.core.publisher.Mono; @@ -63,64 +63,230 @@ public final class DatabaseVulnerabilityAssessmentsClientImpl implements Databas * The interface defining all the services for SqlManagementClientDatabaseVulnerabilityAssessments to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabaseVulnerabilityAssessments") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DatabaseVulnerabilityAssessmentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") DatabaseVulnerabilityAssessmentInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DatabaseVulnerabilityAssessmentInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Lists the vulnerability assessment policies associated with a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment policies are defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 database's vulnerability assessments along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; + return FluxUtil + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), 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())); + } + + /** + * Lists the vulnerability assessment policies associated with a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment policies are defined. + * @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 database's vulnerability assessments along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String serverName, String databaseName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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 + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists the vulnerability assessment policies associated with a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment policies are defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 database's vulnerability assessments as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * Lists the vulnerability assessment policies associated with a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment policies are defined. + * @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 database's vulnerability assessments as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists the vulnerability assessment policies associated with a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment policies are defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 database's vulnerability assessments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); + } + + /** + * Lists the vulnerability assessment policies associated with a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the vulnerability assessment policies are defined. + * @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 database's vulnerability assessments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + } + /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -137,10 +303,6 @@ public Mono> getWithResponseAsync 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.")); @@ -155,18 +317,23 @@ public Mono> getWithResponseAsync return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -185,10 +352,6 @@ private Mono> getWithResponseAsyn 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.")); @@ -203,16 +366,21 @@ private Mono> getWithResponseAsyn return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -231,7 +399,8 @@ public Mono getAsync(String resourceGroupN /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -251,7 +420,8 @@ public Response getWithResponse(String res /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -270,7 +440,8 @@ public DatabaseVulnerabilityAssessmentInner get(String resourceGroupName, String /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -288,10 +459,6 @@ public Mono> createOrUpdateWithRe 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.")); @@ -306,24 +473,28 @@ public Mono> createOrUpdateWithRe return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -343,10 +514,6 @@ private Mono> createOrUpdateWithR 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.")); @@ -361,23 +528,27 @@ private Mono> createOrUpdateWithR return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, - contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -398,7 +569,8 @@ public Mono createOrUpdateAsync(String res /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -420,7 +592,8 @@ public Response createOrUpdateWithResponse /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -441,7 +614,8 @@ public DatabaseVulnerabilityAssessmentInner createOrUpdate(String resourceGroupN /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -457,10 +631,6 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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.")); @@ -475,17 +645,22 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - vulnerabilityAssessmentName, context)) + .withContext( + context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -502,10 +677,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -520,15 +691,20 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -547,7 +723,8 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -567,7 +744,8 @@ public Response deleteWithResponse(String resourceGroupName, String server /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -581,168 +759,6 @@ public void delete(String resourceGroupName, String serverName, String databaseN deleteWithResponse(resourceGroupName, serverName, databaseName, vulnerabilityAssessmentName, Context.NONE); } - /** - * Lists the vulnerability assessment policies associated with a 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 for which the vulnerability assessment is defined. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, 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 vulnerability assessment policies associated with a 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 for which the vulnerability assessment is defined. - * @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 DatabaseVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the vulnerability assessment policies associated with a 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 for which the vulnerability assessment is defined. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseVulnerabilityAssessment list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, - String serverName, String databaseName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Lists the vulnerability assessment policies associated with a 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 for which the vulnerability assessment is defined. - * @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 DatabaseVulnerabilityAssessment list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, - String serverName, String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the vulnerability assessment policies associated with a 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 for which the vulnerability assessment is defined. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String serverName, String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); - } - - /** - * Lists the vulnerability assessment policies associated with a 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 for which the vulnerability assessment is defined. - * @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 DatabaseVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String serverName, String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); - } - /** * Get the next page of items. * @@ -750,8 +766,8 @@ public PagedIterable listByDatabase(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 response of a DatabaseVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of the database's vulnerability assessments along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -779,8 +795,8 @@ public PagedIterable listByDatabase(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 response of a DatabaseVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of the database's vulnerability assessments along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabasesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabasesClientImpl.java index b455114179f2..8523fcae969b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabasesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DatabasesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -36,7 +36,7 @@ import com.azure.resourcemanager.sql.fluent.DatabasesClient; import com.azure.resourcemanager.sql.fluent.models.DatabaseInner; import com.azure.resourcemanager.sql.fluent.models.ImportExportOperationResultInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseListResult; +import com.azure.resourcemanager.sql.models.DatabaseListResult; import com.azure.resourcemanager.sql.models.DatabaseUpdate; import com.azure.resourcemanager.sql.models.ExportDatabaseDefinition; import com.azure.resourcemanager.sql.models.ImportExistingDatabaseDefinition; @@ -75,193 +75,187 @@ public final class DatabasesClientImpl implements DatabasesClient { * The interface defining all the services for SqlManagementClientDatabases to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDatabases") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DatabasesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @QueryParam("$expand") String expand, - @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$skipToken") String skipToken, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}") - @ExpectedResponses({ 200, 201, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") DatabaseInner parameters, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") DatabaseUpdate parameters, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DatabaseInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases") - @ExpectedResponses({ 200 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @QueryParam("$top") Long top, @QueryParam("$skip") Long skip, @QueryParam("$filter") String filter, - @QueryParam("$orderby") String orderby, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DatabaseUpdate parameters, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/export") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> export(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> export(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ExportDatabaseDefinition parameters, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ExportDatabaseDefinition parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/failover") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failover(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> failover(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @QueryParam("replicaType") ReplicaType replicaType, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/import") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> importMethod(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> importMethod(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") ImportExistingDatabaseDefinition parameters, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ImportExistingDatabaseDefinition parameters, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> rename(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> rename(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ResourceMoveDefinition parameters, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/pause") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> pause(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> pause(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/resume") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resume(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> resume(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/upgradeDataWarehouse") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> upgradeDataWarehouse(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> upgradeDataWarehouse(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/inaccessibleDatabases") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listInaccessibleByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByElasticPool(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("elasticPoolName") String elasticPoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/inaccessibleDatabases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByElasticPool(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listInaccessibleByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("elasticPoolName") String elasticPoolName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @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("endpoint") String endpoint, + @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> listInaccessibleByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByElasticPoolNext( + @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> listByElasticPoolNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listInaccessibleByServerNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a database. + * Gets a list of databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param expand The child resources to include in the response. - * @param filter An OData filter expression that filters elements in the collection. + * @param skipToken The skipToken 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 database along with {@link Response} on successful completion of {@link Mono}. + * @return a list of databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String expand, String filter) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName, + String skipToken) { 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.")); @@ -269,42 +263,39 @@ public Mono> getWithResponseAsync(String resourceGroupNa if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, expand, filter, accept, - context)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + skipToken, this.client.getSubscriptionId(), 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())); } /** - * Gets a database. + * Gets a list of databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param expand The child resources to include in the response. - * @param filter An OData filter expression that filters elements in the collection. + * @param skipToken The skipToken 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 database along with {@link Response} on successful completion of {@link Mono}. + * @return a list of databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String expand, String filter, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName, + String skipToken, 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.")); @@ -312,95 +303,130 @@ private Mono> getWithResponseAsync(String resourceGroupN if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, expand, filter, accept, context); + return service + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, skipToken, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a database. + * Gets a list of databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param skipToken The skipToken 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 database on successful completion of {@link Mono}. + * @return a list of databases as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String databaseName) { - final String expand = null; - final String filter = null; - return getWithResponseAsync(resourceGroupName, serverName, databaseName, expand, filter) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByServerAsync(String resourceGroupName, String serverName, String skipToken) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, skipToken), + nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** - * Gets a database. + * Gets a list of databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param expand The child resources to include in the response. - * @param filter An OData filter expression that filters elements in the collection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { + final String skipToken = null; + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, skipToken), + nextLink -> listByServerNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of databases. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param skipToken The skipToken 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 database along with {@link Response}. + * @return a list of databases as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - String expand, String filter, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, expand, filter, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, String skipToken, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, skipToken, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** - * Gets a database. + * Gets a list of databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the 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 a database. + * @return a list of databases as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseInner get(String resourceGroupName, String serverName, String databaseName) { - final String expand = null; - final String filter = null; - return getWithResponse(resourceGroupName, serverName, databaseName, expand, filter, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + final String skipToken = null; + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, skipToken)); } /** - * Creates a new database or updates an existing database. + * Gets a list of databases. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param skipToken The skipToken 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 list of databases as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, String skipToken, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, skipToken, context)); + } + + /** + * Gets a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 database resource along with {@link Response} on successful completion of {@link Mono}. + * @return a database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, DatabaseInner parameters) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName) { 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.")); @@ -411,44 +437,37 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, contentType, accept, - parameters, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a new database or updates an existing database. + * Gets a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 database resource along with {@link Response} on successful completion of {@link Mono}. + * @return a database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, DatabaseInner parameters, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, 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.")); @@ -459,181 +478,75 @@ private Mono>> createOrUpdateWithResponseAsync(String if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, contentType, accept, - parameters, context); - } - - /** - * Creates a new database or updates 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 parameters The requested database resource 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 the {@link PollerFlux} for polling of a database resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, DatabaseInner> beginCreateOrUpdateAsync(String resourceGroupName, - String serverName, String databaseName, DatabaseInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DatabaseInner.class, DatabaseInner.class, this.client.getContext()); - } - - /** - * Creates a new database or updates 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 parameters The requested database resource 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 the {@link PollerFlux} for polling of a database resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DatabaseInner> beginCreateOrUpdateAsync(String resourceGroupName, - String serverName, String databaseName, DatabaseInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DatabaseInner.class, DatabaseInner.class, context); - } - - /** - * Creates a new database or updates 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 parameters The requested database resource 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 the {@link SyncPoller} for polling of a database resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DatabaseInner> beginCreateOrUpdate(String resourceGroupName, - String serverName, String databaseName, DatabaseInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller(); - } - - /** - * Creates a new database or updates 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 parameters The requested database resource 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 the {@link SyncPoller} for polling of a database resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DatabaseInner> beginCreateOrUpdate(String resourceGroupName, - String serverName, String databaseName, DatabaseInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context) - .getSyncPoller(); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Creates a new database or updates an existing database. + * Gets a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 database resource on successful completion of {@link Mono}. + * @return a database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, - DatabaseInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono getAsync(String resourceGroupName, String serverName, String databaseName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates a new database or updates an existing database. + * Gets a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 database resource on successful completion of {@link Mono}. + * @return a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, - DatabaseInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, context).block(); } /** - * Creates a new database or updates an existing database. + * Gets a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 database resource. + * @return a database. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, - DatabaseInner parameters) { - return createOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).block(); + public DatabaseInner get(String resourceGroupName, String serverName, String databaseName) { + return getWithResponse(resourceGroupName, serverName, databaseName, Context.NONE).getValue(); } /** * Creates a new database or updates 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 parameters The requested database resource 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 database resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, - DatabaseInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context).block(); - } - - /** - * Updates an existing database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -643,16 +556,12 @@ public DatabaseInner createOrUpdate(String resourceGroupName, String serverName, * @return a database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, DatabaseUpdate parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseInner 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.")); @@ -663,24 +572,28 @@ public Mono>> updateWithResponseAsync(String resourceG if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, contentType, accept, - parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates an existing database. + * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -691,16 +604,12 @@ public Mono>> updateWithResponseAsync(String resourceG * @return a database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, DatabaseUpdate parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseInner 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.")); @@ -711,22 +620,26 @@ private Mono>> updateWithResponseAsync(String resource if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Updates an existing database. + * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -736,18 +649,19 @@ private Mono>> updateWithResponseAsync(String resource * @return the {@link PollerFlux} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, DatabaseInner> beginUpdateAsync(String resourceGroupName, - String serverName, String databaseName, DatabaseUpdate parameters) { + public PollerFlux, DatabaseInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseInner parameters) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters); + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, this.client.getContext()); } /** - * Updates an existing database. + * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -758,19 +672,20 @@ public PollerFlux, DatabaseInner> beginUpdateAsync(Str * @return the {@link PollerFlux} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DatabaseInner> beginUpdateAsync(String resourceGroupName, - String serverName, String databaseName, DatabaseUpdate parameters, Context context) { + private PollerFlux, DatabaseInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseInner parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context); + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, context); } /** - * Updates an existing database. + * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -780,15 +695,16 @@ private PollerFlux, DatabaseInner> beginUpdateAsync(St * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DatabaseInner> beginUpdate(String resourceGroupName, String serverName, - String databaseName, DatabaseUpdate parameters) { - return this.beginUpdateAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller(); + public SyncPoller, DatabaseInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, DatabaseInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller(); } /** - * Updates an existing database. + * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -799,15 +715,17 @@ public SyncPoller, DatabaseInner> beginUpdate(String r * @return the {@link SyncPoller} for polling of a database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DatabaseInner> beginUpdate(String resourceGroupName, String serverName, - String databaseName, DatabaseUpdate parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context).getSyncPoller(); + public SyncPoller, DatabaseInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String databaseName, DatabaseInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context) + .getSyncPoller(); } /** - * Updates an existing database. + * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -817,16 +735,17 @@ public SyncPoller, DatabaseInner> beginUpdate(String r * @return a database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, - DatabaseUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, parameters).last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + DatabaseInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing database. + * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -837,16 +756,17 @@ public Mono updateAsync(String resourceGroupName, String serverNa * @return a database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String serverName, String databaseName, - DatabaseUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context).last() + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + DatabaseInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing database. + * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -856,15 +776,16 @@ private Mono updateAsync(String resourceGroupName, String serverN * @return a database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseInner update(String resourceGroupName, String serverName, String databaseName, - DatabaseUpdate parameters) { - return updateAsync(resourceGroupName, serverName, databaseName, parameters).block(); + public DatabaseInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + DatabaseInner parameters) { + return createOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).block(); } /** - * Updates an existing database. + * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -875,15 +796,16 @@ public DatabaseInner update(String resourceGroupName, String serverName, String * @return a database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseInner update(String resourceGroupName, String serverName, String databaseName, - DatabaseUpdate parameters, Context context) { - return updateAsync(resourceGroupName, serverName, databaseName, parameters, context).block(); + public DatabaseInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + DatabaseInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context).block(); } /** * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -898,10 +820,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -912,16 +830,21 @@ public Mono>> deleteWithResponseAsync(String resourceG if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -937,10 +860,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -951,15 +870,20 @@ private Mono>> deleteWithResponseAsync(String resource if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -978,7 +902,8 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -1000,7 +925,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1017,7 +943,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -1035,7 +962,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1052,7 +980,8 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -1070,7 +999,8 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri /** * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1085,7 +1015,8 @@ public void delete(String resourceGroupName, String serverName, String databaseN /** * Deletes the database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -1099,30 +1030,73 @@ public void delete(String resourceGroupName, String serverName, String databaseN } /** - * Gets a list of databases. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param top The number of elements to return from the collection. - * @param skip The number of elements in the collection to skip. - * @param filter An OData filter expression that filters elements in the collection. - * @param orderby How the results should be ordered. + * @param databaseName The name of the database. + * @param parameters The requested database resource 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 list of databases along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName, - Long top, Long skip, String filter, String orderby) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseUpdate parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates an existing database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The requested database resource 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 database resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, DatabaseUpdate parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -1130,169 +1104,194 @@ private Mono> listByServerSinglePageAsync(String re if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, top, skip, filter, orderby, 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())); + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); + } + + /** + * Updates an existing database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The requested database resource 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 the {@link PollerFlux} for polling of a database resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, DatabaseInner> beginUpdateAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseUpdate parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DatabaseInner.class, DatabaseInner.class, this.client.getContext()); } /** - * Gets a list of databases. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param top The number of elements to return from the collection. - * @param skip The number of elements in the collection to skip. - * @param filter An OData filter expression that filters elements in the collection. - * @param orderby How the results should be ordered. + * @param databaseName The name of the database. + * @param parameters The requested database resource 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 list of databases along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of a database resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName, - Long top, Long skip, String filter, String orderby, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DatabaseInner> beginUpdateAsync(String resourceGroupName, + String serverName, String databaseName, DatabaseUpdate parameters, Context context) { context = this.client.mergeContext(context); - return service - .listByServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, top, skip, filter, orderby, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DatabaseInner.class, DatabaseInner.class, context); } /** - * Gets a list of databases. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param top The number of elements to return from the collection. - * @param skip The number of elements in the collection to skip. - * @param filter An OData filter expression that filters elements in the collection. - * @param orderby How the results should be ordered. + * @param databaseName The name of the database. + * @param parameters The requested database resource 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 list of databases as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of a database resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName, Long top, Long skip, - String filter, String orderby) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, top, skip, filter, orderby), - nextLink -> listByServerNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DatabaseInner> beginUpdate(String resourceGroupName, String serverName, + String databaseName, DatabaseUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller(); } /** - * Gets a list of databases. + * Updates an existing database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The requested database resource 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 the {@link SyncPoller} for polling of a database resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DatabaseInner> beginUpdate(String resourceGroupName, String serverName, + String databaseName, DatabaseUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context).getSyncPoller(); + } + + /** + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The requested database resource 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 list of databases as paginated response with {@link PagedFlux}. + * @return a database resource on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - final Long top = null; - final Long skip = null; - final String filter = null; - final String orderby = null; - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, top, skip, filter, orderby), - nextLink -> listByServerNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + DatabaseUpdate parameters) { + return beginUpdateAsync(resourceGroupName, serverName, databaseName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a list of databases. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param top The number of elements to return from the collection. - * @param skip The number of elements in the collection to skip. - * @param filter An OData filter expression that filters elements in the collection. - * @param orderby How the results should be ordered. + * @param databaseName The name of the database. + * @param parameters The requested database resource 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 list of databases as paginated response with {@link PagedFlux}. + * @return a database resource on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Long top, Long skip, - String filter, String orderby, Context context) { - return new PagedFlux<>( - () -> listByServerSinglePageAsync(resourceGroupName, serverName, top, skip, filter, orderby, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + DatabaseUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a list of databases. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The requested database resource 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 list of databases as paginated response with {@link PagedIterable}. + * @return a database resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - final Long top = null; - final Long skip = null; - final String filter = null; - final String orderby = null; - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, top, skip, filter, orderby)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseInner update(String resourceGroupName, String serverName, String databaseName, + DatabaseUpdate parameters) { + return updateAsync(resourceGroupName, serverName, databaseName, parameters).block(); } /** - * Gets a list of databases. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param top The number of elements to return from the collection. - * @param skip The number of elements in the collection to skip. - * @param filter An OData filter expression that filters elements in the collection. - * @param orderby How the results should be ordered. + * @param databaseName The name of the database. + * @param parameters The requested database resource 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 list of databases as paginated response with {@link PagedIterable}. + * @return a database resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, Long top, Long skip, - String filter, String orderby, Context context) { - return new PagedIterable<>( - listByServerAsync(resourceGroupName, serverName, top, skip, filter, orderby, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseInner update(String resourceGroupName, String serverName, String databaseName, + DatabaseUpdate parameters, Context context) { + return updateAsync(resourceGroupName, serverName, databaseName, parameters, context).block(); } /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1309,10 +1308,6 @@ public Mono>> exportWithResponseAsync(String resourceG 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.")); @@ -1323,24 +1318,28 @@ public Mono>> exportWithResponseAsync(String resourceG if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.export(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, contentType, accept, - parameters, context)) + .withContext( + context -> service.export(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1358,10 +1357,6 @@ private Mono>> exportWithResponseAsync(String resource 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.")); @@ -1372,22 +1367,26 @@ private Mono>> exportWithResponseAsync(String resource if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.export(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, contentType, accept, parameters, context); + return service.export(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1409,7 +1408,8 @@ public PollerFlux, ImportExportOper /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1434,7 +1434,8 @@ private PollerFlux, ImportExportOpe /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1452,7 +1453,8 @@ public SyncPoller, ImportExportOper /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1472,7 +1474,8 @@ public SyncPoller, ImportExportOper /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1491,7 +1494,8 @@ public Mono exportAsync(String resourceGroupNa /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1511,7 +1515,8 @@ private Mono exportAsync(String resourceGroupN /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1529,7 +1534,8 @@ public ImportExportOperationResultInner export(String resourceGroupName, String /** * Exports a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database export request parameters. @@ -1548,9 +1554,10 @@ public ImportExportOperationResultInner export(String resourceGroupName, String /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1564,10 +1571,6 @@ public Mono>> failoverWithResponseAsync(String resourc 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.")); @@ -1578,18 +1581,23 @@ public Mono>> failoverWithResponseAsync(String resourc if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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.")); + } return FluxUtil - .withContext(context -> service.failover(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, replicaType, context)) + .withContext(context -> service.failover(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, replicaType, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1604,10 +1612,6 @@ private Mono>> failoverWithResponseAsync(String resour 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.")); @@ -1618,17 +1622,22 @@ private Mono>> failoverWithResponseAsync(String resour if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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.")); + } context = this.client.mergeContext(context); - return service.failover(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, replicaType, context); + return service.failover(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, replicaType, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1647,9 +1656,10 @@ public PollerFlux, Void> beginFailoverAsync(String resourceGrou /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1668,9 +1678,10 @@ public PollerFlux, Void> beginFailoverAsync(String resourceGrou /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1691,9 +1702,10 @@ private PollerFlux, Void> beginFailoverAsync(String resourceGro /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1709,9 +1721,10 @@ public SyncPoller, Void> beginFailover(String resourceGroupName /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1729,9 +1742,10 @@ public SyncPoller, Void> beginFailover(String resourceGroupName /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1748,9 +1762,10 @@ public Mono failoverAsync(String resourceGroupName, String serverName, Str /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1766,9 +1781,10 @@ public Mono failoverAsync(String resourceGroupName, String serverName, Str /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1786,9 +1802,10 @@ private Mono failoverAsync(String resourceGroupName, String serverName, St /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1802,9 +1819,10 @@ public void failover(String resourceGroupName, String serverName, String databas /** * Failovers a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to failover. * @param replicaType The type of replica to be failed over. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1820,7 +1838,8 @@ public void failover(String resourceGroupName, String serverName, String databas /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -1837,10 +1856,6 @@ public Mono>> importMethodWithResponseAsync(String res 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.")); @@ -1851,24 +1866,28 @@ public Mono>> importMethodWithResponseAsync(String res if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.importMethod(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, contentType, accept, - parameters, context)) + .withContext( + context -> service.importMethod(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -1886,10 +1905,6 @@ private Mono>> importMethodWithResponseAsync(String re 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.")); @@ -1900,23 +1915,26 @@ private Mono>> importMethodWithResponseAsync(String re if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.importMethod(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, contentType, accept, - parameters, context); + return service.importMethod(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -1939,7 +1957,8 @@ private Mono>> importMethodWithResponseAsync(String re /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -1964,7 +1983,8 @@ private Mono>> importMethodWithResponseAsync(String re /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -1982,7 +2002,8 @@ public SyncPoller, ImportExportOper /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -2003,7 +2024,8 @@ public SyncPoller, ImportExportOper /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -2022,7 +2044,8 @@ public Mono importMethodAsync(String resourceG /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -2042,7 +2065,8 @@ private Mono importMethodAsync(String resource /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -2060,7 +2084,8 @@ public ImportExportOperationResultInner importMethod(String resourceGroupName, S /** * Imports a bacpac into a new database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The database import request parameters. @@ -2079,9 +2104,10 @@ public ImportExportOperationResultInner importMethod(String resourceGroupName, S /** * Renames a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2095,10 +2121,6 @@ public Mono> renameWithResponseAsync(String resourceGroupName, St 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.")); @@ -2109,25 +2131,28 @@ public Mono> renameWithResponseAsync(String resourceGroupName, St if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; return FluxUtil - .withContext(context -> service.rename(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, contentType, parameters, - context)) + .withContext(context -> service.rename(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Renames a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2142,10 +2167,6 @@ private Mono> renameWithResponseAsync(String resourceGroupName, S 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.")); @@ -2156,23 +2177,27 @@ private Mono> renameWithResponseAsync(String resourceGroupName, S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; context = this.client.mergeContext(context); - return service.rename(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, contentType, parameters, context); + return service.rename(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Renames a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2189,9 +2214,10 @@ public Mono renameAsync(String resourceGroupName, String serverName, Strin /** * Renames a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2208,9 +2234,10 @@ public Response renameWithResponse(String resourceGroupName, String server /** * Renames a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to rename. * @param parameters The resource move definition for renaming this database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2225,9 +2252,10 @@ public void rename(String resourceGroupName, String serverName, String databaseN /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2240,10 +2268,6 @@ public Mono>> pauseWithResponseAsync(String resourceGr 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.")); @@ -2254,19 +2278,24 @@ public Mono>> pauseWithResponseAsync(String resourceGr if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; return FluxUtil - .withContext(context -> service.pause(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, accept, context)) + .withContext(context -> service.pause(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @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. @@ -2280,10 +2309,6 @@ private Mono>> pauseWithResponseAsync(String resourceG 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.")); @@ -2294,18 +2319,23 @@ private Mono>> pauseWithResponseAsync(String resourceG if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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.pause(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context); + return service.pause(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2322,9 +2352,10 @@ public PollerFlux, DatabaseInner> beginPauseAsync(Stri /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @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. @@ -2344,9 +2375,10 @@ private PollerFlux, DatabaseInner> beginPauseAsync(Str /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2361,9 +2393,10 @@ public SyncPoller, DatabaseInner> beginPause(String re /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @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. @@ -2379,9 +2412,10 @@ public SyncPoller, DatabaseInner> beginPause(String re /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2396,9 +2430,10 @@ public Mono pauseAsync(String resourceGroupName, String serverNam /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @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. @@ -2415,9 +2450,10 @@ private Mono pauseAsync(String resourceGroupName, String serverNa /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2431,9 +2467,10 @@ public DatabaseInner pause(String resourceGroupName, String serverName, String d /** * Pauses a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be paused. * @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. @@ -2448,9 +2485,10 @@ public DatabaseInner pause(String resourceGroupName, String serverName, String d /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2463,10 +2501,6 @@ public Mono>> resumeWithResponseAsync(String resourceG 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.")); @@ -2477,19 +2511,24 @@ public Mono>> resumeWithResponseAsync(String resourceG if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; return FluxUtil - .withContext(context -> service.resume(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, accept, context)) + .withContext(context -> service.resume(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @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. @@ -2499,13 +2538,9 @@ public Mono>> resumeWithResponseAsync(String resourceG @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> resumeWithResponseAsync(String resourceGroupName, String serverName, String databaseName, 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 (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2517,18 +2552,23 @@ private Mono>> resumeWithResponseAsync(String resource if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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.resume(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context); + return service.resume(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2545,9 +2585,10 @@ public PollerFlux, DatabaseInner> beginResumeAsync(Str /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @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. @@ -2567,9 +2608,10 @@ private PollerFlux, DatabaseInner> beginResumeAsync(St /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2584,9 +2626,10 @@ public SyncPoller, DatabaseInner> beginResume(String r /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @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. @@ -2602,9 +2645,10 @@ public SyncPoller, DatabaseInner> beginResume(String r /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2619,9 +2663,10 @@ public Mono resumeAsync(String resourceGroupName, String serverNa /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @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. @@ -2638,9 +2683,10 @@ private Mono resumeAsync(String resourceGroupName, String serverN /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2654,9 +2700,10 @@ public DatabaseInner resume(String resourceGroupName, String serverName, String /** * Resumes a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be resumed. * @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. @@ -2671,9 +2718,10 @@ public DatabaseInner resume(String resourceGroupName, String serverName, String /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2686,10 +2734,6 @@ public Mono>> upgradeDataWarehouseWithResponseAsync(St 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.")); @@ -2700,18 +2744,23 @@ public Mono>> upgradeDataWarehouseWithResponseAsync(St if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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.")); + } return FluxUtil - .withContext(context -> service.upgradeDataWarehouse(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, context)) + .withContext(context -> service.upgradeDataWarehouse(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @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. @@ -2725,10 +2774,6 @@ private Mono>> upgradeDataWarehouseWithResponseAsync(S 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.")); @@ -2739,17 +2784,22 @@ private Mono>> upgradeDataWarehouseWithResponseAsync(S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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.")); + } context = this.client.mergeContext(context); - return service.upgradeDataWarehouse(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, context); + return service.upgradeDataWarehouse(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2767,9 +2817,10 @@ public PollerFlux, Void> beginUpgradeDataWarehouseAsync(String /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @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. @@ -2789,9 +2840,10 @@ private PollerFlux, Void> beginUpgradeDataWarehouseAsync(String /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2806,9 +2858,10 @@ public SyncPoller, Void> beginUpgradeDataWarehouse(String resou /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @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. @@ -2825,9 +2878,10 @@ public SyncPoller, Void> beginUpgradeDataWarehouse(String resou /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2842,9 +2896,10 @@ public Mono upgradeDataWarehouseAsync(String resourceGroupName, String ser /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @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. @@ -2861,9 +2916,10 @@ private Mono upgradeDataWarehouseAsync(String resourceGroupName, String se /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2876,9 +2932,10 @@ public void upgradeDataWarehouse(String resourceGroupName, String serverName, St /** * Upgrades a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to be upgraded. * @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. @@ -2891,27 +2948,25 @@ public void upgradeDataWarehouse(String resourceGroupName, String serverName, St } /** - * Gets a list of inaccessible databases in a logical server. + * Gets a list of databases in an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 inaccessible databases in a logical server along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of databases in an elastic pool along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listInaccessibleByServerSinglePageAsync(String resourceGroupName, - String serverName) { + private Mono> listByElasticPoolSinglePageAsync(String resourceGroupName, + String serverName, String elasticPoolName) { 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.")); @@ -2919,39 +2974,44 @@ private Mono> listInaccessibleByServerSinglePageAsy if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (elasticPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter elasticPoolName 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"; return FluxUtil - .withContext( - context -> service.listInaccessibleByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + .withContext(context -> service.listByElasticPool(this.client.getEndpoint(), resourceGroupName, serverName, + elasticPoolName, this.client.getSubscriptionId(), 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())); } /** - * Gets a list of inaccessible databases in a logical server. + * Gets a list of databases in an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. * @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 inaccessible databases in a logical server along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of databases in an elastic pool along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listInaccessibleByServerSinglePageAsync(String resourceGroupName, - String serverName, Context context) { + private Mono> listByElasticPoolSinglePageAsync(String resourceGroupName, + String serverName, String elasticPoolName, 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.")); @@ -2959,104 +3019,119 @@ private Mono> listInaccessibleByServerSinglePageAsy if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (elasticPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter elasticPoolName 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 - .listInaccessibleByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context) + .listByElasticPool(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a list of inaccessible databases in a logical server. + * Gets a list of databases in an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 inaccessible databases in a logical server as paginated response with {@link PagedFlux}. + * @return a list of databases in an elastic pool as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listInaccessibleByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>(() -> listInaccessibleByServerSinglePageAsync(resourceGroupName, serverName), - nextLink -> listInaccessibleByServerNextSinglePageAsync(nextLink)); + public PagedFlux listByElasticPoolAsync(String resourceGroupName, String serverName, + String elasticPoolName) { + return new PagedFlux<>(() -> listByElasticPoolSinglePageAsync(resourceGroupName, serverName, elasticPoolName), + nextLink -> listByElasticPoolNextSinglePageAsync(nextLink)); } /** - * Gets a list of inaccessible databases in a logical server. + * Gets a list of databases in an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. * @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 inaccessible databases in a logical server as paginated response with {@link PagedFlux}. + * @return a list of databases in an elastic pool as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listInaccessibleByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listInaccessibleByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listInaccessibleByServerNextSinglePageAsync(nextLink, context)); + private PagedFlux listByElasticPoolAsync(String resourceGroupName, String serverName, + String elasticPoolName, Context context) { + return new PagedFlux<>( + () -> listByElasticPoolSinglePageAsync(resourceGroupName, serverName, elasticPoolName, context), + nextLink -> listByElasticPoolNextSinglePageAsync(nextLink, context)); } /** - * Gets a list of inaccessible databases in a logical server. + * Gets a list of databases in an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 inaccessible databases in a logical server as paginated response with {@link PagedIterable}. + * @return a list of databases in an elastic pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listInaccessibleByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listInaccessibleByServerAsync(resourceGroupName, serverName)); + public PagedIterable listByElasticPool(String resourceGroupName, String serverName, + String elasticPoolName) { + return new PagedIterable<>(listByElasticPoolAsync(resourceGroupName, serverName, elasticPoolName)); } /** - * Gets a list of inaccessible databases in a logical server. + * Gets a list of databases in an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. * @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 inaccessible databases in a logical server as paginated response with {@link PagedIterable}. + * @return a list of databases in an elastic pool as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listInaccessibleByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listInaccessibleByServerAsync(resourceGroupName, serverName, context)); + public PagedIterable listByElasticPool(String resourceGroupName, String serverName, + String elasticPoolName, Context context) { + return new PagedIterable<>(listByElasticPoolAsync(resourceGroupName, serverName, elasticPoolName, context)); } /** - * Gets a list of databases in an elastic pool. + * Gets a list of inaccessible databases in a logical server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 in an elastic pool along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of inaccessible databases in a logical server along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByElasticPoolSinglePageAsync(String resourceGroupName, - String serverName, String elasticPoolName) { + private Mono> listInaccessibleByServerSinglePageAsync(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.")); @@ -3064,43 +3139,39 @@ private Mono> listByElasticPoolSinglePageAsync(Stri if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (elasticPoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter elasticPoolName 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"; return FluxUtil - .withContext(context -> service.listByElasticPool(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, elasticPoolName, accept, context)) + .withContext(context -> service.listInaccessibleByServer(this.client.getEndpoint(), resourceGroupName, + serverName, this.client.getSubscriptionId(), 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())); } /** - * Gets a list of databases in an elastic pool. + * Gets a list of inaccessible databases in a logical server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. * @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 databases in an elastic pool along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of inaccessible databases in a logical server along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByElasticPoolSinglePageAsync(String resourceGroupName, - String serverName, String elasticPoolName, Context context) { + private Mono> listInaccessibleByServerSinglePageAsync(String resourceGroupName, + String serverName, 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.")); @@ -3108,90 +3179,87 @@ private Mono> listByElasticPoolSinglePageAsync(Stri if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (elasticPoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter elasticPoolName 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 - .listByElasticPool(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, elasticPoolName, accept, context) + .listInaccessibleByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a list of databases in an elastic pool. + * Gets a list of inaccessible databases in a logical server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 in an elastic pool as paginated response with {@link PagedFlux}. + * @return a list of inaccessible databases in a logical server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByElasticPoolAsync(String resourceGroupName, String serverName, - String elasticPoolName) { - return new PagedFlux<>(() -> listByElasticPoolSinglePageAsync(resourceGroupName, serverName, elasticPoolName), - nextLink -> listByElasticPoolNextSinglePageAsync(nextLink)); + public PagedFlux listInaccessibleByServerAsync(String resourceGroupName, String serverName) { + return new PagedFlux<>(() -> listInaccessibleByServerSinglePageAsync(resourceGroupName, serverName), + nextLink -> listInaccessibleByServerNextSinglePageAsync(nextLink)); } /** - * Gets a list of databases in an elastic pool. + * Gets a list of inaccessible databases in a logical server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. * @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 databases in an elastic pool as paginated response with {@link PagedFlux}. + * @return a list of inaccessible databases in a logical server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByElasticPoolAsync(String resourceGroupName, String serverName, - String elasticPoolName, Context context) { - return new PagedFlux<>( - () -> listByElasticPoolSinglePageAsync(resourceGroupName, serverName, elasticPoolName, context), - nextLink -> listByElasticPoolNextSinglePageAsync(nextLink, context)); + private PagedFlux listInaccessibleByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listInaccessibleByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listInaccessibleByServerNextSinglePageAsync(nextLink, context)); } /** - * Gets a list of databases in an elastic pool. + * Gets a list of inaccessible databases in a logical server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 in an elastic pool as paginated response with {@link PagedIterable}. + * @return a list of inaccessible databases in a logical server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByElasticPool(String resourceGroupName, String serverName, - String elasticPoolName) { - return new PagedIterable<>(listByElasticPoolAsync(resourceGroupName, serverName, elasticPoolName)); + public PagedIterable listInaccessibleByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listInaccessibleByServerAsync(resourceGroupName, serverName)); } /** - * Gets a list of databases in an elastic pool. + * Gets a list of inaccessible databases in a logical server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. * @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 databases in an elastic pool as paginated response with {@link PagedIterable}. + * @return a list of inaccessible databases in a logical server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByElasticPool(String resourceGroupName, String serverName, - String elasticPoolName, Context context) { - return new PagedIterable<>(listByElasticPoolAsync(resourceGroupName, serverName, elasticPoolName, context)); + public PagedIterable listInaccessibleByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listInaccessibleByServerAsync(resourceGroupName, serverName, context)); } /** @@ -3253,11 +3321,10 @@ 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 inaccessible databases in a logical server along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listInaccessibleByServerNextSinglePageAsync(String nextLink) { + private Mono> listByElasticPoolNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -3267,8 +3334,7 @@ private Mono> listInaccessibleByServerNextSinglePag } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listInaccessibleByServerNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByElasticPoolNext(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())); @@ -3282,12 +3348,10 @@ private Mono> listInaccessibleByServerNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 inaccessible databases in a logical server along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listInaccessibleByServerNextSinglePageAsync(String nextLink, - Context context) { + private Mono> listByElasticPoolNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -3297,7 +3361,7 @@ private Mono> listInaccessibleByServerNextSinglePag } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listInaccessibleByServerNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByElasticPoolNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -3309,11 +3373,10 @@ private Mono> listInaccessibleByServerNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 in an elastic pool along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByElasticPoolNextSinglePageAsync(String nextLink) { + private Mono> listInaccessibleByServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -3323,7 +3386,8 @@ private Mono> listByElasticPoolNextSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByElasticPoolNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext( + context -> service.listInaccessibleByServerNext(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())); @@ -3337,11 +3401,11 @@ private Mono> listByElasticPoolNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 in an elastic pool along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByElasticPoolNextSinglePageAsync(String nextLink, Context context) { + private Mono> listInaccessibleByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -3351,7 +3415,7 @@ private Mono> listByElasticPoolNextSinglePageAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByElasticPoolNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listInaccessibleByServerNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DeletedServersClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DeletedServersClientImpl.java index d21a30707b95..b1975e04b37c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DeletedServersClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DeletedServersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -31,7 +31,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.DeletedServersClient; import com.azure.resourcemanager.sql.fluent.models.DeletedServerInner; -import com.azure.resourcemanager.sql.implementation.models.DeletedServerListResult; +import com.azure.resourcemanager.sql.models.DeletedServerListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -65,71 +65,69 @@ public final class DeletedServersClientImpl implements DeletedServersClient { * The interface defining all the services for SqlManagementClientDeletedServers to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDeletedServers") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DeletedServersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers/{deletedServerName}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/deletedServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, @PathParam("deletedServerName") String deletedServerName, + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); + Mono> listByLocation(@HostParam("$host") String endpoint, + @PathParam("locationName") String locationName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers/{deletedServerName}/recover") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers/{deletedServerName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> recover(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("deletedServerName") String deletedServerName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/deletedServers") - @ExpectedResponses({ 200 }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers/{deletedServerName}/recover") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> recover(@HostParam("$host") String endpoint, + @PathParam("locationName") String locationName, @PathParam("deletedServerName") String deletedServerName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + Mono> listByLocationNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * Gets a deleted server. + * Gets a list of all deleted servers in a subscription. * - * @param locationName The name of the region where the resource is located. - * @param deletedServerName The name of the deleted 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 deleted server along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all deleted servers in a subscription along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String locationName, String deletedServerName) { + private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -138,34 +136,27 @@ public Mono> getWithResponseAsync(String locationNa 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 (deletedServerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deletedServerName 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(), locationName, deletedServerName, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + 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())); } /** - * Gets a deleted server. + * Gets a list of all deleted servers in a subscription. * - * @param locationName The name of the region where the resource is located. - * @param deletedServerName The name of the deleted 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 deleted server along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all deleted servers in a subscription along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String locationName, String deletedServerName, - Context context) { + 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.")); @@ -174,64 +165,66 @@ private Mono> getWithResponseAsync(String locationN 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 (deletedServerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter deletedServerName 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(), - locationName, deletedServerName, accept, context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a deleted server. + * Gets a list of all deleted servers in a subscription. * - * @param locationName The name of the region where the resource is located. - * @param deletedServerName The name of the deleted 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 deleted server on successful completion of {@link Mono}. + * @return a list of all deleted servers in a subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String locationName, String deletedServerName) { - return getWithResponseAsync(locationName, deletedServerName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Gets a deleted server. + * Gets a list of all deleted servers in a subscription. * - * @param locationName The name of the region where the resource is located. - * @param deletedServerName The name of the deleted 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 deleted server along with {@link Response}. + * @return a list of all deleted servers in a subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String locationName, String deletedServerName, - Context context) { - return getWithResponseAsync(locationName, deletedServerName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Gets a deleted server. + * Gets a list of all deleted servers in a subscription. * - * @param locationName The name of the region where the resource is located. - * @param deletedServerName The name of the deleted server. + * @throws ManagementException 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 all deleted servers in a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of all deleted servers in a 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 a deleted server. + * @return a list of all deleted servers in a subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeletedServerInner get(String locationName, String deletedServerName) { - return getWithResponse(locationName, deletedServerName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** @@ -250,17 +243,17 @@ private Mono> listByLocationSinglePageAsync(St return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName 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.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, accept, context)) + .withContext(context -> service.listByLocation(this.client.getEndpoint(), locationName, + this.client.getSubscriptionId(), 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())); @@ -284,18 +277,18 @@ private Mono> listByLocationSinglePageAsync(St return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName 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.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - locationName, accept, context) + .listByLocation(this.client.getEndpoint(), locationName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -361,7 +354,7 @@ public PagedIterable listByLocation(String locationName, Con } /** - * Recovers a deleted server. + * Gets a deleted server. * * @param locationName The name of the region where the resource is located. * @param deletedServerName The name of the deleted server. @@ -371,15 +364,127 @@ public PagedIterable listByLocation(String locationName, Con * @return a deleted server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> recoverWithResponseAsync(String locationName, String deletedServerName) { + public Mono> getWithResponseAsync(String locationName, String deletedServerName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (deletedServerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter deletedServerName 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"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), locationName, deletedServerName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a deleted server. + * + * @param locationName The name of the region where the resource is located. + * @param deletedServerName The name of the deleted 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 deleted server along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String locationName, String deletedServerName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (deletedServerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter deletedServerName 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.get(this.client.getEndpoint(), locationName, deletedServerName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); + } + + /** + * Gets a deleted server. + * + * @param locationName The name of the region where the resource is located. + * @param deletedServerName The name of the deleted 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 deleted server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String locationName, String deletedServerName) { + return getWithResponseAsync(locationName, deletedServerName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a deleted server. + * + * @param locationName The name of the region where the resource is located. + * @param deletedServerName The name of the deleted 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 deleted server along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String locationName, String deletedServerName, + Context context) { + return getWithResponseAsync(locationName, deletedServerName, context).block(); + } + + /** + * Gets a deleted server. + * + * @param locationName The name of the region where the resource is located. + * @param deletedServerName The name of the deleted 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 deleted server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeletedServerInner get(String locationName, String deletedServerName) { + return getWithResponse(locationName, deletedServerName, Context.NONE).getValue(); + } + + /** + * Recovers a deleted server. + * + * @param locationName The name of the region where the resource is located. + * @param deletedServerName The name of the deleted 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 deleted server along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> recoverWithResponseAsync(String locationName, String deletedServerName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } @@ -387,10 +492,14 @@ public Mono>> recoverWithResponseAsync(String location return Mono .error(new IllegalArgumentException("Parameter deletedServerName 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"; return FluxUtil - .withContext(context -> service.recover(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, deletedServerName, accept, context)) + .withContext(context -> service.recover(this.client.getEndpoint(), locationName, deletedServerName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -412,10 +521,6 @@ private Mono>> recoverWithResponseAsync(String locatio 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.")); } @@ -423,10 +528,14 @@ private Mono>> recoverWithResponseAsync(String locatio return Mono .error(new IllegalArgumentException("Parameter deletedServerName 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.recover(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - locationName, deletedServerName, accept, context); + return service.recover(this.client.getEndpoint(), locationName, deletedServerName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** @@ -563,115 +672,6 @@ public DeletedServerInner recover(String locationName, String deletedServerName, return recoverAsync(locationName, deletedServerName, context).block(); } - /** - * Gets a list of all deleted 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. - * @return a list of all deleted servers in a subscription along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - 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"; - return FluxUtil - .withContext(context -> 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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of all deleted servers in a 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 a list of all deleted servers in a subscription 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)); - } - - /** - * Gets a list of all deleted 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. - * @return a list of all deleted servers in a subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of all deleted servers in a 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 a list of all deleted servers in a subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of all deleted 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. - * @return a list of all deleted servers in a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Gets a list of all deleted servers in a 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 a list of all deleted servers in a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - /** * Get the next page of items. * @@ -679,11 +679,10 @@ 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 deleted servers for a location along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of deleted servers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -692,8 +691,7 @@ private Mono> listByLocationNextSinglePageAsyn new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -707,12 +705,10 @@ private Mono> listByLocationNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 deleted servers for a location along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of deleted servers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(String nextLink, - Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -722,7 +718,7 @@ private Mono> listByLocationNextSinglePageAsyn } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, 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)); } @@ -734,11 +730,10 @@ private Mono> listByLocationNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 all deleted servers in a subscription along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of deleted servers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listByLocationNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -747,7 +742,8 @@ private Mono> listNextSinglePageAsync(String n 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.listByLocationNext(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())); @@ -761,11 +757,11 @@ private Mono> listNextSinglePageAsync(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 a list of all deleted servers in a subscription along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of deleted servers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByLocationNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -775,7 +771,7 @@ private Mono> listNextSinglePageAsync(String n } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DistributedAvailabilityGroupsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DistributedAvailabilityGroupsClientImpl.java index 96fb9e1cda6d..c7fba278143e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DistributedAvailabilityGroupsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/DistributedAvailabilityGroupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -14,7 +14,6 @@ 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; @@ -35,9 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.DistributedAvailabilityGroupsClient; import com.azure.resourcemanager.sql.fluent.models.DistributedAvailabilityGroupInner; -import com.azure.resourcemanager.sql.implementation.models.DistributedAvailabilityGroupsListResult; -import com.azure.resourcemanager.sql.models.DistributedAvailabilityGroupSetRole; -import com.azure.resourcemanager.sql.models.DistributedAvailabilityGroupsFailoverRequest; +import com.azure.resourcemanager.sql.models.DistributedAvailabilityGroupsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -71,97 +68,232 @@ public final class DistributedAvailabilityGroupsClientImpl implements Distribute * The interface defining all the services for SqlManagementClientDistributedAvailabilityGroups to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientDistributedAvailabilityGroups") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientD") public interface DistributedAvailabilityGroupsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("distributedAvailabilityGroupName") String distributedAvailabilityGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}") - @ExpectedResponses({ 200, 201, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("distributedAvailabilityGroupName") String distributedAvailabilityGroupName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") DistributedAvailabilityGroupInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("distributedAvailabilityGroupName") String distributedAvailabilityGroupName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") DistributedAvailabilityGroupInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DistributedAvailabilityGroupInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("distributedAvailabilityGroupName") String distributedAvailabilityGroupName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); - - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}/failover") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failover(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("distributedAvailabilityGroupName") String distributedAvailabilityGroupName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") DistributedAvailabilityGroupsFailoverRequest parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}/setRole") + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> setRole(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("distributedAvailabilityGroupName") String distributedAvailabilityGroupName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") DistributedAvailabilityGroupSetRole parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DistributedAvailabilityGroupInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of a distributed availability groups in instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a distributed availability groups in instance along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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"; + return FluxUtil + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of a distributed availability groups in instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 a distributed availability groups in instance along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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 + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of a distributed availability groups in instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a distributed availability groups in instance as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of a distributed availability groups in instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 a distributed availability groups in instance as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of a distributed availability groups in instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 a distributed availability groups in instance as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); + } + + /** + * Gets a list of a distributed availability groups in instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 a distributed availability groups in instance as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); + } + /** * Gets a distributed availability group info. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -177,10 +309,6 @@ public Mono> getWithResponseAsync(St 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.")); @@ -193,18 +321,23 @@ public Mono> getWithResponseAsync(St return Mono.error(new IllegalArgumentException( "Parameter distributedAvailabilityGroupName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, - distributedAvailabilityGroupName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a distributed availability group info. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param context The context to associate with this operation. @@ -221,10 +354,6 @@ private Mono> getWithResponseAsync(S 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.")); @@ -237,16 +366,22 @@ private Mono> getWithResponseAsync(S return Mono.error(new IllegalArgumentException( "Parameter distributedAvailabilityGroupName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** * Gets a distributed availability group info. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -264,7 +399,8 @@ public Mono getAsync(String resourceGroupName /** * Gets a distributed availability group info. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param context The context to associate with this operation. @@ -283,7 +419,8 @@ public Response getWithResponse(String resour /** * Gets a distributed availability group info. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -301,7 +438,8 @@ public DistributedAvailabilityGroupInner get(String resourceGroupName, String ma /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -319,10 +457,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -335,24 +469,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono.error(new IllegalArgumentException( "Parameter distributedAvailabilityGroupName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, - distributedAvailabilityGroupName, contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, distributedAvailabilityGroupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -371,10 +509,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -387,23 +521,27 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter distributedAvailabilityGroupName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, - contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -427,7 +565,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -453,7 +592,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -476,7 +616,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -500,7 +641,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -521,7 +663,8 @@ public Mono createOrUpdateAsync(String resour /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -543,7 +686,8 @@ private Mono createOrUpdateAsync(String resou /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -562,7 +706,8 @@ public DistributedAvailabilityGroupInner createOrUpdate(String resourceGroupName /** * Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. * @param parameters The distributed availability group info. @@ -580,30 +725,24 @@ public DistributedAvailabilityGroupInner createOrUpdate(String resourceGroupName } /** - * Updates a distributed availability group replication mode. + * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return distributed availability group between box and Sql Managed Instance along with {@link Response} on - * successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, - String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, String distributedAvailabilityGroupName) { 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.")); @@ -616,46 +755,37 @@ public Mono>> updateWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter distributedAvailabilityGroupName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, - distributedAvailabilityGroupName, contentType, accept, parameters, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a distributed availability group replication mode. + * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. * @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 distributed availability group between box and Sql Managed Instance along with {@link Response} on - * successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, String distributedAvailabilityGroupName, 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.")); @@ -668,862 +798,180 @@ private Mono>> updateWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter distributedAvailabilityGroupName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, contentType, accept, parameters, - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** - * Updates a distributed availability group replication mode. + * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 distributed availability group between box and Sql Managed - * Instance. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, DistributedAvailabilityGroupInner> - beginUpdateAsync(String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, managedInstanceName, - distributedAvailabilityGroupName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DistributedAvailabilityGroupInner.class, - DistributedAvailabilityGroupInner.class, this.client.getContext()); - } - - /** - * Updates a distributed availability group replication mode. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. - * @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 distributed availability group between box and Sql Managed - * Instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DistributedAvailabilityGroupInner> - beginUpdateAsync(String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, managedInstanceName, - distributedAvailabilityGroupName, parameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DistributedAvailabilityGroupInner.class, - DistributedAvailabilityGroupInner.class, context); - } - - /** - * Updates a distributed availability group replication mode. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 distributed availability group between box and Sql Managed - * Instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DistributedAvailabilityGroupInner> beginUpdate( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters) { - return this - .beginUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) - .getSyncPoller(); - } - - /** - * Updates a distributed availability group replication mode. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. - * @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 distributed availability group between box and Sql Managed - * Instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DistributedAvailabilityGroupInner> beginUpdate( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupInner parameters, Context context) { - return this - .beginUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, - context) - .getSyncPoller(); - } - - /** - * Updates a distributed availability group replication mode. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return distributed availability group between box and Sql Managed Instance on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a distributed availability group replication mode. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. - * @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 distributed availability group between box and Sql Managed Instance on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters, Context context) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a distributed availability group replication mode. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return distributed availability group between box and Sql Managed Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DistributedAvailabilityGroupInner update(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters) { - return updateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) - .block(); - } - - /** - * Updates a distributed availability group replication mode. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group info. - * @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 distributed availability group between box and Sql Managed Instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DistributedAvailabilityGroupInner update(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters, Context context) { - return updateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, - context).block(); - } - - /** - * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managedInstanceName, String distributedAvailabilityGroupName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (distributedAvailabilityGroupName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter distributedAvailabilityGroupName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, - distributedAvailabilityGroupName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String managedInstanceName, String distributedAvailabilityGroupName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (distributedAvailabilityGroupName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter distributedAvailabilityGroupName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, context); - } - - /** - * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managedInstanceName, - String distributedAvailabilityGroupName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @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 managedInstanceName, - String distributedAvailabilityGroupName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, managedInstanceName, - distributedAvailabilityGroupName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managedInstanceName, - String distributedAvailabilityGroupName) { - return this.beginDeleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName) - .getSyncPoller(); - } - - /** - * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @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 managedInstanceName, - String distributedAvailabilityGroupName, Context context) { - return this.beginDeleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, context) - .getSyncPoller(); - } - - /** - * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managedInstanceName, - String distributedAvailabilityGroupName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @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 managedInstanceName, - String distributedAvailabilityGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 managedInstanceName, String distributedAvailabilityGroupName) { - deleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName).block(); - } - - /** - * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @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 managedInstanceName, String distributedAvailabilityGroupName, - Context context) { - deleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, context).block(); - } - - /** - * Gets a list of a distributed availability groups in instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 a distributed availability groups in instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, 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 a list of a distributed availability groups in instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 a distributed availability groups in instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of a distributed availability groups in instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 a distributed availability groups in instance as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of a distributed availability groups in instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 a distributed availability groups in instance as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of a distributed availability groups in instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 a distributed availability groups in instance as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); - } - - /** - * Gets a list of a distributed availability groups in instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 a distributed availability groups in instance as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); - } - - /** - * Performs requested failover type in this distributed availability group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return distributed availability group between box and Sql Managed Instance along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> failoverWithResponseAsync(String resourceGroupName, - String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupsFailoverRequest 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (distributedAvailabilityGroupName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter distributedAvailabilityGroupName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.failover(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, - distributedAvailabilityGroupName, contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Performs requested failover type in this distributed availability group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request 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 distributed availability group between box and Sql Managed Instance along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverWithResponseAsync(String resourceGroupName, - String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupsFailoverRequest 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (distributedAvailabilityGroupName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter distributedAvailabilityGroupName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.failover(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, contentType, accept, parameters, - context); - } - - /** - * Performs requested failover type in this distributed availability group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 distributed availability group between box and Sql Managed - * Instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, DistributedAvailabilityGroupInner> - beginFailoverAsync(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupsFailoverRequest parameters) { - Mono>> mono = failoverWithResponseAsync(resourceGroupName, managedInstanceName, - distributedAvailabilityGroupName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DistributedAvailabilityGroupInner.class, - DistributedAvailabilityGroupInner.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Performs requested failover type in this distributed availability group. + * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request 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 distributed availability group between box and Sql Managed - * Instance. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DistributedAvailabilityGroupInner> - beginFailoverAsync(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupsFailoverRequest parameters, - Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = failoverWithResponseAsync(resourceGroupName, managedInstanceName, - distributedAvailabilityGroupName, parameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DistributedAvailabilityGroupInner.class, - DistributedAvailabilityGroupInner.class, context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Performs requested failover type in this distributed availability group. + * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 distributed availability group between box and Sql Managed - * Instance. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DistributedAvailabilityGroupInner> beginFailover( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupsFailoverRequest parameters) { - return this - .beginFailoverAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName) .getSyncPoller(); } /** - * Performs requested failover type in this distributed availability group. + * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request 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 SyncPoller} for polling of distributed availability group between box and Sql Managed - * Instance. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DistributedAvailabilityGroupInner> beginFailover( - String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupsFailoverRequest parameters, Context context) { - return this - .beginFailoverAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, - context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, Context context) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, context) .getSyncPoller(); } /** - * Performs requested failover type in this distributed availability group. + * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return distributed availability group between box and Sql Managed Instance on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono failoverAsync(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupsFailoverRequest parameters) { - return beginFailoverAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) - .last() + public Mono deleteAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName) { + return beginDeleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Performs requested failover type in this distributed availability group. + * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request 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 distributed availability group between box and Sql Managed Instance on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverAsync(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupsFailoverRequest parameters, - Context context) { - return beginFailoverAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, - context).last().flatMap(this.client::getLroFinalResultOrError); + private Mono deleteAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, Context context) { + return beginDeleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Performs requested failover type in this distributed availability group. + * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return distributed availability group between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DistributedAvailabilityGroupInner failover(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupsFailoverRequest parameters) { - return failoverAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) - .block(); + public void delete(String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName) { + deleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName).block(); } /** - * Performs requested failover type in this distributed availability group. + * Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group failover request 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 distributed availability group between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DistributedAvailabilityGroupInner failover(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupsFailoverRequest parameters, + public void delete(String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, Context context) { - return failoverAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, - context).block(); + deleteAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, context).block(); } /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1531,17 +979,13 @@ public DistributedAvailabilityGroupInner failover(String resourceGroupName, Stri * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> setRoleWithResponseAsync(String resourceGroupName, + public Mono>> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupSetRole parameters) { + DistributedAvailabilityGroupInner 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.")); @@ -1554,27 +998,31 @@ public Mono>> setRoleWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter distributedAvailabilityGroupName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.setRole(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, - distributedAvailabilityGroupName, contentType, accept, parameters, context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @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. @@ -1583,17 +1031,13 @@ public Mono>> setRoleWithResponseAsync(String resource * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> setRoleWithResponseAsync(String resourceGroupName, + private Mono>> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupSetRole parameters, Context context) { + DistributedAvailabilityGroupInner 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.")); @@ -1606,26 +1050,30 @@ private Mono>> setRoleWithResponseAsync(String resourc return Mono.error(new IllegalArgumentException( "Parameter distributedAvailabilityGroupName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.setRole(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, contentType, accept, parameters, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + distributedAvailabilityGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1634,9 +1082,9 @@ private Mono>> setRoleWithResponseAsync(String resourc */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, DistributedAvailabilityGroupInner> - beginSetRoleAsync(String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupSetRole parameters) { - Mono>> mono = setRoleWithResponseAsync(resourceGroupName, managedInstanceName, + beginUpdateAsync(String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, + DistributedAvailabilityGroupInner parameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), DistributedAvailabilityGroupInner.class, @@ -1644,12 +1092,13 @@ private Mono>> setRoleWithResponseAsync(String resourc } /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @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. @@ -1659,10 +1108,10 @@ private Mono>> setRoleWithResponseAsync(String resourc */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DistributedAvailabilityGroupInner> - beginSetRoleAsync(String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupSetRole parameters, Context context) { + beginUpdateAsync(String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, + DistributedAvailabilityGroupInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = setRoleWithResponseAsync(resourceGroupName, managedInstanceName, + Mono>> mono = updateWithResponseAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), DistributedAvailabilityGroupInner.class, @@ -1670,12 +1119,13 @@ private Mono>> setRoleWithResponseAsync(String resourc } /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1683,21 +1133,22 @@ private Mono>> setRoleWithResponseAsync(String resourc * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DistributedAvailabilityGroupInner> beginSetRole( + public SyncPoller, DistributedAvailabilityGroupInner> beginUpdate( String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupSetRole parameters) { + DistributedAvailabilityGroupInner parameters) { return this - .beginSetRoleAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) + .beginUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) .getSyncPoller(); } /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @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. @@ -1706,22 +1157,23 @@ public SyncPoller, DistributedAvai * Instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DistributedAvailabilityGroupInner> beginSetRole( + public SyncPoller, DistributedAvailabilityGroupInner> beginUpdate( String resourceGroupName, String managedInstanceName, String distributedAvailabilityGroupName, - DistributedAvailabilityGroupSetRole parameters, Context context) { + DistributedAvailabilityGroupInner parameters, Context context) { return this - .beginSetRoleAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, + .beginUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, context) .getSyncPoller(); } /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1729,20 +1181,21 @@ public SyncPoller, DistributedAvai * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setRoleAsync(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupSetRole parameters) { - return beginSetRoleAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) + public Mono updateAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters) { + return beginUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @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. @@ -1751,38 +1204,40 @@ public Mono setRoleAsync(String resourceGroup * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono setRoleAsync(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupSetRole parameters, Context context) { - return beginSetRoleAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, + private Mono updateAsync(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters, Context context) { + return beginUpdateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return distributed availability group between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DistributedAvailabilityGroupInner setRole(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupSetRole parameters) { - return setRoleAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) + public DistributedAvailabilityGroupInner update(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters) { + return updateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters) .block(); } /** - * Sets the role for managed instance in a distributed availability group. + * Updates a distributed availability group replication mode. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param distributedAvailabilityGroupName The distributed availability group name. - * @param parameters The distributed availability group set role request parameters. + * @param parameters The distributed availability group info. * @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. @@ -1790,9 +1245,9 @@ public DistributedAvailabilityGroupInner setRole(String resourceGroupName, Strin * @return distributed availability group between box and Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DistributedAvailabilityGroupInner setRole(String resourceGroupName, String managedInstanceName, - String distributedAvailabilityGroupName, DistributedAvailabilityGroupSetRole parameters, Context context) { - return setRoleAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, + public DistributedAvailabilityGroupInner update(String resourceGroupName, String managedInstanceName, + String distributedAvailabilityGroupName, DistributedAvailabilityGroupInner parameters, Context context) { + return updateAsync(resourceGroupName, managedInstanceName, distributedAvailabilityGroupName, parameters, context).block(); } @@ -1803,7 +1258,7 @@ public DistributedAvailabilityGroupInner setRole(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 a distributed availability groups in instance along with {@link PagedResponse} on successful + * @return a list of distributed availability groups in instance along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1831,7 +1286,7 @@ private Mono> listByInstanceNex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 a distributed availability groups in instance along with {@link PagedResponse} on successful + * @return a list of distributed availability groups in instance along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolOperationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolOperationsClientImpl.java index ad85805b78f4..ba81ffff43b1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolOperationsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolOperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -28,7 +28,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ElasticPoolOperationsClient; import com.azure.resourcemanager.sql.fluent.models.ElasticPoolOperationInner; -import com.azure.resourcemanager.sql.implementation.models.ElasticPoolOperationListResult; +import com.azure.resourcemanager.sql.models.ElasticPoolOperationListResult; import java.util.UUID; import reactor.core.publisher.Mono; @@ -61,27 +61,26 @@ public final class ElasticPoolOperationsClientImpl implements ElasticPoolOperati * The interface defining all the services for SqlManagementClientElasticPoolOperations to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientElasticPoolOperations") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientE") public interface ElasticPoolOperationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByElasticPool(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByElasticPool(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("elasticPoolName") String elasticPoolName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("elasticPoolName") String elasticPoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations/{operationId}/cancel") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> cancel(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> cancel(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("elasticPoolName") String elasticPoolName, @PathParam("operationId") UUID operationId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @@ -89,16 +88,17 @@ Mono> cancel(@HostParam("endpoint") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByElasticPoolNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of operations performed on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName 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. @@ -112,10 +112,6 @@ private Mono> listByElasticPoolSinglePa 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.")); @@ -127,10 +123,14 @@ private Mono> listByElasticPoolSinglePa return Mono .error(new IllegalArgumentException("Parameter elasticPoolName 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"; return FluxUtil - .withContext(context -> service.listByElasticPool(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, elasticPoolName, accept, context)) + .withContext(context -> service.listByElasticPool(this.client.getEndpoint(), resourceGroupName, serverName, + elasticPoolName, this.client.getSubscriptionId(), 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())); @@ -139,9 +139,10 @@ private Mono> listByElasticPoolSinglePa /** * Gets a list of operations performed on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName 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. @@ -156,10 +157,6 @@ private Mono> listByElasticPoolSinglePa 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.")); @@ -171,11 +168,15 @@ private Mono> listByElasticPoolSinglePa return Mono .error(new IllegalArgumentException("Parameter elasticPoolName 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 - .listByElasticPool(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, elasticPoolName, accept, context) + .listByElasticPool(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -183,9 +184,10 @@ private Mono> listByElasticPoolSinglePa /** * Gets a list of operations performed on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName 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. @@ -201,9 +203,10 @@ public PagedFlux listByElasticPoolAsync(String resour /** * Gets a list of operations performed on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName 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. @@ -221,9 +224,10 @@ private PagedFlux listByElasticPoolAsync(String resou /** * Gets a list of operations performed on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName 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. @@ -238,9 +242,10 @@ public PagedIterable listByElasticPool(String resourc /** * Gets a list of operations performed on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName 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. @@ -256,9 +261,10 @@ public PagedIterable listByElasticPool(String resourc /** * Cancels the asynchronous operation on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -272,10 +278,6 @@ public Mono> cancelWithResponseAsync(String resourceGroupName, St 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.")); @@ -290,18 +292,23 @@ public Mono> cancelWithResponseAsync(String resourceGroupName, St if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId 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.")); + } return FluxUtil - .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, elasticPoolName, operationId, context)) + .withContext(context -> service.cancel(this.client.getEndpoint(), resourceGroupName, serverName, + elasticPoolName, operationId, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Cancels the asynchronous operation on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -316,10 +323,6 @@ private Mono> cancelWithResponseAsync(String resourceGroupName, S 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.")); @@ -334,17 +337,22 @@ private Mono> cancelWithResponseAsync(String resourceGroupName, S if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId 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.")); + } context = this.client.mergeContext(context); - return service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, elasticPoolName, operationId, context); + return service.cancel(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, operationId, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Cancels the asynchronous operation on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -361,9 +369,10 @@ public Mono cancelAsync(String resourceGroupName, String serverName, Strin /** * Cancels the asynchronous operation on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -380,9 +389,10 @@ public Response cancelWithResponse(String resourceGroupName, String server /** * Cancels the asynchronous operation on the elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The elasticPoolName parameter. * @param operationId The operation identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -400,7 +410,7 @@ public void cancel(String resourceGroupName, String serverName, String elasticPo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 operations performed on the elastic pool along with {@link PagedResponse} on successful + * @return the response to a list elastic pool operations request along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -428,7 +438,7 @@ private Mono> listByElasticPoolNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 operations performed on the elastic pool along with {@link PagedResponse} on successful + * @return the response to a list elastic pool operations request along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolsClientImpl.java index 76293deee6d8..cbd813e48011 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -35,7 +35,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ElasticPoolsClient; import com.azure.resourcemanager.sql.fluent.models.ElasticPoolInner; -import com.azure.resourcemanager.sql.implementation.models.ElasticPoolListResult; +import com.azure.resourcemanager.sql.models.ElasticPoolListResult; import com.azure.resourcemanager.sql.models.ElasticPoolUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -70,97 +70,93 @@ public final class ElasticPoolsClientImpl implements ElasticPoolsClient { * The interface defining all the services for SqlManagementClientElasticPools to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientElasticPools") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientE") public interface ElasticPoolsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("elasticPoolName") String elasticPoolName, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$skip") Long skip, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}") - @ExpectedResponses({ 200, 201, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("elasticPoolName") String elasticPoolName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticPoolInner parameters, - Context context); + @PathParam("elasticPoolName") String elasticPoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("elasticPoolName") String elasticPoolName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticPoolUpdate parameters, - Context context); + @PathParam("elasticPoolName") String elasticPoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ElasticPoolInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("elasticPoolName") String elasticPoolName, Context context); + @PathParam("elasticPoolName") String elasticPoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools") - @ExpectedResponses({ 200 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @QueryParam("$skip") Long skip, @HeaderParam("Accept") String accept, Context context); + @PathParam("elasticPoolName") String elasticPoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ElasticPoolUpdate parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/failover") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failover(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> failover(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("elasticPoolName") String elasticPoolName, Context context); + @PathParam("elasticPoolName") String elasticPoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets an elastic pool. + * Gets all elastic pools in a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param skip The number of elements in the collection to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. + * @return all elastic pools in a server along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String elasticPoolName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Long skip) { 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.")); @@ -168,40 +164,39 @@ public Mono> getWithResponseAsync(String resourceGrou if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (elasticPoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter elasticPoolName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, elasticPoolName, accept, context)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, skip, + this.client.getSubscriptionId(), 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())); } /** - * Gets an elastic pool. + * Gets all elastic pools in a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param skip The number of elements in the collection to skip. * @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 an elastic pool along with {@link Response} on successful completion of {@link Mono}. + * @return all elastic pools in a server along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String elasticPoolName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Long skip, 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.")); @@ -209,90 +204,130 @@ private Mono> getWithResponseAsync(String resourceGro if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (elasticPoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter elasticPoolName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, elasticPoolName, accept, context); + return service + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, skip, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets an elastic pool. + * Gets all elastic pools in a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param skip The number of elements in the collection to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an elastic pool on successful completion of {@link Mono}. + * @return all elastic pools in a server as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String elasticPoolName) { - return getWithResponseAsync(resourceGroupName, serverName, elasticPoolName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByServerAsync(String resourceGroupName, String serverName, Long skip) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, skip), + nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** - * Gets an elastic pool. + * Gets all elastic pools in a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 elastic pools in a server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { + final Long skip = null; + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, skip), + nextLink -> listByServerNextSinglePageAsync(nextLink)); + } + + /** + * Gets all elastic pools in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param skip The number of elements in the collection to skip. * @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 an elastic pool along with {@link Response}. + * @return all elastic pools in a server as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String elasticPoolName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, elasticPoolName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Long skip, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, skip, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** - * Gets an elastic pool. + * Gets all elastic pools in a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an elastic pool. + * @return all elastic pools in a server as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ElasticPoolInner get(String resourceGroupName, String serverName, String elasticPoolName) { - return getWithResponse(resourceGroupName, serverName, elasticPoolName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + final Long skip = null; + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, skip)); } /** - * Creates or updates an elastic pool. + * Gets all elastic pools in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param skip The number of elements in the collection to skip. + * @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 all elastic pools in a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, Long skip, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, skip, context)); + } + + /** + * Gets an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - String elasticPoolName, ElasticPoolInner parameters) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName) { 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.")); @@ -304,27 +339,24 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter elasticPoolName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, elasticPoolName, contentType, accept, - parameters, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + elasticPoolName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates an elastic pool. + * Gets an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool 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. @@ -332,16 +364,12 @@ public Mono>> createOrUpdateWithResponseAsync(String r * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, String elasticPoolName, ElasticPoolInner parameters, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName, 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.")); @@ -353,202 +381,90 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter elasticPoolName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, elasticPoolName, contentType, accept, - parameters, context); - } - - /** - * Creates or updates an elastic pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 an elastic pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ElasticPoolInner> beginCreateOrUpdateAsync(String resourceGroupName, - String serverName, String elasticPoolName, ElasticPoolInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ElasticPoolInner.class, ElasticPoolInner.class, this.client.getContext()); - } - - /** - * Creates or updates an elastic pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool 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 an elastic pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ElasticPoolInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolInner parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ElasticPoolInner.class, ElasticPoolInner.class, context); - } - - /** - * Creates or updates an elastic pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 an elastic pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ElasticPoolInner> beginCreateOrUpdate(String resourceGroupName, - String serverName, String elasticPoolName, ElasticPoolInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters) - .getSyncPoller(); - } - - /** - * Creates or updates an elastic pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool 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 SyncPoller} for polling of an elastic pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ElasticPoolInner> beginCreateOrUpdate(String resourceGroupName, - String serverName, String elasticPoolName, ElasticPoolInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context) - .getSyncPoller(); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Creates or updates an elastic pool. + * Gets an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an elastic pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String serverName, - String elasticPoolName, ElasticPoolInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono getAsync(String resourceGroupName, String serverName, String elasticPoolName) { + return getWithResponseAsync(resourceGroupName, serverName, elasticPoolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates or updates an elastic pool. + * Gets an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool 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 an elastic pool on successful completion of {@link Mono}. + * @return an elastic pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String serverName, - String elasticPoolName, ElasticPoolInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public Response getWithResponse(String resourceGroupName, String serverName, + String elasticPoolName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, elasticPoolName, context).block(); } /** - * Creates or updates an elastic pool. + * Gets an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an elastic pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ElasticPoolInner createOrUpdate(String resourceGroupName, String serverName, String elasticPoolName, - ElasticPoolInner parameters) { - return createOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).block(); + public ElasticPoolInner get(String resourceGroupName, String serverName, String elasticPoolName) { + return getWithResponse(resourceGroupName, serverName, elasticPoolName, Context.NONE).getValue(); } /** * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param parameters The elastic pool 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 an elastic pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ElasticPoolInner createOrUpdate(String resourceGroupName, String serverName, String elasticPoolName, - ElasticPoolInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context).block(); - } - - /** - * Updates an elastic pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String elasticPoolName, ElasticPoolUpdate parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolInner 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.")); @@ -560,27 +476,31 @@ public Mono>> updateWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter elasticPoolName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, elasticPoolName, contentType, accept, - parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + elasticPoolName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates an elastic pool. + * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. + * @param parameters The elastic pool 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. @@ -588,16 +508,12 @@ public Mono>> updateWithResponseAsync(String resourceG * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String elasticPoolName, ElasticPoolUpdate parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolInner 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.")); @@ -609,46 +525,51 @@ private Mono>> updateWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter elasticPoolName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, elasticPoolName, contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Updates an elastic pool. + * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. + * @param parameters The elastic pool parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ElasticPoolInner> beginUpdateAsync(String resourceGroupName, - String serverName, String elasticPoolName, ElasticPoolUpdate parameters) { + public PollerFlux, ElasticPoolInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolInner parameters) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters); + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ElasticPoolInner.class, ElasticPoolInner.class, this.client.getContext()); } /** - * Updates an elastic pool. + * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. + * @param parameters The elastic pool 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. @@ -656,40 +577,44 @@ public PollerFlux, ElasticPoolInner> beginUpdateAsy * @return the {@link PollerFlux} for polling of an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ElasticPoolInner> beginUpdateAsync(String resourceGroupName, - String serverName, String elasticPoolName, ElasticPoolUpdate parameters, Context context) { + private PollerFlux, ElasticPoolInner> beginCreateOrUpdateAsync( + String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolInner parameters, + Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateWithResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters, context); + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ElasticPoolInner.class, ElasticPoolInner.class, context); } /** - * Updates an elastic pool. + * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. + * @param parameters The elastic pool parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ElasticPoolInner> beginUpdate(String resourceGroupName, - String serverName, String elasticPoolName, ElasticPoolUpdate parameters) { - return this.beginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).getSyncPoller(); + public SyncPoller, ElasticPoolInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters) + .getSyncPoller(); } /** - * Updates an elastic pool. + * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. + * @param parameters The elastic pool 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. @@ -697,38 +622,40 @@ public SyncPoller, ElasticPoolInner> beginUpdate(St * @return the {@link SyncPoller} for polling of an elastic pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ElasticPoolInner> beginUpdate(String resourceGroupName, - String serverName, String elasticPoolName, ElasticPoolUpdate parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context) + public SyncPoller, ElasticPoolInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context) .getSyncPoller(); } /** - * Updates an elastic pool. + * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. + * @param parameters The elastic pool parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an elastic pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, String elasticPoolName, - ElasticPoolUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an elastic pool. + * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. + * @param parameters The elastic pool 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. @@ -736,37 +663,39 @@ public Mono updateAsync(String resourceGroupName, String serve * @return an elastic pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String serverName, String elasticPoolName, - ElasticPoolUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context).last() + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an elastic pool. + * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. + * @param parameters The elastic pool parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an elastic pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ElasticPoolInner update(String resourceGroupName, String serverName, String elasticPoolName, - ElasticPoolUpdate parameters) { - return updateAsync(resourceGroupName, serverName, elasticPoolName, parameters).block(); + public ElasticPoolInner createOrUpdate(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolInner parameters) { + return createOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).block(); } /** - * Updates an elastic pool. + * Creates or updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. - * @param parameters The elastic pool update parameters. + * @param parameters The elastic pool 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. @@ -774,15 +703,16 @@ public ElasticPoolInner update(String resourceGroupName, String serverName, Stri * @return an elastic pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ElasticPoolInner update(String resourceGroupName, String serverName, String elasticPoolName, - ElasticPoolUpdate parameters, Context context) { - return updateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context).block(); + public ElasticPoolInner createOrUpdate(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context).block(); } /** * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -797,10 +727,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -812,16 +738,21 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter elasticPoolName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, elasticPoolName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + elasticPoolName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -837,10 +768,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -852,15 +779,20 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter elasticPoolName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, elasticPoolName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -879,7 +811,8 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -901,7 +834,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -918,7 +852,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -936,7 +871,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -953,7 +889,8 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -972,7 +909,8 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri /** * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -987,7 +925,8 @@ public void delete(String resourceGroupName, String serverName, String elasticPo /** * Deletes an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. * @param context The context to associate with this operation. @@ -1001,27 +940,25 @@ public void delete(String resourceGroupName, String serverName, String elasticPo } /** - * Gets all elastic pools in a server. + * Updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param skip The number of elements in the collection to skip. + * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 elastic pools in a server along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, Long skip) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolUpdate 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.")); @@ -1029,38 +966,48 @@ private Mono> listByServerSinglePageAsync(String if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (elasticPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter elasticPoolName 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.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext( + context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets all elastic pools in a server. + * Updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param skip The number of elements in the collection to skip. + * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update 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 all elastic pools in a server along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return an elastic pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, Long skip, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String elasticPoolName, ElasticPoolUpdate 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.")); @@ -1068,108 +1015,198 @@ private Mono> listByServerSinglePageAsync(String if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (elasticPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter elasticPoolName 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"; context = this.client.mergeContext(context); - return service - .listByServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Gets all elastic pools in a server. + * Updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param skip The number of elements in the collection to skip. + * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 elastic pools in a server as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of an elastic pool. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName, Long skip) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, skip), - nextLink -> listByServerNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ElasticPoolInner> beginUpdateAsync(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolUpdate parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticPoolInner.class, ElasticPoolInner.class, this.client.getContext()); } /** - * Gets all elastic pools in a server. + * Updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update 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 all elastic pools in a server as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of an elastic pool. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - final Long skip = null; - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, skip), - nextLink -> listByServerNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticPoolInner> beginUpdateAsync(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolUpdate parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticPoolInner.class, ElasticPoolInner.class, context); } /** - * Gets all elastic pools in a server. + * Updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param skip The number of elements in the collection to skip. + * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 an elastic pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticPoolInner> beginUpdate(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).getSyncPoller(); + } + + /** + * Updates an elastic pool. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update 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 all elastic pools in a server as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of an elastic pool. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Long skip, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, skip, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticPoolInner> beginUpdate(String resourceGroupName, + String serverName, String elasticPoolName, ElasticPoolUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context) + .getSyncPoller(); } /** - * Gets all elastic pools in a server. + * Updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 elastic pools in a server as paginated response with {@link PagedIterable}. + * @return an elastic pool on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - final Long skip = null; - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, skip)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolUpdate parameters) { + return beginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets all elastic pools in a server. + * Updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param skip The number of elements in the collection to skip. + * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update 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 all elastic pools in a server as paginated response with {@link PagedIterable}. + * @return an elastic pool on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, Long skip, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, skip, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Failovers an elastic pool. + * Updates an elastic pool. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an elastic pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticPoolInner update(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolUpdate parameters) { + return updateAsync(resourceGroupName, serverName, elasticPoolName, parameters).block(); + } + + /** + * Updates an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the elastic pool. + * @param parameters The elastic pool update 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 an elastic pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticPoolInner update(String resourceGroupName, String serverName, String elasticPoolName, + ElasticPoolUpdate parameters, Context context) { + return updateAsync(resourceGroupName, serverName, elasticPoolName, parameters, context).block(); + } + + /** + * Failovers an elastic pool. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1182,10 +1219,6 @@ public Mono>> failoverWithResponseAsync(String resourc 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.")); @@ -1197,18 +1230,23 @@ public Mono>> failoverWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter elasticPoolName 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.")); + } return FluxUtil - .withContext(context -> service.failover(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, elasticPoolName, context)) + .withContext(context -> service.failover(this.client.getEndpoint(), resourceGroupName, serverName, + elasticPoolName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Failovers an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The name of the elastic pool to failover. * @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. @@ -1222,10 +1260,6 @@ private Mono>> failoverWithResponseAsync(String resour 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.")); @@ -1237,17 +1271,22 @@ private Mono>> failoverWithResponseAsync(String resour return Mono .error(new IllegalArgumentException("Parameter elasticPoolName 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.")); + } context = this.client.mergeContext(context); - return service.failover(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, elasticPoolName, context); + return service.failover(this.client.getEndpoint(), resourceGroupName, serverName, elasticPoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Failovers an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1265,9 +1304,10 @@ public PollerFlux, Void> beginFailoverAsync(String resourceGrou /** * Failovers an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The name of the elastic pool to failover. * @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. @@ -1287,9 +1327,10 @@ private PollerFlux, Void> beginFailoverAsync(String resourceGro /** * Failovers an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1304,9 +1345,10 @@ public SyncPoller, Void> beginFailover(String resourceGroupName /** * Failovers an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The name of the elastic pool to failover. * @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. @@ -1322,9 +1364,10 @@ public SyncPoller, Void> beginFailover(String resourceGroupName /** * Failovers an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1339,9 +1382,10 @@ public Mono failoverAsync(String resourceGroupName, String serverName, Str /** * Failovers an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The name of the elastic pool to failover. * @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. @@ -1358,9 +1402,10 @@ private Mono failoverAsync(String resourceGroupName, String serverName, St /** * Failovers an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The name of the elastic pool to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1373,9 +1418,10 @@ public void failover(String resourceGroupName, String serverName, String elastic /** * Failovers an elastic pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param elasticPoolName The name of the elastic pool. + * @param elasticPoolName The name of the elastic pool to failover. * @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. @@ -1393,7 +1439,8 @@ public void failover(String resourceGroupName, String serverName, String elastic * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 elastic pools in a server along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the result of an elastic pool list request along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -1420,7 +1467,8 @@ private Mono> listByServerNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 elastic pools in a server along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the result of an elastic pool list request along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/EncryptionProtectorsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/EncryptionProtectorsClientImpl.java index c6fcf3c2ba31..c2349bc23504 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/EncryptionProtectorsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/EncryptionProtectorsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.EncryptionProtectorsClient; import com.azure.resourcemanager.sql.fluent.models.EncryptionProtectorInner; -import com.azure.resourcemanager.sql.implementation.models.EncryptionProtectorListResult; +import com.azure.resourcemanager.sql.models.EncryptionProtectorListResult; import com.azure.resourcemanager.sql.models.EncryptionProtectorName; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -68,60 +68,212 @@ public final class EncryptionProtectorsClientImpl implements EncryptionProtector * The interface defining all the services for SqlManagementClientEncryptionProtectors to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientEncryptionProtectors") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientE") public interface EncryptionProtectorsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EncryptionProtectorInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") EncryptionProtectorInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}/revalidate") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> revalidate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> revalidate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, Context context); + @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of server encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 encryption protectors 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 (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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of server encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 encryption protectors along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of server encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 encryption protectors 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)); + } + + /** + * Gets a list of server encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 encryption protectors as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of server encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 encryption protectors as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Gets a list of server encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 encryption protectors as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + /** * Gets a server encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -136,10 +288,6 @@ public Mono> getWithResponseAsync(String reso 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.")); @@ -151,16 +299,22 @@ public Mono> getWithResponseAsync(String reso return Mono.error( new IllegalArgumentException("Parameter encryptionProtectorName 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"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, encryptionProtectorName, accept, context)) + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + encryptionProtectorName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @param context The context to associate with this operation. @@ -176,10 +330,6 @@ private Mono> getWithResponseAsync(String res 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.")); @@ -191,16 +341,21 @@ private Mono> getWithResponseAsync(String res return Mono.error( new IllegalArgumentException("Parameter encryptionProtectorName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, encryptionProtectorName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, encryptionProtectorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -218,7 +373,8 @@ public Mono getAsync(String resourceGroupName, String /** * Gets a server encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @param context The context to associate with this operation. @@ -236,7 +392,8 @@ public Response getWithResponse(String resourceGroupNa /** * Gets a server encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -253,9 +410,10 @@ public EncryptionProtectorInner get(String resourceGroupName, String serverName, /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -269,10 +427,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -284,26 +438,30 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono.error( new IllegalArgumentException("Parameter encryptionProtectorName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, encryptionProtectorName, contentType, - accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + encryptionProtectorName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -319,10 +477,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -334,25 +488,28 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter encryptionProtectorName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, encryptionProtectorName, contentType, - accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, encryptionProtectorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -373,9 +530,10 @@ public PollerFlux, EncryptionProtectorInner /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -397,9 +555,10 @@ private PollerFlux, EncryptionProtectorInne /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -417,9 +576,10 @@ public SyncPoller, EncryptionProtectorInner /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -439,9 +599,10 @@ public SyncPoller, EncryptionProtectorInner /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -458,9 +619,10 @@ public Mono createOrUpdateAsync(String resourceGroupNa /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -479,9 +641,10 @@ private Mono createOrUpdateAsync(String resourceGroupN /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -497,9 +660,10 @@ public EncryptionProtectorInner createOrUpdate(String resourceGroupName, String /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -513,155 +677,13 @@ public EncryptionProtectorInner createOrUpdate(String resourceGroupName, String return createOrUpdateAsync(resourceGroupName, serverName, encryptionProtectorName, parameters, context).block(); } - /** - * Gets a list of server encryption protectors. - * - * @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 encryption protectors 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())); - } - - /** - * Gets a list of server encryption protectors. - * - * @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 encryption protectors along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Gets a list of server encryption protectors. - * - * @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 encryption protectors 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)); - } - - /** - * Gets a list of server encryption protectors. - * - * @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 encryption protectors as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of server encryption protectors. - * - * @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 encryption protectors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Gets a list of server encryption protectors. - * - * @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 encryption protectors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); - } - /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -674,10 +696,6 @@ public Mono>> revalidateWithResponseAsync(String resou 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.")); @@ -689,18 +707,23 @@ public Mono>> revalidateWithResponseAsync(String resou return Mono.error( new IllegalArgumentException("Parameter encryptionProtectorName 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.")); + } return FluxUtil - .withContext(context -> service.revalidate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, encryptionProtectorName, context)) + .withContext(context -> service.revalidate(this.client.getEndpoint(), resourceGroupName, serverName, + encryptionProtectorName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -714,10 +737,6 @@ private Mono>> revalidateWithResponseAsync(String reso 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.")); @@ -729,17 +748,22 @@ private Mono>> revalidateWithResponseAsync(String reso return Mono.error( new IllegalArgumentException("Parameter encryptionProtectorName 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.")); + } context = this.client.mergeContext(context); - return service.revalidate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, encryptionProtectorName, context); + return service.revalidate(this.client.getEndpoint(), resourceGroupName, serverName, encryptionProtectorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -757,9 +781,10 @@ public PollerFlux, Void> beginRevalidateAsync(String resourceGr /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -779,9 +804,10 @@ private PollerFlux, Void> beginRevalidateAsync(String resourceG /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -796,9 +822,10 @@ public SyncPoller, Void> beginRevalidate(String resourceGroupNa /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -815,9 +842,10 @@ public SyncPoller, Void> beginRevalidate(String resourceGroupNa /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -833,9 +861,10 @@ public Mono revalidateAsync(String resourceGroupName, String serverName, /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -852,9 +881,10 @@ private Mono revalidateAsync(String resourceGroupName, String serverName, /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -868,9 +898,10 @@ public void revalidate(String resourceGroupName, String serverName, /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/EndpointCertificatesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/EndpointCertificatesClientImpl.java index 134f39e7f764..d8e750985f51 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/EndpointCertificatesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/EndpointCertificatesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.EndpointCertificatesClient; import com.azure.resourcemanager.sql.fluent.models.EndpointCertificateInner; -import com.azure.resourcemanager.sql.implementation.models.EndpointCertificateListResult; +import com.azure.resourcemanager.sql.models.EndpointCertificateListResult; import reactor.core.publisher.Mono; /** @@ -59,61 +59,57 @@ public final class EndpointCertificatesClientImpl implements EndpointCertificate * The interface defining all the services for SqlManagementClientEndpointCertificates to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientEndpointCertificates") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientE") public interface EndpointCertificatesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates/{endpointType}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("endpointType") String endpointType, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates/{endpointType}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("endpointType") String endpointType, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a certificate used on the endpoint with the given id. + * List certificates used on endpoints on the target instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a certificate used on the endpoint with the given id along with {@link Response} on successful completion - * of {@link Mono}. + * @return a list of endpoint certificates on the target instance along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String endpointType) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName) { 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.")); @@ -122,40 +118,39 @@ public Mono> getWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } - if (endpointType == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointType 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, endpointType, accept, context)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); } /** - * Gets a certificate used on the endpoint with the given id. + * List certificates used on endpoints on the target instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @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 certificate used on the endpoint with the given id along with {@link Response} on successful completion - * of {@link Mono}. + * @return a list of endpoint certificates on the target instance along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String endpointType, Context context) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, 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.")); @@ -164,89 +159,111 @@ private Mono> getWithResponseAsync(String res return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } - if (endpointType == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointType 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, endpointType, accept, context); + return service + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a certificate used on the endpoint with the given id. + * List certificates used on endpoints on the target instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a certificate used on the endpoint with the given id on successful completion of {@link Mono}. + * @return a list of endpoint certificates on the target instance as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String managedInstanceName, - String endpointType) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, endpointType) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** - * Gets a certificate used on the endpoint with the given id. + * List certificates used on endpoints on the target instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @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 certificate used on the endpoint with the given id along with {@link Response}. + * @return a list of endpoint certificates on the target instance as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String managedInstanceName, - String endpointType, Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, endpointType, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** - * Gets a certificate used on the endpoint with the given id. + * List certificates used on endpoints on the target instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a certificate used on the endpoint with the given id. + * @return a list of endpoint certificates on the target instance as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointCertificateInner get(String resourceGroupName, String managedInstanceName, String endpointType) { - return getWithResponse(resourceGroupName, managedInstanceName, endpointType, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); } /** * List certificates used on endpoints on the target instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @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 EndpointCertificate list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of endpoint certificates on the target instance as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + Context context) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); + } + + /** + * Gets a certificate used on the endpoint with the given id. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param endpointType Type of the endpoint whose certificate the customer is looking for. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a certificate used on the endpoint with the given id along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync(String resourceGroupName, - String managedInstanceName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String endpointType) { 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.")); @@ -255,38 +272,41 @@ private Mono> listByInstanceSinglePageAs return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } + if (endpointType == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointType 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"; return FluxUtil - .withContext(context -> service.listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + endpointType, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List certificates used on endpoints on the target instance. + * Gets a certificate used on the endpoint with the given id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @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 EndpointCertificate list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a certificate used on the endpoint with the given id along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync(String resourceGroupName, - String managedInstanceName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String endpointType, 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.")); @@ -295,81 +315,72 @@ private Mono> listByInstanceSinglePageAs return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } + if (endpointType == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointType 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 - .listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, endpointType, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * List certificates used on endpoints on the target instance. + * Gets a certificate used on the endpoint with the given id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 EndpointCertificate list operation as paginated response with {@link PagedFlux}. + * @return a certificate used on the endpoint with the given id on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String endpointType) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, endpointType) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List certificates used on endpoints on the target instance. + * Gets a certificate used on the endpoint with the given id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @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 EndpointCertificate list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * List certificates used on endpoints on the target instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 EndpointCertificate list operation as paginated response with {@link PagedIterable}. + * @return a certificate used on the endpoint with the given id along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + String endpointType, Context context) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, endpointType, context).block(); } /** - * List certificates used on endpoints on the target instance. + * Gets a certificate used on the endpoint with the given id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param context The context to associate with this operation. + * @param endpointType Type of the endpoint whose certificate the customer is looking for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 EndpointCertificate list operation as paginated response with {@link PagedIterable}. + * @return a certificate used on the endpoint with the given id. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, - Context context) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointCertificateInner get(String resourceGroupName, String managedInstanceName, String endpointType) { + return getWithResponse(resourceGroupName, managedInstanceName, endpointType, Context.NONE).getValue(); } /** @@ -379,7 +390,7 @@ public PagedIterable listByInstance(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 EndpointCertificate list operation along with {@link PagedResponse} on successful + * @return a list of endpoint certificates on the target instance along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -407,7 +418,7 @@ private Mono> listByInstanceNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 EndpointCertificate list operation along with {@link PagedResponse} on successful + * @return a list of endpoint certificates on the target instance along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedDatabaseBlobAuditingPoliciesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedDatabaseBlobAuditingPoliciesClientImpl.java index a6bb269240d0..1182140d7ecd 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedDatabaseBlobAuditingPoliciesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedDatabaseBlobAuditingPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -29,8 +29,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ExtendedDatabaseBlobAuditingPoliciesClient; import com.azure.resourcemanager.sql.fluent.models.ExtendedDatabaseBlobAuditingPolicyInner; -import com.azure.resourcemanager.sql.implementation.models.ExtendedDatabaseBlobAuditingPolicyListResult; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyName; +import com.azure.resourcemanager.sql.models.ExtendedDatabaseBlobAuditingPolicyListResult; import reactor.core.publisher.Mono; /** @@ -64,74 +63,70 @@ public final class ExtendedDatabaseBlobAuditingPoliciesClientImpl * The interface defining all the services for SqlManagementClientExtendedDatabaseBlobAuditingPolicies to be used by * the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientExtendedDatabaseBlobAuditingPolicies") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientE") public interface ExtendedDatabaseBlobAuditingPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, - @PathParam("blobAuditingPolicyName") BlobAuditingPolicyName blobAuditingPolicyName, + @PathParam("blobAuditingPolicyName") String blobAuditingPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, - @PathParam("blobAuditingPolicyName") BlobAuditingPolicyName blobAuditingPolicyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ExtendedDatabaseBlobAuditingPolicyInner parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("blobAuditingPolicyName") String blobAuditingPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ExtendedDatabaseBlobAuditingPolicyInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets an extended database's blob auditing policy. + * Lists extended auditing settings of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an extended database's blob auditing policy along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of database extended auditing settings along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, BlobAuditingPolicyName blobAuditingPolicyName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { 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.")); @@ -142,43 +137,41 @@ public Mono> getWithResponseAs if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (blobAuditingPolicyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter blobAuditingPolicyName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, blobAuditingPolicyName, - accept, context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), 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())); } /** - * Gets an extended database's blob auditing policy. + * Lists extended auditing settings of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @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 an extended database's blob auditing policy along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of database extended auditing settings along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, Context context) { + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String serverName, String databaseName, 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.")); @@ -189,100 +182,116 @@ private Mono> getWithResponseA if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (blobAuditingPolicyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter blobAuditingPolicyName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, blobAuditingPolicyName, accept, context); + return service + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets an extended database's blob auditing policy. + * Lists extended auditing settings of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an extended database's blob auditing policy on successful completion of {@link Mono}. + * @return a list of database extended auditing settings as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - String databaseName, BlobAuditingPolicyName blobAuditingPolicyName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, blobAuditingPolicyName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** - * Gets an extended database's blob auditing policy. + * Lists extended auditing settings of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @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 an extended database's blob auditing policy along with {@link Response}. + * @return a list of database extended auditing settings as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String serverName, String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, blobAuditingPolicyName, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Gets an extended database's blob auditing policy. + * Lists extended auditing settings of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an extended database's blob auditing policy. + * @return a list of database extended auditing settings as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ExtendedDatabaseBlobAuditingPolicyInner get(String resourceGroupName, String serverName, String databaseName, - BlobAuditingPolicyName blobAuditingPolicyName) { - return getWithResponse(resourceGroupName, serverName, databaseName, blobAuditingPolicyName, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** - * Creates or updates an extended database's blob auditing policy. + * Lists extended auditing settings of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. - * @param parameters The extended database blob auditing policy. + * @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 an extended database blob auditing policy along with {@link Response} on successful completion of + * @return a list of database extended auditing settings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String serverName, String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + } + + /** + * Gets an extended database's blob auditing policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 an extended database's blob auditing policy along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, - ExtendedDatabaseBlobAuditingPolicyInner parameters) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName) { 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.")); @@ -293,51 +302,39 @@ public Mono> createOrUpdateWit if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (blobAuditingPolicyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter blobAuditingPolicyName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; + final String blobAuditingPolicyName = "default"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, blobAuditingPolicyName, - contentType, accept, parameters, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates an extended database's blob auditing policy. + * Gets an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. - * @param parameters The extended database blob auditing policy. * @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 an extended database blob auditing policy along with {@link Response} on successful completion of + * @return an extended database's blob auditing policy along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, - ExtendedDatabaseBlobAuditingPolicyInner parameters, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, 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.")); @@ -348,110 +345,95 @@ private Mono> createOrUpdateWi if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (blobAuditingPolicyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter blobAuditingPolicyName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; + final String blobAuditingPolicyName = "default"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, blobAuditingPolicyName, - contentType, accept, parameters, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Creates or updates an extended database's blob auditing policy. + * Gets an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. - * @param parameters The extended database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an extended database blob auditing policy on successful completion of {@link Mono}. + * @return an extended database's blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, - String serverName, String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, - ExtendedDatabaseBlobAuditingPolicyInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, blobAuditingPolicyName, - parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync(String resourceGroupName, String serverName, + String databaseName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates or updates an extended database's blob auditing policy. + * Gets an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. - * @param parameters The extended database blob auditing policy. * @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 an extended database blob auditing policy along with {@link Response}. + * @return an extended database's blob auditing policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String serverName, String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, - ExtendedDatabaseBlobAuditingPolicyInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, blobAuditingPolicyName, - parameters, context).block(); + public Response getWithResponse(String resourceGroupName, + String serverName, String databaseName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, context).block(); } /** - * Creates or updates an extended database's blob auditing policy. + * Gets an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param blobAuditingPolicyName The name of the blob auditing policy. - * @param parameters The extended database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an extended database blob auditing policy. + * @return an extended database's blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExtendedDatabaseBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, - String databaseName, BlobAuditingPolicyName blobAuditingPolicyName, - ExtendedDatabaseBlobAuditingPolicyInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, blobAuditingPolicyName, - parameters, Context.NONE).getValue(); + public ExtendedDatabaseBlobAuditingPolicyInner get(String resourceGroupName, String serverName, + String databaseName) { + return getWithResponse(resourceGroupName, serverName, databaseName, Context.NONE).getValue(); } /** - * Lists extended auditing settings of a database. + * Creates or updates an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The extended database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ExtendedDatabaseBlobAuditingPolicy list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return an extended database blob auditing policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByDatabaseSinglePageAsync(String resourceGroupName, String serverName, String databaseName) { + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String serverName, String databaseName, + ExtendedDatabaseBlobAuditingPolicyInner 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.")); @@ -462,40 +444,47 @@ public ExtendedDatabaseBlobAuditingPolicyInner createOrUpdate(String resourceGro if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 blobAuditingPolicyName = "default"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, accept, context)) - .>map( - res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists extended auditing settings of a database. + * Creates or updates an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The extended database blob auditing policy. * @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 ExtendedDatabaseBlobAuditingPolicy list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return an extended database blob auditing policy along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String serverName, String databaseName, Context context) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String serverName, String databaseName, + ExtendedDatabaseBlobAuditingPolicyInner 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.")); @@ -506,90 +495,82 @@ private Mono> listByDatab if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 blobAuditingPolicyName = "default"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** - * Lists extended auditing settings of a database. + * Creates or updates an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The extended database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ExtendedDatabaseBlobAuditingPolicy list operation as paginated response with - * {@link PagedFlux}. + * @return an extended database blob auditing policy on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, - String serverName, String databaseName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, ExtendedDatabaseBlobAuditingPolicyInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists extended auditing settings of a database. + * Creates or updates an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The extended database blob auditing policy. * @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 ExtendedDatabaseBlobAuditingPolicy list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, - String serverName, String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists extended auditing settings of a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 ExtendedDatabaseBlobAuditingPolicy list operation as paginated response with - * {@link PagedIterable}. + * @return an extended database blob auditing policy along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String serverName, String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, + String serverName, String databaseName, ExtendedDatabaseBlobAuditingPolicyInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context) + .block(); } /** - * Lists extended auditing settings of a database. + * Creates or updates an extended database's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param context The context to associate with this operation. + * @param parameters The extended database blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ExtendedDatabaseBlobAuditingPolicy list operation as paginated response with - * {@link PagedIterable}. + * @return an extended database blob auditing policy. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String serverName, String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ExtendedDatabaseBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, ExtendedDatabaseBlobAuditingPolicyInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, parameters, Context.NONE) + .getValue(); } /** @@ -599,8 +580,8 @@ public PagedIterable listByDatabase(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 the response of a ExtendedDatabaseBlobAuditingPolicy list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of database extended auditing settings along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -629,8 +610,8 @@ public PagedIterable listByDatabase(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 the response of a ExtendedDatabaseBlobAuditingPolicy list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of database extended auditing settings along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedServerBlobAuditingPoliciesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedServerBlobAuditingPoliciesClientImpl.java index 6c31a5338f00..b5120d487cd0 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedServerBlobAuditingPoliciesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedServerBlobAuditingPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -32,8 +32,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ExtendedServerBlobAuditingPoliciesClient; import com.azure.resourcemanager.sql.fluent.models.ExtendedServerBlobAuditingPolicyInner; -import com.azure.resourcemanager.sql.implementation.models.ExtendedServerBlobAuditingPolicyListResult; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyName; +import com.azure.resourcemanager.sql.models.ExtendedServerBlobAuditingPolicyListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,36 +66,37 @@ public final class ExtendedServerBlobAuditingPoliciesClientImpl implements Exten * The interface defining all the services for SqlManagementClientExtendedServerBlobAuditingPolicies to be used by * the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientExtendedServerBlobAuditingPolicies") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientE") public interface ExtendedServerBlobAuditingPoliciesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("blobAuditingPolicyName") BlobAuditingPolicyName blobAuditingPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("blobAuditingPolicyName") BlobAuditingPolicyName blobAuditingPolicyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ExtendedServerBlobAuditingPolicyInner parameters, Context context); + @PathParam("blobAuditingPolicyName") String blobAuditingPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("blobAuditingPolicyName") String blobAuditingPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ExtendedServerBlobAuditingPolicyInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -104,33 +104,69 @@ Mono> listByServer(@HostPar @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets an extended server's blob auditing policy. + * Lists extended auditing settings of a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an extended server's blob auditing policy along with {@link Response} on successful completion of + * @return a list of server extended auditing settings along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, BlobAuditingPolicyName blobAuditingPolicyName) { + 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 (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 (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Lists extended auditing settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 extended auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByServerSinglePageAsync(String resourceGroupName, String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -138,40 +174,149 @@ public Mono> getWithResponseAsyn if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (blobAuditingPolicyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter blobAuditingPolicyName 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"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, blobAuditingPolicyName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + context = this.client.mergeContext(context); + return service + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets an extended server's blob auditing policy. + * Lists extended auditing settings of a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 extended auditing settings 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 extended auditing settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @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 extended auditing settings as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, + String serverName, Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists extended auditing settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 extended auditing settings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, + String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Lists extended auditing settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 extended auditing settings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, + String serverName, Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + + /** + * Gets an extended server's blob auditing policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 an extended server's blob auditing policy along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, BlobAuditingPolicyName blobAuditingPolicyName, Context context) { + public Mono> getWithResponseAsync(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 (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 (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String blobAuditingPolicyName = "default"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets an extended server's blob auditing policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 an extended server's blob auditing policy along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -179,40 +324,39 @@ private Mono> getWithResponseAsy if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (blobAuditingPolicyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter blobAuditingPolicyName 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 blobAuditingPolicyName = "default"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, blobAuditingPolicyName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, blobAuditingPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an extended server's blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName) { - return getWithResponseAsync(resourceGroupName, serverName, blobAuditingPolicyName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync(String resourceGroupName, String serverName) { + return getWithResponseAsync(resourceGroupName, serverName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @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. @@ -221,33 +365,32 @@ public Mono getAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, blobAuditingPolicyName, context).block(); + Context context) { + return getWithResponseAsync(resourceGroupName, serverName, context).block(); } /** * Gets an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an extended server's blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExtendedServerBlobAuditingPolicyInner get(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName) { - return getWithResponse(resourceGroupName, serverName, blobAuditingPolicyName, Context.NONE).getValue(); + public ExtendedServerBlobAuditingPolicyInner get(String resourceGroupName, String serverName) { + return getWithResponse(resourceGroupName, serverName, Context.NONE).getValue(); } /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -257,15 +400,11 @@ public ExtendedServerBlobAuditingPolicyInner get(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ExtendedServerBlobAuditingPolicyInner parameters) { + ExtendedServerBlobAuditingPolicyInner 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.")); @@ -273,30 +412,30 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (blobAuditingPolicyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter blobAuditingPolicyName 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 contentType = "application/json"; + final String blobAuditingPolicyName = "default"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, blobAuditingPolicyName, contentType, - accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -307,16 +446,11 @@ public Mono>> createOrUpdateWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, BlobAuditingPolicyName blobAuditingPolicyName, - ExtendedServerBlobAuditingPolicyInner parameters, Context context) { + String serverName, ExtendedServerBlobAuditingPolicyInner 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.")); @@ -324,29 +458,28 @@ private Mono>> createOrUpdateWithResponseAsync(String if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (blobAuditingPolicyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter blobAuditingPolicyName 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 contentType = "application/json"; + final String blobAuditingPolicyName = "default"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, blobAuditingPolicyName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, blobAuditingPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -356,9 +489,9 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ExtendedServerBlobAuditingPolicyInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ExtendedServerBlobAuditingPolicyInner parameters) { + ExtendedServerBlobAuditingPolicyInner parameters) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, serverName, blobAuditingPolicyName, parameters); + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters); return this.client.getLroResult( mono, this.client.getHttpPipeline(), ExtendedServerBlobAuditingPolicyInner.class, ExtendedServerBlobAuditingPolicyInner.class, this.client.getContext()); @@ -367,9 +500,9 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -380,11 +513,10 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ExtendedServerBlobAuditingPolicyInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ExtendedServerBlobAuditingPolicyInner parameters, - Context context) { + ExtendedServerBlobAuditingPolicyInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, - blobAuditingPolicyName, parameters, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters, context); return this.client.getLroResult( mono, this.client.getHttpPipeline(), ExtendedServerBlobAuditingPolicyInner.class, ExtendedServerBlobAuditingPolicyInner.class, context); @@ -393,9 +525,9 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -404,18 +536,17 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExtendedServerBlobAuditingPolicyInner> - beginCreateOrUpdate(String resourceGroupName, String serverName, BlobAuditingPolicyName blobAuditingPolicyName, + beginCreateOrUpdate(String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, blobAuditingPolicyName, parameters) - .getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); } /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -425,18 +556,17 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExtendedServerBlobAuditingPolicyInner> - beginCreateOrUpdate(String resourceGroupName, String serverName, BlobAuditingPolicyName blobAuditingPolicyName, + beginCreateOrUpdate(String resourceGroupName, String serverName, ExtendedServerBlobAuditingPolicyInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, blobAuditingPolicyName, parameters, context) - .getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); } /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -445,17 +575,17 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ExtendedServerBlobAuditingPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, blobAuditingPolicyName, parameters).last() + ExtendedServerBlobAuditingPolicyInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -465,19 +595,17 @@ public Mono createOrUpdateAsync(String re */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ExtendedServerBlobAuditingPolicyInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, blobAuditingPolicyName, parameters, context) - .last() + ExtendedServerBlobAuditingPolicyInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -486,16 +614,16 @@ private Mono createOrUpdateAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) public ExtendedServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ExtendedServerBlobAuditingPolicyInner parameters) { - return createOrUpdateAsync(resourceGroupName, serverName, blobAuditingPolicyName, parameters).block(); + ExtendedServerBlobAuditingPolicyInner parameters) { + return createOrUpdateAsync(resourceGroupName, serverName, parameters).block(); } /** * Creates or updates an extended server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of extended blob auditing policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -505,158 +633,8 @@ public ExtendedServerBlobAuditingPolicyInner createOrUpdate(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) public ExtendedServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ExtendedServerBlobAuditingPolicyInner parameters, - Context context) { - return createOrUpdateAsync(resourceGroupName, serverName, blobAuditingPolicyName, parameters, context).block(); - } - - /** - * Lists extended auditing settings 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 the response of a ExtendedServerBlobAuditingPolicy list operation 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 extended auditing settings 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 the response of a ExtendedServerBlobAuditingPolicy list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByServerSinglePageAsync(String resourceGroupName, String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Lists extended auditing settings 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 the response of a ExtendedServerBlobAuditingPolicy list operation 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 extended auditing settings 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 the response of a ExtendedServerBlobAuditingPolicy list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, - String serverName, Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists extended auditing settings 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 the response of a ExtendedServerBlobAuditingPolicy list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, - String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Lists extended auditing settings 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 the response of a ExtendedServerBlobAuditingPolicy list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, - String serverName, Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + ExtendedServerBlobAuditingPolicyInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, serverName, parameters, context).block(); } /** @@ -666,8 +644,8 @@ public PagedIterable listByServer(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 response of a ExtendedServerBlobAuditingPolicy list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of server extended auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -695,8 +673,8 @@ public PagedIterable listByServer(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 response of a ExtendedServerBlobAuditingPolicy list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of server extended auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/FailoverGroupsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/FailoverGroupsClientImpl.java index 4408b5c20884..057cafb91019 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/FailoverGroupsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/FailoverGroupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -35,7 +35,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.FailoverGroupsClient; import com.azure.resourcemanager.sql.fluent.models.FailoverGroupInner; -import com.azure.resourcemanager.sql.implementation.models.FailoverGroupListResult; +import com.azure.resourcemanager.sql.models.FailoverGroupListResult; import com.azure.resourcemanager.sql.models.FailoverGroupUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -70,101 +70,242 @@ public final class FailoverGroupsClientImpl implements FailoverGroupsClient { * The interface defining all the services for SqlManagementClientFailoverGroups to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientFailoverGroups") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientF") public interface FailoverGroupsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("failoverGroupName") String failoverGroupName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}") - @ExpectedResponses({ 200, 201, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("failoverGroupName") String failoverGroupName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") FailoverGroupInner parameters, - Context context); + @PathParam("failoverGroupName") String failoverGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("failoverGroupName") String failoverGroupName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") FailoverGroupUpdate parameters, + @PathParam("failoverGroupName") String failoverGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FailoverGroupInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("failoverGroupName") String failoverGroupName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") 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); + @PathParam("failoverGroupName") String failoverGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/failover") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failover(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("failoverGroupName") String failoverGroupName, @HeaderParam("Accept") String accept, + @PathParam("failoverGroupName") String failoverGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FailoverGroupUpdate parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/failover") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> forceFailoverAllowDataLoss(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> failover(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("failoverGroupName") String failoverGroupName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("failoverGroupName") String failoverGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/tryPlannedBeforeForcedFailover") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> tryPlannedBeforeForcedFailover(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> forceFailoverAllowDataLoss(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("failoverGroupName") String failoverGroupName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("failoverGroupName") String failoverGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @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("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Lists the failover groups in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 failover groups 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 (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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Lists the failover groups in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @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 failover groups along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists the failover groups in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 failover groups 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 failover groups in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @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 failover groups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists the failover groups in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 failover groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Lists the failover groups in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. + * @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 failover groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -178,10 +319,6 @@ public Mono> getWithResponseAsync(String resourceGr 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.")); @@ -193,18 +330,23 @@ public Mono> getWithResponseAsync(String resourceGr return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, failoverGroupName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -219,10 +361,6 @@ private Mono> getWithResponseAsync(String resourceG 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.")); @@ -234,17 +372,22 @@ private Mono> getWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, failoverGroupName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -260,8 +403,9 @@ public Mono getAsync(String resourceGroupName, String server /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -278,8 +422,9 @@ public Response getWithResponse(String resourceGroupName, St /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -294,8 +439,9 @@ public FailoverGroupInner get(String resourceGroupName, String serverName, Strin /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -310,10 +456,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -325,25 +467,29 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, failoverGroupName, contentType, accept, - parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @param context The context to associate with this operation. @@ -359,10 +505,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -374,24 +516,27 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, failoverGroupName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -411,8 +556,9 @@ public PollerFlux, FailoverGroupInner> beginCreat /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @param context The context to associate with this operation. @@ -435,8 +581,9 @@ private PollerFlux, FailoverGroupInner> beginCrea /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -454,8 +601,9 @@ public SyncPoller, FailoverGroupInner> beginCreat /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @param context The context to associate with this operation. @@ -474,8 +622,9 @@ public SyncPoller, FailoverGroupInner> beginCreat /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -493,8 +642,9 @@ public Mono createOrUpdateAsync(String resourceGroupName, St /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @param context The context to associate with this operation. @@ -513,8 +663,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, S /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -531,8 +682,9 @@ public FailoverGroupInner createOrUpdate(String resourceGroupName, String server /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. * @param context The context to associate with this operation. @@ -548,28 +700,24 @@ public FailoverGroupInner createOrUpdate(String resourceGroupName, String server } /** - * Updates a failover group. + * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. - * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a failover group along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String failoverGroupName, FailoverGroupUpdate parameters) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName) { 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.")); @@ -581,44 +729,36 @@ public Mono>> updateWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, failoverGroupName, contentType, accept, - parameters, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a failover group. + * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. - * @param parameters The failover group 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 failover group along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String failoverGroupName, FailoverGroupUpdate parameters, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName, 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.")); @@ -630,301 +770,65 @@ private Mono>> updateWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, failoverGroupName, contentType, accept, parameters, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** - * Updates a failover group. + * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. - * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 failover group. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, FailoverGroupInner> beginUpdateAsync(String resourceGroupName, - String serverName, String failoverGroupName, FailoverGroupUpdate parameters) { + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String failoverGroupName) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, serverName, failoverGroupName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - FailoverGroupInner.class, FailoverGroupInner.class, this.client.getContext()); + = deleteWithResponseAsync(resourceGroupName, serverName, failoverGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Updates a failover group. + * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. - * @param parameters The failover group 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 failover group. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FailoverGroupInner> beginUpdateAsync(String resourceGroupName, - String serverName, String failoverGroupName, FailoverGroupUpdate parameters, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String failoverGroupName, Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateWithResponseAsync(resourceGroupName, serverName, failoverGroupName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - FailoverGroupInner.class, FailoverGroupInner.class, context); - } - - /** - * Updates a failover group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @param parameters The failover group parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 failover group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FailoverGroupInner> beginUpdate(String resourceGroupName, - String serverName, String failoverGroupName, FailoverGroupUpdate parameters) { - return this.beginUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters).getSyncPoller(); - } - - /** - * Updates a failover group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @param parameters The failover group 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 SyncPoller} for polling of a failover group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FailoverGroupInner> beginUpdate(String resourceGroupName, - String serverName, String failoverGroupName, FailoverGroupUpdate parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters, context) - .getSyncPoller(); - } - - /** - * Updates a failover group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @param parameters The failover group parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a failover group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, String failoverGroupName, - FailoverGroupUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a failover group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @param parameters The failover group 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 failover group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String serverName, String failoverGroupName, - FailoverGroupUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a failover group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @param parameters The failover group parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a failover group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FailoverGroupInner update(String resourceGroupName, String serverName, String failoverGroupName, - FailoverGroupUpdate parameters) { - return updateAsync(resourceGroupName, serverName, failoverGroupName, parameters).block(); - } - - /** - * Updates a failover group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @param parameters The failover group 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 failover group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FailoverGroupInner update(String resourceGroupName, String serverName, String failoverGroupName, - FailoverGroupUpdate parameters, Context context) { - return updateAsync(resourceGroupName, serverName, failoverGroupName, parameters, context).block(); - } - - /** - * Deletes a failover group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 failoverGroupName) { - 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 (failoverGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, failoverGroupName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + = deleteWithResponseAsync(resourceGroupName, serverName, failoverGroupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, - String failoverGroupName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (failoverGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter failoverGroupName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, failoverGroupName, context); - } - - /** - * Deletes a failover group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 failoverGroupName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, serverName, failoverGroupName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a failover group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param failoverGroupName The name of the failover group. - * @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 serverName, - String failoverGroupName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, serverName, failoverGroupName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a failover group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -940,8 +844,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -958,8 +863,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -975,8 +881,9 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -994,8 +901,9 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1009,184 +917,40 @@ public void delete(String resourceGroupName, String serverName, String failoverG /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @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 failoverGroupName, Context context) { - deleteAsync(resourceGroupName, serverName, failoverGroupName, context).block(); - } - - /** - * Lists the failover groups 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 the response of a FailoverGroup list operation 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 failover groups in 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 response of a FailoverGroup list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Lists the failover groups 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 the response of a FailoverGroup list operation 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 failover groups in 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 response of a FailoverGroup list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the failover groups 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 the response of a FailoverGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Lists the failover groups in 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 response of a FailoverGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String serverName, String failoverGroupName, Context context) { + deleteAsync(resourceGroupName, serverName, failoverGroupName, context).block(); } /** - * Fails over from the current primary server to this server. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> failoverWithResponseAsync(String resourceGroupName, String serverName, - String failoverGroupName) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName, FailoverGroupUpdate 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.")); @@ -1198,19 +962,31 @@ public Mono>> failoverWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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.failover(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, failoverGroupName, accept, context)) + .withContext( + context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Fails over from the current primary server to this server. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group 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. @@ -1218,16 +994,12 @@ public Mono>> failoverWithResponseAsync(String resourc * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverWithResponseAsync(String resourceGroupName, String serverName, - String failoverGroupName, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName, FailoverGroupUpdate 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.")); @@ -1239,38 +1011,51 @@ private Mono>> failoverWithResponseAsync(String resour return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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"; context = this.client.mergeContext(context); - return service.failover(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, failoverGroupName, accept, context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Fails over from the current primary server to this server. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, FailoverGroupInner> beginFailoverAsync(String resourceGroupName, - String serverName, String failoverGroupName) { + public PollerFlux, FailoverGroupInner> beginUpdateAsync(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupUpdate parameters) { Mono>> mono - = failoverWithResponseAsync(resourceGroupName, serverName, failoverGroupName); + = updateWithResponseAsync(resourceGroupName, serverName, failoverGroupName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), FailoverGroupInner.class, FailoverGroupInner.class, this.client.getContext()); } /** - * Fails over from the current primary server to this server. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group 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. @@ -1278,38 +1063,42 @@ public PollerFlux, FailoverGroupInner> beginFailo * @return the {@link PollerFlux} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FailoverGroupInner> beginFailoverAsync(String resourceGroupName, - String serverName, String failoverGroupName, Context context) { + private PollerFlux, FailoverGroupInner> beginUpdateAsync(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupUpdate parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono - = failoverWithResponseAsync(resourceGroupName, serverName, failoverGroupName, context); + = updateWithResponseAsync(resourceGroupName, serverName, failoverGroupName, parameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), FailoverGroupInner.class, FailoverGroupInner.class, context); } /** - * Fails over from the current primary server to this server. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FailoverGroupInner> beginFailover(String resourceGroupName, - String serverName, String failoverGroupName) { - return this.beginFailoverAsync(resourceGroupName, serverName, failoverGroupName).getSyncPoller(); + public SyncPoller, FailoverGroupInner> beginUpdate(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters).getSyncPoller(); } /** - * Fails over from the current primary server to this server. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group 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. @@ -1317,35 +1106,40 @@ public SyncPoller, FailoverGroupInner> beginFailo * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FailoverGroupInner> beginFailover(String resourceGroupName, - String serverName, String failoverGroupName, Context context) { - return this.beginFailoverAsync(resourceGroupName, serverName, failoverGroupName, context).getSyncPoller(); + public SyncPoller, FailoverGroupInner> beginUpdate(String resourceGroupName, + String serverName, String failoverGroupName, FailoverGroupUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters, context) + .getSyncPoller(); } /** - * Fails over from the current primary server to this server. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono failoverAsync(String resourceGroupName, String serverName, - String failoverGroupName) { - return beginFailoverAsync(resourceGroupName, serverName, failoverGroupName).last() + public Mono updateAsync(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupUpdate parameters) { + return beginUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Fails over from the current primary server to this server. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group 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. @@ -1353,34 +1147,39 @@ public Mono failoverAsync(String resourceGroupName, String s * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverAsync(String resourceGroupName, String serverName, - String failoverGroupName, Context context) { - return beginFailoverAsync(resourceGroupName, serverName, failoverGroupName, context).last() + private Mono updateAsync(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Fails over from the current primary server to this server. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FailoverGroupInner failover(String resourceGroupName, String serverName, String failoverGroupName) { - return failoverAsync(resourceGroupName, serverName, failoverGroupName).block(); + public FailoverGroupInner update(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupUpdate parameters) { + return updateAsync(resourceGroupName, serverName, failoverGroupName, parameters).block(); } /** - * Fails over from the current primary server to this server. + * Updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. + * @param parameters The failover group 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. @@ -1388,16 +1187,17 @@ public FailoverGroupInner failover(String resourceGroupName, String serverName, * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FailoverGroupInner failover(String resourceGroupName, String serverName, String failoverGroupName, - Context context) { - return failoverAsync(resourceGroupName, serverName, failoverGroupName, context).block(); + public FailoverGroupInner update(String resourceGroupName, String serverName, String failoverGroupName, + FailoverGroupUpdate parameters, Context context) { + return updateAsync(resourceGroupName, serverName, failoverGroupName, parameters, context).block(); } /** - * Fails over from the current primary server to this server. This operation might result in data loss. + * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1405,16 +1205,12 @@ public FailoverGroupInner failover(String resourceGroupName, String serverName, * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> forceFailoverAllowDataLossWithResponseAsync(String resourceGroupName, - String serverName, String failoverGroupName) { + public Mono>> failoverWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName) { 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.")); @@ -1426,19 +1222,23 @@ public Mono>> forceFailoverAllowDataLossWithResponseAs return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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"; return FluxUtil - .withContext( - context -> service.forceFailoverAllowDataLoss(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, failoverGroupName, accept, context)) + .withContext(context -> service.failover(this.client.getEndpoint(), resourceGroupName, serverName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Fails over from the current primary server to this server. This operation might result in data loss. + * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1447,16 +1247,12 @@ public Mono>> forceFailoverAllowDataLossWithResponseAs * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> forceFailoverAllowDataLossWithResponseAsync(String resourceGroupName, - String serverName, String failoverGroupName, Context context) { + private Mono>> failoverWithResponseAsync(String resourceGroupName, String serverName, + String failoverGroupName, 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.")); @@ -1468,17 +1264,22 @@ private Mono>> forceFailoverAllowDataLossWithResponseA return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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.forceFailoverAllowDataLoss(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, failoverGroupName, accept, context); + return service.failover(this.client.getEndpoint(), resourceGroupName, serverName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Fails over from the current primary server to this server. This operation might result in data loss. + * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1486,19 +1287,20 @@ private Mono>> forceFailoverAllowDataLossWithResponseA * @return the {@link PollerFlux} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, FailoverGroupInner> - beginForceFailoverAllowDataLossAsync(String resourceGroupName, String serverName, String failoverGroupName) { + public PollerFlux, FailoverGroupInner> beginFailoverAsync(String resourceGroupName, + String serverName, String failoverGroupName) { Mono>> mono - = forceFailoverAllowDataLossWithResponseAsync(resourceGroupName, serverName, failoverGroupName); + = failoverWithResponseAsync(resourceGroupName, serverName, failoverGroupName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), FailoverGroupInner.class, FailoverGroupInner.class, this.client.getContext()); } /** - * Fails over from the current primary server to this server. This operation might result in data loss. + * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1507,20 +1309,21 @@ private Mono>> forceFailoverAllowDataLossWithResponseA * @return the {@link PollerFlux} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FailoverGroupInner> beginForceFailoverAllowDataLossAsync( - String resourceGroupName, String serverName, String failoverGroupName, Context context) { + private PollerFlux, FailoverGroupInner> beginFailoverAsync(String resourceGroupName, + String serverName, String failoverGroupName, Context context) { context = this.client.mergeContext(context); Mono>> mono - = forceFailoverAllowDataLossWithResponseAsync(resourceGroupName, serverName, failoverGroupName, context); + = failoverWithResponseAsync(resourceGroupName, serverName, failoverGroupName, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), FailoverGroupInner.class, FailoverGroupInner.class, context); } /** - * Fails over from the current primary server to this server. This operation might result in data loss. + * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1528,17 +1331,17 @@ private PollerFlux, FailoverGroupInner> beginForc * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FailoverGroupInner> - beginForceFailoverAllowDataLoss(String resourceGroupName, String serverName, String failoverGroupName) { - return this.beginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName) - .getSyncPoller(); + public SyncPoller, FailoverGroupInner> beginFailover(String resourceGroupName, + String serverName, String failoverGroupName) { + return this.beginFailoverAsync(resourceGroupName, serverName, failoverGroupName).getSyncPoller(); } /** - * Fails over from the current primary server to this server. This operation might result in data loss. + * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1547,17 +1350,17 @@ private PollerFlux, FailoverGroupInner> beginForc * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FailoverGroupInner> beginForceFailoverAllowDataLoss( - String resourceGroupName, String serverName, String failoverGroupName, Context context) { - return this.beginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName, context) - .getSyncPoller(); + public SyncPoller, FailoverGroupInner> beginFailover(String resourceGroupName, + String serverName, String failoverGroupName, Context context) { + return this.beginFailoverAsync(resourceGroupName, serverName, failoverGroupName, context).getSyncPoller(); } /** - * Fails over from the current primary server to this server. This operation might result in data loss. + * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1565,17 +1368,18 @@ public SyncPoller, FailoverGroupInner> beginForce * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono forceFailoverAllowDataLossAsync(String resourceGroupName, String serverName, + public Mono failoverAsync(String resourceGroupName, String serverName, String failoverGroupName) { - return beginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName).last() + return beginFailoverAsync(resourceGroupName, serverName, failoverGroupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Fails over from the current primary server to this server. This operation might result in data loss. + * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1584,17 +1388,18 @@ public Mono forceFailoverAllowDataLossAsync(String resourceG * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono forceFailoverAllowDataLossAsync(String resourceGroupName, String serverName, + private Mono failoverAsync(String resourceGroupName, String serverName, String failoverGroupName, Context context) { - return beginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName, context).last() + return beginFailoverAsync(resourceGroupName, serverName, failoverGroupName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Fails over from the current primary server to this server. This operation might result in data loss. + * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1602,16 +1407,16 @@ private Mono forceFailoverAllowDataLossAsync(String resource * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, String serverName, - String failoverGroupName) { - return forceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName).block(); + public FailoverGroupInner failover(String resourceGroupName, String serverName, String failoverGroupName) { + return failoverAsync(resourceGroupName, serverName, failoverGroupName).block(); } /** - * Fails over from the current primary server to this server. This operation might result in data loss. + * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1620,17 +1425,17 @@ public FailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, S * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, String serverName, - String failoverGroupName, Context context) { - return forceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName, context).block(); + public FailoverGroupInner failover(String resourceGroupName, String serverName, String failoverGroupName, + Context context) { + return failoverAsync(resourceGroupName, serverName, failoverGroupName, context).block(); } /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. + * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1638,16 +1443,12 @@ public FailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, S * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> tryPlannedBeforeForcedFailoverWithResponseAsync(String resourceGroupName, + public Mono>> forceFailoverAllowDataLossWithResponseAsync(String resourceGroupName, String serverName, String failoverGroupName) { 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.")); @@ -1659,20 +1460,24 @@ public Mono>> tryPlannedBeforeForcedFailoverWithRespon return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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"; return FluxUtil - .withContext(context -> service.tryPlannedBeforeForcedFailover(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, - failoverGroupName, accept, context)) + .withContext( + context -> service.forceFailoverAllowDataLoss(this.client.getEndpoint(), resourceGroupName, serverName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. + * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1681,16 +1486,12 @@ public Mono>> tryPlannedBeforeForcedFailoverWithRespon * @return a failover group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> tryPlannedBeforeForcedFailoverWithResponseAsync(String resourceGroupName, + private Mono>> forceFailoverAllowDataLossWithResponseAsync(String resourceGroupName, String serverName, String failoverGroupName, 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.")); @@ -1702,18 +1503,22 @@ private Mono>> tryPlannedBeforeForcedFailoverWithRespo return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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.tryPlannedBeforeForcedFailover(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, failoverGroupName, accept, context); + return service.forceFailoverAllowDataLoss(this.client.getEndpoint(), resourceGroupName, serverName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. + * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1721,20 +1526,20 @@ private Mono>> tryPlannedBeforeForcedFailoverWithRespo * @return the {@link PollerFlux} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, FailoverGroupInner> beginTryPlannedBeforeForcedFailoverAsync( - String resourceGroupName, String serverName, String failoverGroupName) { + public PollerFlux, FailoverGroupInner> + beginForceFailoverAllowDataLossAsync(String resourceGroupName, String serverName, String failoverGroupName) { Mono>> mono - = tryPlannedBeforeForcedFailoverWithResponseAsync(resourceGroupName, serverName, failoverGroupName); + = forceFailoverAllowDataLossWithResponseAsync(resourceGroupName, serverName, failoverGroupName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), FailoverGroupInner.class, FailoverGroupInner.class, this.client.getContext()); } /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. + * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1743,21 +1548,21 @@ public PollerFlux, FailoverGroupInner> beginTryPl * @return the {@link PollerFlux} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FailoverGroupInner> beginTryPlannedBeforeForcedFailoverAsync( + private PollerFlux, FailoverGroupInner> beginForceFailoverAllowDataLossAsync( String resourceGroupName, String serverName, String failoverGroupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = tryPlannedBeforeForcedFailoverWithResponseAsync(resourceGroupName, - serverName, failoverGroupName, context); + Mono>> mono + = forceFailoverAllowDataLossWithResponseAsync(resourceGroupName, serverName, failoverGroupName, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), FailoverGroupInner.class, FailoverGroupInner.class, context); } /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. + * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1766,17 +1571,17 @@ private PollerFlux, FailoverGroupInner> beginTryP */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FailoverGroupInner> - beginTryPlannedBeforeForcedFailover(String resourceGroupName, String serverName, String failoverGroupName) { - return this.beginTryPlannedBeforeForcedFailoverAsync(resourceGroupName, serverName, failoverGroupName) + beginForceFailoverAllowDataLoss(String resourceGroupName, String serverName, String failoverGroupName) { + return this.beginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName) .getSyncPoller(); } /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. + * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1785,18 +1590,18 @@ private PollerFlux, FailoverGroupInner> beginTryP * @return the {@link SyncPoller} for polling of a failover group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FailoverGroupInner> beginTryPlannedBeforeForcedFailover( + public SyncPoller, FailoverGroupInner> beginForceFailoverAllowDataLoss( String resourceGroupName, String serverName, String failoverGroupName, Context context) { - return this.beginTryPlannedBeforeForcedFailoverAsync(resourceGroupName, serverName, failoverGroupName, context) + return this.beginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName, context) .getSyncPoller(); } /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. + * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1804,18 +1609,18 @@ public SyncPoller, FailoverGroupInner> beginTryPl * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono tryPlannedBeforeForcedFailoverAsync(String resourceGroupName, String serverName, + public Mono forceFailoverAllowDataLossAsync(String resourceGroupName, String serverName, String failoverGroupName) { - return beginTryPlannedBeforeForcedFailoverAsync(resourceGroupName, serverName, failoverGroupName).last() + return beginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. + * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1824,19 +1629,18 @@ public Mono tryPlannedBeforeForcedFailoverAsync(String resou * @return a failover group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono tryPlannedBeforeForcedFailoverAsync(String resourceGroupName, String serverName, + private Mono forceFailoverAllowDataLossAsync(String resourceGroupName, String serverName, String failoverGroupName, Context context) { - return beginTryPlannedBeforeForcedFailoverAsync(resourceGroupName, serverName, failoverGroupName, context) - .last() + return beginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. + * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1844,17 +1648,17 @@ private Mono tryPlannedBeforeForcedFailoverAsync(String reso * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FailoverGroupInner tryPlannedBeforeForcedFailover(String resourceGroupName, String serverName, + public FailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, String serverName, String failoverGroupName) { - return tryPlannedBeforeForcedFailoverAsync(resourceGroupName, serverName, failoverGroupName).block(); + return forceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName).block(); } /** - * Fails over from the current primary server to this server. This operation tries planned before forced failover - * but might still result in data loss. + * Fails over from the current primary server to this server. This operation might result in data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server containing the failover group. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1863,9 +1667,9 @@ public FailoverGroupInner tryPlannedBeforeForcedFailover(String resourceGroupNam * @return a failover group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FailoverGroupInner tryPlannedBeforeForcedFailover(String resourceGroupName, String serverName, + public FailoverGroupInner forceFailoverAllowDataLoss(String resourceGroupName, String serverName, String failoverGroupName, Context context) { - return tryPlannedBeforeForcedFailoverAsync(resourceGroupName, serverName, failoverGroupName, context).block(); + return forceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName, context).block(); } /** @@ -1875,8 +1679,7 @@ public FailoverGroupInner tryPlannedBeforeForcedFailover(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 the response of a FailoverGroup list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of failover groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -1903,8 +1706,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 the response of a FailoverGroup list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of failover groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/FirewallRulesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/FirewallRulesClientImpl.java index e692bf405dac..52c97a7cbd76 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/FirewallRulesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/FirewallRulesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -30,8 +30,8 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.FirewallRulesClient; import com.azure.resourcemanager.sql.fluent.models.FirewallRuleInner; -import com.azure.resourcemanager.sql.implementation.models.FirewallRuleListResult; import com.azure.resourcemanager.sql.models.FirewallRuleList; +import com.azure.resourcemanager.sql.models.FirewallRuleListResult; import reactor.core.publisher.Mono; /** @@ -63,87 +63,83 @@ public final class FirewallRulesClientImpl implements FirewallRulesClient { * The interface defining all the services for SqlManagementClientFirewallRules to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientFirewallRules") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientF") public interface FirewallRulesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> replace(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") FirewallRuleInner parameters, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FirewallRuleList parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({ 200, 204 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, Context context); + @PathParam("firewallRuleName") String firewallRuleName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("firewallRuleName") String firewallRuleName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") FirewallRuleInner parameters, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> replace(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") FirewallRuleList parameters, Context context); + @PathParam("firewallRuleName") String firewallRuleName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a firewall rule. + * Gets a list of firewall rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The 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 a firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return a list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String firewallRuleName) { + 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.")); @@ -151,40 +147,38 @@ public Mono> getWithResponseAsync(String resourceGro if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (firewallRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter firewallRuleName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, accept, context)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); } /** - * Gets a firewall rule. + * Gets a list of firewall rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The 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 a firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return a list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String firewallRuleName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, 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.")); @@ -192,90 +186,107 @@ private Mono> getWithResponseAsync(String resourceGr if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (firewallRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter firewallRuleName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, firewallRuleName, accept, context); + return service + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a firewall rule. + * Gets a list of firewall rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The 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 a firewall rule on successful completion of {@link Mono}. + * @return a list of firewall rules as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String firewallRuleName) { - return getWithResponseAsync(resourceGroupName, serverName, firewallRuleName) - .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 a firewall rule. + * Gets a list of firewall rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The 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 a firewall rule along with {@link Response}. + * @return a list of firewall rules as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String firewallRuleName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, firewallRuleName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** - * Gets a firewall rule. + * Gets a list of firewall rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The 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 a firewall rule. + * @return a list of firewall rules as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName) { - return getWithResponse(resourceGroupName, serverName, firewallRuleName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); } /** - * Creates or updates a firewall rule. + * Gets a list of firewall rules. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The name of the firewall rule. - * @param parameters The required parameters 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 a list of firewall rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + + /** + * Replaces all firewall rules on the server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The parameters 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 server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, String firewallRuleName, FirewallRuleInner parameters) { + public Mono> replaceWithResponseAsync(String resourceGroupName, String serverName, + FirewallRuleList 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.")); @@ -283,31 +294,29 @@ public Mono> createOrUpdateWithResponseAsync(String if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (firewallRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter firewallRuleName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, contentType, accept, - parameters, context)) + .withContext(context -> service.replace(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates a firewall rule. + * Replaces all firewall rules on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The name of the firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param parameters The parameters 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. @@ -315,16 +324,12 @@ public Mono> createOrUpdateWithResponseAsync(String * @return a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, String firewallRuleName, FirewallRuleInner parameters, Context context) { + private Mono> replaceWithResponseAsync(String resourceGroupName, String serverName, + FirewallRuleList 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.")); @@ -332,49 +337,47 @@ private Mono> createOrUpdateWithResponseAsync(String if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (firewallRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter firewallRuleName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, contentType, accept, - parameters, context); + return service.replace(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Creates or updates a firewall rule. + * Replaces all firewall rules on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The name of the firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param parameters The parameters 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 server firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String serverName, - String firewallRuleName, FirewallRuleInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, firewallRuleName, parameters) + public Mono replaceAsync(String resourceGroupName, String serverName, + FirewallRuleList parameters) { + return replaceWithResponseAsync(resourceGroupName, serverName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates or updates a firewall rule. + * Replaces all firewall rules on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The name of the firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param parameters The parameters 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. @@ -382,53 +385,47 @@ public Mono createOrUpdateAsync(String resourceGroupName, Str * @return a server firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String serverName, - String firewallRuleName, FirewallRuleInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, firewallRuleName, parameters, context) - .block(); + public Response replaceWithResponse(String resourceGroupName, String serverName, + FirewallRuleList parameters, Context context) { + return replaceWithResponseAsync(resourceGroupName, serverName, parameters, context).block(); } /** - * Creates or updates a firewall rule. + * Replaces all firewall rules on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The name of the firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param parameters The parameters 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 server firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, - FirewallRuleInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, serverName, firewallRuleName, parameters, Context.NONE) - .getValue(); + public FirewallRuleInner replace(String resourceGroupName, String serverName, FirewallRuleList parameters) { + return replaceWithResponse(resourceGroupName, serverName, parameters, Context.NONE).getValue(); } /** - * Deletes a firewall rule. + * Gets a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The 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 the {@link Response} on successful completion of {@link Mono}. + * @return a firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, String firewallRuleName) { 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.")); @@ -440,35 +437,37 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono .error(new IllegalArgumentException("Parameter firewallRuleName 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"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + firewallRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a firewall rule. + * Gets a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The 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 the {@link Response} on successful completion of {@link Mono}. + * @return a firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, String firewallRuleName, 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.")); @@ -480,82 +479,90 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono .error(new IllegalArgumentException("Parameter firewallRuleName 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.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, firewallRuleName, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, firewallRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Deletes a firewall rule. + * Gets a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The 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 A {@link Mono} that completes when a successful response is received. + * @return a firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String serverName, String firewallRuleName) { - return deleteWithResponseAsync(resourceGroupName, serverName, firewallRuleName) - .flatMap(ignored -> Mono.empty()); + public Mono getAsync(String resourceGroupName, String serverName, String firewallRuleName) { + return getWithResponseAsync(resourceGroupName, serverName, firewallRuleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Deletes a firewall rule. + * Gets a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The 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 the {@link Response}. + * @return a firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String serverName, String firewallRuleName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, serverName, firewallRuleName, context).block(); + public Response getWithResponse(String resourceGroupName, String serverName, + String firewallRuleName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, firewallRuleName, context).block(); } /** - * Deletes a firewall rule. + * Gets a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The 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 a firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String serverName, String firewallRuleName) { - deleteWithResponse(resourceGroupName, serverName, firewallRuleName, Context.NONE); + public FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName) { + return getWithResponse(resourceGroupName, serverName, firewallRuleName, Context.NONE).getValue(); } /** - * Gets a list of firewall rules. + * Creates or updates a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param firewallRuleName The name of the firewall rule. + * @param parameters The required parameters 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 a list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String firewallRuleName, FirewallRuleInner 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.")); @@ -563,37 +570,48 @@ private Mono> listByServerSinglePageAsync(Strin if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (firewallRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter firewallRuleName 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.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)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + firewallRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of firewall rules. + * Creates or updates a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param firewallRuleName The name of the firewall rule. + * @param parameters The required parameters 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 a list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String firewallRuleName, FirewallRuleInner 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.")); @@ -601,102 +619,105 @@ private Mono> listByServerSinglePageAsync(Strin if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (firewallRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter firewallRuleName 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"; context = this.client.mergeContext(context); - return 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)); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, firewallRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Gets a list of firewall rules. + * Creates or updates a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param firewallRuleName The name of the firewall rule. + * @param parameters The required parameters 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 a list of firewall rules as paginated response with {@link PagedFlux}. + * @return a server firewall rule on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String firewallRuleName, FirewallRuleInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, firewallRuleName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of firewall rules. + * Creates or updates a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param firewallRuleName The name of the firewall rule. + * @param parameters The required parameters 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 a list of firewall rules as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of firewall rules. - * - * @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 a server firewall rule along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String firewallRuleName, FirewallRuleInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, firewallRuleName, parameters, context) + .block(); } /** - * Gets a list of firewall rules. + * Creates or updates a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param firewallRuleName The name of the firewall rule. + * @param parameters The required parameters 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 a list of firewall rules as paginated response with {@link PagedIterable}. + * @return a server firewall rule. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, + FirewallRuleInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, serverName, firewallRuleName, parameters, Context.NONE) + .getValue(); } /** - * Replaces all firewall rules on the server. + * Deletes a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The parameters parameter. + * @param firewallRuleName The 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 a server firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> replaceWithResponseAsync(String resourceGroupName, String serverName, - FirewallRuleList parameters) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName) { 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.")); @@ -704,41 +725,40 @@ public Mono> replaceWithResponseAsync(String resourc 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(); + if (firewallRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.replace(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, accept, parameters, context)) + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + firewallRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Replaces all firewall rules on the server. + * Deletes a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The parameters parameter. + * @param firewallRuleName The 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 a server firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> replaceWithResponseAsync(String resourceGroupName, String serverName, - FirewallRuleList parameters, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName, 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.")); @@ -746,68 +766,70 @@ private Mono> replaceWithResponseAsync(String resour 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(); + if (firewallRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter firewallRuleName 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 contentType = "application/json"; - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.replace(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, contentType, accept, parameters, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, firewallRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** - * Replaces all firewall rules on the server. + * Deletes a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The parameters parameter. + * @param firewallRuleName The 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 a server firewall rule on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono replaceAsync(String resourceGroupName, String serverName, - FirewallRuleList parameters) { - return replaceWithResponseAsync(resourceGroupName, serverName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono deleteAsync(String resourceGroupName, String serverName, String firewallRuleName) { + return deleteWithResponseAsync(resourceGroupName, serverName, firewallRuleName) + .flatMap(ignored -> Mono.empty()); } /** - * Replaces all firewall rules on the server. + * Deletes a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The parameters parameter. + * @param firewallRuleName The 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 a server firewall rule along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response replaceWithResponse(String resourceGroupName, String serverName, - FirewallRuleList parameters, Context context) { - return replaceWithResponseAsync(resourceGroupName, serverName, parameters, context).block(); + public Response deleteWithResponse(String resourceGroupName, String serverName, String firewallRuleName, + Context context) { + return deleteWithResponseAsync(resourceGroupName, serverName, firewallRuleName, context).block(); } /** - * Replaces all firewall rules on the server. + * Deletes a firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The parameters parameter. + * @param firewallRuleName The 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 a server firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FirewallRuleInner replace(String resourceGroupName, String serverName, FirewallRuleList parameters) { - return replaceWithResponse(resourceGroupName, serverName, parameters, Context.NONE).getValue(); + public void delete(String resourceGroupName, String serverName, String firewallRuleName) { + deleteWithResponse(resourceGroupName, serverName, firewallRuleName, Context.NONE); } /** @@ -817,7 +839,8 @@ public FirewallRuleInner replace(String resourceGroupName, String serverName, Fi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the response to a list firewall rules request along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -844,7 +867,8 @@ 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} on successful completion of {@link Mono}. + * @return the response to a list firewall rules request along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/GeoBackupPoliciesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/GeoBackupPoliciesClientImpl.java index 6def939305a9..97d75921ea01 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/GeoBackupPoliciesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/GeoBackupPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -29,7 +29,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.GeoBackupPoliciesClient; import com.azure.resourcemanager.sql.fluent.models.GeoBackupPolicyInner; -import com.azure.resourcemanager.sql.implementation.models.GeoBackupPolicyListResult; +import com.azure.resourcemanager.sql.models.GeoBackupPolicyListResult; import com.azure.resourcemanager.sql.models.GeoBackupPolicyName; import reactor.core.publisher.Mono; @@ -62,73 +62,70 @@ public final class GeoBackupPoliciesClientImpl implements GeoBackupPoliciesClien * The interface defining all the services for SqlManagementClientGeoBackupPolicies to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientGeoBackupPolicies") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientG") public interface GeoBackupPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("geoBackupPolicyName") GeoBackupPolicyName geoBackupPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("geoBackupPolicyName") GeoBackupPolicyName geoBackupPolicyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") GeoBackupPolicyInner parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") GeoBackupPolicyInner parameters, @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("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a Geo backup policy for the given database resource. + * Gets a list of Geo backup policies for the given database resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Geo backup policy for the given database resource along with {@link Response} on successful completion - * of {@link Mono}. + * @return a list of Geo backup policies for the given database resource along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, GeoBackupPolicyName geoBackupPolicyName) { + private Mono> listSinglePageAsync(String resourceGroupName, String serverName, + String databaseName) { 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.")); @@ -139,43 +136,40 @@ public Mono> getWithResponseAsync(String resource if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (geoBackupPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter geoBackupPolicyName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, geoBackupPolicyName, - accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), 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())); } /** - * Gets a Geo backup policy for the given database resource. + * Gets a list of Geo backup policies for the given database resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. * @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 Geo backup policy for the given database resource along with {@link Response} on successful completion - * of {@link Mono}. + * @return a list of Geo backup policies for the given database resource along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, GeoBackupPolicyName geoBackupPolicyName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String serverName, + String databaseName, 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.")); @@ -186,98 +180,118 @@ private Mono> getWithResponseAsync(String resourc if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (geoBackupPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter geoBackupPolicyName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, geoBackupPolicyName, accept, context); + return service + .list(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a Geo backup policy for the given database resource. + * Gets a list of Geo backup policies for the given database resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Geo backup policy for the given database resource on successful completion of {@link Mono}. + * @return a list of Geo backup policies for the given database resource as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String databaseName, - GeoBackupPolicyName geoBackupPolicyName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, geoBackupPolicyName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String serverName, String databaseName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, serverName, databaseName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Gets a Geo backup policy for the given database resource. + * Gets a list of Geo backup policies for the given database resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. * @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 Geo backup policy for the given database resource along with {@link Response}. + * @return a list of Geo backup policies for the given database resource as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, GeoBackupPolicyName geoBackupPolicyName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, geoBackupPolicyName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String serverName, String databaseName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, serverName, databaseName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Gets a Geo backup policy for the given database resource. + * Gets a list of Geo backup policies for the given database resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Geo backup policy for the given database resource. + * @return a list of Geo backup policies for the given database resource as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GeoBackupPolicyInner get(String resourceGroupName, String serverName, String databaseName, - GeoBackupPolicyName geoBackupPolicyName) { - return getWithResponse(resourceGroupName, serverName, databaseName, geoBackupPolicyName, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String serverName, String databaseName) { + return new PagedIterable<>(listAsync(resourceGroupName, serverName, databaseName)); } /** - * Create or update a database default Geo backup policy. + * Gets a list of Geo backup policies for the given database resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a list of Geo backup policies for the given database resource as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String serverName, String databaseName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, serverName, databaseName, context)); + } + + /** + * Gets a Geo backup policy for the given database resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. - * @param parameters The required parameters for creating or updating the geo backup policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Geo backup policy along with {@link Response} on successful completion of {@link Mono}. + * @return a Geo backup policy for the given database resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, GeoBackupPolicyName geoBackupPolicyName, - GeoBackupPolicyInner parameters) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, GeoBackupPolicyName geoBackupPolicyName) { 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.")); @@ -292,46 +306,39 @@ public Mono> createOrUpdateWithResponseAsync(Stri return Mono .error(new IllegalArgumentException("Parameter geoBackupPolicyName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, geoBackupPolicyName, - contentType, accept, parameters, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + geoBackupPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a database default Geo backup policy. + * Gets a Geo backup policy for the given database resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. - * @param parameters The required parameters for creating or updating the geo backup policy. * @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 Geo backup policy along with {@link Response} on successful completion of {@link Mono}. + * @return a Geo backup policy for the given database resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, GeoBackupPolicyName geoBackupPolicyName, - GeoBackupPolicyInner parameters, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, GeoBackupPolicyName geoBackupPolicyName, 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.")); @@ -346,104 +353,98 @@ private Mono> createOrUpdateWithResponseAsync(Str return Mono .error(new IllegalArgumentException("Parameter geoBackupPolicyName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, geoBackupPolicyName, - contentType, accept, parameters, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, geoBackupPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Create or update a database default Geo backup policy. + * Gets a Geo backup policy for the given database resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. - * @param parameters The required parameters for creating or updating the geo backup policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Geo backup policy on successful completion of {@link Mono}. + * @return a Geo backup policy for the given database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String serverName, - String databaseName, GeoBackupPolicyName geoBackupPolicyName, GeoBackupPolicyInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, geoBackupPolicyName, - parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + GeoBackupPolicyName geoBackupPolicyName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, geoBackupPolicyName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create or update a database default Geo backup policy. + * Gets a Geo backup policy for the given database resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. - * @param parameters The required parameters for creating or updating the geo backup policy. * @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 Geo backup policy along with {@link Response}. + * @return a Geo backup policy for the given database resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String serverName, - String databaseName, GeoBackupPolicyName geoBackupPolicyName, GeoBackupPolicyInner parameters, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, geoBackupPolicyName, - parameters, context).block(); + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, GeoBackupPolicyName geoBackupPolicyName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, geoBackupPolicyName, context).block(); } /** - * Create or update a database default Geo backup policy. + * Gets a Geo backup policy for the given database resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. - * @param parameters The required parameters for creating or updating the geo backup policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Geo backup policy. + * @return a Geo backup policy for the given database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GeoBackupPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, - GeoBackupPolicyName geoBackupPolicyName, GeoBackupPolicyInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, geoBackupPolicyName, parameters, - Context.NONE).getValue(); + public GeoBackupPolicyInner get(String resourceGroupName, String serverName, String databaseName, + GeoBackupPolicyName geoBackupPolicyName) { + return getWithResponse(resourceGroupName, serverName, databaseName, geoBackupPolicyName, Context.NONE) + .getValue(); } /** - * Gets a list of Geo backup policies for the given database resource. + * Create or update a database default Geo backup policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. + * @param parameters The required parameters for creating or updating the geo backup policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Geo backup policies for the given database resource along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a Geo backup policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String serverName, - String databaseName) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, GeoBackupPolicyName geoBackupPolicyName, + GeoBackupPolicyInner 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.")); @@ -454,39 +455,50 @@ private Mono> listSinglePageAsync(String res if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (geoBackupPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter geoBackupPolicyName 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.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, geoBackupPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of Geo backup policies for the given database resource. + * Create or update a database default Geo backup policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. + * @param parameters The required parameters for creating or updating the geo backup policy. * @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 Geo backup policies for the given database resource along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a Geo backup policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String serverName, - String databaseName, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, GeoBackupPolicyName geoBackupPolicyName, + GeoBackupPolicyInner 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.")); @@ -497,87 +509,89 @@ private Mono> listSinglePageAsync(String res if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (geoBackupPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter geoBackupPolicyName 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"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + geoBackupPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** - * Gets a list of Geo backup policies for the given database resource. + * Create or update a database default Geo backup policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. + * @param parameters The required parameters for creating or updating the geo backup policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Geo backup policies for the given database resource as paginated response with - * {@link PagedFlux}. + * @return a Geo backup policy on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String serverName, String databaseName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String databaseName, GeoBackupPolicyName geoBackupPolicyName, GeoBackupPolicyInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, geoBackupPolicyName, + parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of Geo backup policies for the given database resource. + * Create or update a database default Geo backup policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. + * @param parameters The required parameters for creating or updating the geo backup policy. * @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 Geo backup policies for the given database resource as paginated response with - * {@link PagedFlux}. + * @return a Geo backup policy along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String serverName, String databaseName, + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String databaseName, GeoBackupPolicyName geoBackupPolicyName, GeoBackupPolicyInner parameters, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of Geo backup policies for the given database resource. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Geo backup policies for the given database resource as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String serverName, String databaseName) { - return new PagedIterable<>(listAsync(resourceGroupName, serverName, databaseName)); + return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, geoBackupPolicyName, + parameters, context).block(); } /** - * Gets a list of Geo backup policies for the given database resource. + * Create or update a database default Geo backup policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param context The context to associate with this operation. + * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. + * @param parameters The required parameters for creating or updating the geo backup policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Geo backup policies for the given database resource as paginated response with - * {@link PagedIterable}. + * @return a Geo backup policy. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String serverName, String databaseName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, serverName, databaseName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public GeoBackupPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + GeoBackupPolicyName geoBackupPolicyName, GeoBackupPolicyInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, geoBackupPolicyName, parameters, + Context.NONE).getValue(); } /** @@ -587,8 +601,8 @@ public PagedIterable list(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 Geo backup policies for the given database resource along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the list of geo backup policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -614,8 +628,8 @@ 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 a list of Geo backup policies for the given database resource along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the list of geo backup policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/IPv6FirewallRulesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/IPv6FirewallRulesClientImpl.java index 08527a822588..305455b747d5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/IPv6FirewallRulesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/IPv6FirewallRulesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.IPv6FirewallRulesClient; import com.azure.resourcemanager.sql.fluent.models.IPv6FirewallRuleInner; -import com.azure.resourcemanager.sql.implementation.models.IPv6FirewallRuleListResult; +import com.azure.resourcemanager.sql.models.IPv6FirewallRuleListResult; import reactor.core.publisher.Mono; /** @@ -62,60 +62,208 @@ public final class IPv6FirewallRulesClientImpl implements IPv6FirewallRulesClien * The interface defining all the services for SqlManagementClientIPv6FirewallRules to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientIPv6FirewallRules") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientI") public interface IPv6FirewallRulesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("firewallRuleName") String firewallRuleName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") IPv6FirewallRuleInner parameters, + @PathParam("firewallRuleName") String firewallRuleName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") IPv6FirewallRuleInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") 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); + @PathParam("firewallRuleName") String firewallRuleName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of IPv6 firewall rules. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 IPv6 firewall rules 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 (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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of IPv6 firewall rules. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 IPv6 firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of IPv6 firewall rules. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 IPv6 firewall rules 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)); + } + + /** + * Gets a list of IPv6 firewall rules. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 IPv6 firewall rules as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of IPv6 firewall rules. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 IPv6 firewall rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Gets a list of IPv6 firewall rules. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 IPv6 firewall rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + /** * Gets an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -130,10 +278,6 @@ public Mono> getWithResponseAsync(String resourc 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.")); @@ -145,17 +289,22 @@ public Mono> getWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter firewallRuleName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + firewallRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -171,10 +320,6 @@ private Mono> getWithResponseAsync(String resour 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.")); @@ -186,16 +331,21 @@ private Mono> getWithResponseAsync(String resour return Mono .error(new IllegalArgumentException("Parameter firewallRuleName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, firewallRuleName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, firewallRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -212,7 +362,8 @@ public Mono getAsync(String resourceGroupName, String ser /** * Gets an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -230,7 +381,8 @@ public Response getWithResponse(String resourceGroupName, /** * Gets an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -246,7 +398,8 @@ public IPv6FirewallRuleInner get(String resourceGroupName, String serverName, St /** * Creates or updates an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -262,10 +415,6 @@ public Mono> createOrUpdateWithResponseAsync(Str 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.")); @@ -277,24 +426,28 @@ public Mono> createOrUpdateWithResponseAsync(Str return Mono .error(new IllegalArgumentException("Parameter firewallRuleName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, contentType, accept, - parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + firewallRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -311,10 +464,6 @@ private Mono> createOrUpdateWithResponseAsync(St 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.")); @@ -326,23 +475,26 @@ private Mono> createOrUpdateWithResponseAsync(St return Mono .error(new IllegalArgumentException("Parameter firewallRuleName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, firewallRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -361,7 +513,8 @@ public Mono createOrUpdateAsync(String resourceGroupName, /** * Creates or updates an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -381,7 +534,8 @@ public Response createOrUpdateWithResponse(String resourc /** * Creates or updates an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param parameters The required parameters for creating or updating an IPv6 firewall rule. @@ -400,7 +554,8 @@ public IPv6FirewallRuleInner createOrUpdate(String resourceGroupName, String ser /** * Deletes an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -415,10 +570,6 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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.")); @@ -430,16 +581,21 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono .error(new IllegalArgumentException("Parameter firewallRuleName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + firewallRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -455,10 +611,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -470,15 +622,20 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono .error(new IllegalArgumentException("Parameter firewallRuleName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, firewallRuleName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, firewallRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -495,7 +652,8 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @param context The context to associate with this operation. @@ -513,7 +671,8 @@ public Response deleteWithResponse(String resourceGroupName, String server /** * Deletes an IPv6 firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param firewallRuleName The name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -525,147 +684,6 @@ public void delete(String resourceGroupName, String serverName, String firewallR deleteWithResponse(resourceGroupName, serverName, firewallRuleName, Context.NONE); } - /** - * Gets a list of IPv6 firewall rules. - * - * @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 IPv6 firewall rules 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())); - } - - /** - * Gets a list of IPv6 firewall rules. - * - * @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 IPv6 firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Gets a list of IPv6 firewall rules. - * - * @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 IPv6 firewall rules 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)); - } - - /** - * Gets a list of IPv6 firewall rules. - * - * @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 IPv6 firewall rules as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of IPv6 firewall rules. - * - * @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 IPv6 firewall rules as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Gets a list of IPv6 firewall rules. - * - * @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 IPv6 firewall rules as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); - } - /** * Get the next page of items. * @@ -673,7 +691,8 @@ public PagedIterable listByServer(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 a list of IPv6 firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response to a list IPv6 firewall rules request along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -700,7 +719,8 @@ private Mono> listByServerNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 IPv6 firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response to a list IPv6 firewall rules request along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstanceFailoverGroupsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstanceFailoverGroupsClientImpl.java index 3e180e8a3ea2..8f76cf19b383 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstanceFailoverGroupsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstanceFailoverGroupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.InstanceFailoverGroupsClient; import com.azure.resourcemanager.sql.fluent.models.InstanceFailoverGroupInner; -import com.azure.resourcemanager.sql.implementation.models.InstanceFailoverGroupListResult; +import com.azure.resourcemanager.sql.models.InstanceFailoverGroupListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -68,80 +68,232 @@ public final class InstanceFailoverGroupsClientImpl implements InstanceFailoverG * The interface defining all the services for SqlManagementClientInstanceFailoverGroups to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientInstanceFailoverGroups") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientI") public interface InstanceFailoverGroupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocation(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @PathParam("failoverGroupName") String failoverGroupName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("failoverGroupName") String failoverGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @PathParam("failoverGroupName") String failoverGroupName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") InstanceFailoverGroupInner parameters, + @PathParam("failoverGroupName") String failoverGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") InstanceFailoverGroupInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @PathParam("failoverGroupName") String failoverGroupName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("failoverGroupName") String failoverGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/failover") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failover(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> failover(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @PathParam("failoverGroupName") String failoverGroupName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("failoverGroupName") String failoverGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> forceFailoverAllowDataLoss(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> forceFailoverAllowDataLoss(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @PathParam("failoverGroupName") String failoverGroupName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("failoverGroupName") String failoverGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Lists the failover groups in a location. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 instance failover groups along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String resourceGroupName, + String locationName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName 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"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), resourceGroupName, locationName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Lists the failover groups in a location. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @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 instance failover groups along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String resourceGroupName, + String locationName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName 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 + .listByLocation(this.client.getEndpoint(), resourceGroupName, locationName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists the failover groups in a location. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 instance failover groups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByLocationAsync(String resourceGroupName, String locationName) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(resourceGroupName, locationName), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); + } + + /** + * Lists the failover groups in a location. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @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 instance failover groups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String resourceGroupName, String locationName, + Context context) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(resourceGroupName, locationName, context), + nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists the failover groups in a location. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 instance failover groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String resourceGroupName, String locationName) { + return new PagedIterable<>(listByLocationAsync(resourceGroupName, locationName)); + } + + /** + * Lists the failover groups in a location. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @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 instance failover groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String resourceGroupName, String locationName, + Context context) { + return new PagedIterable<>(listByLocationAsync(resourceGroupName, locationName, context)); + } + /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -156,10 +308,6 @@ public Mono> getWithResponseAsync(String re 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.")); @@ -171,17 +319,22 @@ public Mono> getWithResponseAsync(String re return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, failoverGroupName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, locationName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -197,10 +350,6 @@ private Mono> getWithResponseAsync(String r 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.")); @@ -212,16 +361,21 @@ private Mono> getWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, locationName, failoverGroupName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, locationName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -239,7 +393,8 @@ public Mono getAsync(String resourceGroupName, Strin /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -257,7 +412,8 @@ public Response getWithResponse(String resourceGroup /** * Gets a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -273,7 +429,8 @@ public InstanceFailoverGroupInner get(String resourceGroupName, String locationN /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -289,10 +446,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -304,24 +457,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, failoverGroupName, contentType, - accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, locationName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -338,10 +495,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -353,23 +506,26 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, failoverGroupName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, locationName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -392,7 +548,8 @@ public PollerFlux, InstanceFailoverGroupI /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -416,7 +573,8 @@ private PollerFlux, InstanceFailoverGroup /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -436,7 +594,8 @@ public SyncPoller, InstanceFailoverGroupI /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -457,7 +616,8 @@ public SyncPoller, InstanceFailoverGroupI /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -476,7 +636,8 @@ public Mono createOrUpdateAsync(String resourceGroup /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -496,7 +657,8 @@ private Mono createOrUpdateAsync(String resourceGrou /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -514,7 +676,8 @@ public InstanceFailoverGroupInner createOrUpdate(String resourceGroupName, Strin /** * Creates or updates a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param parameters The failover group parameters. @@ -533,7 +696,8 @@ public InstanceFailoverGroupInner createOrUpdate(String resourceGroupName, Strin /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -548,10 +712,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -563,16 +723,21 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, failoverGroupName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, locationName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -588,10 +753,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -603,15 +764,20 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, locationName, failoverGroupName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, locationName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -631,7 +797,8 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -653,7 +820,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -670,7 +838,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -688,7 +857,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -705,7 +875,8 @@ public Mono deleteAsync(String resourceGroupName, String locationName, Str /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -724,7 +895,8 @@ private Mono deleteAsync(String resourceGroupName, String locationName, St /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -739,7 +911,8 @@ public void delete(String resourceGroupName, String locationName, String failove /** * Deletes a failover group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -752,153 +925,11 @@ public void delete(String resourceGroupName, String locationName, String failove deleteAsync(resourceGroupName, locationName, failoverGroupName, context).block(); } - /** - * Lists the failover groups in a location. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 InstanceFailoverGroup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String resourceGroupName, - String locationName) { - 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, 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 failover groups in a location. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @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 InstanceFailoverGroup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String resourceGroupName, - String locationName, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, locationName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the failover groups in a location. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 InstanceFailoverGroup list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByLocationAsync(String resourceGroupName, String locationName) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(resourceGroupName, locationName), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); - } - - /** - * Lists the failover groups in a location. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @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 InstanceFailoverGroup list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String resourceGroupName, String locationName, - Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(resourceGroupName, locationName, context), - nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the failover groups in a location. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 InstanceFailoverGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String resourceGroupName, String locationName) { - return new PagedIterable<>(listByLocationAsync(resourceGroupName, locationName)); - } - - /** - * Lists the failover groups in a location. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @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 InstanceFailoverGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String resourceGroupName, String locationName, - Context context) { - return new PagedIterable<>(listByLocationAsync(resourceGroupName, locationName, context)); - } - /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -913,10 +944,6 @@ public Mono>> failoverWithResponseAsync(String resourc 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.")); @@ -928,17 +955,22 @@ public Mono>> failoverWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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"; return FluxUtil - .withContext(context -> service.failover(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, failoverGroupName, accept, context)) + .withContext(context -> service.failover(this.client.getEndpoint(), resourceGroupName, locationName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -954,10 +986,6 @@ private Mono>> failoverWithResponseAsync(String resour 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.")); @@ -969,16 +997,21 @@ private Mono>> failoverWithResponseAsync(String resour return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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.failover(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, locationName, failoverGroupName, accept, context); + return service.failover(this.client.getEndpoint(), resourceGroupName, locationName, failoverGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -999,7 +1032,8 @@ private Mono>> failoverWithResponseAsync(String resour /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1021,7 +1055,8 @@ private Mono>> failoverWithResponseAsync(String resour /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1038,7 +1073,8 @@ private Mono>> failoverWithResponseAsync(String resour /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1056,7 +1092,8 @@ private Mono>> failoverWithResponseAsync(String resour /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1074,7 +1111,8 @@ public Mono failoverAsync(String resourceGroupName, /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1093,7 +1131,8 @@ private Mono failoverAsync(String resourceGroupName, /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1110,7 +1149,8 @@ public InstanceFailoverGroupInner failover(String resourceGroupName, String loca /** * Fails over from the current primary managed instance to this managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1129,7 +1169,8 @@ public InstanceFailoverGroupInner failover(String resourceGroupName, String loca * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1144,10 +1185,6 @@ public Mono>> forceFailoverAllowDataLossWithResponseAs 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.")); @@ -1159,11 +1196,15 @@ public Mono>> forceFailoverAllowDataLossWithResponseAs return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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"; return FluxUtil - .withContext(context -> service.forceFailoverAllowDataLoss(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, locationName, - failoverGroupName, accept, context)) + .withContext(context -> service.forceFailoverAllowDataLoss(this.client.getEndpoint(), resourceGroupName, + locationName, failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1171,7 +1212,8 @@ public Mono>> forceFailoverAllowDataLossWithResponseAs * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1187,10 +1229,6 @@ private Mono>> forceFailoverAllowDataLossWithResponseA 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.")); @@ -1202,17 +1240,22 @@ private Mono>> forceFailoverAllowDataLossWithResponseA return Mono .error(new IllegalArgumentException("Parameter failoverGroupName 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.forceFailoverAllowDataLoss(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, failoverGroupName, accept, context); + return service.forceFailoverAllowDataLoss(this.client.getEndpoint(), resourceGroupName, locationName, + failoverGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1234,7 +1277,8 @@ private Mono>> forceFailoverAllowDataLossWithResponseA * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1258,7 +1302,8 @@ private Mono>> forceFailoverAllowDataLossWithResponseA * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1277,7 +1322,8 @@ private Mono>> forceFailoverAllowDataLossWithResponseA * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1298,7 +1344,8 @@ private Mono>> forceFailoverAllowDataLossWithResponseA * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1317,7 +1364,8 @@ public Mono forceFailoverAllowDataLossAsync(String r * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1337,7 +1385,8 @@ private Mono forceFailoverAllowDataLossAsync(String * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1355,7 +1404,8 @@ public InstanceFailoverGroupInner forceFailoverAllowDataLoss(String resourceGrou * Fails over from the current primary managed instance to this managed instance. This operation might result in * data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param failoverGroupName The name of the failover group. * @param context The context to associate with this operation. @@ -1377,8 +1427,8 @@ public InstanceFailoverGroupInner forceFailoverAllowDataLoss(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 InstanceFailoverGroup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of instance failover groups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationNextSinglePageAsync(String nextLink) { @@ -1405,8 +1455,8 @@ private Mono> listByLocationNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 InstanceFailoverGroup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of instance failover groups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstancePoolOperationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstancePoolOperationsClientImpl.java deleted file mode 100644 index 38355682b764..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstancePoolOperationsClientImpl.java +++ /dev/null @@ -1,430 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.resourcemanager.sql.fluent.InstancePoolOperationsClient; -import com.azure.resourcemanager.sql.fluent.models.InstancePoolOperationInner; -import com.azure.resourcemanager.sql.implementation.models.InstancePoolOperationListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in InstancePoolOperationsClient. - */ -public final class InstancePoolOperationsClientImpl implements InstancePoolOperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final InstancePoolOperationsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of InstancePoolOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - InstancePoolOperationsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(InstancePoolOperationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientInstancePoolOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientInstancePoolOperations") - public interface InstancePoolOperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/operations/{operationId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("instancePoolName") String instancePoolName, @PathParam("operationId") String operationId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstancePool(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("instancePoolName") String instancePoolName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstancePoolNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a management operation on a instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param operationId The operationId 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 management operation on a instance pool along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String instancePoolName, String operationId) { - 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 (instancePoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId 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, instancePoolName, operationId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a management operation on a instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param operationId The operationId 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 management operation on a instance pool along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String instancePoolName, String operationId, 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 (instancePoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId 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, instancePoolName, operationId, accept, context); - } - - /** - * Gets a management operation on a instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param operationId The operationId 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 management operation on a instance pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String instancePoolName, - String operationId) { - return getWithResponseAsync(resourceGroupName, instancePoolName, operationId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a management operation on a instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param operationId The operationId 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 management operation on a instance pool along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String instancePoolName, - String operationId, Context context) { - return getWithResponseAsync(resourceGroupName, instancePoolName, operationId, context).block(); - } - - /** - * Gets a management operation on a instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param operationId The operationId 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 management operation on a instance pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InstancePoolOperationInner get(String resourceGroupName, String instancePoolName, String operationId) { - return getWithResponse(resourceGroupName, instancePoolName, operationId, Context.NONE).getValue(); - } - - /** - * Gets a list of operations performed on the instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 operations performed on the instance pool along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstancePoolSinglePageAsync(String resourceGroupName, - String instancePoolName) { - 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 (instancePoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByInstancePool(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancePoolName, 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 a list of operations performed on the instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @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 operations performed on the instance pool along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstancePoolSinglePageAsync(String resourceGroupName, - String instancePoolName, 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 (instancePoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByInstancePool(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, instancePoolName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of operations performed on the instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 operations performed on the instance pool as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstancePoolAsync(String resourceGroupName, - String instancePoolName) { - return new PagedFlux<>(() -> listByInstancePoolSinglePageAsync(resourceGroupName, instancePoolName), - nextLink -> listByInstancePoolNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of operations performed on the instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @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 operations performed on the instance pool as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstancePoolAsync(String resourceGroupName, - String instancePoolName, Context context) { - return new PagedFlux<>(() -> listByInstancePoolSinglePageAsync(resourceGroupName, instancePoolName, context), - nextLink -> listByInstancePoolNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of operations performed on the instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 operations performed on the instance pool as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstancePool(String resourceGroupName, - String instancePoolName) { - return new PagedIterable<>(listByInstancePoolAsync(resourceGroupName, instancePoolName)); - } - - /** - * Gets a list of operations performed on the instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @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 operations performed on the instance pool as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstancePool(String resourceGroupName, - String instancePoolName, Context context) { - return new PagedIterable<>(listByInstancePoolAsync(resourceGroupName, instancePoolName, 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 operations performed on the instance pool along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstancePoolNextSinglePageAsync(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.listByInstancePoolNext(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. - * @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 operations performed on the instance pool along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstancePoolNextSinglePageAsync(String nextLink, - Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listByInstancePoolNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstancePoolsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstancePoolsClientImpl.java index a735b6313502..543fa779866a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstancePoolsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/InstancePoolsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -37,7 +37,7 @@ import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; import com.azure.resourcemanager.sql.fluent.InstancePoolsClient; import com.azure.resourcemanager.sql.fluent.models.InstancePoolInner; -import com.azure.resourcemanager.sql.implementation.models.InstancePoolListResult; +import com.azure.resourcemanager.sql.models.InstancePoolListResult; import com.azure.resourcemanager.sql.models.InstancePoolUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -73,94 +73,90 @@ public final class InstancePoolsClientImpl implements InnerSupportsGet> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("instancePoolName") String instancePoolName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}") - @ExpectedResponses({ 200, 201, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("instancePoolName") String instancePoolName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") InstancePoolInner parameters, - Context context); + @PathParam("instancePoolName") String instancePoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("instancePoolName") String instancePoolName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") InstancePoolUpdate parameters, - Context context); + @PathParam("instancePoolName") String instancePoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") InstancePoolInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("instancePoolName") String instancePoolName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("instancePoolName") String instancePoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools") - @ExpectedResponses({ 200 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("instancePoolName") String instancePoolName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") InstancePoolUpdate parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * Gets an instance pool. + * Gets a list of all instance pools in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance pool along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all instance pools in the subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String instancePoolName) { + private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -169,35 +165,27 @@ public Mono> getByResourceGroupWithResponseAsync(Str 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 (instancePoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancePoolName, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + 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())); } /** - * Gets an instance pool. + * Gets a list of all instance pools in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. * @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 an instance pool along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all instance pools in the subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String instancePoolName, Context context) { + 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.")); @@ -206,310 +194,333 @@ private Mono> getByResourceGroupWithResponseAsync(St 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 (instancePoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter instancePoolName 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, instancePoolName, accept, context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets an instance pool. + * Gets a list of all instance pools in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance pool on successful completion of {@link Mono}. + * @return a list of all instance pools in the subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String instancePoolName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, instancePoolName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Gets an instance pool. + * Gets a list of all instance pools in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. * @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 an instance pool along with {@link Response}. + * @return a list of all instance pools in the subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String instancePoolName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, instancePoolName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Gets an instance pool. + * Gets a list of all instance pools in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @throws ManagementException 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 all instance pools in the subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of all instance pools in the 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 an instance pool. + * @return a list of all instance pools in the subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InstancePoolInner getByResourceGroup(String resourceGroupName, String instancePoolName) { - return getByResourceGroupWithResponse(resourceGroupName, instancePoolName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** - * Creates or updates an instance pool. + * Gets a list of instance pools in the resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL instance pool along with {@link Response} on successful completion of {@link Mono}. + * @return a list of instance pools in the resource group along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String instancePoolName, InstancePoolInner parameters) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { 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 (instancePoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter instancePoolName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancePoolName, contentType, accept, parameters, - context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, + this.client.getSubscriptionId(), 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())); } /** - * Creates or updates an instance pool. + * Gets a list of instance pools in the resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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 an Azure SQL instance pool along with {@link Response} on successful completion of {@link Mono}. + * @return a list of instance pools in the resource group along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String instancePoolName, InstancePoolInner parameters, Context context) { + 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.")); } - if (instancePoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter instancePoolName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancePoolName, contentType, accept, parameters, - context); + return service + .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Creates or updates an instance pool. + * Gets a list of instance pools in the resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an Azure SQL instance pool. + * @return a list of instance pools in the resource group as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, InstancePoolInner> - beginCreateOrUpdateAsync(String resourceGroupName, String instancePoolName, InstancePoolInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, instancePoolName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - InstancePoolInner.class, InstancePoolInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Creates or updates an instance pool. + * Gets a list of instance pools in the resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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 an Azure SQL instance pool. + * @return a list of instance pools in the resource group as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InstancePoolInner> beginCreateOrUpdateAsync( - String resourceGroupName, String instancePoolName, InstancePoolInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, instancePoolName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - InstancePoolInner.class, InstancePoolInner.class, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Creates or updates an instance pool. + * Gets a list of instance pools in the resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an Azure SQL instance pool. + * @return a list of instance pools in the resource group as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InstancePoolInner> beginCreateOrUpdate(String resourceGroupName, - String instancePoolName, InstancePoolInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } /** - * Creates or updates an instance pool. + * Gets a list of instance pools in the resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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 an Azure SQL instance pool. + * @return a list of instance pools in the resource group as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InstancePoolInner> beginCreateOrUpdate(String resourceGroupName, - String instancePoolName, InstancePoolInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** - * Creates or updates an instance pool. + * Gets an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource 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 an Azure SQL instance pool on successful completion of {@link Mono}. + * @return an instance pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String instancePoolName, - InstancePoolInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String instancePoolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (instancePoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter instancePoolName 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"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, + instancePoolName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates an instance pool. + * Gets an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource 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 an Azure SQL instance pool on successful completion of {@link Mono}. + * @return an instance pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String instancePoolName, - InstancePoolInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String instancePoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (instancePoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter instancePoolName 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.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, instancePoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Creates or updates an instance pool. + * Gets an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource 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 an Azure SQL instance pool. + * @return an instance pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InstancePoolInner createOrUpdate(String resourceGroupName, String instancePoolName, - InstancePoolInner parameters) { - return createOrUpdateAsync(resourceGroupName, instancePoolName, parameters).block(); + public Mono getByResourceGroupAsync(String resourceGroupName, String instancePoolName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, instancePoolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates or updates an instance pool. + * Gets an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. - * @param parameters The requested instance pool resource 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 an Azure SQL instance pool. + * @return an instance pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InstancePoolInner createOrUpdate(String resourceGroupName, String instancePoolName, - InstancePoolInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, instancePoolName, parameters, context).block(); + public Response getByResourceGroupWithResponse(String resourceGroupName, String instancePoolName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, instancePoolName, context).block(); } /** - * Updates an instance pool. + * Gets an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InstancePoolInner getByResourceGroup(String resourceGroupName, String instancePoolName) { + return getByResourceGroupWithResponse(resourceGroupName, instancePoolName, Context.NONE).getValue(); + } + + /** + * Creates or updates an instance pool. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -517,16 +528,12 @@ public InstancePoolInner createOrUpdate(String resourceGroupName, String instanc * @return an Azure SQL instance pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String instancePoolName, - InstancePoolUpdate parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String instancePoolName, InstancePoolInner 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.")); @@ -535,25 +542,29 @@ public Mono>> updateWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter instancePoolName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancePoolName, contentType, accept, parameters, - context)) + .withContext( + context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, instancePoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates an instance pool. + * Creates or updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -562,16 +573,12 @@ public Mono>> updateWithResponseAsync(String resourceG * @return an Azure SQL instance pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String instancePoolName, - InstancePoolUpdate parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String instancePoolName, InstancePoolInner 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.")); @@ -580,23 +587,27 @@ private Mono>> updateWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter instancePoolName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, instancePoolName, contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, instancePoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Updates an instance pool. + * Creates or updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -604,19 +615,20 @@ private Mono>> updateWithResponseAsync(String resource * @return the {@link PollerFlux} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, InstancePoolInner> beginUpdateAsync(String resourceGroupName, - String instancePoolName, InstancePoolUpdate parameters) { + public PollerFlux, InstancePoolInner> + beginCreateOrUpdateAsync(String resourceGroupName, String instancePoolName, InstancePoolInner parameters) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, instancePoolName, parameters); + = createOrUpdateWithResponseAsync(resourceGroupName, instancePoolName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), InstancePoolInner.class, InstancePoolInner.class, this.client.getContext()); } /** - * Updates an instance pool. + * Creates or updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -625,20 +637,21 @@ public PollerFlux, InstancePoolInner> beginUpdateA * @return the {@link PollerFlux} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InstancePoolInner> beginUpdateAsync(String resourceGroupName, - String instancePoolName, InstancePoolUpdate parameters, Context context) { + private PollerFlux, InstancePoolInner> beginCreateOrUpdateAsync( + String resourceGroupName, String instancePoolName, InstancePoolInner parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateWithResponseAsync(resourceGroupName, instancePoolName, parameters, context); + = createOrUpdateWithResponseAsync(resourceGroupName, instancePoolName, parameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), InstancePoolInner.class, InstancePoolInner.class, context); } /** - * Updates an instance pool. + * Creates or updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -646,16 +659,17 @@ private PollerFlux, InstancePoolInner> beginUpdate * @return the {@link SyncPoller} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InstancePoolInner> beginUpdate(String resourceGroupName, - String instancePoolName, InstancePoolUpdate parameters) { - return this.beginUpdateAsync(resourceGroupName, instancePoolName, parameters).getSyncPoller(); + public SyncPoller, InstancePoolInner> beginCreateOrUpdate(String resourceGroupName, + String instancePoolName, InstancePoolInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters).getSyncPoller(); } /** - * Updates an instance pool. + * Creates or updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -664,16 +678,17 @@ public SyncPoller, InstancePoolInner> beginUpdate( * @return the {@link SyncPoller} for polling of an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InstancePoolInner> beginUpdate(String resourceGroupName, - String instancePoolName, InstancePoolUpdate parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, instancePoolName, parameters, context).getSyncPoller(); + public SyncPoller, InstancePoolInner> beginCreateOrUpdate(String resourceGroupName, + String instancePoolName, InstancePoolInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters, context).getSyncPoller(); } /** - * Updates an instance pool. + * Creates or updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -681,17 +696,18 @@ public SyncPoller, InstancePoolInner> beginUpdate( * @return an Azure SQL instance pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String instancePoolName, - InstancePoolUpdate parameters) { - return beginUpdateAsync(resourceGroupName, instancePoolName, parameters).last() + public Mono createOrUpdateAsync(String resourceGroupName, String instancePoolName, + InstancePoolInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an instance pool. + * Creates or updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -700,17 +716,18 @@ public Mono updateAsync(String resourceGroupName, String inst * @return an Azure SQL instance pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String instancePoolName, - InstancePoolUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, instancePoolName, parameters, context).last() + private Mono createOrUpdateAsync(String resourceGroupName, String instancePoolName, + InstancePoolInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an instance pool. + * Creates or updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -718,15 +735,17 @@ private Mono updateAsync(String resourceGroupName, String ins * @return an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InstancePoolInner update(String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters) { - return updateAsync(resourceGroupName, instancePoolName, parameters).block(); + public InstancePoolInner createOrUpdate(String resourceGroupName, String instancePoolName, + InstancePoolInner parameters) { + return createOrUpdateAsync(resourceGroupName, instancePoolName, parameters).block(); } /** - * Updates an instance pool. + * Creates or updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be created or updated. * @param parameters The requested instance pool resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -735,16 +754,17 @@ public InstancePoolInner update(String resourceGroupName, String instancePoolNam * @return an Azure SQL instance pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public InstancePoolInner update(String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters, - Context context) { - return updateAsync(resourceGroupName, instancePoolName, parameters, context).block(); + public InstancePoolInner createOrUpdate(String resourceGroupName, String instancePoolName, + InstancePoolInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, instancePoolName, parameters, context).block(); } /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -756,10 +776,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -768,17 +784,22 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter instancePoolName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancePoolName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, instancePoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @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. @@ -792,10 +813,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -804,16 +821,21 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter instancePoolName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, instancePoolName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, instancePoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -829,8 +851,9 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @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. @@ -849,8 +872,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -864,8 +888,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @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. @@ -881,8 +906,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -897,8 +923,9 @@ public Mono deleteAsync(String resourceGroupName, String instancePoolName) /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @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. @@ -914,8 +941,9 @@ private Mono deleteAsync(String resourceGroupName, String instancePoolName /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -928,8 +956,9 @@ public void delete(String resourceGroupName, String instancePoolName) { /** * Deletes an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be deleted. * @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. @@ -941,240 +970,245 @@ public void delete(String resourceGroupName, String instancePoolName, Context co } /** - * Gets a list of instance pools in the resource group. + * Updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 list of instance pools in the resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return an Azure SQL instance pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String instancePoolName, + InstancePoolUpdate parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (instancePoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter instancePoolName 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 (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.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)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, instancePoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of instance pools in the resource group. + * Updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 list of instance pools in the resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return an Azure SQL instance pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String instancePoolName, + InstancePoolUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (instancePoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter instancePoolName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } 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)); + return service.update(this.client.getEndpoint(), resourceGroupName, instancePoolName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Gets a list of instance pools in the resource group. + * Updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 list of instance pools in the resource group as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of an Azure SQL instance pool. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, InstancePoolInner> beginUpdateAsync(String resourceGroupName, + String instancePoolName, InstancePoolUpdate parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, instancePoolName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InstancePoolInner.class, InstancePoolInner.class, this.client.getContext()); } /** - * Gets a list of instance pools in the resource group. + * Updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 list of instance pools in the resource group as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of an Azure SQL instance pool. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InstancePoolInner> beginUpdateAsync(String resourceGroupName, + String instancePoolName, InstancePoolUpdate parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, instancePoolName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InstancePoolInner.class, InstancePoolInner.class, context); } /** - * Gets a list of instance pools in the resource group. + * Updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 list of instance pools in the resource group as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of an Azure SQL instance pool. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InstancePoolInner> beginUpdate(String resourceGroupName, + String instancePoolName, InstancePoolUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, instancePoolName, parameters).getSyncPoller(); } /** - * Gets a list of instance pools in the resource group. + * Updates an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 list of instance pools in the resource group as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of an Azure SQL instance pool. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InstancePoolInner> beginUpdate(String resourceGroupName, + String instancePoolName, InstancePoolUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, instancePoolName, parameters, context).getSyncPoller(); } /** - * Gets a list of all instance pools in the subscription. + * Updates an instance pool. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 list of all instance pools in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return an Azure SQL instance pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - 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"; - return FluxUtil - .withContext(context -> 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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public Mono updateAsync(String resourceGroupName, String instancePoolName, + InstancePoolUpdate parameters) { + return beginUpdateAsync(resourceGroupName, instancePoolName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a list of all instance pools in the subscription. + * Updates an instance pool. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 list of all instance pools in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return an Azure SQL instance pool 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)); - } - - /** - * Gets a list of all instance pools in the 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 a list of all instance pools in the subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + private Mono updateAsync(String resourceGroupName, String instancePoolName, + InstancePoolUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, instancePoolName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a list of all instance pools in the subscription. + * Updates an instance pool. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 list of all instance pools in the subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of all instance pools in the 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 a list of all instance pools in the subscription as paginated response with {@link PagedIterable}. + * @return an Azure SQL instance pool. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public InstancePoolInner update(String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters) { + return updateAsync(resourceGroupName, instancePoolName, parameters).block(); } /** - * Gets a list of all instance pools in the subscription. + * Updates an instance pool. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The name of the instance pool to be updated. + * @param parameters The requested instance pool resource 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 list of all instance pools in the subscription as paginated response with {@link PagedIterable}. + * @return an Azure SQL instance pool. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public InstancePoolInner update(String resourceGroupName, String instancePoolName, InstancePoolUpdate parameters, + Context context) { + return updateAsync(resourceGroupName, instancePoolName, parameters, context).block(); } /** @@ -1184,11 +1218,11 @@ 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 instance pools in the resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of Azure SQL instance pools along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1197,9 +1231,7 @@ private Mono> listByResourceGroupNextSinglePage new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -1213,12 +1245,11 @@ private Mono> listByResourceGroupNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 instance pools in the resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of Azure SQL instance pools along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1228,7 +1259,7 @@ private Mono> listByResourceGroupNextSinglePage } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, 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)); } @@ -1240,11 +1271,11 @@ private Mono> listByResourceGroupNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 all instance pools in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of Azure SQL instance pools along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1253,7 +1284,9 @@ private Mono> listNextSinglePageAsync(String ne 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.listByResourceGroupNext(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())); @@ -1267,11 +1300,12 @@ private Mono> listNextSinglePageAsync(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 all instance pools in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of Azure SQL instance pools along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1281,7 +1315,7 @@ private Mono> listNextSinglePageAsync(String ne } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, 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)); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobAgentsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobAgentsClientImpl.java index ecc3b13ba33e..b2964d50a8ff 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobAgentsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobAgentsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.JobAgentsClient; import com.azure.resourcemanager.sql.fluent.models.JobAgentInner; -import com.azure.resourcemanager.sql.implementation.models.JobAgentListResult; +import com.azure.resourcemanager.sql.models.JobAgentListResult; import com.azure.resourcemanager.sql.models.JobAgentUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -69,54 +69,54 @@ public final class JobAgentsClientImpl implements JobAgentsClient { * The interface defining all the services for SqlManagementClientJobAgents to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientJobAgents") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientJ") public interface JobAgentsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}") - @ExpectedResponses({ 200, 201, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") JobAgentInner parameters, - Context context); + @PathParam("jobAgentName") String jobAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") JobAgentUpdate parameters, - Context context); + @PathParam("jobAgentName") String jobAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") JobAgentInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, Context context); + @PathParam("jobAgentName") String jobAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents") - @ExpectedResponses({ 200 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") JobAgentUpdate parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -124,14 +124,162 @@ Mono> listByServer(@HostParam("endpoint") String en @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of job agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 job agents in a 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 (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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of job agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 job agents in a server along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of job agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 job agents in a 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)); + } + + /** + * Gets a list of job agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 job agents in a server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of job agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 job agents in a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Gets a list of job agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 job agents in a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + /** * Gets a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -146,10 +294,6 @@ public Mono> getWithResponseAsync(String resourceGroupNa 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.")); @@ -160,17 +304,22 @@ public Mono> getWithResponseAsync(String resourceGroupNa if (jobAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter jobAgentName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @param context The context to associate with this operation. @@ -186,10 +335,6 @@ private Mono> getWithResponseAsync(String resourceGroupN 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.")); @@ -200,16 +345,21 @@ private Mono> getWithResponseAsync(String resourceGroupN if (jobAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter jobAgentName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -226,7 +376,8 @@ public Mono getAsync(String resourceGroupName, String serverName, /** * Gets a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @param context The context to associate with this operation. @@ -244,7 +395,8 @@ public Response getWithResponse(String resourceGroupName, String /** * Gets a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -260,9 +412,10 @@ public JobAgentInner get(String resourceGroupName, String serverName, String job /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -276,10 +429,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -290,26 +439,30 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (jobAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter jobAgentName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, contentType, accept, - parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -324,10 +477,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -338,25 +487,28 @@ private Mono>> createOrUpdateWithResponseAsync(String if (jobAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter jobAgentName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -375,9 +527,10 @@ public PollerFlux, JobAgentInner> beginCreateOrUpdateA /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -398,9 +551,10 @@ private PollerFlux, JobAgentInner> beginCreateOrUpdate /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -416,9 +570,10 @@ public SyncPoller, JobAgentInner> beginCreateOrUpdate( /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -436,9 +591,10 @@ public SyncPoller, JobAgentInner> beginCreateOrUpdate( /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -455,9 +611,10 @@ public Mono createOrUpdateAsync(String resourceGroupName, String /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -475,9 +632,10 @@ private Mono createOrUpdateAsync(String resourceGroupName, String /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -493,9 +651,10 @@ public JobAgentInner createOrUpdate(String resourceGroupName, String serverName, /** * Creates or updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be created or updated. * @param parameters The requested job agent resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -510,28 +669,24 @@ public JobAgentInner createOrUpdate(String resourceGroupName, String serverName, } /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL job agent along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, JobAgentUpdate parameters) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName) { 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.")); @@ -542,44 +697,36 @@ public Mono>> updateWithResponseAsync(String resourceG if (jobAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter jobAgentName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, contentType, accept, - parameters, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @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 an Azure SQL job agent along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, JobAgentUpdate parameters, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, 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.")); @@ -590,197 +737,185 @@ private Mono>> updateWithResponseAsync(String resource if (jobAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter jobAgentName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, contentType, accept, parameters, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an Azure SQL job agent. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, JobAgentInner> beginUpdateAsync(String resourceGroupName, - String serverName, String jobAgentName, JobAgentUpdate parameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, serverName, jobAgentName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - JobAgentInner.class, JobAgentInner.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String jobAgentName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, jobAgentName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @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 an Azure SQL job agent. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobAgentInner> beginUpdateAsync(String resourceGroupName, - String serverName, String jobAgentName, JobAgentUpdate parameters, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String jobAgentName, Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateWithResponseAsync(resourceGroupName, serverName, jobAgentName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - JobAgentInner.class, JobAgentInner.class, context); + = deleteWithResponseAsync(resourceGroupName, serverName, jobAgentName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an Azure SQL job agent. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobAgentInner> beginUpdate(String resourceGroupName, String serverName, - String jobAgentName, JobAgentUpdate parameters) { - return this.beginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String jobAgentName) { + return this.beginDeleteAsync(resourceGroupName, serverName, jobAgentName).getSyncPoller(); } /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @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 an Azure SQL job agent. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobAgentInner> beginUpdate(String resourceGroupName, String serverName, - String jobAgentName, JobAgentUpdate parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String jobAgentName, Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, jobAgentName, context).getSyncPoller(); } /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL job agent on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, String jobAgentName, - JobAgentUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters).last() + public Mono deleteAsync(String resourceGroupName, String serverName, String jobAgentName) { + return beginDeleteAsync(resourceGroupName, serverName, jobAgentName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @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 an Azure SQL job agent 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 serverName, String jobAgentName, - JobAgentUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters, context).last() + private Mono deleteAsync(String resourceGroupName, String serverName, String jobAgentName, Context context) { + return beginDeleteAsync(resourceGroupName, serverName, jobAgentName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobAgentInner update(String resourceGroupName, String serverName, String jobAgentName, - JobAgentUpdate parameters) { - return updateAsync(resourceGroupName, serverName, jobAgentName, parameters).block(); + public void delete(String resourceGroupName, String serverName, String jobAgentName) { + deleteAsync(resourceGroupName, serverName, jobAgentName).block(); } /** - * Updates a job agent. + * Deletes a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param parameters The update to the job agent. + * @param jobAgentName The name of the job agent to be deleted. * @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 an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobAgentInner update(String resourceGroupName, String serverName, String jobAgentName, - JobAgentUpdate parameters, Context context) { - return updateAsync(resourceGroupName, serverName, jobAgentName, parameters, context).block(); + public void delete(String resourceGroupName, String serverName, String jobAgentName, Context context) { + deleteAsync(resourceGroupName, serverName, jobAgentName, context).block(); } /** - * Deletes a job agent. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an Azure SQL job agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, JobAgentUpdate 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.")); @@ -791,35 +926,44 @@ public Mono>> deleteWithResponseAsync(String resourceG if (jobAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter jobAgentName 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.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, context)) + .withContext( + context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a job agent. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @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 an Azure SQL job agent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, JobAgentUpdate 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.")); @@ -830,292 +974,184 @@ private Mono>> deleteWithResponseAsync(String resource if (jobAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter jobAgentName 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"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Deletes a job agent. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, - String jobAgentName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, jobAgentName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + public PollerFlux, JobAgentInner> beginUpdateAsync(String resourceGroupName, + String serverName, String jobAgentName, JobAgentUpdate parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, jobAgentName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JobAgentInner.class, JobAgentInner.class, this.client.getContext()); } /** - * Deletes a job agent. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @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 {@link PollerFlux} for polling of an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, - String jobAgentName, Context context) { + private PollerFlux, JobAgentInner> beginUpdateAsync(String resourceGroupName, + String serverName, String jobAgentName, JobAgentUpdate parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono - = deleteWithResponseAsync(resourceGroupName, serverName, jobAgentName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = updateWithResponseAsync(resourceGroupName, serverName, jobAgentName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JobAgentInner.class, JobAgentInner.class, context); } /** - * Deletes a job agent. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, - String jobAgentName) { - return this.beginDeleteAsync(resourceGroupName, serverName, jobAgentName).getSyncPoller(); + public SyncPoller, JobAgentInner> beginUpdate(String resourceGroupName, String serverName, + String jobAgentName, JobAgentUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters).getSyncPoller(); } /** - * Deletes a job agent. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @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 an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, - String jobAgentName, Context context) { - return this.beginDeleteAsync(resourceGroupName, serverName, jobAgentName, context).getSyncPoller(); + public SyncPoller, JobAgentInner> beginUpdate(String resourceGroupName, String serverName, + String jobAgentName, JobAgentUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters, context).getSyncPoller(); } /** - * Deletes a job agent. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an Azure SQL job agent on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String serverName, String jobAgentName) { - return beginDeleteAsync(resourceGroupName, serverName, jobAgentName).last() + public Mono updateAsync(String resourceGroupName, String serverName, String jobAgentName, + JobAgentUpdate parameters) { + return beginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a job agent. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @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 an Azure SQL job agent on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String serverName, String jobAgentName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, jobAgentName, context).last() + private Mono updateAsync(String resourceGroupName, String serverName, String jobAgentName, + JobAgentUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, serverName, jobAgentName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a job agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 jobAgentName) { - deleteAsync(resourceGroupName, serverName, jobAgentName).block(); - } - - /** - * Deletes a job agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 jobAgentName, Context context) { - deleteAsync(resourceGroupName, serverName, jobAgentName, context).block(); - } - - /** - * Gets a list of job agents in a server. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 job agents in a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return an Azure SQL job agent. */ @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())); + public JobAgentInner update(String resourceGroupName, String serverName, String jobAgentName, + JobAgentUpdate parameters) { + return updateAsync(resourceGroupName, serverName, jobAgentName, parameters).block(); } /** - * Gets a list of job agents in a server. + * Updates a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param jobAgentName The name of the job agent to be updated. + * @param parameters The update to the job agent. * @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 job agents in a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return an Azure SQL job agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName, - 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Gets a list of job agents 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 job agents in a 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)); - } - - /** - * Gets a list of job agents in 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 job agents in a server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of job agents 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 job agents in a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Gets a list of job agents in 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 job agents in a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + public JobAgentInner update(String resourceGroupName, String serverName, String jobAgentName, + JobAgentUpdate parameters, Context context) { + return updateAsync(resourceGroupName, serverName, jobAgentName, parameters, context).block(); } /** @@ -1125,8 +1161,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 job agents in a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of Azure SQL job agents along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -1153,8 +1188,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 job agents in a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of Azure SQL job agents along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobCredentialsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobCredentialsClientImpl.java index e26031028553..3c7487a42f09 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobCredentialsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobCredentialsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.JobCredentialsClient; import com.azure.resourcemanager.sql.fluent.models.JobCredentialInner; -import com.azure.resourcemanager.sql.implementation.models.JobCredentialListResult; +import com.azure.resourcemanager.sql.models.JobCredentialListResult; import reactor.core.publisher.Mono; /** @@ -62,63 +62,226 @@ public final class JobCredentialsClientImpl implements JobCredentialsClient { * The interface defining all the services for SqlManagementClientJobCredentials to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientJobCredentials") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientJ") public interface JobCredentialsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByAgent(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("credentialName") String credentialName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("credentialName") String credentialName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") JobCredentialInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") JobCredentialInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("credentialName") String credentialName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAgent(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByAgentNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of jobs credentials. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 jobs credentials along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByAgentSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (jobAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobAgentName 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"; + return FluxUtil + .withContext(context -> service.listByAgent(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of jobs credentials. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @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 jobs credentials along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByAgentSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (jobAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobAgentName 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 + .listByAgent(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of jobs credentials. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 jobs credentials as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByAgentAsync(String resourceGroupName, String serverName, + String jobAgentName) { + return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName), + nextLink -> listByAgentNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of jobs credentials. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @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 jobs credentials as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByAgentAsync(String resourceGroupName, String serverName, + String jobAgentName, Context context) { + return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, context), + nextLink -> listByAgentNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of jobs credentials. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 jobs credentials as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByAgent(String resourceGroupName, String serverName, + String jobAgentName) { + return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName)); + } + + /** + * Gets a list of jobs credentials. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @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 jobs credentials as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByAgent(String resourceGroupName, String serverName, + String jobAgentName, Context context) { + return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName, context)); + } + /** * Gets a jobs credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -132,10 +295,6 @@ public Mono> getWithResponseAsync(String resourceGr 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.")); @@ -149,20 +308,24 @@ public Mono> getWithResponseAsync(String resourceGr if (credentialName == null) { return Mono.error(new IllegalArgumentException("Parameter credentialName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, credentialName, accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + credentialName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a jobs credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -177,10 +340,6 @@ private Mono> getWithResponseAsync(String resourceG 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.")); @@ -194,18 +353,23 @@ private Mono> getWithResponseAsync(String resourceG if (credentialName == null) { return Mono.error(new IllegalArgumentException("Parameter credentialName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, credentialName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, credentialName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a jobs credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -222,9 +386,10 @@ public Mono getAsync(String resourceGroupName, String server /** * Gets a jobs credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -241,9 +406,10 @@ public Response getWithResponse(String resourceGroupName, St /** * Gets a jobs credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -259,9 +425,10 @@ public JobCredentialInner get(String resourceGroupName, String serverName, Strin /** * Creates or updates a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @param parameters The requested job credential state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -277,10 +444,6 @@ public Mono> createOrUpdateWithResponseAsync(String 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.")); @@ -294,26 +457,30 @@ public Mono> createOrUpdateWithResponseAsync(String if (credentialName == null) { return Mono.error(new IllegalArgumentException("Parameter credentialName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, credentialName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, credentialName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @param parameters The requested job credential state. * @param context The context to associate with this operation. @@ -330,10 +497,6 @@ private Mono> createOrUpdateWithResponseAsync(Strin 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.")); @@ -347,25 +510,28 @@ private Mono> createOrUpdateWithResponseAsync(Strin if (credentialName == null) { return Mono.error(new IllegalArgumentException("Parameter credentialName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, credentialName, contentType, - accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + credentialName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @param parameters The requested job credential state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -384,9 +550,10 @@ public Mono createOrUpdateAsync(String resourceGroupName, St /** * Creates or updates a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @param parameters The requested job credential state. * @param context The context to associate with this operation. @@ -405,9 +572,10 @@ public Response createOrUpdateWithResponse(String resourceGr /** * Creates or updates a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @param parameters The requested job credential state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -425,9 +593,10 @@ public JobCredentialInner createOrUpdate(String resourceGroupName, String server /** * Deletes a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -441,10 +610,6 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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.")); @@ -458,18 +623,23 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St if (credentialName == null) { return Mono.error(new IllegalArgumentException("Parameter credentialName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, credentialName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, credentialName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -484,10 +654,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -501,17 +667,22 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (credentialName == null) { return Mono.error(new IllegalArgumentException("Parameter credentialName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, credentialName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, credentialName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -528,9 +699,10 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -547,9 +719,10 @@ public Response deleteWithResponse(String resourceGroupName, String server /** * Deletes a job credential. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param credentialName The name of the credential. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -560,161 +733,6 @@ public void delete(String resourceGroupName, String serverName, String jobAgentN deleteWithResponse(resourceGroupName, serverName, jobAgentName, credentialName, Context.NONE); } - /** - * Gets a list of jobs credentials. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 jobs credentials along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentSinglePageAsync(String resourceGroupName, - String serverName, String jobAgentName) { - 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 (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByAgent(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, 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 a list of jobs credentials. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 jobs credentials along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentSinglePageAsync(String resourceGroupName, - String serverName, String jobAgentName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByAgent(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of jobs credentials. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 jobs credentials as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByAgentAsync(String resourceGroupName, String serverName, - String jobAgentName) { - return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName), - nextLink -> listByAgentNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of jobs credentials. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 jobs credentials as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAgentAsync(String resourceGroupName, String serverName, - String jobAgentName, Context context) { - return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, context), - nextLink -> listByAgentNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of jobs credentials. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 jobs credentials as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent(String resourceGroupName, String serverName, - String jobAgentName) { - return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName)); - } - - /** - * Gets a list of jobs credentials. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 jobs credentials as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent(String resourceGroupName, String serverName, - String jobAgentName, Context context) { - return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName, context)); - } - /** * Get the next page of items. * @@ -722,7 +740,7 @@ public PagedIterable listByAgent(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 jobs credentials along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of job credentials along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByAgentNextSinglePageAsync(String nextLink) { @@ -749,7 +767,7 @@ private Mono> listByAgentNextSinglePageAsync(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 jobs credentials along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of job credentials along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByAgentNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobExecutionsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobExecutionsClientImpl.java index 7015ef41a062..389525302c7d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobExecutionsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobExecutionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -32,7 +32,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.JobExecutionsClient; import com.azure.resourcemanager.sql.fluent.models.JobExecutionInner; -import com.azure.resourcemanager.sql.implementation.models.JobExecutionListResult; +import com.azure.resourcemanager.sql.models.JobExecutionListResult; import java.nio.ByteBuffer; import java.time.OffsetDateTime; import java.util.UUID; @@ -68,117 +68,120 @@ public final class JobExecutionsClientImpl implements JobExecutionsClient { * The interface defining all the services for SqlManagementClientJobExecutions to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientJobExecutions") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientJ") public interface JobExecutionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByAgent(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, - @PathParam("jobExecutionId") UUID jobExecutionId, @HeaderParam("Accept") String accept, Context context); + @PathParam("jobAgentName") String jobAgentName, @QueryParam("createTimeMin") OffsetDateTime createTimeMin, + @QueryParam("createTimeMax") OffsetDateTime createTimeMax, + @QueryParam("endTimeMin") OffsetDateTime endTimeMin, @QueryParam("endTimeMax") OffsetDateTime endTimeMax, + @QueryParam("isActive") Boolean isActive, @QueryParam("$skip") Long skip, @QueryParam("$top") Long top, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}") - @ExpectedResponses({ 200, 201, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByJob(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, - @PathParam("jobExecutionId") UUID jobExecutionId, @HeaderParam("Accept") String accept, Context context); + @QueryParam("createTimeMin") OffsetDateTime createTimeMin, + @QueryParam("createTimeMax") OffsetDateTime createTimeMax, + @QueryParam("endTimeMin") OffsetDateTime endTimeMin, @QueryParam("endTimeMax") OffsetDateTime endTimeMax, + @QueryParam("isActive") Boolean isActive, @QueryParam("$skip") Long skip, @QueryParam("$top") Long top, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel") + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> cancel(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, - @PathParam("jobExecutionId") UUID jobExecutionId, Context context); + @PathParam("jobExecutionId") UUID jobExecutionId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByJob(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, - @QueryParam("createTimeMin") OffsetDateTime createTimeMin, - @QueryParam("createTimeMax") OffsetDateTime createTimeMax, - @QueryParam("endTimeMin") OffsetDateTime endTimeMin, @QueryParam("endTimeMax") OffsetDateTime endTimeMax, - @QueryParam("isActive") Boolean isActive, @QueryParam("$skip") Long skip, @QueryParam("$top") Long top, - @HeaderParam("Accept") String accept, Context context); + @PathParam("jobExecutionId") UUID jobExecutionId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions") + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAgent(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> cancel(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, @QueryParam("createTimeMin") OffsetDateTime createTimeMin, - @QueryParam("createTimeMax") OffsetDateTime createTimeMax, - @QueryParam("endTimeMin") OffsetDateTime endTimeMin, @QueryParam("endTimeMax") OffsetDateTime endTimeMax, - @QueryParam("isActive") Boolean isActive, @QueryParam("$skip") Long skip, @QueryParam("$top") Long top, - @HeaderParam("Accept") String accept, Context context); + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("jobExecutionId") UUID jobExecutionId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> create(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByJobNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByAgentNext( + @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> listByAgentNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByJobNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a job execution. + * Lists all executions in a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param createTimeMin If specified, only job executions created at or after the specified time are included. + * @param createTimeMax If specified, only job executions created before the specified time are included. + * @param endTimeMin If specified, only job executions completed at or after the specified time are included. + * @param endTimeMax If specified, only job executions completed before the specified time are included. + * @param isActive If specified, only active or only completed job executions are included. + * @param skip The number of elements in the collection to skip. + * @param top The number of elements to return from the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a job execution along with {@link Response} on successful completion of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, UUID jobExecutionId) { + private Mono> listByAgentSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, + OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { 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.")); @@ -189,45 +192,48 @@ public Mono> getWithResponseAsync(String resourceGro if (jobAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobExecutionId == null) { - return Mono.error(new IllegalArgumentException("Parameter jobExecutionId 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, - accept, context)) + .withContext(context -> service.listByAgent(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, + this.client.getSubscriptionId(), 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())); } /** - * Gets a job execution. + * Lists all executions in a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param createTimeMin If specified, only job executions created at or after the specified time are included. + * @param createTimeMax If specified, only job executions created before the specified time are included. + * @param endTimeMin If specified, only job executions completed at or after the specified time are included. + * @param endTimeMax If specified, only job executions completed before the specified time are included. + * @param isActive If specified, only active or only completed job executions are included. + * @param skip The number of elements in the collection to skip. + * @param top The number of elements to return from the collection. * @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 job execution along with {@link Response} on successful completion of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, UUID jobExecutionId, Context context) { + private Mono> listByAgentSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, + OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, 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.")); @@ -238,103 +244,187 @@ private Mono> getWithResponseAsync(String resourceGr if (jobAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobExecutionId == null) { - return Mono.error(new IllegalArgumentException("Parameter jobExecutionId 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, accept, context); + return service + .listByAgent(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a job execution. + * Lists all executions in a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param createTimeMin If specified, only job executions created at or after the specified time are included. + * @param createTimeMax If specified, only job executions created before the specified time are included. + * @param endTimeMin If specified, only job executions completed at or after the specified time are included. + * @param endTimeMax If specified, only job executions completed before the specified time are included. + * @param isActive If specified, only active or only completed job executions are included. + * @param skip The number of elements in the collection to skip. + * @param top The number of elements to return from the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a job execution on successful completion of {@link Mono}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName, UUID jobExecutionId) { - return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByAgentAsync(String resourceGroupName, String serverName, + String jobAgentName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { + return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, + createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), + nextLink -> listByAgentNextSinglePageAsync(nextLink)); } /** - * Gets a job execution. + * Lists all executions in a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 job executions as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByAgentAsync(String resourceGroupName, String serverName, + String jobAgentName) { + final OffsetDateTime createTimeMin = null; + final OffsetDateTime createTimeMax = null; + final OffsetDateTime endTimeMin = null; + final OffsetDateTime endTimeMax = null; + final Boolean isActive = null; + final Long skip = null; + final Long top = null; + return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, + createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), + nextLink -> listByAgentNextSinglePageAsync(nextLink)); + } + + /** + * Lists all executions in a job agent. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param createTimeMin If specified, only job executions created at or after the specified time are included. + * @param createTimeMax If specified, only job executions created before the specified time are included. + * @param endTimeMin If specified, only job executions completed at or after the specified time are included. + * @param endTimeMax If specified, only job executions completed before the specified time are included. + * @param isActive If specified, only active or only completed job executions are included. + * @param skip The number of elements in the collection to skip. + * @param top The number of elements to return from the collection. * @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 job execution along with {@link Response}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, - String jobName, UUID jobExecutionId, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByAgentAsync(String resourceGroupName, String serverName, + String jobAgentName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { + return new PagedFlux<>( + () -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, createTimeMin, createTimeMax, + endTimeMin, endTimeMax, isActive, skip, top, context), + nextLink -> listByAgentNextSinglePageAsync(nextLink, context)); } /** - * Gets a job execution. + * Lists all executions in a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a job execution. + * @return a list of job executions as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobExecutionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, - UUID jobExecutionId) { - return getWithResponse(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByAgent(String resourceGroupName, String serverName, + String jobAgentName) { + final OffsetDateTime createTimeMin = null; + final OffsetDateTime createTimeMax = null; + final OffsetDateTime endTimeMin = null; + final OffsetDateTime endTimeMax = null; + final Boolean isActive = null; + final Long skip = null; + final Long top = null; + return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)); } /** - * Creates or updates a job execution. + * Lists all executions in a job agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param createTimeMin If specified, only job executions created at or after the specified time are included. + * @param createTimeMax If specified, only job executions created before the specified time are included. + * @param endTimeMin If specified, only job executions completed at or after the specified time are included. + * @param endTimeMax If specified, only job executions completed before the specified time are included. + * @param isActive If specified, only active or only completed job executions are included. + * @param skip The number of elements in the collection to skip. + * @param top The number of elements to return from the collection. + * @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 an execution of a job along with {@link Response} on successful completion of {@link Mono}. + * @return a list of job executions as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByAgent(String resourceGroupName, String serverName, + String jobAgentName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { + return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context)); + } + + /** + * Lists a job's executions. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param createTimeMin If specified, only job executions created at or after the specified time are included. + * @param createTimeMax If specified, only job executions created before the specified time are included. + * @param endTimeMin If specified, only job executions completed at or after the specified time are included. + * @param endTimeMax If specified, only job executions completed before the specified time are included. + * @param isActive If specified, only active or only completed job executions are included. + * @param skip The number of elements in the collection to skip. + * @param top The number of elements to return from the collection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, UUID jobExecutionId) { + private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, + OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { 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.")); @@ -348,42 +438,49 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } - if (jobExecutionId == null) { - return Mono.error(new IllegalArgumentException("Parameter jobExecutionId 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"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, - accept, context)) + .withContext(context -> service.listByJob(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, + this.client.getSubscriptionId(), 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())); } /** - * Creates or updates a job execution. + * Lists a job's executions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param jobName The name of the job to get. + * @param createTimeMin If specified, only job executions created at or after the specified time are included. + * @param createTimeMax If specified, only job executions created before the specified time are included. + * @param endTimeMin If specified, only job executions completed at or after the specified time are included. + * @param endTimeMax If specified, only job executions completed before the specified time are included. + * @param isActive If specified, only active or only completed job executions are included. + * @param skip The number of elements in the collection to skip. + * @param top The number of elements to return from the collection. * @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 an execution of a job along with {@link Response} on successful completion of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, String jobAgentName, String jobName, UUID jobExecutionId, Context context) { + private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, + OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, 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.")); @@ -397,191 +494,171 @@ private Mono>> createOrUpdateWithResponseAsync(String if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } - if (jobExecutionId == null) { - return Mono.error(new IllegalArgumentException("Parameter jobExecutionId 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.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, - accept, context); - } - - /** - * Creates or updates a job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 an execution of a job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, JobExecutionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - JobExecutionInner.class, JobExecutionInner.class, this.client.getContext()); - } - - /** - * Creates or updates a job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. - * @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 an execution of a job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobExecutionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, - jobAgentName, jobName, jobExecutionId, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - JobExecutionInner.class, JobExecutionInner.class, context); - } - - /** - * Creates or updates a job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 an execution of a job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobExecutionInner> beginCreateOrUpdate(String resourceGroupName, - String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { - return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId) - .getSyncPoller(); + return service + .listByJob(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Creates or updates a job execution. + * Lists a job's executions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. - * @param context The context to associate with this operation. + * @param jobName The name of the job to get. + * @param createTimeMin If specified, only job executions created at or after the specified time are included. + * @param createTimeMax If specified, only job executions created before the specified time are included. + * @param endTimeMin If specified, only job executions completed at or after the specified time are included. + * @param endTimeMax If specified, only job executions completed before the specified time are included. + * @param isActive If specified, only active or only completed job executions are included. + * @param skip The number of elements in the collection to skip. + * @param top The number of elements to return from the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an execution of a job. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobExecutionInner> beginCreateOrUpdate(String resourceGroupName, - String serverName, String jobAgentName, String jobName, UUID jobExecutionId, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { + return new PagedFlux<>( + () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), + nextLink -> listByJobNextSinglePageAsync(nextLink)); } /** - * Creates or updates a job execution. + * Lists a job's executions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an execution of a job on successful completion of {@link Mono}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName, UUID jobExecutionId) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName) { + final OffsetDateTime createTimeMin = null; + final OffsetDateTime createTimeMax = null; + final OffsetDateTime endTimeMin = null; + final OffsetDateTime endTimeMax = null; + final Boolean isActive = null; + final Long skip = null; + final Long top = null; + return new PagedFlux<>( + () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), + nextLink -> listByJobNextSinglePageAsync(nextLink)); } /** - * Creates or updates a job execution. + * Lists a job's executions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param jobName The name of the job to get. + * @param createTimeMin If specified, only job executions created at or after the specified time are included. + * @param createTimeMax If specified, only job executions created before the specified time are included. + * @param endTimeMin If specified, only job executions completed at or after the specified time are included. + * @param endTimeMax If specified, only job executions completed before the specified time are included. + * @param isActive If specified, only active or only completed job executions are included. + * @param skip The number of elements in the collection to skip. + * @param top The number of elements to return from the collection. * @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 an execution of a job on successful completion of {@link Mono}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, UUID jobExecutionId, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByJobAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, + OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { + return new PagedFlux<>( + () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context), + nextLink -> listByJobNextSinglePageAsync(nextLink, context)); } /** - * Creates or updates a job execution. + * Lists a job's executions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an execution of a job. + * @return a list of job executions as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobExecutionInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, - String jobName, UUID jobExecutionId) { - return createOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName) { + final OffsetDateTime createTimeMin = null; + final OffsetDateTime createTimeMax = null; + final OffsetDateTime endTimeMin = null; + final OffsetDateTime endTimeMax = null; + final Boolean isActive = null; + final Long skip = null; + final Long top = null; + return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)); } /** - * Creates or updates a job execution. + * Lists a job's executions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobExecutionId The id of the job execution. + * @param jobName The name of the job to get. + * @param createTimeMin If specified, only job executions created at or after the specified time are included. + * @param createTimeMax If specified, only job executions created before the specified time are included. + * @param endTimeMin If specified, only job executions completed at or after the specified time are included. + * @param endTimeMax If specified, only job executions completed before the specified time are included. + * @param isActive If specified, only active or only completed job executions are included. + * @param skip The number of elements in the collection to skip. + * @param top The number of elements to return from the collection. * @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 an execution of a job. + * @return a list of job executions as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobExecutionInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, - String jobName, UUID jobExecutionId, Context context) { - return createOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, + OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { + return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, + createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context)); } /** - * Requests cancellation of a job execution. + * Gets a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -589,19 +666,15 @@ public JobExecutionInner createOrUpdate(String resourceGroupName, String serverN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 job execution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { 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.")); @@ -618,17 +691,22 @@ public Mono> cancelWithResponseAsync(String resourceGroupName, St if (jobExecutionId == null) { return Mono.error(new IllegalArgumentException("Parameter jobExecutionId 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"; return FluxUtil - .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + jobName, jobExecutionId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Requests cancellation of a job execution. + * Gets a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -637,19 +715,15 @@ public Mono> cancelWithResponseAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 job execution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId, 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.")); @@ -666,15 +740,21 @@ private Mono> cancelWithResponseAsync(String resourceGroupName, S if (jobExecutionId == null) { return Mono.error(new IllegalArgumentException("Parameter jobExecutionId 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.cancel(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Requests cancellation of a job execution. + * Gets a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -682,19 +762,20 @@ private Mono> cancelWithResponseAsync(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 {@link Mono} that completes when a successful response is received. + * @return a job execution on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono cancelAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, - UUID jobExecutionId) { - return cancelWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId) - .flatMap(ignored -> Mono.empty()); + public Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId) { + return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Requests cancellation of a job execution. + * Gets a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -703,19 +784,20 @@ public Mono cancelAsync(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 the {@link Response}. + * @return a job execution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response cancelWithResponse(String resourceGroupName, String serverName, String jobAgentName, + public Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId, Context context) { - return cancelWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context) + return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context) .block(); } /** - * Requests cancellation of a job execution. + * Gets a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -723,45 +805,36 @@ public Response cancelWithResponse(String resourceGroupName, String 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 job execution. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void cancel(String resourceGroupName, String serverName, String jobAgentName, String jobName, + public JobExecutionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { - cancelWithResponse(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, Context.NONE); + return getWithResponse(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, Context.NONE) + .getValue(); } /** - * Lists a job's executions. + * Creates or updates a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param createTimeMin If specified, only job executions created at or after the specified time are included. - * @param createTimeMax If specified, only job executions created before the specified time are included. - * @param endTimeMin If specified, only job executions completed at or after the specified time are included. - * @param endTimeMax If specified, only job executions completed before the specified time are included. - * @param isActive If specified, only active or only completed job executions are included. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return an execution of a job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId) { 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.")); @@ -775,49 +848,43 @@ private Mono> listByJobSinglePageAsync(String r if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } + if (jobExecutionId == null) { + return Mono.error(new IllegalArgumentException("Parameter jobExecutionId 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"; return FluxUtil - .withContext(context -> service.listByJob(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, - createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, jobExecutionId, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists a job's executions. + * Creates or updates a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param createTimeMin If specified, only job executions created at or after the specified time are included. - * @param createTimeMax If specified, only job executions created before the specified time are included. - * @param endTimeMin If specified, only job executions completed at or after the specified time are included. - * @param endTimeMax If specified, only job executions completed before the specified time are included. - * @param isActive If specified, only active or only completed job executions are included. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. * @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 JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return an execution of a job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String jobAgentName, String jobName, UUID jobExecutionId, 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.")); @@ -831,188 +898,219 @@ private Mono> listByJobSinglePageAsync(String r if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } + if (jobExecutionId == null) { + return Mono.error(new IllegalArgumentException("Parameter jobExecutionId 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 - .listByJob(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, createTimeMax, endTimeMin, - endTimeMax, isActive, skip, top, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Lists a job's executions. + * Creates or updates a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param createTimeMin If specified, only job executions created at or after the specified time are included. - * @param createTimeMax If specified, only job executions created before the specified time are included. - * @param endTimeMin If specified, only job executions completed at or after the specified time are included. - * @param endTimeMax If specified, only job executions completed before the specified time are included. - * @param isActive If specified, only active or only completed job executions are included. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of an execution of a job. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { - return new PagedFlux<>( - () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, - createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), - nextLink -> listByJobNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, JobExecutionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JobExecutionInner.class, JobExecutionInner.class, this.client.getContext()); } /** - * Lists a job's executions. + * Creates or updates a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. + * @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 JobExecution list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of an execution of a job. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName) { - final OffsetDateTime createTimeMin = null; - final OffsetDateTime createTimeMax = null; - final OffsetDateTime endTimeMin = null; - final OffsetDateTime endTimeMax = null; - final Boolean isActive = null; - final Long skip = null; - final Long top = null; - return new PagedFlux<>( - () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, - createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), - nextLink -> listByJobNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, JobExecutionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + jobAgentName, jobName, jobExecutionId, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JobExecutionInner.class, JobExecutionInner.class, context); } /** - * Lists a job's executions. + * Creates or updates a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param createTimeMin If specified, only job executions created at or after the specified time are included. - * @param createTimeMax If specified, only job executions created before the specified time are included. - * @param endTimeMin If specified, only job executions completed at or after the specified time are included. - * @param endTimeMax If specified, only job executions completed before the specified time are included. - * @param isActive If specified, only active or only completed job executions are included. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 an execution of a job. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, JobExecutionInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String jobAgentName, String jobName, UUID jobExecutionId) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId) + .getSyncPoller(); + } + + /** + * Creates or updates a job execution. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. * @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 JobExecution list operation as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of an execution of a job. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByJobAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { - return new PagedFlux<>( - () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, - createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context), - nextLink -> listByJobNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, JobExecutionInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, String jobAgentName, String jobName, UUID jobExecutionId, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context) + .getSyncPoller(); } /** - * Lists a job's executions. + * Creates or updates a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation as paginated response with {@link PagedIterable}. + * @return an execution of a job on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, - String jobName) { - final OffsetDateTime createTimeMin = null; - final OffsetDateTime createTimeMax = null; - final OffsetDateTime endTimeMin = null; - final OffsetDateTime endTimeMax = null; - final Boolean isActive = null; - final Long skip = null; - final Long top = null; - return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, - createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a job execution. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. + * @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 an execution of a job on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a job execution. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an execution of a job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JobExecutionInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId) { + return createOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId).block(); } /** - * Lists a job's executions. + * Creates or updates a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param createTimeMin If specified, only job executions created at or after the specified time are included. - * @param createTimeMax If specified, only job executions created before the specified time are included. - * @param endTimeMin If specified, only job executions completed at or after the specified time are included. - * @param endTimeMax If specified, only job executions completed before the specified time are included. - * @param isActive If specified, only active or only completed job executions are included. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. + * @param jobName The name of the job to get. + * @param jobExecutionId The job execution id to create the job execution under. * @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 JobExecution list operation as paginated response with {@link PagedIterable}. + * @return an execution of a job. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, - String jobName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { - return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName, createTimeMin, - createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public JobExecutionInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, Context context) { + return createOrUpdateAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context) + .block(); } /** - * Lists all executions in a job agent. + * Requests cancellation of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param createTimeMin If specified, only job executions created at or after the specified time are included. - * @param createTimeMax If specified, only job executions created before the specified time are included. - * @param endTimeMin If specified, only job executions completed at or after the specified time are included. - * @param endTimeMax If specified, only job executions completed before the specified time are included. - * @param isActive If specified, only active or only completed job executions are included. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobExecutionId The id of the job execution to cancel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list 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> listByAgentSinglePageAsync(String resourceGroupName, - String serverName, String jobAgentName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { + public Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId) { 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.")); @@ -1023,48 +1121,45 @@ private Mono> listByAgentSinglePageAsync(String if (jobAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } - final String accept = "application/json"; + if (jobName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); + } + if (jobExecutionId == null) { + return Mono.error(new IllegalArgumentException("Parameter jobExecutionId 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.")); + } return FluxUtil - .withContext(context -> service.listByAgent(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, createTimeMin, - createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext( + context -> service.cancel(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + jobName, jobExecutionId, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all executions in a job agent. + * Requests cancellation of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param createTimeMin If specified, only job executions created at or after the specified time are included. - * @param createTimeMax If specified, only job executions created before the specified time are included. - * @param endTimeMin If specified, only job executions completed at or after the specified time are included. - * @param endTimeMax If specified, only job executions completed before the specified time are included. - * @param isActive If specified, only active or only completed job executions are included. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobExecutionId The id of the job execution to cancel. * @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 JobExecution list 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> listByAgentSinglePageAsync(String resourceGroupName, - String serverName, String jobAgentName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, - OffsetDateTime endTimeMin, OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { + private Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, 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.")); @@ -1075,156 +1170,90 @@ private Mono> listByAgentSinglePageAsync(String if (jobAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); } - final String accept = "application/json"; + if (jobName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); + } + if (jobExecutionId == null) { + return Mono.error(new IllegalArgumentException("Parameter jobExecutionId 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.")); + } context = this.client.mergeContext(context); - return service - .listByAgent(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, - isActive, skip, top, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all executions in a job agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param createTimeMin If specified, only job executions created at or after the specified time are included. - * @param createTimeMax If specified, only job executions created before the specified time are included. - * @param endTimeMin If specified, only job executions completed at or after the specified time are included. - * @param endTimeMax If specified, only job executions completed before the specified time are included. - * @param isActive If specified, only active or only completed job executions are included. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 JobExecution list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByAgentAsync(String resourceGroupName, String serverName, - String jobAgentName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top) { - return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, - createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), - nextLink -> listByAgentNextSinglePageAsync(nextLink)); + return service.cancel(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** - * Lists all executions in a job agent. + * Requests cancellation of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobExecutionId The id of the job execution to cancel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation as paginated response with {@link PagedFlux}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByAgentAsync(String resourceGroupName, String serverName, - String jobAgentName) { - final OffsetDateTime createTimeMin = null; - final OffsetDateTime createTimeMax = null; - final OffsetDateTime endTimeMin = null; - final OffsetDateTime endTimeMax = null; - final Boolean isActive = null; - final Long skip = null; - final Long top = null; - return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, - createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top), - nextLink -> listByAgentNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono cancelAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId) { + return cancelWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId) + .flatMap(ignored -> Mono.empty()); } /** - * Lists all executions in a job agent. + * Requests cancellation of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param createTimeMin If specified, only job executions created at or after the specified time are included. - * @param createTimeMax If specified, only job executions created before the specified time are included. - * @param endTimeMin If specified, only job executions completed at or after the specified time are included. - * @param endTimeMax If specified, only job executions completed before the specified time are included. - * @param isActive If specified, only active or only completed job executions are included. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobExecutionId The id of the job execution to cancel. * @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 JobExecution list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAgentAsync(String resourceGroupName, String serverName, - String jobAgentName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { - return new PagedFlux<>( - () -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, createTimeMin, createTimeMax, - endTimeMin, endTimeMax, isActive, skip, top, context), - nextLink -> listByAgentNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all executions in a job agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 JobExecution list operation as paginated response with {@link PagedIterable}. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent(String resourceGroupName, String serverName, - String jobAgentName) { - final OffsetDateTime createTimeMin = null; - final OffsetDateTime createTimeMax = null; - final OffsetDateTime endTimeMin = null; - final OffsetDateTime endTimeMax = null; - final Boolean isActive = null; - final Long skip = null; - final Long top = null; - return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName, createTimeMin, - createTimeMax, endTimeMin, endTimeMax, isActive, skip, top)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response cancelWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, Context context) { + return cancelWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, context) + .block(); } /** - * Lists all executions in a job agent. + * Requests cancellation of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param createTimeMin If specified, only job executions created at or after the specified time are included. - * @param createTimeMax If specified, only job executions created before the specified time are included. - * @param endTimeMin If specified, only job executions completed at or after the specified time are included. - * @param endTimeMax If specified, only job executions completed before the specified time are included. - * @param isActive If specified, only active or only completed job executions are included. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @param context The context to associate with this operation. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobExecutionId The id of the job execution to cancel. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent(String resourceGroupName, String serverName, - String jobAgentName, OffsetDateTime createTimeMin, OffsetDateTime createTimeMax, OffsetDateTime endTimeMin, - OffsetDateTime endTimeMax, Boolean isActive, Long skip, Long top, Context context) { - return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName, createTimeMin, - createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void cancel(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId) { + cancelWithResponse(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, Context.NONE); } /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1238,10 +1267,6 @@ public Mono>> createWithResponseAsync(String resourceG 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.")); @@ -1255,19 +1280,24 @@ public Mono>> createWithResponseAsync(String resourceG if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName 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"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1282,10 +1312,6 @@ private Mono>> createWithResponseAsync(String resource 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.")); @@ -1299,18 +1325,23 @@ private Mono>> createWithResponseAsync(String resource if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName 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.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, jobName, accept, context); + return service.create(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1329,9 +1360,10 @@ public PollerFlux, JobExecutionInner> beginCreateA /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1352,9 +1384,10 @@ private PollerFlux, JobExecutionInner> beginCreate /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1370,9 +1403,10 @@ public SyncPoller, JobExecutionInner> beginCreate( /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1389,9 +1423,10 @@ public SyncPoller, JobExecutionInner> beginCreate( /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1408,9 +1443,10 @@ public Mono createAsync(String resourceGroupName, String serv /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1428,9 +1464,10 @@ private Mono createAsync(String resourceGroupName, String ser /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1445,9 +1482,10 @@ public JobExecutionInner create(String resourceGroupName, String serverName, Str /** * Starts an elastic job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1468,11 +1506,10 @@ public JobExecutionInner create(String resourceGroupName, String serverName, 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 the response of a JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobNextSinglePageAsync(String nextLink) { + private Mono> listByAgentNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1482,7 +1519,7 @@ private Mono> listByJobNextSinglePageAsync(Stri } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByJobNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByAgentNext(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())); @@ -1496,11 +1533,10 @@ private Mono> listByJobNextSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByAgentNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1510,7 +1546,7 @@ private Mono> listByJobNextSinglePageAsync(Stri } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByJobNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByAgentNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -1522,11 +1558,10 @@ private Mono> listByJobNextSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentNextSinglePageAsync(String nextLink) { + private Mono> listByJobNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1536,7 +1571,7 @@ private Mono> listByAgentNextSinglePageAsync(St } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByAgentNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByJobNext(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())); @@ -1550,11 +1585,10 @@ private Mono> listByAgentNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByJobNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1564,7 +1598,7 @@ private Mono> listByAgentNextSinglePageAsync(St } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByAgentNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByJobNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobPrivateEndpointsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobPrivateEndpointsClientImpl.java deleted file mode 100644 index ba5dcf04fee3..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobPrivateEndpointsClientImpl.java +++ /dev/null @@ -1,1003 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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; -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.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.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.fluent.JobPrivateEndpointsClient; -import com.azure.resourcemanager.sql.fluent.models.JobPrivateEndpointInner; -import com.azure.resourcemanager.sql.implementation.models.JobPrivateEndpointListResult; -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 JobPrivateEndpointsClient. - */ -public final class JobPrivateEndpointsClientImpl implements JobPrivateEndpointsClient { - /** - * The proxy service used to perform REST calls. - */ - private final JobPrivateEndpointsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of JobPrivateEndpointsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - JobPrivateEndpointsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(JobPrivateEndpointsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientJobPrivateEndpoints to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientJobPrivateEndpoints") - public interface JobPrivateEndpointsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("privateEndpointName") String privateEndpointName, @HeaderParam("Accept") String accept, - Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName}") - @ExpectedResponses({ 200, 201, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("privateEndpointName") String privateEndpointName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") JobPrivateEndpointInner parameters, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, - @PathParam("privateEndpointName") String privateEndpointName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAgent(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAgentNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String privateEndpointName) { - 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 (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - if (privateEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateEndpointName 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, jobAgentName, privateEndpointName, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @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 private endpoint along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String privateEndpointName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - if (privateEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateEndpointName 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, serverName, jobAgentName, privateEndpointName, accept, context); - } - - /** - * Gets a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, - String privateEndpointName) { - return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, privateEndpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @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 private endpoint along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String jobAgentName, String privateEndpointName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, privateEndpointName, context).block(); - } - - /** - * Gets a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobPrivateEndpointInner get(String resourceGroupName, String serverName, String jobAgentName, - String privateEndpointName) { - return getWithResponse(resourceGroupName, serverName, jobAgentName, privateEndpointName, Context.NONE) - .getValue(); - } - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 job agent private endpoint along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String privateEndpointName, JobPrivateEndpointInner 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 (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - if (privateEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateEndpointName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, privateEndpointName, - contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 job agent private endpoint along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, String jobAgentName, String privateEndpointName, JobPrivateEndpointInner 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - if (privateEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateEndpointName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, privateEndpointName, - contentType, accept, parameters, context); - } - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 the {@link PollerFlux} for polling of a job agent private endpoint. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, JobPrivateEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, String privateEndpointName, - JobPrivateEndpointInner parameters) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, - jobAgentName, privateEndpointName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), JobPrivateEndpointInner.class, JobPrivateEndpointInner.class, - this.client.getContext()); - } - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 the {@link PollerFlux} for polling of a job agent private endpoint. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobPrivateEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String jobAgentName, String privateEndpointName, - JobPrivateEndpointInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, - jobAgentName, privateEndpointName, parameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), JobPrivateEndpointInner.class, JobPrivateEndpointInner.class, context); - } - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 the {@link SyncPoller} for polling of a job agent private endpoint. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobPrivateEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, String privateEndpointName, - JobPrivateEndpointInner parameters) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, privateEndpointName, parameters) - .getSyncPoller(); - } - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 the {@link SyncPoller} for polling of a job agent private endpoint. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobPrivateEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String jobAgentName, String privateEndpointName, - JobPrivateEndpointInner parameters, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, privateEndpointName, parameters, - context) - .getSyncPoller(); - } - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 job agent private endpoint on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String serverName, - String jobAgentName, String privateEndpointName, JobPrivateEndpointInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, privateEndpointName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 job agent private endpoint on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String serverName, - String jobAgentName, String privateEndpointName, JobPrivateEndpointInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, jobAgentName, privateEndpointName, parameters, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 job agent private endpoint. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobPrivateEndpointInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, - String privateEndpointName, JobPrivateEndpointInner parameters) { - return createOrUpdateAsync(resourceGroupName, serverName, jobAgentName, privateEndpointName, parameters) - .block(); - } - - /** - * Creates or updates a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @param parameters The requested private endpoint 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 job agent private endpoint. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobPrivateEndpointInner createOrUpdate(String resourceGroupName, String serverName, String jobAgentName, - String privateEndpointName, JobPrivateEndpointInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, serverName, jobAgentName, privateEndpointName, parameters, - context).block(); - } - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 jobAgentName, String privateEndpointName) { - 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 (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - if (privateEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateEndpointName is required and cannot be null.")); - } - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, privateEndpointName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String privateEndpointName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - if (privateEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateEndpointName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, privateEndpointName, context); - } - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 jobAgentName, String privateEndpointName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, serverName, jobAgentName, privateEndpointName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @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 serverName, - String jobAgentName, String privateEndpointName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, serverName, jobAgentName, privateEndpointName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 jobAgentName, String privateEndpointName) { - return this.beginDeleteAsync(resourceGroupName, serverName, jobAgentName, privateEndpointName).getSyncPoller(); - } - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @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 jobAgentName, String privateEndpointName, Context context) { - return this.beginDeleteAsync(resourceGroupName, serverName, jobAgentName, privateEndpointName, context) - .getSyncPoller(); - } - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 jobAgentName, - String privateEndpointName) { - return beginDeleteAsync(resourceGroupName, serverName, jobAgentName, privateEndpointName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @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 serverName, String jobAgentName, - String privateEndpointName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, jobAgentName, privateEndpointName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 jobAgentName, String privateEndpointName) { - deleteAsync(resourceGroupName, serverName, jobAgentName, privateEndpointName).block(); - } - - /** - * Deletes a private endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param privateEndpointName The name of the private endpoint to get. - * @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 jobAgentName, String privateEndpointName, - Context context) { - deleteAsync(resourceGroupName, serverName, jobAgentName, privateEndpointName, context).block(); - } - - /** - * Gets a list of job agent private endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 job agent private endpoints along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentSinglePageAsync(String resourceGroupName, - String serverName, String jobAgentName) { - 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 (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByAgent(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, 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 a list of job agent private endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 job agent private endpoints along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentSinglePageAsync(String resourceGroupName, - String serverName, String jobAgentName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByAgent(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of job agent private endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 job agent private endpoints as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByAgentAsync(String resourceGroupName, String serverName, - String jobAgentName) { - return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName), - nextLink -> listByAgentNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of job agent private endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 job agent private endpoints as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAgentAsync(String resourceGroupName, String serverName, - String jobAgentName, Context context) { - return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, context), - nextLink -> listByAgentNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of job agent private endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 job agent private endpoints as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent(String resourceGroupName, String serverName, - String jobAgentName) { - return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName)); - } - - /** - * Gets a list of job agent private endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 job agent private endpoints as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent(String resourceGroupName, String serverName, - String jobAgentName, Context context) { - return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName, 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 job agent private endpoints along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentNextSinglePageAsync(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.listByAgentNext(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. - * @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 job agent private endpoints along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentNextSinglePageAsync(String nextLink, - Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listByAgentNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobStepExecutionsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobStepExecutionsClientImpl.java index bef1be3857c4..4a0f66aa9755 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobStepExecutionsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobStepExecutionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.JobStepExecutionsClient; import com.azure.resourcemanager.sql.fluent.models.JobExecutionInner; -import com.azure.resourcemanager.sql.implementation.models.JobExecutionListResult; +import com.azure.resourcemanager.sql.models.JobExecutionListResult; import java.time.OffsetDateTime; import java.util.UUID; import reactor.core.publisher.Mono; @@ -61,32 +61,32 @@ public final class JobStepExecutionsClientImpl implements JobStepExecutionsClien * The interface defining all the services for SqlManagementClientJobStepExecutions to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientJobStepExecutions") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientJ") public interface JobStepExecutionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByJobExecution(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, - @PathParam("jobExecutionId") UUID jobExecutionId, @PathParam("stepName") String stepName, + @PathParam("jobExecutionId") UUID jobExecutionId, @QueryParam("createTimeMin") OffsetDateTime createTimeMin, + @QueryParam("createTimeMax") OffsetDateTime createTimeMax, + @QueryParam("endTimeMin") OffsetDateTime endTimeMin, @QueryParam("endTimeMax") OffsetDateTime endTimeMax, + @QueryParam("isActive") Boolean isActive, @QueryParam("$skip") Long skip, @QueryParam("$top") Long top, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByJobExecution(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, - @PathParam("jobExecutionId") UUID jobExecutionId, @QueryParam("createTimeMin") OffsetDateTime createTimeMin, - @QueryParam("createTimeMax") OffsetDateTime createTimeMax, - @QueryParam("endTimeMin") OffsetDateTime endTimeMin, @QueryParam("endTimeMax") OffsetDateTime endTimeMax, - @QueryParam("isActive") Boolean isActive, @QueryParam("$skip") Long skip, @QueryParam("$top") Long top, + @PathParam("jobExecutionId") UUID jobExecutionId, @PathParam("stepName") String stepName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -94,185 +94,19 @@ Mono> listByJobExecution(@HostParam("endpoint") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByJobExecutionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Gets a step execution of a job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. - * @param stepName The name of the step. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a step execution of a job execution along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, UUID jobExecutionId, String stepName) { - 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 (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobExecutionId == null) { - return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); - } - if (stepName == null) { - return Mono.error(new IllegalArgumentException("Parameter stepName 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, jobAgentName, jobName, jobExecutionId, - stepName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a step execution of a job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. - * @param stepName The name of the step. - * @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 step execution of a job execution along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, UUID jobExecutionId, String stepName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobExecutionId == null) { - return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); - } - if (stepName == null) { - return Mono.error(new IllegalArgumentException("Parameter stepName 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, serverName, jobAgentName, jobName, jobExecutionId, stepName, accept, context); - } - - /** - * Gets a step execution of a job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. - * @param stepName The name of the step. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a step execution of a job execution on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName, UUID jobExecutionId, String stepName) { - return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a step execution of a job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. - * @param stepName The name of the step. - * @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 step execution of a job execution along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, - String jobName, UUID jobExecutionId, String stepName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, - context).block(); - } - - /** - * Gets a step execution of a job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. - * @param stepName The name of the step. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a step execution of a job execution. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobExecutionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, - UUID jobExecutionId, String stepName) { - return getWithResponse(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, - Context.NONE).getValue(); - } - /** * Lists the step executions of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. * @param endTimeMin If specified, only job executions completed at or after the specified time are included. @@ -283,8 +117,7 @@ public JobExecutionInner get(String resourceGroupName, String serverName, 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 response of a JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByJobExecutionSinglePageAsync(String resourceGroupName, @@ -295,10 +128,6 @@ private Mono> listByJobExecutionSinglePageAsync 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.")); @@ -315,11 +144,15 @@ private Mono> listByJobExecutionSinglePageAsync if (jobExecutionId == null) { return Mono.error(new IllegalArgumentException("Parameter jobExecutionId 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"; return FluxUtil - .withContext(context -> service.listByJobExecution(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, - createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, accept, context)) + .withContext(context -> service.listByJobExecution(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, + skip, top, this.client.getSubscriptionId(), 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())); @@ -328,11 +161,12 @@ private Mono> listByJobExecutionSinglePageAsync /** * Lists the step executions of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. * @param endTimeMin If specified, only job executions completed at or after the specified time are included. @@ -344,8 +178,7 @@ private Mono> listByJobExecutionSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByJobExecutionSinglePageAsync(String resourceGroupName, @@ -356,10 +189,6 @@ private Mono> listByJobExecutionSinglePageAsync 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.")); @@ -376,12 +205,16 @@ private Mono> listByJobExecutionSinglePageAsync if (jobExecutionId == null) { return Mono.error(new IllegalArgumentException("Parameter jobExecutionId 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 - .listByJobExecution(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, createTimeMin, createTimeMax, - endTimeMin, endTimeMax, isActive, skip, top, accept, context) + .listByJobExecution(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -389,11 +222,12 @@ private Mono> listByJobExecutionSinglePageAsync /** * Lists the step executions of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. * @param endTimeMin If specified, only job executions completed at or after the specified time are included. @@ -404,7 +238,7 @@ private Mono> listByJobExecutionSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation as paginated response with {@link PagedFlux}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, @@ -420,15 +254,16 @@ public PagedFlux listByJobExecutionAsync(String resourceGroup /** * Lists the step executions of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation as paginated response with {@link PagedFlux}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, @@ -449,11 +284,12 @@ public PagedFlux listByJobExecutionAsync(String resourceGroup /** * Lists the step executions of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. * @param endTimeMin If specified, only job executions completed at or after the specified time are included. @@ -465,7 +301,7 @@ public PagedFlux listByJobExecutionAsync(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 response of a JobExecution list operation as paginated response with {@link PagedFlux}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, @@ -481,15 +317,16 @@ private PagedFlux listByJobExecutionAsync(String resourceGrou /** * Lists the step executions of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation as paginated response with {@link PagedIterable}. + * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByJobExecution(String resourceGroupName, String serverName, @@ -508,11 +345,12 @@ public PagedIterable listByJobExecution(String resourceGroupN /** * Lists the step executions of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. * @param endTimeMin If specified, only job executions completed at or after the specified time are included. @@ -524,7 +362,7 @@ public PagedIterable listByJobExecution(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 the response of a JobExecution list operation as paginated response with {@link PagedIterable}. + * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByJobExecution(String resourceGroupName, String serverName, @@ -535,6 +373,178 @@ public PagedIterable listByJobExecution(String resourceGroupN jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context)); } + /** + * Gets a step execution of a job execution. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution. + * @param stepName The name of the step. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a step execution of a job execution along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, String stepName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (jobAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); + } + if (jobName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); + } + if (jobExecutionId == null) { + return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); + } + if (stepName == null) { + return Mono.error(new IllegalArgumentException("Parameter stepName 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"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + jobName, jobExecutionId, stepName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a step execution of a job execution. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution. + * @param stepName The name of the step. + * @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 step execution of a job execution along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, String stepName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (jobAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); + } + if (jobName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); + } + if (jobExecutionId == null) { + return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); + } + if (stepName == null) { + return Mono.error(new IllegalArgumentException("Parameter stepName 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.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, stepName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + } + + /** + * Gets a step execution of a job execution. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution. + * @param stepName The name of the step. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a step execution of a job execution on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName) { + return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a step execution of a job execution. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution. + * @param stepName The name of the step. + * @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 step execution of a job execution along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, + context).block(); + } + + /** + * Gets a step execution of a job execution. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution. + * @param stepName The name of the step. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a step execution of a job execution. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JobExecutionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId, String stepName) { + return getWithResponse(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, + Context.NONE).getValue(); + } + /** * Get the next page of items. * @@ -542,8 +552,7 @@ public PagedIterable listByJobExecution(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 the response of a JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByJobExecutionNextSinglePageAsync(String nextLink) { @@ -571,8 +580,7 @@ private Mono> listByJobExecutionNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByJobExecutionNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobStepsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobStepsClientImpl.java index c6a190bf9621..aa19c9dd20b9 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobStepsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobStepsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.JobStepsClient; import com.azure.resourcemanager.sql.fluent.models.JobStepInner; -import com.azure.resourcemanager.sql.implementation.models.JobStepListResult; +import com.azure.resourcemanager.sql.models.JobStepListResult; import reactor.core.publisher.Mono; /** @@ -61,91 +61,268 @@ public final class JobStepsClientImpl implements JobStepsClient { * The interface defining all the services for SqlManagementClientJobSteps to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientJobSteps") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientJ") public interface JobStepsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByJob(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, - @PathParam("stepName") String stepName, @HeaderParam("Accept") String accept, Context context); + @PathParam("stepName") String stepName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, - @PathParam("stepName") String stepName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") JobStepInner parameters, - Context context); + @PathParam("stepName") String stepName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") JobStepInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, - @PathParam("stepName") String stepName, Context context); + @PathParam("stepName") String stepName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByJob(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByVersion(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("jobVersion") int jobVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByVersion(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> getByVersion(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, @PathParam("jobVersion") int jobVersion, @PathParam("stepName") String stepName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByVersion(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, - @PathParam("jobVersion") int jobVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByJobNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByVersionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets all job steps for a job's current version. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 job steps for a job's current version along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (jobAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); + } + if (jobName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobName 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"; + return FluxUtil + .withContext(context -> service.listByJob(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets all job steps for a job's current version. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @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 all job steps for a job's current version along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (jobAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); + } + if (jobName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobName 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 + .listByJob(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets all job steps for a job's current version. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 job steps for a job's current version as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName) { + return new PagedFlux<>(() -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName), + nextLink -> listByJobNextSinglePageAsync(nextLink)); + } + + /** + * Gets all job steps for a job's current version. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @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 all job steps for a job's current version as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, Context context) { + return new PagedFlux<>( + () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, context), + nextLink -> listByJobNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all job steps for a job's current version. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 job steps for a job's current version as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName) { + return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName)); + } + + /** + * Gets all job steps for a job's current version. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @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 all job steps for a job's current version as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName, Context context) { + return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName, context)); + } + /** * Gets a job step in a job's current version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -163,10 +340,6 @@ public Mono> getWithResponseAsync(String resourceGroupNam 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.")); @@ -183,18 +356,22 @@ public Mono> getWithResponseAsync(String resourceGroupNam if (stepName == null) { return Mono.error(new IllegalArgumentException("Parameter stepName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, stepName, accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + jobName, stepName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a job step in a job's current version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -213,10 +390,6 @@ private Mono> getWithResponseAsync(String resourceGroupNa 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.")); @@ -233,16 +406,21 @@ private Mono> getWithResponseAsync(String resourceGroupNa if (stepName == null) { return Mono.error(new IllegalArgumentException("Parameter stepName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, jobName, stepName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, stepName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a job step in a job's current version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -262,7 +440,8 @@ public Mono getAsync(String resourceGroupName, String serverName, /** * Gets a job step in a job's current version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -282,7 +461,8 @@ public Response getWithResponse(String resourceGroupName, String s /** * Gets a job step in a job's current version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -301,7 +481,8 @@ public JobStepInner get(String resourceGroupName, String serverName, String jobA /** * Creates or updates a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -319,10 +500,6 @@ public Mono> createOrUpdateWithResponseAsync(String resou 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.")); @@ -339,24 +516,28 @@ public Mono> createOrUpdateWithResponseAsync(String resou if (stepName == null) { return Mono.error(new IllegalArgumentException("Parameter stepName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, stepName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, stepName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -375,10 +556,6 @@ private Mono> createOrUpdateWithResponseAsync(String reso 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.")); @@ -395,23 +572,26 @@ private Mono> createOrUpdateWithResponseAsync(String reso if (stepName == null) { return Mono.error(new IllegalArgumentException("Parameter stepName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, stepName, - contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + stepName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -432,7 +612,8 @@ public Mono createOrUpdateAsync(String resourceGroupName, String s /** * Creates or updates a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -454,7 +635,8 @@ public Response createOrUpdateWithResponse(String resourceGroupNam /** * Creates or updates a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -475,11 +657,12 @@ public JobStepInner createOrUpdate(String resourceGroupName, String serverName, /** * Deletes a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. - * @param stepName The name of the job step. + * @param stepName The name of the job step to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -492,10 +675,6 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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.")); @@ -512,19 +691,25 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St if (stepName == null) { return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); } - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, stepName, context)) + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, stepName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. - * @param stepName The name of the job step. + * @param stepName The name of the job step to delete. * @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. @@ -538,10 +723,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -558,19 +739,24 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (stepName == null) { return Mono.error(new IllegalArgumentException("Parameter stepName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, jobName, stepName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, stepName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. - * @param stepName The name of the job step. + * @param stepName The name of the job step to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -586,11 +772,12 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. - * @param stepName The name of the job step. + * @param stepName The name of the job step to delete. * @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. @@ -606,11 +793,12 @@ public Response deleteWithResponse(String resourceGroupName, String server /** * Deletes a job step. This will implicitly create a new job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. - * @param stepName The name of the job step. + * @param stepName The name of the job step to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -622,29 +810,27 @@ public void delete(String resourceGroupName, String serverName, String jobAgentN } /** - * Gets all job steps for a job's current version. + * Gets all job steps in the specified job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. + * @param jobVersion The version of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 job steps for a job's current version along with {@link PagedResponse} on successful completion of + * @return all job steps in the specified job version along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName) { + private Mono> listByVersionSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, int jobVersion) { 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.")); @@ -658,40 +844,43 @@ private Mono> listByJobSinglePageAsync(String resour if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName 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"; return FluxUtil - .withContext(context -> service.listByJob(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, accept, context)) + .withContext( + context -> service.listByVersion(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + jobName, jobVersion, this.client.getSubscriptionId(), 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())); } /** - * Gets all job steps for a job's current version. + * Gets all job steps in the specified job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. + * @param jobVersion The version of the job to get. * @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 all job steps for a job's current version along with {@link PagedResponse} on successful completion of + * @return all job steps in the specified job version along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, Context context) { + private Mono> listByVersionSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, int jobVersion, 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.")); @@ -705,96 +894,111 @@ private Mono> listByJobSinglePageAsync(String resour if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName 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 - .listByJob(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, jobName, accept, context) + .listByVersion(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, jobVersion, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets all job steps for a job's current version. + * Gets all job steps in the specified job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. + * @param jobVersion The version of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 job steps for a job's current version as paginated response with {@link PagedFlux}. + * @return all job steps in the specified job version as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName) { - return new PagedFlux<>(() -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName), - nextLink -> listByJobNextSinglePageAsync(nextLink)); + public PagedFlux listByVersionAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion) { + return new PagedFlux<>( + () -> listByVersionSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion), + nextLink -> listByVersionNextSinglePageAsync(nextLink)); } /** - * Gets all job steps for a job's current version. + * Gets all job steps in the specified job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. + * @param jobVersion The version of the job to get. * @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 all job steps for a job's current version as paginated response with {@link PagedFlux}. + * @return all job steps in the specified job version as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName, Context context) { - return new PagedFlux<>( - () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, context), - nextLink -> listByJobNextSinglePageAsync(nextLink, context)); + private PagedFlux listByVersionAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion, Context context) { + return new PagedFlux<>(() -> listByVersionSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, + jobVersion, context), nextLink -> listByVersionNextSinglePageAsync(nextLink, context)); } /** - * Gets all job steps for a job's current version. + * Gets all job steps in the specified job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. + * @param jobVersion The version of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 job steps for a job's current version as paginated response with {@link PagedIterable}. + * @return all job steps in the specified job version as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, - String jobName) { - return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName)); + public PagedIterable listByVersion(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion) { + return new PagedIterable<>( + listByVersionAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion)); } /** - * Gets all job steps for a job's current version. + * Gets all job steps in the specified job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. + * @param jobVersion The version of the job to get. * @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 all job steps for a job's current version as paginated response with {@link PagedIterable}. + * @return all job steps in the specified job version as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, - String jobName, Context context) { - return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName, context)); + public PagedIterable listByVersion(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion, Context context) { + return new PagedIterable<>( + listByVersionAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, context)); } /** * Gets the specified version of a job step. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -812,10 +1016,6 @@ public Mono> getByVersionWithResponseAsync(String resourc 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.")); @@ -832,18 +1032,23 @@ public Mono> getByVersionWithResponseAsync(String resourc if (stepName == null) { return Mono.error(new IllegalArgumentException("Parameter stepName 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"; return FluxUtil - .withContext(context -> service.getByVersion(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, jobVersion, - stepName, accept, context)) + .withContext(context -> service.getByVersion(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, jobVersion, stepName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the specified version of a job step. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -862,10 +1067,6 @@ private Mono> getByVersionWithResponseAsync(String resour 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.")); @@ -882,17 +1083,21 @@ private Mono> getByVersionWithResponseAsync(String resour if (stepName == null) { return Mono.error(new IllegalArgumentException("Parameter stepName 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.getByVersion(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, jobVersion, stepName, - accept, context); + return service.getByVersion(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + jobVersion, stepName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets the specified version of a job step. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -913,7 +1118,8 @@ public Mono getByVersionAsync(String resourceGroupName, String ser /** * Gets the specified version of a job step. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -935,7 +1141,8 @@ public Response getByVersionWithResponse(String resourceGroupName, /** * Gets the specified version of a job step. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job. @@ -953,185 +1160,6 @@ public JobStepInner getByVersion(String resourceGroupName, String serverName, St Context.NONE).getValue(); } - /** - * Gets all job steps in the specified job version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 job steps in the specified job version along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVersionSinglePageAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, int jobVersion) { - 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 (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByVersion(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, jobVersion, - 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 all job steps in the specified job version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. - * @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 all job steps in the specified job version along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVersionSinglePageAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, int jobVersion, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByVersion(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, jobName, jobVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets all job steps in the specified job version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 job steps in the specified job version as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByVersionAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName, int jobVersion) { - return new PagedFlux<>( - () -> listByVersionSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion), - nextLink -> listByVersionNextSinglePageAsync(nextLink)); - } - - /** - * Gets all job steps in the specified job version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. - * @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 all job steps in the specified job version as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByVersionAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName, int jobVersion, Context context) { - return new PagedFlux<>(() -> listByVersionSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, - jobVersion, context), nextLink -> listByVersionNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all job steps in the specified job version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 job steps in the specified job version as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByVersion(String resourceGroupName, String serverName, String jobAgentName, - String jobName, int jobVersion) { - return new PagedIterable<>( - listByVersionAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion)); - } - - /** - * Gets all job steps in the specified job version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. - * @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 all job steps in the specified job version as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByVersion(String resourceGroupName, String serverName, String jobAgentName, - String jobName, int jobVersion, Context context) { - return new PagedIterable<>( - listByVersionAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, context)); - } - /** * Get the next page of items. * @@ -1139,8 +1167,7 @@ public PagedIterable listByVersion(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 all job steps for a job's current version along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of job steps along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByJobNextSinglePageAsync(String nextLink) { @@ -1167,8 +1194,7 @@ private Mono> listByJobNextSinglePageAsync(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 job steps for a job's current version along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of job steps along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByJobNextSinglePageAsync(String nextLink, Context context) { @@ -1193,8 +1219,7 @@ private Mono> listByJobNextSinglePageAsync(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 job steps in the specified job version along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of job steps along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByVersionNextSinglePageAsync(String nextLink) { @@ -1221,8 +1246,7 @@ private Mono> listByVersionNextSinglePageAsync(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 all job steps in the specified job version along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of job steps along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByVersionNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetExecutionsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetExecutionsClientImpl.java index d638213834ce..5a13e4ff2bf9 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetExecutionsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetExecutionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.JobTargetExecutionsClient; import com.azure.resourcemanager.sql.fluent.models.JobExecutionInner; -import com.azure.resourcemanager.sql.implementation.models.JobExecutionListResult; +import com.azure.resourcemanager.sql.models.JobExecutionListResult; import java.time.OffsetDateTime; import java.util.UUID; import reactor.core.publisher.Mono; @@ -61,47 +61,47 @@ public final class JobTargetExecutionsClientImpl implements JobTargetExecutionsC * The interface defining all the services for SqlManagementClientJobTargetExecutions to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientJobTargetExecutions") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientJ") public interface JobTargetExecutionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets/{targetId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByStep(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, @PathParam("jobExecutionId") UUID jobExecutionId, @PathParam("stepName") String stepName, - @PathParam("targetId") UUID targetId, @HeaderParam("Accept") String accept, Context context); + @QueryParam("createTimeMin") OffsetDateTime createTimeMin, + @QueryParam("createTimeMax") OffsetDateTime createTimeMax, + @QueryParam("endTimeMin") OffsetDateTime endTimeMin, @QueryParam("endTimeMax") OffsetDateTime endTimeMax, + @QueryParam("isActive") Boolean isActive, @QueryParam("$skip") Long skip, @QueryParam("$top") Long top, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets/{targetId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByStep(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, @PathParam("jobExecutionId") UUID jobExecutionId, @PathParam("stepName") String stepName, - @QueryParam("createTimeMin") OffsetDateTime createTimeMin, - @QueryParam("createTimeMax") OffsetDateTime createTimeMax, - @QueryParam("endTimeMin") OffsetDateTime endTimeMin, @QueryParam("endTimeMax") OffsetDateTime endTimeMax, - @QueryParam("isActive") Boolean isActive, @QueryParam("$skip") Long skip, @QueryParam("$top") Long top, - @HeaderParam("Accept") String accept, Context context); + @PathParam("targetId") UUID targetId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByJobExecution(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByJobExecution(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, @PathParam("jobExecutionId") UUID jobExecutionId, @QueryParam("createTimeMin") OffsetDateTime createTimeMin, @QueryParam("createTimeMax") OffsetDateTime createTimeMax, @QueryParam("endTimeMin") OffsetDateTime endTimeMin, @QueryParam("endTimeMax") OffsetDateTime endTimeMax, @QueryParam("isActive") Boolean isActive, @QueryParam("$skip") Long skip, @QueryParam("$top") Long top, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -109,7 +109,7 @@ Mono> listByJobExecution(@HostParam("endpoint") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByStepNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -117,196 +117,19 @@ Mono> listByStepNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByJobExecutionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Gets a target execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. - * @param stepName The name of the step. - * @param targetId The target 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 a target execution along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, UUID jobExecutionId, String stepName, UUID targetId) { - 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 (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobExecutionId == null) { - return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); - } - if (stepName == null) { - return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); - } - if (targetId == null) { - return Mono.error(new IllegalArgumentException("Parameter targetId 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, jobAgentName, jobName, jobExecutionId, - stepName, targetId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a target execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. - * @param stepName The name of the step. - * @param targetId The target 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 a target execution along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, UUID jobExecutionId, String stepName, UUID targetId, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobExecutionId == null) { - return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); - } - if (stepName == null) { - return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); - } - if (targetId == null) { - return Mono.error(new IllegalArgumentException("Parameter targetId 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, serverName, jobAgentName, jobName, jobExecutionId, stepName, targetId, accept, context); - } - - /** - * Gets a target execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. - * @param stepName The name of the step. - * @param targetId The target 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 a target execution on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName, UUID jobExecutionId, String stepName, UUID targetId) { - return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, - targetId).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a target execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. - * @param stepName The name of the step. - * @param targetId The target 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 a target execution along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, - String jobName, UUID jobExecutionId, String stepName, UUID targetId, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, - targetId, context).block(); - } - - /** - * Gets a target execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent. - * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. - * @param stepName The name of the step. - * @param targetId The target 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 a target execution. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobExecutionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, - UUID jobExecutionId, String stepName, UUID targetId) { - return getWithResponse(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, targetId, - Context.NONE).getValue(); - } - /** * Lists the target executions of a job step execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param stepName The name of the step. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. @@ -318,8 +141,7 @@ public JobExecutionInner get(String resourceGroupName, String serverName, 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 response of a JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByStepSinglePageAsync(String resourceGroupName, @@ -330,10 +152,6 @@ private Mono> listByStepSinglePageAsync(String 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.")); @@ -353,11 +171,15 @@ private Mono> listByStepSinglePageAsync(String if (stepName == null) { return Mono.error(new IllegalArgumentException("Parameter stepName 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"; return FluxUtil - .withContext(context -> service.listByStep(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, - stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, accept, context)) + .withContext(context -> service.listByStep(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, jobExecutionId, stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, + isActive, skip, top, this.client.getSubscriptionId(), 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())); @@ -366,11 +188,12 @@ private Mono> listByStepSinglePageAsync(String /** * Lists the target executions of a job step execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param stepName The name of the step. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. @@ -383,8 +206,7 @@ private Mono> listByStepSinglePageAsync(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 response of a JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByStepSinglePageAsync(String resourceGroupName, @@ -395,10 +217,6 @@ private Mono> listByStepSinglePageAsync(String 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.")); @@ -418,12 +236,16 @@ private Mono> listByStepSinglePageAsync(String if (stepName == null) { return Mono.error(new IllegalArgumentException("Parameter stepName 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 - .listByStep(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, createTimeMin, - createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, accept, context) + .listByStep(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, + stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -431,11 +253,12 @@ private Mono> listByStepSinglePageAsync(String /** * Lists the target executions of a job step execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param stepName The name of the step. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. @@ -447,7 +270,7 @@ private Mono> listByStepSinglePageAsync(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 response of a JobExecution list operation as paginated response with {@link PagedFlux}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByStepAsync(String resourceGroupName, String serverName, @@ -463,16 +286,17 @@ public PagedFlux listByStepAsync(String resourceGroupName, St /** * Lists the target executions of a job step execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param stepName The name of the step. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation as paginated response with {@link PagedFlux}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByStepAsync(String resourceGroupName, String serverName, @@ -493,11 +317,12 @@ public PagedFlux listByStepAsync(String resourceGroupName, St /** * Lists the target executions of a job step execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param stepName The name of the step. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. @@ -510,7 +335,7 @@ public PagedFlux listByStepAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation as paginated response with {@link PagedFlux}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByStepAsync(String resourceGroupName, String serverName, @@ -526,16 +351,17 @@ private PagedFlux listByStepAsync(String resourceGroupName, S /** * Lists the target executions of a job step execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param stepName The name of the step. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation as paginated response with {@link PagedIterable}. + * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByStep(String resourceGroupName, String serverName, String jobAgentName, @@ -554,11 +380,12 @@ public PagedIterable listByStep(String resourceGroupName, Str /** * Lists the target executions of a job step execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. - * @param jobExecutionId The unique id of the job execution. + * @param jobExecutionId The id of the job execution. * @param stepName The name of the step. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. @@ -571,7 +398,7 @@ public PagedIterable listByStep(String resourceGroupName, 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 the response of a JobExecution list operation as paginated response with {@link PagedIterable}. + * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByStep(String resourceGroupName, String serverName, String jobAgentName, @@ -582,13 +409,198 @@ public PagedIterable listByStep(String resourceGroupName, Str stepName, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, context)); } + /** + * Gets a target execution. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution. + * @param stepName The name of the step. + * @param targetId The target 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 a target execution along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, String stepName, UUID targetId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (jobAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); + } + if (jobName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); + } + if (jobExecutionId == null) { + return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); + } + if (stepName == null) { + return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); + } + if (targetId == null) { + return Mono.error(new IllegalArgumentException("Parameter targetId 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"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + jobName, jobExecutionId, stepName, targetId, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a target execution. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution. + * @param stepName The name of the step. + * @param targetId The target 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 a target execution along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, UUID jobExecutionId, String stepName, UUID targetId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (jobAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); + } + if (jobName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); + } + if (jobExecutionId == null) { + return Mono.error(new IllegalArgumentException("Parameter jobExecutionId is required and cannot be null.")); + } + if (stepName == null) { + return Mono.error(new IllegalArgumentException("Parameter stepName is required and cannot be null.")); + } + if (targetId == null) { + return Mono.error(new IllegalArgumentException("Parameter targetId 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.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, stepName, targetId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); + } + + /** + * Gets a target execution. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution. + * @param stepName The name of the step. + * @param targetId The target 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 a target execution on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName, UUID targetId) { + return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, + targetId).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a target execution. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution. + * @param stepName The name of the step. + * @param targetId The target 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 a target execution along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, UUID jobExecutionId, String stepName, UUID targetId, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, + targetId, context).block(); + } + + /** + * Gets a target execution. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to get. + * @param jobExecutionId The unique id of the job execution. + * @param stepName The name of the step. + * @param targetId The target 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 a target execution. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JobExecutionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, + UUID jobExecutionId, String stepName, UUID targetId) { + return getWithResponse(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, targetId, + Context.NONE).getValue(); + } + /** * Lists target executions for all steps of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. * @param jobExecutionId The id of the job execution. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. @@ -600,8 +612,7 @@ public PagedIterable listByStep(String resourceGroupName, 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 the response of a JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByJobExecutionSinglePageAsync(String resourceGroupName, @@ -612,10 +623,6 @@ private Mono> listByJobExecutionSinglePageAsync 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.")); @@ -632,11 +639,15 @@ private Mono> listByJobExecutionSinglePageAsync if (jobExecutionId == null) { return Mono.error(new IllegalArgumentException("Parameter jobExecutionId 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"; return FluxUtil - .withContext(context -> service.listByJobExecution(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, - createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, accept, context)) + .withContext(context -> service.listByJobExecution(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, + skip, top, this.client.getSubscriptionId(), 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())); @@ -645,10 +656,11 @@ private Mono> listByJobExecutionSinglePageAsync /** * Lists target executions for all steps of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. * @param jobExecutionId The id of the job execution. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. @@ -661,8 +673,7 @@ private Mono> listByJobExecutionSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByJobExecutionSinglePageAsync(String resourceGroupName, @@ -673,10 +684,6 @@ private Mono> listByJobExecutionSinglePageAsync 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.")); @@ -693,12 +700,16 @@ private Mono> listByJobExecutionSinglePageAsync if (jobExecutionId == null) { return Mono.error(new IllegalArgumentException("Parameter jobExecutionId 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 - .listByJobExecution(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, createTimeMin, createTimeMax, - endTimeMin, endTimeMax, isActive, skip, top, accept, context) + .listByJobExecution(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, createTimeMin, createTimeMax, endTimeMin, endTimeMax, isActive, skip, top, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -706,10 +717,11 @@ private Mono> listByJobExecutionSinglePageAsync /** * Lists target executions for all steps of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. * @param jobExecutionId The id of the job execution. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. @@ -721,7 +733,7 @@ private Mono> listByJobExecutionSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation as paginated response with {@link PagedFlux}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, @@ -737,15 +749,16 @@ public PagedFlux listByJobExecutionAsync(String resourceGroup /** * Lists target executions for all steps of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. * @param jobExecutionId The id of the job execution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation as paginated response with {@link PagedFlux}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, @@ -766,10 +779,11 @@ public PagedFlux listByJobExecutionAsync(String resourceGroup /** * Lists target executions for all steps of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. * @param jobExecutionId The id of the job execution. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. @@ -782,7 +796,7 @@ public PagedFlux listByJobExecutionAsync(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 response of a JobExecution list operation as paginated response with {@link PagedFlux}. + * @return a list of job executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByJobExecutionAsync(String resourceGroupName, String serverName, @@ -798,15 +812,16 @@ private PagedFlux listByJobExecutionAsync(String resourceGrou /** * Lists target executions for all steps of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. * @param jobExecutionId The id of the job execution. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation as paginated response with {@link PagedIterable}. + * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByJobExecution(String resourceGroupName, String serverName, @@ -825,10 +840,11 @@ public PagedIterable listByJobExecution(String resourceGroupN /** * Lists target executions for all steps of a job execution. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. + * @param jobName The name of the job to get. * @param jobExecutionId The id of the job execution. * @param createTimeMin If specified, only job executions created at or after the specified time are included. * @param createTimeMax If specified, only job executions created before the specified time are included. @@ -841,7 +857,7 @@ public PagedIterable listByJobExecution(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 the response of a JobExecution list operation as paginated response with {@link PagedIterable}. + * @return a list of job executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByJobExecution(String resourceGroupName, String serverName, @@ -859,8 +875,7 @@ public PagedIterable listByJobExecution(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 the response of a JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByStepNextSinglePageAsync(String nextLink) { @@ -887,8 +902,7 @@ private Mono> listByStepNextSinglePageAsync(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 the response of a JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByStepNextSinglePageAsync(String nextLink, Context context) { @@ -913,8 +927,7 @@ private Mono> listByStepNextSinglePageAsync(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 the response of a JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByJobExecutionNextSinglePageAsync(String nextLink) { @@ -942,8 +955,7 @@ private Mono> listByJobExecutionNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobExecution list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of job executions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByJobExecutionNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetGroupsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetGroupsClientImpl.java index b554555bc3a2..443950ea5065 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetGroupsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetGroupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.JobTargetGroupsClient; import com.azure.resourcemanager.sql.fluent.models.JobTargetGroupInner; -import com.azure.resourcemanager.sql.implementation.models.JobTargetGroupListResult; +import com.azure.resourcemanager.sql.models.JobTargetGroupListResult; import reactor.core.publisher.Mono; /** @@ -62,63 +62,226 @@ public final class JobTargetGroupsClientImpl implements JobTargetGroupsClient { * The interface defining all the services for SqlManagementClientJobTargetGroups to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientJobTargetGroups") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientJ") public interface JobTargetGroupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByAgent(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("targetGroupName") String targetGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("targetGroupName") String targetGroupName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") JobTargetGroupInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") JobTargetGroupInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("targetGroupName") String targetGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAgent(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByAgentNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets all target groups in an agent. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 target groups in an agent along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByAgentSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (jobAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobAgentName 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"; + return FluxUtil + .withContext(context -> service.listByAgent(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets all target groups in an agent. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @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 all target groups in an agent along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByAgentSinglePageAsync(String resourceGroupName, + String serverName, String jobAgentName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (jobAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobAgentName 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 + .listByAgent(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets all target groups in an agent. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 target groups in an agent as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByAgentAsync(String resourceGroupName, String serverName, + String jobAgentName) { + return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName), + nextLink -> listByAgentNextSinglePageAsync(nextLink)); + } + + /** + * Gets all target groups in an agent. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @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 all target groups in an agent as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByAgentAsync(String resourceGroupName, String serverName, + String jobAgentName, Context context) { + return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, context), + nextLink -> listByAgentNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all target groups in an agent. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 target groups in an agent as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByAgent(String resourceGroupName, String serverName, + String jobAgentName) { + return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName)); + } + + /** + * Gets all target groups in an agent. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @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 all target groups in an agent as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByAgent(String resourceGroupName, String serverName, + String jobAgentName, Context context) { + return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName, context)); + } + /** * Gets a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -132,10 +295,6 @@ public Mono> getWithResponseAsync(String resourceG 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.")); @@ -150,20 +309,24 @@ public Mono> getWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter targetGroupName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, targetGroupName, accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + targetGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -178,10 +341,6 @@ private Mono> getWithResponseAsync(String resource 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.")); @@ -196,18 +355,23 @@ private Mono> getWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter targetGroupName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, targetGroupName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, targetGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -224,9 +388,10 @@ public Mono getAsync(String resourceGroupName, String serve /** * Gets a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -243,9 +408,10 @@ public Response getWithResponse(String resourceGroupName, S /** * Gets a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -261,9 +427,10 @@ public JobTargetGroupInner get(String resourceGroupName, String serverName, Stri /** * Creates or updates a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @param parameters The requested state of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -278,10 +445,6 @@ public Mono> createOrUpdateWithResponseAsync(Strin 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.")); @@ -296,26 +459,30 @@ public Mono> createOrUpdateWithResponseAsync(Strin return Mono .error(new IllegalArgumentException("Parameter targetGroupName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, targetGroupName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, targetGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @param parameters The requested state of the target group. * @param context The context to associate with this operation. @@ -332,10 +499,6 @@ private Mono> createOrUpdateWithResponseAsync(Stri 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.")); @@ -350,25 +513,28 @@ private Mono> createOrUpdateWithResponseAsync(Stri return Mono .error(new IllegalArgumentException("Parameter targetGroupName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, targetGroupName, contentType, - accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + targetGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @param parameters The requested state of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -386,9 +552,10 @@ public Mono createOrUpdateAsync(String resourceGroupName, S /** * Creates or updates a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @param parameters The requested state of the target group. * @param context The context to associate with this operation. @@ -407,9 +574,10 @@ public Response createOrUpdateWithResponse(String resourceG /** * Creates or updates a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @param parameters The requested state of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -427,9 +595,10 @@ public JobTargetGroupInner createOrUpdate(String resourceGroupName, String serve /** * Deletes a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -443,10 +612,6 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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.")); @@ -461,18 +626,23 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono .error(new IllegalArgumentException("Parameter targetGroupName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, targetGroupName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, targetGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -487,10 +657,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -505,17 +671,22 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono .error(new IllegalArgumentException("Parameter targetGroupName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, targetGroupName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, targetGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -532,9 +703,10 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -551,9 +723,10 @@ public Response deleteWithResponse(String resourceGroupName, String server /** * Deletes a target group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param targetGroupName The name of the target group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -564,161 +737,6 @@ public void delete(String resourceGroupName, String serverName, String jobAgentN deleteWithResponse(resourceGroupName, serverName, jobAgentName, targetGroupName, Context.NONE); } - /** - * Gets all target groups in an agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 target groups in an agent along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentSinglePageAsync(String resourceGroupName, - String serverName, String jobAgentName) { - 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 (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByAgent(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, 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 all target groups in an agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 all target groups in an agent along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentSinglePageAsync(String resourceGroupName, - String serverName, String jobAgentName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByAgent(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets all target groups in an agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 target groups in an agent as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByAgentAsync(String resourceGroupName, String serverName, - String jobAgentName) { - return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName), - nextLink -> listByAgentNextSinglePageAsync(nextLink)); - } - - /** - * Gets all target groups in an agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 all target groups in an agent as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAgentAsync(String resourceGroupName, String serverName, - String jobAgentName, Context context) { - return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, context), - nextLink -> listByAgentNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all target groups in an agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 target groups in an agent as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent(String resourceGroupName, String serverName, - String jobAgentName) { - return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName)); - } - - /** - * Gets all target groups in an agent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 all target groups in an agent as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent(String resourceGroupName, String serverName, - String jobAgentName, Context context) { - return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName, context)); - } - /** * Get the next page of items. * @@ -726,7 +744,7 @@ public PagedIterable listByAgent(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 all target groups in an agent along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of target groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByAgentNextSinglePageAsync(String nextLink) { @@ -753,7 +771,7 @@ private Mono> listByAgentNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 target groups in an agent along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of target groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByAgentNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobVersionsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobVersionsClientImpl.java index 18ae19a14eb8..c1c4a9a01f35 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobVersionsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobVersionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.JobVersionsClient; import com.azure.resourcemanager.sql.fluent.models.JobVersionInner; -import com.azure.resourcemanager.sql.implementation.models.JobVersionListResult; +import com.azure.resourcemanager.sql.models.JobVersionListResult; import reactor.core.publisher.Mono; /** @@ -59,62 +59,58 @@ public final class JobVersionsClientImpl implements JobVersionsClient { * The interface defining all the services for SqlManagementClientJobVersions to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientJobVersions") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientJ") public interface JobVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByJob(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, - @PathParam("jobVersion") int jobVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByJob(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("jobVersion") int jobVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByJobNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a job version. + * Gets all versions of a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. + * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a job version along with {@link Response} on successful completion of {@link Mono}. + * @return all versions of a job along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, int jobVersion) { + private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName) { 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.")); @@ -128,39 +124,40 @@ public Mono> getWithResponseAsync(String resourceGroup if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, jobVersion, - accept, context)) + .withContext(context -> service.listByJob(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, this.client.getSubscriptionId(), 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())); } /** - * Gets a job version. + * Gets all versions of a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. + * @param jobName The name of the job to get. * @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 job version along with {@link Response} on successful completion of {@link Mono}. + * @return all versions of a job along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, int jobVersion, Context context) { + private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, 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.")); @@ -174,95 +171,121 @@ private Mono> getWithResponseAsync(String resourceGrou if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, jobName, jobVersion, accept, context); + return service + .listByJob(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a job version. + * Gets all versions of a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. + * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a job version on successful completion of {@link Mono}. + * @return all versions of a job as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName, int jobVersion) { - return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName) { + return new PagedFlux<>(() -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName), + nextLink -> listByJobNextSinglePageAsync(nextLink)); } /** - * Gets a job version. + * Gets all versions of a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. + * @param jobName The name of the job to get. * @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 job version along with {@link Response}. + * @return all versions of a job as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, - String jobName, int jobVersion, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, Context context) { + return new PagedFlux<>( + () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, context), + nextLink -> listByJobNextSinglePageAsync(nextLink, context)); } /** - * Gets a job version. + * Gets all versions of a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param jobAgentName The name of the job agent. - * @param jobName The name of the job. - * @param jobVersion The version of the job to get. + * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a job version. + * @return all versions of a job as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobVersionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, - int jobVersion) { - return getWithResponse(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName) { + return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName)); } /** * Gets all versions of a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. + * @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 all versions of a job along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all versions of a job as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, + String jobName, Context context) { + return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName, context)); + } + + /** + * Gets a job version. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobVersion The version of the job to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a job version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, int jobVersion) { 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.")); @@ -276,39 +299,39 @@ private Mono> listByJobSinglePageAsync(String res if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName 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"; return FluxUtil - .withContext(context -> service.listByJob(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + jobName, jobVersion, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets all versions of a job. + * Gets a job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobVersion The version of the job to get. * @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 all versions of a job along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a job version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByJobSinglePageAsync(String resourceGroupName, String serverName, - String jobAgentName, String jobName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String jobAgentName, String jobName, int jobVersion, 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.")); @@ -322,90 +345,77 @@ private Mono> listByJobSinglePageAsync(String res if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName 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 - .listByJob(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, jobName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, jobVersion, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Gets all versions of a job. + * Gets a job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobVersion The version of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 versions of a job as paginated response with {@link PagedFlux}. + * @return a job version on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName) { - return new PagedFlux<>(() -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName), - nextLink -> listByJobNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion) { + return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets all versions of a job. + * Gets a job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobVersion The version of the job to get. * @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 all versions of a job as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByJobAsync(String resourceGroupName, String serverName, String jobAgentName, - String jobName, Context context) { - return new PagedFlux<>( - () -> listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName, context), - nextLink -> listByJobNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all versions of a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 versions of a job as paginated response with {@link PagedIterable}. + * @return a job version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, - String jobName) { - return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, String jobAgentName, + String jobName, int jobVersion, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, context).block(); } /** - * Gets all versions of a job. + * Gets a job version. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. - * @param context The context to associate with this operation. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job. + * @param jobVersion The version of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 versions of a job as paginated response with {@link PagedIterable}. + * @return a job version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByJob(String resourceGroupName, String serverName, String jobAgentName, - String jobName, Context context) { - return new PagedIterable<>(listByJobAsync(resourceGroupName, serverName, jobAgentName, jobName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public JobVersionInner get(String resourceGroupName, String serverName, String jobAgentName, String jobName, + int jobVersion) { + return getWithResponse(resourceGroupName, serverName, jobAgentName, jobName, jobVersion, Context.NONE) + .getValue(); } /** @@ -415,7 +425,7 @@ public PagedIterable listByJob(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 all versions of a job along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of job versions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByJobNextSinglePageAsync(String nextLink) { @@ -442,7 +452,7 @@ private Mono> listByJobNextSinglePageAsync(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 all versions of a job along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of job versions along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByJobNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobsClientImpl.java index db3b8e6128b8..79defab5c8e5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/JobsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.JobsClient; import com.azure.resourcemanager.sql.fluent.models.JobInner; -import com.azure.resourcemanager.sql.implementation.models.JobListResult; +import com.azure.resourcemanager.sql.models.JobListResult; import reactor.core.publisher.Mono; /** @@ -61,61 +61,222 @@ public final class JobsClientImpl implements JobsClient { * The interface defining all the services for SqlManagementClientJobs to be used by the proxy service to perform * REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientJobs") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientJ") public interface JobsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByAgent(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("jobAgentName") String jobAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") JobInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") JobInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAgent(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("jobAgentName") String jobAgentName, @HeaderParam("Accept") String accept, Context context); + @PathParam("jobAgentName") String jobAgentName, @PathParam("jobName") String jobName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByAgentNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a list of jobs. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 jobs along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByAgentSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (jobAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobAgentName 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"; + return FluxUtil + .withContext(context -> service.listByAgent(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of jobs. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @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 jobs along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByAgentSinglePageAsync(String resourceGroupName, String serverName, + String jobAgentName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (jobAgentName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobAgentName 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 + .listByAgent(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of jobs. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 jobs as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName) { + return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName), + nextLink -> listByAgentNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of jobs. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @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 jobs as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName, + Context context) { + return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, context), + nextLink -> listByAgentNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of jobs. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 jobs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName) { + return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName)); + } + + /** + * Gets a list of jobs. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param jobAgentName The name of the job agent. + * @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 jobs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName, + Context context) { + return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName, context)); } /** * Gets a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -129,10 +290,6 @@ public Mono> getWithResponseAsync(String resourceGroupName, S 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.")); @@ -146,19 +303,24 @@ public Mono> getWithResponseAsync(String resourceGroupName, S if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, + jobName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -173,10 +335,6 @@ private Mono> getWithResponseAsync(String resourceGroupName, 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.")); @@ -190,18 +348,23 @@ private Mono> getWithResponseAsync(String resourceGroupName, if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, jobName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -217,9 +380,10 @@ public Mono getAsync(String resourceGroupName, String serverName, Stri /** * Gets a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -236,9 +400,10 @@ public Response getWithResponse(String resourceGroupName, String serve /** * Gets a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -253,9 +418,10 @@ public JobInner get(String resourceGroupName, String serverName, String jobAgent /** * Creates or updates a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param parameters The requested job state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -270,10 +436,6 @@ public Mono> createOrUpdateWithResponseAsync(String resourceG 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.")); @@ -287,26 +449,30 @@ public Mono> createOrUpdateWithResponseAsync(String resourceG if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, contentType, - accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param parameters The requested job state. * @param context The context to associate with this operation. @@ -322,10 +488,6 @@ private Mono> createOrUpdateWithResponseAsync(String resource 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.")); @@ -339,25 +501,28 @@ private Mono> createOrUpdateWithResponseAsync(String resource if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param parameters The requested job state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -375,9 +540,10 @@ public Mono createOrUpdateAsync(String resourceGroupName, String serve /** * Creates or updates a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param parameters The requested job state. * @param context The context to associate with this operation. @@ -396,9 +562,10 @@ public Response createOrUpdateWithResponse(String resourceGroupName, S /** * Creates or updates a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. + * @param jobAgentName The name of the job agent. * @param jobName The name of the job to get. * @param parameters The requested job state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -416,10 +583,11 @@ public JobInner createOrUpdate(String resourceGroupName, String serverName, Stri /** * Deletes a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -432,10 +600,6 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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.")); @@ -449,19 +613,24 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, jobName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + jobAgentName, jobName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to delete. * @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. @@ -475,10 +644,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -492,18 +657,23 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, jobName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, jobAgentName, jobName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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,10 +688,11 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to delete. * @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. @@ -537,10 +708,11 @@ public Response deleteWithResponse(String resourceGroupName, String server /** * Deletes a job. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @param jobName The name of the job to get. + * @param jobAgentName The name of the job agent. + * @param jobName The name of the job to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -550,159 +722,6 @@ public void delete(String resourceGroupName, String serverName, String jobAgentN deleteWithResponse(resourceGroupName, serverName, jobAgentName, jobName, Context.NONE); } - /** - * Gets a list of jobs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 jobs along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentSinglePageAsync(String resourceGroupName, String serverName, - String jobAgentName) { - 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 (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByAgent(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, jobAgentName, 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 a list of jobs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 jobs along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAgentSinglePageAsync(String resourceGroupName, String serverName, - String jobAgentName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (jobAgentName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByAgent(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, jobAgentName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of jobs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 jobs as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName) { - return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName), - nextLink -> listByAgentNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of jobs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 jobs as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAgentAsync(String resourceGroupName, String serverName, String jobAgentName, - Context context) { - return new PagedFlux<>(() -> listByAgentSinglePageAsync(resourceGroupName, serverName, jobAgentName, context), - nextLink -> listByAgentNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of jobs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 jobs as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName) { - return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName)); - } - - /** - * Gets a list of jobs. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param jobAgentName The name of the job agent to be retrieved. - * @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 jobs as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAgent(String resourceGroupName, String serverName, String jobAgentName, - Context context) { - return new PagedIterable<>(listByAgentAsync(resourceGroupName, serverName, jobAgentName, context)); - } - /** * Get the next page of items. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LedgerDigestUploadsOperationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LedgerDigestUploadsOperationsClientImpl.java index 9bda8ec2a00b..a6cf2c410576 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LedgerDigestUploadsOperationsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LedgerDigestUploadsOperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.LedgerDigestUploadsOperationsClient; import com.azure.resourcemanager.sql.fluent.models.LedgerDigestUploadsInner; -import com.azure.resourcemanager.sql.implementation.models.LedgerDigestUploadsListResult; +import com.azure.resourcemanager.sql.models.LedgerDigestUploadsListResult; import com.azure.resourcemanager.sql.models.LedgerDigestUploadsName; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -68,49 +68,50 @@ public final class LedgerDigestUploadsOperationsClientImpl implements LedgerDige * The interface defining all the services for SqlManagementClientLedgerDigestUploadsOperations to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientLedgerDigestUploadsOperations") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientL") public interface LedgerDigestUploadsOperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("ledgerDigestUploads") LedgerDigestUploadsName ledgerDigestUploads, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("ledgerDigestUploads") LedgerDigestUploadsName ledgerDigestUploads, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") LedgerDigestUploadsInner parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") LedgerDigestUploadsInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}/disable") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> disable(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> disable(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("ledgerDigestUploads") LedgerDigestUploadsName ledgerDigestUploads, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -118,14 +119,179 @@ Mono>> disable(@HostParam("endpoint") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets all ledger digest upload settings on a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 all ledger digest upload settings on a database along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; + return FluxUtil + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets all ledger digest upload settings on a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 all ledger digest upload settings on a database along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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 + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets all ledger digest upload settings on a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 all ledger digest upload settings on a database as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * Gets all ledger digest upload settings on a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 all ledger digest upload settings on a database as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all ledger digest upload settings on a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 all ledger digest upload settings on a database as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); + } + + /** + * Gets all ledger digest upload settings on a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 all ledger digest upload settings on a database as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + } + /** * Gets the current ledger digest upload configuration for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -142,10 +308,6 @@ public Mono> getWithResponseAsync(String reso 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.")); @@ -160,18 +322,22 @@ public Mono> getWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter ledgerDigestUploads 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, ledgerDigestUploads, - accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + ledgerDigestUploads, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the current ledger digest upload configuration for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -189,10 +355,6 @@ private Mono> getWithResponseAsync(String res 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.")); @@ -207,16 +369,21 @@ private Mono> getWithResponseAsync(String res return Mono .error(new IllegalArgumentException("Parameter ledgerDigestUploads 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, ledgerDigestUploads, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, ledgerDigestUploads, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets the current ledger digest upload configuration for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -235,7 +402,8 @@ public Mono getAsync(String resourceGroupName, String /** * Gets the current ledger digest upload configuration for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -254,7 +422,8 @@ public Response getWithResponse(String resourceGroupNa /** * Gets the current ledger digest upload configuration for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -273,7 +442,8 @@ public LedgerDigestUploadsInner get(String resourceGroupName, String serverName, /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -291,10 +461,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -309,24 +475,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter ledgerDigestUploads 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, ledgerDigestUploads, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, ledgerDigestUploads, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -346,10 +516,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -364,23 +530,27 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter ledgerDigestUploads 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, ledgerDigestUploads, - contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + ledgerDigestUploads, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -404,7 +574,8 @@ public PollerFlux, LedgerDigestUploadsInner /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -429,7 +600,8 @@ private PollerFlux, LedgerDigestUploadsInne /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -451,7 +623,8 @@ public SyncPoller, LedgerDigestUploadsInner /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -475,7 +648,8 @@ public SyncPoller, LedgerDigestUploadsInner /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -496,7 +670,8 @@ public Mono createOrUpdateAsync(String resourceGroupNa /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -518,7 +693,8 @@ private Mono createOrUpdateAsync(String resourceGroupN /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -538,7 +714,8 @@ public LedgerDigestUploadsInner createOrUpdate(String resourceGroupName, String /** * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -556,168 +733,11 @@ public LedgerDigestUploadsInner createOrUpdate(String resourceGroupName, String context).block(); } - /** - * Gets all ledger digest upload settings on a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 ledger digest upload settings on a database along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, 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 all ledger digest upload settings on a 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 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 all ledger digest upload settings on a database along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets all ledger digest upload settings on a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 ledger digest upload settings on a database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Gets all ledger digest upload settings on a 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 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 all ledger digest upload settings on a database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all ledger digest upload settings on a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 ledger digest upload settings on a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); - } - - /** - * Gets all ledger digest upload settings on a 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 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 all ledger digest upload settings on a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); - } - /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -734,10 +754,6 @@ public Mono>> disableWithResponseAsync(String resource 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.")); @@ -752,18 +768,23 @@ public Mono>> disableWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter ledgerDigestUploads 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"; return FluxUtil - .withContext(context -> service.disable(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, ledgerDigestUploads, - accept, context)) + .withContext( + context -> service.disable(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + ledgerDigestUploads, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -781,10 +802,6 @@ private Mono>> disableWithResponseAsync(String resourc 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.")); @@ -799,16 +816,21 @@ private Mono>> disableWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter ledgerDigestUploads 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.disable(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, ledgerDigestUploads, accept, context); + return service.disable(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + ledgerDigestUploads, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -830,7 +852,8 @@ public PollerFlux, LedgerDigestUploadsInner /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -854,7 +877,8 @@ private PollerFlux, LedgerDigestUploadsInne /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -872,7 +896,8 @@ public SyncPoller, LedgerDigestUploadsInner /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -893,7 +918,8 @@ public SyncPoller, LedgerDigestUploadsInner /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -912,7 +938,8 @@ public Mono disableAsync(String resourceGroupName, Str /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -932,7 +959,8 @@ private Mono disableAsync(String resourceGroupName, St /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -950,7 +978,8 @@ public LedgerDigestUploadsInner disable(String resourceGroupName, String serverN /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param ledgerDigestUploads The ledgerDigestUploads parameter. @@ -973,8 +1002,8 @@ public LedgerDigestUploadsInner disable(String resourceGroupName, String serverN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 ledger digest upload settings on a database along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of ledger digest upload settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -1001,8 +1030,8 @@ private Mono> listByDatabaseNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 ledger digest upload settings on a database along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of ledger digest upload settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionBackupsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionBackupsClientImpl.java index 25d88c007321..d0a33804ca13 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionBackupsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionBackupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -34,10 +34,9 @@ import com.azure.resourcemanager.sql.fluent.LongTermRetentionBackupsClient; import com.azure.resourcemanager.sql.fluent.models.LongTermRetentionBackupInner; import com.azure.resourcemanager.sql.fluent.models.LongTermRetentionBackupOperationResultInner; -import com.azure.resourcemanager.sql.implementation.models.LongTermRetentionBackupListResult; -import com.azure.resourcemanager.sql.models.ChangeLongTermRetentionBackupAccessTierParameters; import com.azure.resourcemanager.sql.models.CopyLongTermRetentionBackupParameters; import com.azure.resourcemanager.sql.models.DatabaseState; +import com.azure.resourcemanager.sql.models.LongTermRetentionBackupListResult; import com.azure.resourcemanager.sql.models.UpdateLongTermRetentionBackupParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -72,512 +71,409 @@ public final class LongTermRetentionBackupsClientImpl implements LongTermRetenti * The interface defining all the services for SqlManagementClientLongTermRetentionBackups to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientLongTermRetentionBackups") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientL") public interface LongTermRetentionBackupsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByLocation(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, - @PathParam("longTermRetentionServerName") String longTermRetentionServerName, - @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); + @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, + @QueryParam("databaseState") DatabaseState databaseState, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, - @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, Context context); + @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, + @QueryParam("databaseState") DatabaseState databaseState, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, - @QueryParam("databaseState") DatabaseState databaseState, @HeaderParam("Accept") String accept, - Context context); - - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/changeAccessTier") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> changeAccessTier(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @PathParam("longTermRetentionServerName") String longTermRetentionServerName, - @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") ChangeLongTermRetentionBackupAccessTierParameters parameters, - Context context); - - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> copy(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @PathParam("longTermRetentionServerName") String longTermRetentionServerName, - @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") CopyLongTermRetentionBackupParameters parameters, Context context); + @QueryParam("databaseState") DatabaseState databaseState, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/lockTimeBasedImmutability") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> lockTimeBasedImmutability(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); + @PathParam("backupName") String backupName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/removeLegalHoldImmutability") + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> removeLegalHoldImmutability(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); + @PathParam("backupName") String backupName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/removeTimeBasedImmutability") + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> removeTimeBasedImmutability(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> copy(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); + @PathParam("backupName") String backupName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CopyLongTermRetentionBackupParameters parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/setLegalHoldImmutability") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> setLegalHoldImmutability(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @PathParam("longTermRetentionServerName") String longTermRetentionServerName, - @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/update") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") UpdateLongTermRetentionBackupParameters parameters, Context context); + @PathParam("backupName") String backupName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") UpdateLongTermRetentionBackupParameters parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @PathParam("longTermRetentionServerName") String longTermRetentionServerName, - @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroupLocation( + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("locationName") String locationName, + @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, + @QueryParam("databaseState") DatabaseState databaseState, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByResourceGroupServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, - @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, Context context); + @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, + @QueryParam("databaseState") DatabaseState databaseState, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupDatabase( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, - @QueryParam("databaseState") DatabaseState databaseState, @HeaderParam("Accept") String accept, - Context context); - - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/changeAccessTier") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> changeAccessTierByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @PathParam("longTermRetentionServerName") String longTermRetentionServerName, - @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") ChangeLongTermRetentionBackupAccessTierParameters parameters, - Context context); - - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> copyByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @PathParam("longTermRetentionServerName") String longTermRetentionServerName, - @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") CopyLongTermRetentionBackupParameters parameters, Context context); + @QueryParam("databaseState") DatabaseState databaseState, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/lockTimeBasedImmutability") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> lockTimeBasedImmutabilityByResourceGroup( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); + @PathParam("backupName") String backupName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/removeLegalHoldImmutability") + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> removeLegalHoldImmutabilityByResourceGroup( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono>> deleteByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); + @PathParam("backupName") String backupName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/removeTimeBasedImmutability") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> removeTimeBasedImmutabilityByResourceGroup( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono>> copyByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); + @PathParam("backupName") String backupName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CopyLongTermRetentionBackupParameters parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/setLegalHoldImmutability") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> setLegalHoldImmutabilityByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @PathParam("longTermRetentionServerName") String longTermRetentionServerName, - @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/update") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> updateByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("longTermRetentionServerName") String longTermRetentionServerName, @PathParam("longTermRetentionDatabaseName") String longTermRetentionDatabaseName, - @PathParam("backupName") String backupName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") UpdateLongTermRetentionBackupParameters parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, - @QueryParam("databaseState") DatabaseState databaseState, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @PathParam("longTermRetentionServerName") String longTermRetentionServerName, - @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, - @QueryParam("databaseState") DatabaseState databaseState, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupLocation( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, - @QueryParam("databaseState") DatabaseState databaseState, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupServer( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @PathParam("longTermRetentionServerName") String longTermRetentionServerName, - @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, - @QueryParam("databaseState") DatabaseState databaseState, @HeaderParam("Accept") String accept, - Context context); + @PathParam("backupName") String backupName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") UpdateLongTermRetentionBackupParameters parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByLocationNext( + @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> listByResourceGroupDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + 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) - Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByDatabaseNext( + @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("endpoint") String endpoint, + Mono> listByResourceGroupLocationNext( + @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> listByResourceGroupLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByResourceGroupServerNext( + @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> listByResourceGroupServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByResourceGroupDatabaseNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a long term retention backup. + * Lists the long term retention backups for a given location. * * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { + private Mono> listByLocationSinglePageAsync(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState) { 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 (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { + if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + "Parameter this.client.getSubscriptionId() 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(), locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, accept, context)) + .withContext( + context -> service.listByLocation(this.client.getEndpoint(), locationName, onlyLatestPerDatabase, + databaseState, this.client.getSubscriptionId(), 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())); } /** - * Gets a long term retention backup. + * Lists the long term retention backups for a given location. * * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { + private Mono> listByLocationSinglePageAsync(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { + if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + "Parameter this.client.getSubscriptionId() 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(), - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, accept, context); + return service + .listByLocation(this.client.getEndpoint(), locationName, onlyLatestPerDatabase, databaseState, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a long term retention backup. + * Lists the long term retention backups for a given location. * * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup on successful completion of {@link Mono}. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName) { - return getWithResponseAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByLocationAsync(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** - * Gets a long term retention backup. + * Lists the long term retention backups for a given location. * * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup along with {@link Response}. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { - return getWithResponseAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByLocationAsync(String locationName) { + final Boolean onlyLatestPerDatabase = null; + final DatabaseState databaseState = null; + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** - * Gets a long term retention backup. + * Lists the long term retention backups for a given location. * * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @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 long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner get(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName) { - return getWithResponse(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, - Context.NONE).getValue(); - } - - /** - * Deletes a long term retention backup. + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedFlux<>( + () -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState, context), + nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists the long term retention backups for a given location. + * + * @param locationName The location of the 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 a list of long term retention backups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String locationName) { + final Boolean onlyLatestPerDatabase = null; + final DatabaseState databaseState = null; + return new PagedIterable<>(listByLocationAsync(locationName, onlyLatestPerDatabase, databaseState)); + } + + /** + * Lists the long term retention backups for a given location. + * + * @param locationName The location of the database. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @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 backups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedIterable<>(listByLocationAsync(locationName, onlyLatestPerDatabase, databaseState, context)); + } + + /** + * Lists the long term retention backups for a given server. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { + private Mono> listByServerSinglePageAsync(String locationName, + String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { 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.")); } @@ -585,44 +481,42 @@ public Mono>> deleteWithResponseAsync(String locationN return Mono.error( new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } - if (longTermRetentionDatabaseName == null) { + if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + "Parameter this.client.getSubscriptionId() 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(), locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), locationName, + longTermRetentionServerName, onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), + 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())); } /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given server. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { + private Mono> listByServerSinglePageAsync(String locationName, + String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, + 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } @@ -630,206 +524,189 @@ private Mono>> deleteWithResponseAsync(String location return Mono.error( new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } - if (longTermRetentionDatabaseName == null) { + if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + "Parameter this.client.getSubscriptionId() 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(), - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context); + return service + .listByServer(this.client.getEndpoint(), locationName, longTermRetentionServerName, onlyLatestPerDatabase, + databaseState, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given server. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName) { - Mono>> mono = deleteWithResponseAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByServerAsync(String locationName, + String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(locationName, longTermRetentionServerName, + onlyLatestPerDatabase, databaseState), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given server. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByServerAsync(String locationName, + String longTermRetentionServerName) { + final Boolean onlyLatestPerDatabase = null; + final DatabaseState databaseState = null; + return new PagedFlux<>(() -> listByServerSinglePageAsync(locationName, longTermRetentionServerName, + onlyLatestPerDatabase, databaseState), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given server. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @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 a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName) { - return this - .beginDeleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String locationName, + String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(locationName, longTermRetentionServerName, + onlyLatestPerDatabase, databaseState, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given server. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 a list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context) { - return this - .beginDeleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, - context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String locationName, + String longTermRetentionServerName) { + final Boolean onlyLatestPerDatabase = null; + final DatabaseState databaseState = null; + return new PagedIterable<>( + listByServerAsync(locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState)); } /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given server. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @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 a list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName) { - return beginDeleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName) - .last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String locationName, + String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, + Context context) { + return new PagedIterable<>(listByServerAsync(locationName, longTermRetentionServerName, onlyLatestPerDatabase, + databaseState, context)); } /** - * Deletes a long term retention backup. + * Lists all long term retention backups for a database. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param context The context to associate with this operation. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context) { - return beginDeleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, - context).last().flatMap(this.client::getLroFinalResultOrError); + private Mono> listByDatabaseSinglePageAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (longTermRetentionServerName == null) { + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); + } + if (longTermRetentionDatabaseName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName 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"; + return FluxUtil + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, + this.client.getSubscriptionId(), 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())); } /** - * Deletes a long term retention backup. + * Lists all long term retention backups for a database. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @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 locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName) { - deleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName).block(); - } - - /** - * Deletes a long term retention backup. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context) { - deleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context) - .block(); - } - - /** - * Lists all long term retention backups for a database. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 backups along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseSinglePageAsync(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, - DatabaseState databaseState) { + DatabaseState databaseState, 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } @@ -841,60 +718,16 @@ private Mono> listByDatabaseSinglePa return Mono.error(new IllegalArgumentException( "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, 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 long term retention backups for a database. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, - DatabaseState databaseState, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, - databaseState, accept, context) + .listByDatabase(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -1011,30 +844,24 @@ public PagedIterable listByDatabase(String locatio } /** - * Change a long term retention backup access tier. + * Gets a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> changeAccessTierWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters) { + public Mono> getWithResponseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } @@ -1049,28 +876,25 @@ public Mono>> changeAccessTierWithResponseAsync(String if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.changeAccessTier(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, contentType, accept, parameters, context)) + .withContext(context -> service.get(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Change a long term retention backup access tier. + * Gets a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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. @@ -1078,17 +902,12 @@ public Mono>> changeAccessTierWithResponseAsync(String * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> changeAccessTierWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters, Context context) { + private Mono> getWithResponseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } @@ -1103,216 +922,337 @@ private Mono>> changeAccessTierWithResponseAsync(Strin if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.changeAccessTier(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName, contentType, accept, parameters, context); + return service.get(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context); } /** - * Change a long term retention backup access tier. + * Gets a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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 a long term retention backup. + * @return a long term retention backup on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, LongTermRetentionBackupInner> - beginChangeAccessTierAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters) { - Mono>> mono = changeAccessTierWithResponseAsync(locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName) { + return getWithResponseAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, + backupName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Change a long term retention backup access tier. + * Gets a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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 a long term retention backup. + * @return a long term retention backup along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LongTermRetentionBackupInner> - beginChangeAccessTierAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = changeAccessTierWithResponseAsync(locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { + return getWithResponseAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, + backupName, context).block(); } /** - * Change a long term retention backup access tier. + * Gets a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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 a long term retention backup. + * @return a long term retention backup. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> beginChangeAccessTier( - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, ChangeLongTermRetentionBackupAccessTierParameters parameters) { - return this - .beginChangeAccessTierAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName, parameters) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public LongTermRetentionBackupInner get(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName) { + return getWithResponse(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + Context.NONE).getValue(); } /** - * Change a long term retention backup access tier. + * Deletes a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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 a long term retention backup. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> beginChangeAccessTier( - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, ChangeLongTermRetentionBackupAccessTierParameters parameters, Context context) { - return this - .beginChangeAccessTierAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName, parameters, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (longTermRetentionServerName == null) { + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); + } + if (longTermRetentionDatabaseName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Change a long term retention backup access tier. + * Deletes a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono changeAccessTierAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters) { - return beginChangeAccessTierAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName, parameters).last().flatMap(this.client::getLroFinalResultOrError); + private Mono>> deleteWithResponseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (longTermRetentionServerName == null) { + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); + } + if (longTermRetentionDatabaseName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + context); } /** - * Change a long term retention backup access tier. + * Deletes a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono changeAccessTierAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters, Context context) { - return beginChangeAccessTierAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName, parameters, context).last().flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName) { + Mono>> mono = deleteWithResponseAsync(locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Change a long term retention backup access tier. + * Deletes a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner changeAccessTier(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters) { - return changeAccessTierAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName, parameters).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Change a long term retention backup access tier. + * Deletes a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner changeAccessTier(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters, Context context) { - return changeAccessTierAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName, parameters, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName) { + return this + .beginDeleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName) + .getSyncPoller(); } /** - * Copy an existing long term retention backup. + * Deletes a long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, Context context) { + return this + .beginDeleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + context) + .getSyncPoller(); + } + + /** + * Deletes a long term retention backup. + * + * @param locationName The location of the database. + * @param longTermRetentionServerName The name of the server. + * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName) { + return beginDeleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a long term retention backup. + * + * @param locationName The location of the database. + * @param longTermRetentionServerName The name of the server. + * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. + * @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 locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, Context context) { + return beginDeleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a long term retention backup. + * + * @param locationName The location of the database. + * @param longTermRetentionServerName The name of the server. + * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName) { + deleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName).block(); + } + + /** + * Deletes a long term retention backup. + * + * @param locationName The location of the database. + * @param longTermRetentionServerName The name of the server. + * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. + * @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 locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, Context context) { + deleteAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context) + .block(); + } + + /** + * Copy an existing long term retention backup. + * + * @param locationName The location of the database. + * @param longTermRetentionServerName The name of the server. + * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. + * @param parameters The parameters needed for long term retention copy 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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1323,10 +1263,6 @@ public Mono>> copyWithResponseAsync(String locationNam 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.")); } @@ -1341,17 +1277,20 @@ public Mono>> copyWithResponseAsync(String locationNam if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.copy(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, contentType, accept, parameters, context)) + .withContext(context -> service.copy(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1378,10 +1317,6 @@ private Mono>> copyWithResponseAsync(String locationNa 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.")); } @@ -1396,17 +1331,20 @@ private Mono>> copyWithResponseAsync(String locationNa if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.copy(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, contentType, accept, - parameters, context); + return service.copy(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context); } /** @@ -1598,28 +1536,27 @@ public LongTermRetentionBackupOperationResultInner copy(String locationName, Str } /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a LongTermRetentionBackup operation result resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> lockTimeBasedImmutabilityWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { + public Mono>> updateWithResponseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + UpdateLongTermRetentionBackupParameters 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.")); } @@ -1634,38 +1571,46 @@ public Mono>> lockTimeBasedImmutabilityWithResponseAsy if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName 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.lockTimeBasedImmutability(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a LongTermRetentionBackup operation result resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> lockTimeBasedImmutabilityWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { + private Mono>> updateWithResponseAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + UpdateLongTermRetentionBackupParameters 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } @@ -1680,467 +1625,427 @@ private Mono>> lockTimeBasedImmutabilityWithResponseAs if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName 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"; context = this.client.mergeContext(context); - return service.lockTimeBasedImmutability(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName, accept, context); + return service.update(this.client.getEndpoint(), locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context); } /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 the {@link PollerFlux} for polling of a long term retention backup. + * @return the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, LongTermRetentionBackupInner> - beginLockTimeBasedImmutabilityAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName) { - Mono>> mono = lockTimeBasedImmutabilityWithResponseAsync(locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - this.client.getContext()); + public + PollerFlux, LongTermRetentionBackupOperationResultInner> + beginUpdateAsync(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters) { + Mono>> mono = updateWithResponseAsync(locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, + LongTermRetentionBackupOperationResultInner.class, this.client.getContext()); } /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 the {@link PollerFlux} for polling of a long term retention backup. + * @return the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LongTermRetentionBackupInner> - beginLockTimeBasedImmutabilityAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context) { + private + PollerFlux, LongTermRetentionBackupOperationResultInner> + beginUpdateAsync(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = lockTimeBasedImmutabilityWithResponseAsync(locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - context); + Mono>> mono = updateWithResponseAsync(locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters, context); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, + LongTermRetentionBackupOperationResultInner.class, context); } /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 the {@link SyncPoller} for polling of a long term retention backup. + * @return the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginLockTimeBasedImmutability(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName) { + public + SyncPoller, LongTermRetentionBackupOperationResultInner> + beginUpdate(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters) { return this - .beginLockTimeBasedImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName) + .beginUpdateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters) .getSyncPoller(); } /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 the {@link SyncPoller} for polling of a long term retention backup. + * @return the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginLockTimeBasedImmutability(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context) { + public + SyncPoller, LongTermRetentionBackupOperationResultInner> + beginUpdate(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context) { return this - .beginLockTimeBasedImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context) + .beginUpdateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters, context) .getSyncPoller(); } /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 long term retention backup on successful completion of {@link Mono}. + * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono lockTimeBasedImmutabilityAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - return beginLockTimeBasedImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName).last().flatMap(this.client::getLroFinalResultOrError); + public Mono updateAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + UpdateLongTermRetentionBackupParameters parameters) { + return beginUpdateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 long term retention backup on successful completion of {@link Mono}. + * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono lockTimeBasedImmutabilityAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { - return beginLockTimeBasedImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context).last().flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + UpdateLongTermRetentionBackupParameters parameters, Context context) { + return beginUpdateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters, context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 long term retention backup. + * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner lockTimeBasedImmutability(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - return lockTimeBasedImmutabilityAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName).block(); + public LongTermRetentionBackupOperationResultInner update(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters) { + return updateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters).block(); } /** - * Lock time based immutability of an existing long term retention backup. + * Updates an existing long term retention backup. * * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The requested backup resource 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 long term retention backup. + * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner lockTimeBasedImmutability(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { - return lockTimeBasedImmutabilityAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName, context).block(); + public LongTermRetentionBackupOperationResultInner update(String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters, + Context context) { + return updateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + parameters, context).block(); } /** - * Remove legal hold immutability of an existing long term retention backup. + * Lists the long term retention backups for a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> removeLegalHoldImmutabilityWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { + private Mono> listByResourceGroupLocationSinglePageAsync( + String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { + if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.removeLegalHoldImmutability(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, accept, context)) + .withContext(context -> service.listByResourceGroupLocation(this.client.getEndpoint(), resourceGroupName, + locationName, onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), + 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())); } /** - * Remove legal hold immutability of an existing long term retention backup. + * Lists the long term retention backups for a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> removeLegalHoldImmutabilityWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { + private Mono> listByResourceGroupLocationSinglePageAsync( + String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, + 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { + if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.removeLegalHoldImmutability(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName, accept, context); - } - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, LongTermRetentionBackupInner> - beginRemoveLegalHoldImmutabilityAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName) { - Mono>> mono = removeLegalHoldImmutabilityWithResponseAsync(locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - this.client.getContext()); - } - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LongTermRetentionBackupInner> - beginRemoveLegalHoldImmutabilityAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = removeLegalHoldImmutabilityWithResponseAsync(locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - context); - } - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginRemoveLegalHoldImmutability(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName) { - return this - .beginRemoveLegalHoldImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName) - .getSyncPoller(); + return service + .listByResourceGroupLocation(this.client.getEndpoint(), resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Remove legal hold immutability of an existing long term retention backup. + * Lists the long term retention backups for a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param context The context to associate with this operation. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginRemoveLegalHoldImmutability(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context) { - return this - .beginRemoveLegalHoldImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, + String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + return new PagedFlux<>(() -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState), + nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink)); } /** - * Remove legal hold immutability of an existing long term retention backup. + * Lists the long term retention backups for a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup on successful completion of {@link Mono}. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono removeLegalHoldImmutabilityAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - return beginRemoveLegalHoldImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName).last().flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, + String locationName) { + final Boolean onlyLatestPerDatabase = null; + final DatabaseState databaseState = null; + return new PagedFlux<>(() -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState), + nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink)); } /** - * Remove legal hold immutability of an existing long term retention backup. + * Lists the long term retention backups for a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 long term retention backup on successful completion of {@link Mono}. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono removeLegalHoldImmutabilityAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { - return beginRemoveLegalHoldImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context).last().flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, + String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedFlux<>(() -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState, context), + nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink, context)); } /** - * Remove legal hold immutability of an existing long term retention backup. + * Lists the long term retention backups for a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner removeLegalHoldImmutability(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - return removeLegalHoldImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroupLocation(String resourceGroupName, + String locationName) { + final Boolean onlyLatestPerDatabase = null; + final DatabaseState databaseState = null; + return new PagedIterable<>( + listByResourceGroupLocationAsync(resourceGroupName, locationName, onlyLatestPerDatabase, databaseState)); } /** - * Remove legal hold immutability of an existing long term retention backup. + * Lists the long term retention backups for a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner removeLegalHoldImmutability(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { - return removeLegalHoldImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroupLocation(String resourceGroupName, + String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedIterable<>(listByResourceGroupLocationAsync(resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState, context)); } /** - * Remove time based immutability of an existing long term retention backup. + * Lists the long term retention backups for a given server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> removeTimeBasedImmutabilityWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { + private Mono> listByResourceGroupServerSinglePageAsync( + String resourceGroupName, String locationName, String longTermRetentionServerName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState) { 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -2149,44 +2054,47 @@ public Mono>> removeTimeBasedImmutabilityWithResponseA return Mono.error( new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } - if (longTermRetentionDatabaseName == null) { + if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.removeTimeBasedImmutability(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, accept, context)) + .withContext(context -> service.listByResourceGroupServer(this.client.getEndpoint(), resourceGroupName, + locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, + this.client.getSubscriptionId(), 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())); } /** - * Remove time based immutability of an existing long term retention backup. + * Lists the long term retention backups for a given server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> removeTimeBasedImmutabilityWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { + private Mono> listByResourceGroupServerSinglePageAsync( + String resourceGroupName, String locationName, String longTermRetentionServerName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -2195,213 +2103,163 @@ private Mono>> removeTimeBasedImmutabilityWithResponse return Mono.error( new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); } - if (longTermRetentionDatabaseName == null) { + if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.removeTimeBasedImmutability(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName, accept, context); + return service + .listByResourceGroupServer(this.client.getEndpoint(), resourceGroupName, locationName, + longTermRetentionServerName, onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Remove time based immutability of an existing long term retention backup. + * Lists the long term retention backups for a given server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, LongTermRetentionBackupInner> - beginRemoveTimeBasedImmutabilityAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName) { - Mono>> mono = removeTimeBasedImmutabilityWithResponseAsync(locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - this.client.getContext()); - } - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LongTermRetentionBackupInner> - beginRemoveTimeBasedImmutabilityAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = removeTimeBasedImmutabilityWithResponseAsync(locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - context); - } - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginRemoveTimeBasedImmutability(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName) { - return this - .beginRemoveTimeBasedImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName) - .getSyncPoller(); - } - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginRemoveTimeBasedImmutability(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context) { - return this - .beginRemoveTimeBasedImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupServerAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState) { + return new PagedFlux<>( + () -> listByResourceGroupServerSinglePageAsync(resourceGroupName, locationName, longTermRetentionServerName, + onlyLatestPerDatabase, databaseState), + nextLink -> listByResourceGroupServerNextSinglePageAsync(nextLink)); } /** - * Remove time based immutability of an existing long term retention backup. + * Lists the long term retention backups for a given server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup on successful completion of {@link Mono}. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono removeTimeBasedImmutabilityAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - return beginRemoveTimeBasedImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName).last().flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupServerAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName) { + final Boolean onlyLatestPerDatabase = null; + final DatabaseState databaseState = null; + return new PagedFlux<>( + () -> listByResourceGroupServerSinglePageAsync(resourceGroupName, locationName, longTermRetentionServerName, + onlyLatestPerDatabase, databaseState), + nextLink -> listByResourceGroupServerNextSinglePageAsync(nextLink)); } /** - * Remove time based immutability of an existing long term retention backup. + * Lists the long term retention backups for a given server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 long term retention backup on successful completion of {@link Mono}. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono removeTimeBasedImmutabilityAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { - return beginRemoveTimeBasedImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context).last().flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupServerAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupServerSinglePageAsync(resourceGroupName, locationName, longTermRetentionServerName, + onlyLatestPerDatabase, databaseState, context), + nextLink -> listByResourceGroupServerNextSinglePageAsync(nextLink, context)); } /** - * Remove time based immutability of an existing long term retention backup. + * Lists the long term retention backups for a given server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner removeTimeBasedImmutability(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - return removeTimeBasedImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroupServer(String resourceGroupName, + String locationName, String longTermRetentionServerName) { + final Boolean onlyLatestPerDatabase = null; + final DatabaseState databaseState = null; + return new PagedIterable<>(listByResourceGroupServerAsync(resourceGroupName, locationName, + longTermRetentionServerName, onlyLatestPerDatabase, databaseState)); } /** - * Remove time based immutability of an existing long term retention backup. + * Lists the long term retention backups for a given server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner removeTimeBasedImmutability(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { - return removeTimeBasedImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroupServer(String resourceGroupName, + String locationName, String longTermRetentionServerName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState, Context context) { + return new PagedIterable<>(listByResourceGroupServerAsync(resourceGroupName, locationName, + longTermRetentionServerName, onlyLatestPerDatabase, databaseState, context)); } /** - * Set legal hold immutability of an existing long term retention backup. + * Lists all long term retention backups for a database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> setLegalHoldImmutabilityWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { + private Mono> listByResourceGroupDatabaseSinglePageAsync( + String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -2414,40 +2272,49 @@ public Mono>> setLegalHoldImmutabilityWithResponseAsyn return Mono.error(new IllegalArgumentException( "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName 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"; return FluxUtil - .withContext(context -> service.setLegalHoldImmutability(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, accept, context)) + .withContext(context -> service.listByResourceGroupDatabase(this.client.getEndpoint(), resourceGroupName, + locationName, longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, + databaseState, this.client.getSubscriptionId(), 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())); } /** - * Set legal hold immutability of an existing long term retention backup. + * Lists all long term retention backups for a database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> setLegalHoldImmutabilityWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { + private Mono> listByResourceGroupDatabaseSinglePageAsync( + String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, + 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -2460,131 +2327,197 @@ private Mono>> setLegalHoldImmutabilityWithResponseAsy return Mono.error(new IllegalArgumentException( "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName 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.setLegalHoldImmutability(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName, accept, context); + return service + .listByResourceGroupDatabase(this.client.getEndpoint(), resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Set legal hold immutability of an existing long term retention backup. + * Lists all long term retention backups for a database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, LongTermRetentionBackupInner> - beginSetLegalHoldImmutabilityAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName) { - Mono>> mono = setLegalHoldImmutabilityWithResponseAsync(locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + return new PagedFlux<>( + () -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState), + nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink)); } /** - * Set legal hold immutability of an existing long term retention backup. + * Lists all long term retention backups for a database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LongTermRetentionBackupInner> - beginSetLegalHoldImmutabilityAsync(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = setLegalHoldImmutabilityWithResponseAsync(locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName) { + final Boolean onlyLatestPerDatabase = null; + final DatabaseState databaseState = null; + return new PagedFlux<>( + () -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState), + nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink)); } /** - * Set legal hold immutability of an existing long term retention backup. + * Lists all long term retention backups for a database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @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 long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginSetLegalHoldImmutability(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName) { - return this - .beginSetLegalHoldImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedFlux<>(() -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, context), + nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Set legal hold immutability of an existing long term retention backup. + * Lists all long term retention backups for a database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. + * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginSetLegalHoldImmutability(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context) { - return this - .beginSetLegalHoldImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroupDatabase(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName) { + final Boolean onlyLatestPerDatabase = null; + final DatabaseState databaseState = null; + return new PagedIterable<>(listByResourceGroupDatabaseAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState)); } /** - * Set legal hold immutability of an existing long term retention backup. + * Lists all long term retention backups for a database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @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 long term retention backup on successful completion of {@link Mono}. + * @return a list of long term retention backups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setLegalHoldImmutabilityAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - return beginSetLegalHoldImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Set legal hold immutability of an existing long term retention backup. - * + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroupDatabase(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedIterable<>(listByResourceGroupDatabaseAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, context)); + } + + /** + * Gets a long term retention backup. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The location of the database. + * @param longTermRetentionServerName The name of the server. + * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (longTermRetentionServerName == null) { + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); + } + if (longTermRetentionDatabaseName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, + locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a long term retention backup. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2593,18 +2526,50 @@ public Mono setLegalHoldImmutabilityAsync(String l * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup on successful completion of {@link Mono}. + * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono setLegalHoldImmutabilityAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { - return beginSetLegalHoldImmutabilityAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context).last().flatMap(this.client::getLroFinalResultOrError); + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (longTermRetentionServerName == null) { + return Mono.error( + new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); + } + if (longTermRetentionDatabaseName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter longTermRetentionDatabaseName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); } /** - * Set legal hold immutability of an existing long term retention backup. + * Gets a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2612,18 +2577,20 @@ private Mono setLegalHoldImmutabilityAsync(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 long term retention backup. + * @return a long term retention backup on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner setLegalHoldImmutability(String locationName, + public Mono getByResourceGroupAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - return setLegalHoldImmutabilityAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName).block(); + return getByResourceGroupWithResponseAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Set legal hold immutability of an existing long term retention backup. + * Gets a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. @@ -2632,40 +2599,62 @@ public LongTermRetentionBackupInner setLegalHoldImmutability(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 a long term retention backup along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, context).block(); + } + + /** + * Gets a long term retention backup. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The location of the database. + * @param longTermRetentionServerName The name of the server. + * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a long term retention backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner setLegalHoldImmutability(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { - return setLegalHoldImmutabilityAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName, context).block(); + public LongTermRetentionBackupInner getByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { + return getByResourceGroupWithResponse(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, Context.NONE).getValue(); } /** - * Updates an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The requested backup resource 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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - UpdateLongTermRetentionBackupParameters parameters) { + public Mono>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -2681,46 +2670,43 @@ public Mono>> updateWithResponseAsync(String locationN if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, contentType, accept, parameters, context)) + .withContext(context -> service.deleteByResourceGroup(this.client.getEndpoint(), resourceGroupName, + locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The requested backup resource 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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - UpdateLongTermRetentionBackupParameters parameters, Context context) { + private Mono>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -2736,232 +2722,221 @@ private Mono>> updateWithResponseAsync(String location if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, contentType, accept, - parameters, context); + return service.deleteByResourceGroup(this.client.getEndpoint(), resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** - * Updates an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The requested backup resource 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 the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - PollerFlux, LongTermRetentionBackupOperationResultInner> - beginUpdateAsync(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, UpdateLongTermRetentionBackupParameters parameters) { - Mono>> mono = updateWithResponseAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, - LongTermRetentionBackupOperationResultInner.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteByResourceGroupAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName) { + Mono>> mono = deleteByResourceGroupWithResponseAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Updates an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The requested backup resource 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 the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, LongTermRetentionBackupOperationResultInner> - beginUpdateAsync(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context) { + private PollerFlux, Void> beginDeleteByResourceGroupAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, - LongTermRetentionBackupOperationResultInner.class, context); + Mono>> mono = deleteByResourceGroupWithResponseAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Updates an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The requested backup resource 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 the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, LongTermRetentionBackupOperationResultInner> - beginUpdate(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, UpdateLongTermRetentionBackupParameters parameters) { + public SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { return this - .beginUpdateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, - parameters) + .beginDeleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName) .getSyncPoller(); } /** - * Updates an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The requested backup resource 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 the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, LongTermRetentionBackupOperationResultInner> - beginUpdate(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context) { + public SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { return this - .beginUpdateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, - parameters, context) + .beginDeleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, context) .getSyncPoller(); } /** - * Updates an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The requested backup resource 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 LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - UpdateLongTermRetentionBackupParameters parameters) { - return beginUpdateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, - parameters).last().flatMap(this.client::getLroFinalResultOrError); + public Mono deleteByResourceGroupAsync(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { + return beginDeleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The requested backup resource 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 LongTermRetentionBackup operation result resource 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 locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - UpdateLongTermRetentionBackupParameters parameters, Context context) { - return beginUpdateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, - parameters, context).last().flatMap(this.client::getLroFinalResultOrError); + private Mono deleteByResourceGroupAsync(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { + return beginDeleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The requested backup resource 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 LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupOperationResultInner update(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters) { - return updateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, - parameters).block(); + public void deleteByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName) { + deleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName).block(); } /** - * Updates an existing long term retention backup. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param parameters The requested backup resource 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 LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupOperationResultInner update(String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters, - Context context) { - return updateAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, - parameters, context).block(); + public void deleteByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, Context context) { + deleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, context).block(); } /** - * Gets a long term retention backup. + * Copy an existing long term retention backup to a different server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The parameters needed for long term retention copy 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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a LongTermRetentionBackup operation result resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + public Mono>> copyByResourceGroupWithResponseAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName) { + String backupName, CopyLongTermRetentionBackupParameters 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.")); @@ -2980,40 +2955,48 @@ public Mono> getByResourceGroupWithRespon if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName 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.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, accept, context)) + .withContext(context -> service.copyByResourceGroup(this.client.getEndpoint(), resourceGroupName, + locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a long term retention backup. + * Copy an existing long term retention backup to a different server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The parameters needed for long term retention copy 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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. + * @return a LongTermRetentionBackup operation result resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + private Mono>> copyByResourceGroupWithResponseAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context) { + String backupName, CopyLongTermRetentionBackupParameters 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.")); @@ -3032,375 +3015,255 @@ private Mono> getByResourceGroupWithRespo if (backupName == null) { return Mono.error(new IllegalArgumentException("Parameter backupName 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"; context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, accept, context); + return service.copyByResourceGroup(this.client.getEndpoint(), resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** - * Gets a long term retention backup. + * Copy an existing long term retention backup to a different server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The parameters needed for long term retention copy 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 long term retention backup on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + PollerFlux, LongTermRetentionBackupOperationResultInner> + beginCopyByResourceGroupAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters) { + Mono>> mono = copyByResourceGroupWithResponseAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, + LongTermRetentionBackupOperationResultInner.class, this.client.getContext()); } /** - * Gets a long term retention backup. + * Copy an existing long term retention backup to a different server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The parameters needed for long term retention copy 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 long term retention backup along with {@link Response}. + * @return the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, LongTermRetentionBackupOperationResultInner> + beginCopyByResourceGroupAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = copyByResourceGroupWithResponseAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, context); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, + LongTermRetentionBackupOperationResultInner.class, context); } /** - * Gets a long term retention backup. + * Copy an existing long term retention backup to a different server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The parameters needed for long term retention copy 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 long term retention backup. + * @return the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner getByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - return getByResourceGroupWithResponse(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, LongTermRetentionBackupOperationResultInner> + beginCopyByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters) { + return this + .beginCopyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters) + .getSyncPoller(); } /** - * Deletes a long term retention backup. + * Copy an existing long term retention backup to a different server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The parameters needed for long term retention copy 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 Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.deleteByResourceGroup(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, LongTermRetentionBackupOperationResultInner> + beginCopyByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters, + Context context) { + return this + .beginCopyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters, context) + .getSyncPoller(); } /** - * Deletes a long term retention backup. + * Copy an existing long term retention backup to a different server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @param context The context to associate with this operation. + * @param parameters The parameters needed for long term retention copy 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}. + * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, + public Mono copyByResourceGroupAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.deleteByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context); + String backupName, CopyLongTermRetentionBackupParameters parameters) { + return beginCopyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a long term retention backup. + * Copy an existing long term retention backup to a different server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The parameters needed for long term retention copy 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 PollerFlux} for polling of long-running operation. + * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName) { - Mono>> mono = deleteByResourceGroupWithResponseAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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> beginDeleteByResourceGroupAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono copyByResourceGroupAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteByResourceGroupWithResponseAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginDeleteByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - return this - .beginDeleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName) - .getSyncPoller(); - } - - /** - * Deletes a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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> beginDeleteByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { - return this - .beginDeleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context) - .getSyncPoller(); + String backupName, CopyLongTermRetentionBackupParameters parameters, Context context) { + return beginCopyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a long term retention backup. + * Copy an existing long term retention backup to a different server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The parameters needed for long term retention copy 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. + * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - return beginDeleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName).last().flatMap(this.client::getLroFinalResultOrError); + public LongTermRetentionBackupOperationResultInner copyByResourceGroup(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, CopyLongTermRetentionBackupParameters parameters) { + return copyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters).block(); } /** - * Deletes a long term retention backup. + * Copy an existing long term retention backup to a different server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. + * @param parameters The parameters needed for long term retention copy 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, Context context) { - return beginDeleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName) { - deleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName).block(); + public LongTermRetentionBackupOperationResultInner copyByResourceGroup(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, CopyLongTermRetentionBackupParameters parameters, Context context) { + return copyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters, context).block(); } /** - * Deletes a long term retention backup. + * Updates an existing long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. * @param backupName The backup name. - * @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 deleteByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, Context context) { - deleteByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, context).block(); - } - - /** - * Lists all long term retention backups for a database based on a particular resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @param parameters The requested backup resource 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 list of long term retention backups along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a LongTermRetentionBackup operation result resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupDatabaseSinglePageAsync( - String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + public Mono>> updateByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters 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.")); @@ -3416,46 +3279,51 @@ private Mono> listByResourceGroupDat return Mono.error(new IllegalArgumentException( "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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.listByResourceGroupDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.updateByResourceGroup(this.client.getEndpoint(), resourceGroupName, + locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all long term retention backups for a database based on a particular resource group. + * Updates an existing long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @param backupName The backup name. + * @param parameters The requested backup resource 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 list of long term retention backups along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a LongTermRetentionBackup operation result resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupDatabaseSinglePageAsync( - String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, - Context context) { + private Mono>> updateByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters 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.")); @@ -3471,2977 +3339,234 @@ private Mono> listByResourceGroupDat return Mono.error(new IllegalArgumentException( "Parameter longTermRetentionDatabaseName is required and cannot be null.")); } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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"; context = this.client.mergeContext(context); - return service - .listByResourceGroupDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all long term retention backups for a database based on a particular resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState) { - return new PagedFlux<>( - () -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState), - nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink)); + return service.updateByResourceGroup(this.client.getEndpoint(), resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** - * Lists all long term retention backups for a database based on a particular resource group. + * Updates an existing long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. + * @param parameters The requested backup resource 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 list of long term retention backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName) { - final Boolean onlyLatestPerDatabase = null; - final DatabaseState databaseState = null; - return new PagedFlux<>( - () -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState), - nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Lists all long term retention backups for a database based on a particular resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupDatabaseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedFlux<>(() -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, context), - nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all long term retention backups for a database based on a particular resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the 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 a list of long term retention backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupDatabase(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName) { - final Boolean onlyLatestPerDatabase = null; - final DatabaseState databaseState = null; - return new PagedIterable<>(listByResourceGroupDatabaseAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState)); - } - - /** - * Lists all long term retention backups for a database based on a particular resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupDatabase(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedIterable<>(listByResourceGroupDatabaseAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, onlyLatestPerDatabase, databaseState, context)); - } - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> changeAccessTierByResourceGroupWithResponseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, ChangeLongTermRetentionBackupAccessTierParameters 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.changeAccessTierByResourceGroup(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, contentType, accept, parameters, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> changeAccessTierByResourceGroupWithResponseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, ChangeLongTermRetentionBackupAccessTierParameters 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.changeAccessTierByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, contentType, accept, parameters, context); - } - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 a long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, LongTermRetentionBackupInner> - beginChangeAccessTierByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters) { - Mono>> mono = changeAccessTierByResourceGroupWithResponseAsync(resourceGroupName, - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - this.client.getContext()); - } - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 a long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LongTermRetentionBackupInner> - beginChangeAccessTierByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = changeAccessTierByResourceGroupWithResponseAsync(resourceGroupName, - locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - context); - } - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 a long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginChangeAccessTierByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters) { - return this - .beginChangeAccessTierByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters) - .getSyncPoller(); - } - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 a long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginChangeAccessTierByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters, Context context) { - return this - .beginChangeAccessTierByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters, context) - .getSyncPoller(); - } - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono changeAccessTierByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, ChangeLongTermRetentionBackupAccessTierParameters parameters) { - return beginChangeAccessTierByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono changeAccessTierByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, ChangeLongTermRetentionBackupAccessTierParameters parameters, Context context) { - return beginChangeAccessTierByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner changeAccessTierByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters) { - return changeAccessTierByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters).block(); - } - - /** - * Change a long term retention backup access tier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner changeAccessTierByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - ChangeLongTermRetentionBackupAccessTierParameters parameters, Context context) { - return changeAccessTierByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters, context).block(); - } - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> copyByResourceGroupWithResponseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, CopyLongTermRetentionBackupParameters 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.copyByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> copyByResourceGroupWithResponseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, CopyLongTermRetentionBackupParameters 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.copyByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, contentType, accept, parameters, context); - } - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 a LongTermRetentionBackup operation result resource. + * @return the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, LongTermRetentionBackupOperationResultInner> - beginCopyByResourceGroupAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters) { - Mono>> mono = copyByResourceGroupWithResponseAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, - LongTermRetentionBackupOperationResultInner.class, this.client.getContext()); - } - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 PollerFlux} for polling of a LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, LongTermRetentionBackupOperationResultInner> - beginCopyByResourceGroupAsync(String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = copyByResourceGroupWithResponseAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, - LongTermRetentionBackupOperationResultInner.class, context); - } - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 a LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, LongTermRetentionBackupOperationResultInner> - beginCopyByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters) { - return this - .beginCopyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters) - .getSyncPoller(); - } - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 a LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, LongTermRetentionBackupOperationResultInner> - beginCopyByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, CopyLongTermRetentionBackupParameters parameters, - Context context) { - return this - .beginCopyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters, context) - .getSyncPoller(); - } - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono copyByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, CopyLongTermRetentionBackupParameters parameters) { - return beginCopyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono copyByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, CopyLongTermRetentionBackupParameters parameters, Context context) { - return beginCopyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupOperationResultInner copyByResourceGroup(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, CopyLongTermRetentionBackupParameters parameters) { - return copyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters).block(); - } - - /** - * Copy an existing long term retention backup to a different server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The parameters needed for long term retention copy 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 LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupOperationResultInner copyByResourceGroup(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, CopyLongTermRetentionBackupParameters parameters, Context context) { - return copyByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters, context).block(); - } - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> lockTimeBasedImmutabilityByResourceGroupWithResponseAsync( - String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName 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.lockTimeBasedImmutabilityByResourceGroup(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> lockTimeBasedImmutabilityByResourceGroupWithResponseAsync( - String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName 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"; - context = this.client.mergeContext(context); - return service.lockTimeBasedImmutabilityByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, accept, context); - } - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, LongTermRetentionBackupInner> - beginLockTimeBasedImmutabilityByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - Mono>> mono = lockTimeBasedImmutabilityByResourceGroupWithResponseAsync( - resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - this.client.getContext()); - } - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LongTermRetentionBackupInner> - beginLockTimeBasedImmutabilityByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = lockTimeBasedImmutabilityByResourceGroupWithResponseAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - context); - } - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginLockTimeBasedImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - return this - .beginLockTimeBasedImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName) - .getSyncPoller(); - } - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginLockTimeBasedImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - Context context) { - return this - .beginLockTimeBasedImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context) - .getSyncPoller(); - } - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono lockTimeBasedImmutabilityByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName) { - return beginLockTimeBasedImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono lockTimeBasedImmutabilityByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context) { - return beginLockTimeBasedImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner lockTimeBasedImmutabilityByResourceGroup(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName) { - return lockTimeBasedImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName).block(); - } - - /** - * Lock time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner lockTimeBasedImmutabilityByResourceGroup(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context) { - return lockTimeBasedImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context).block(); - } - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> removeLegalHoldImmutabilityByResourceGroupWithResponseAsync( - String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName 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.removeLegalHoldImmutabilityByResourceGroup(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> removeLegalHoldImmutabilityByResourceGroupWithResponseAsync( - String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName 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"; - context = this.client.mergeContext(context); - return service.removeLegalHoldImmutabilityByResourceGroup(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, accept, context); - } - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, LongTermRetentionBackupInner> - beginRemoveLegalHoldImmutabilityByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - Mono>> mono = removeLegalHoldImmutabilityByResourceGroupWithResponseAsync( - resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - this.client.getContext()); - } - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LongTermRetentionBackupInner> - beginRemoveLegalHoldImmutabilityByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = removeLegalHoldImmutabilityByResourceGroupWithResponseAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - context); - } - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginRemoveLegalHoldImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - return this - .beginRemoveLegalHoldImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName) - .getSyncPoller(); - } - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginRemoveLegalHoldImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - Context context) { - return this - .beginRemoveLegalHoldImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context) - .getSyncPoller(); - } - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono removeLegalHoldImmutabilityByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName) { - return beginRemoveLegalHoldImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono removeLegalHoldImmutabilityByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context) { - return beginRemoveLegalHoldImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner removeLegalHoldImmutabilityByResourceGroup(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName) { - return removeLegalHoldImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName).block(); - } - - /** - * Remove legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner removeLegalHoldImmutabilityByResourceGroup(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context) { - return removeLegalHoldImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context).block(); - } - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> removeTimeBasedImmutabilityByResourceGroupWithResponseAsync( - String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName 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.removeTimeBasedImmutabilityByResourceGroup(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> removeTimeBasedImmutabilityByResourceGroupWithResponseAsync( - String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName 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"; - context = this.client.mergeContext(context); - return service.removeTimeBasedImmutabilityByResourceGroup(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, accept, context); - } - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, LongTermRetentionBackupInner> - beginRemoveTimeBasedImmutabilityByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - Mono>> mono = removeTimeBasedImmutabilityByResourceGroupWithResponseAsync( - resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - this.client.getContext()); - } - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LongTermRetentionBackupInner> - beginRemoveTimeBasedImmutabilityByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = removeTimeBasedImmutabilityByResourceGroupWithResponseAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - context); - } - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginRemoveTimeBasedImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - return this - .beginRemoveTimeBasedImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName) - .getSyncPoller(); - } - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginRemoveTimeBasedImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - Context context) { - return this - .beginRemoveTimeBasedImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context) - .getSyncPoller(); - } - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono removeTimeBasedImmutabilityByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName) { - return beginRemoveTimeBasedImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono removeTimeBasedImmutabilityByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context) { - return beginRemoveTimeBasedImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner removeTimeBasedImmutabilityByResourceGroup(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName) { - return removeTimeBasedImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName).block(); - } - - /** - * Remove time based immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner removeTimeBasedImmutabilityByResourceGroup(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context) { - return removeTimeBasedImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context).block(); - } - - /** - * Set legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> setLegalHoldImmutabilityByResourceGroupWithResponseAsync( - String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName 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.setLegalHoldImmutabilityByResourceGroup(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Set legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> setLegalHoldImmutabilityByResourceGroupWithResponseAsync( - String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName 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"; - context = this.client.mergeContext(context); - return service.setLegalHoldImmutabilityByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, accept, context); - } - - /** - * Set legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, LongTermRetentionBackupInner> - beginSetLegalHoldImmutabilityByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - Mono>> mono = setLegalHoldImmutabilityByResourceGroupWithResponseAsync( - resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - this.client.getContext()); - } - - /** - * Set legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LongTermRetentionBackupInner> - beginSetLegalHoldImmutabilityByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = setLegalHoldImmutabilityByResourceGroupWithResponseAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LongTermRetentionBackupInner.class, LongTermRetentionBackupInner.class, - context); - } - - /** - * Set legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginSetLegalHoldImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName) { - return this - .beginSetLegalHoldImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName) - .getSyncPoller(); - } - - /** - * Set legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LongTermRetentionBackupInner> - beginSetLegalHoldImmutabilityByResourceGroup(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - Context context) { - return this - .beginSetLegalHoldImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context) - .getSyncPoller(); - } - - /** - * Set legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setLegalHoldImmutabilityByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName) { - return beginSetLegalHoldImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Set legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono setLegalHoldImmutabilityByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context) { - return beginSetLegalHoldImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Set legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner setLegalHoldImmutabilityByResourceGroup(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName) { - return setLegalHoldImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName).block(); - } - - /** - * Set legal hold immutability of an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @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 long term retention backup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupInner setLegalHoldImmutabilityByResourceGroup(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, Context context) { - return setLegalHoldImmutabilityByResourceGroupAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, context).block(); - } - - /** - * Updates an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The requested backup resource 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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateByResourceGroupWithResponseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, UpdateLongTermRetentionBackupParameters 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.updateByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The requested backup resource 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 LongTermRetentionBackup operation result resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateByResourceGroupWithResponseAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, UpdateLongTermRetentionBackupParameters 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - if (longTermRetentionDatabaseName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter longTermRetentionDatabaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, contentType, accept, parameters, context); - } - - /** - * Updates an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The requested backup resource 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 the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - PollerFlux, LongTermRetentionBackupOperationResultInner> - beginUpdateByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - UpdateLongTermRetentionBackupParameters parameters) { - Mono>> mono = updateByResourceGroupWithResponseAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, - LongTermRetentionBackupOperationResultInner.class, this.client.getContext()); - } - - /** - * Updates an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The requested backup resource 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 the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, LongTermRetentionBackupOperationResultInner> - beginUpdateByResourceGroupAsync(String resourceGroupName, String locationName, - String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, - UpdateLongTermRetentionBackupParameters parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateByResourceGroupWithResponseAsync(resourceGroupName, locationName, - longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, - LongTermRetentionBackupOperationResultInner.class, context); - } - - /** - * Updates an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The requested backup resource 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 the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, LongTermRetentionBackupOperationResultInner> - beginUpdateByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, - UpdateLongTermRetentionBackupParameters parameters) { - return this - .beginUpdateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters) - .getSyncPoller(); - } - - /** - * Updates an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The requested backup resource 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 the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, LongTermRetentionBackupOperationResultInner> - beginUpdateByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, - String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters, - Context context) { - return this - .beginUpdateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters, context) - .getSyncPoller(); - } - - /** - * Updates an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The requested backup resource 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 LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, UpdateLongTermRetentionBackupParameters parameters) { - return beginUpdateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The requested backup resource 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 LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateByResourceGroupAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context) { - return beginUpdateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The requested backup resource 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 LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupOperationResultInner updateByResourceGroup(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, UpdateLongTermRetentionBackupParameters parameters) { - return updateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters).block(); - } - - /** - * Updates an existing long term retention backup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param longTermRetentionDatabaseName The name of the database. - * @param backupName The backup name. - * @param parameters The requested backup resource 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 LongTermRetentionBackup operation result resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LongTermRetentionBackupOperationResultInner updateByResourceGroup(String resourceGroupName, - String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, - String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context) { - return updateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, - longTermRetentionDatabaseName, backupName, parameters, context).block(); - } - - /** - * Lists the long term retention backups for a given location. - * - * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 backups along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String locationName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, onlyLatestPerDatabase, databaseState, 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 long term retention backups for a given location. - * - * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String locationName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - locationName, onlyLatestPerDatabase, databaseState, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the long term retention backups for a given location. - * - * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByLocationAsync(String locationName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); - } - - /** - * Lists the long term retention backups for a given location. - * - * @param locationName The location of the 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 a list of long term retention backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByLocationAsync(String locationName) { - final Boolean onlyLatestPerDatabase = null; - final DatabaseState databaseState = null; - return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); - } - - /** - * Lists the long term retention backups for a given location. - * - * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String locationName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState, context), - nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the long term retention backups for a given location. - * - * @param locationName The location of the 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 a list of long term retention backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String locationName) { - final Boolean onlyLatestPerDatabase = null; - final DatabaseState databaseState = null; - return new PagedIterable<>(listByLocationAsync(locationName, onlyLatestPerDatabase, databaseState)); - } - - /** - * Lists the long term retention backups for a given location. - * - * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String locationName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedIterable<>(listByLocationAsync(locationName, onlyLatestPerDatabase, databaseState, context)); - } - - /** - * Lists the long term retention backups for a given server. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 backups along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String locationName, - String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { - 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 (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName 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(), locationName, longTermRetentionServerName, onlyLatestPerDatabase, - databaseState, 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 long term retention backups for a given server. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String locationName, - String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, - 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the long term retention backups for a given server. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String locationName, - String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(locationName, longTermRetentionServerName, - onlyLatestPerDatabase, databaseState), nextLink -> listByServerNextSinglePageAsync(nextLink)); - } - - /** - * Lists the long term retention backups for a given server. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName 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 backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String locationName, - String longTermRetentionServerName) { - final Boolean onlyLatestPerDatabase = null; - final DatabaseState databaseState = null; - return new PagedFlux<>(() -> listByServerSinglePageAsync(locationName, longTermRetentionServerName, - onlyLatestPerDatabase, databaseState), nextLink -> listByServerNextSinglePageAsync(nextLink)); - } - - /** - * Lists the long term retention backups for a given server. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String locationName, - String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(locationName, longTermRetentionServerName, - onlyLatestPerDatabase, databaseState, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the long term retention backups for a given server. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName 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 backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String locationName, - String longTermRetentionServerName) { - final Boolean onlyLatestPerDatabase = null; - final DatabaseState databaseState = null; - return new PagedIterable<>( - listByServerAsync(locationName, longTermRetentionServerName, onlyLatestPerDatabase, databaseState)); - } - - /** - * Lists the long term retention backups for a given server. - * - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String locationName, - String longTermRetentionServerName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, - Context context) { - return new PagedIterable<>(listByServerAsync(locationName, longTermRetentionServerName, onlyLatestPerDatabase, - databaseState, context)); - } - - /** - * Lists the long term retention backups for a given location based on resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 backups along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupLocationSinglePageAsync( - String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { - 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroupLocation(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, locationName, - onlyLatestPerDatabase, databaseState, 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 long term retention backups for a given location based on resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupLocationSinglePageAsync( - String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, - 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroupLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, onlyLatestPerDatabase, databaseState, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the long term retention backups for a given location based on resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { - return new PagedFlux<>(() -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, - onlyLatestPerDatabase, databaseState), - nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink)); - } - - /** - * Lists the long term retention backups for a given location based on resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the 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 a list of long term retention backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, - String locationName) { - final Boolean onlyLatestPerDatabase = null; - final DatabaseState databaseState = null; - return new PagedFlux<>(() -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, - onlyLatestPerDatabase, databaseState), - nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink)); - } - - /** - * Lists the long term retention backups for a given location based on resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupLocationAsync(String resourceGroupName, - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedFlux<>(() -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, - onlyLatestPerDatabase, databaseState, context), - nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the long term retention backups for a given location based on resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the 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 a list of long term retention backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupLocation(String resourceGroupName, - String locationName) { - final Boolean onlyLatestPerDatabase = null; - final DatabaseState databaseState = null; - return new PagedIterable<>( - listByResourceGroupLocationAsync(resourceGroupName, locationName, onlyLatestPerDatabase, databaseState)); - } - - /** - * Lists the long term retention backups for a given location based on resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @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 backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupLocation(String resourceGroupName, - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedIterable<>(listByResourceGroupLocationAsync(resourceGroupName, locationName, - onlyLatestPerDatabase, databaseState, context)); - } - - /** - * Lists the long term retention backups for a given server based on resource groups. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param longTermRetentionServerName The name of the server. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 backups along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupServerSinglePageAsync( - String resourceGroupName, String locationName, String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState) { - 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroupServer(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, locationName, - longTermRetentionServerName, onlyLatestPerDatabase, databaseState, 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())); + beginUpdateByResourceGroupAsync(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + UpdateLongTermRetentionBackupParameters parameters) { + Mono>> mono = updateByResourceGroupWithResponseAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, + LongTermRetentionBackupOperationResultInner.class, this.client.getContext()); } /** - * Lists the long term retention backups for a given server based on resource groups. + * Updates an existing long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. + * @param parameters The requested backup resource 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 list of long term retention backups along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the {@link PollerFlux} for polling of a LongTermRetentionBackup operation result resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupServerSinglePageAsync( - String resourceGroupName, String locationName, String longTermRetentionServerName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (longTermRetentionServerName == null) { - return Mono.error( - new IllegalArgumentException("Parameter longTermRetentionServerName is required and cannot be null.")); - } - final String accept = "application/json"; + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, LongTermRetentionBackupOperationResultInner> + beginUpdateByResourceGroupAsync(String resourceGroupName, String locationName, + String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, + UpdateLongTermRetentionBackupParameters parameters, Context context) { context = this.client.mergeContext(context); - return service - .listByResourceGroupServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, longTermRetentionServerName, - onlyLatestPerDatabase, databaseState, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Mono>> mono = updateByResourceGroupWithResponseAsync(resourceGroupName, locationName, + longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, context); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), LongTermRetentionBackupOperationResultInner.class, + LongTermRetentionBackupOperationResultInner.class, context); } /** - * Lists the long term retention backups for a given server based on resource groups. + * Updates an existing long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. + * @param parameters The requested backup resource 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 list of long term retention backups as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupServerAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, Boolean onlyLatestPerDatabase, - DatabaseState databaseState) { - return new PagedFlux<>( - () -> listByResourceGroupServerSinglePageAsync(resourceGroupName, locationName, longTermRetentionServerName, - onlyLatestPerDatabase, databaseState), - nextLink -> listByResourceGroupServerNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, LongTermRetentionBackupOperationResultInner> + beginUpdateByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, + UpdateLongTermRetentionBackupParameters parameters) { + return this + .beginUpdateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters) + .getSyncPoller(); } /** - * Lists the long term retention backups for a given server based on resource groups. + * Updates an existing long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. + * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. + * @param parameters The requested backup resource 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 list of long term retention backups as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of a LongTermRetentionBackup operation result resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupServerAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName) { - final Boolean onlyLatestPerDatabase = null; - final DatabaseState databaseState = null; - return new PagedFlux<>( - () -> listByResourceGroupServerSinglePageAsync(resourceGroupName, locationName, longTermRetentionServerName, - onlyLatestPerDatabase, databaseState), - nextLink -> listByResourceGroupServerNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, LongTermRetentionBackupOperationResultInner> + beginUpdateByResourceGroup(String resourceGroupName, String locationName, String longTermRetentionServerName, + String longTermRetentionDatabaseName, String backupName, UpdateLongTermRetentionBackupParameters parameters, + Context context) { + return this + .beginUpdateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters, context) + .getSyncPoller(); } /** - * Lists the long term retention backups for a given server based on resource groups. + * Updates an existing long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. + * @param parameters The requested backup resource 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 LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateByResourceGroupAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters) { + return beginUpdateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing long term retention backup. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The location of the database. + * @param longTermRetentionServerName The name of the server. + * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. + * @param parameters The requested backup resource 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 list of long term retention backups as paginated response with {@link PagedFlux}. + * @return a LongTermRetentionBackup operation result resource on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupServerAsync(String resourceGroupName, - String locationName, String longTermRetentionServerName, Boolean onlyLatestPerDatabase, - DatabaseState databaseState, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupServerSinglePageAsync(resourceGroupName, locationName, longTermRetentionServerName, - onlyLatestPerDatabase, databaseState, context), - nextLink -> listByResourceGroupServerNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateByResourceGroupAsync(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context) { + return beginUpdateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Lists the long term retention backups for a given server based on resource groups. + * Updates an existing long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. + * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. + * @param parameters The requested backup resource 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 list of long term retention backups as paginated response with {@link PagedIterable}. + * @return a LongTermRetentionBackup operation result resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupServer(String resourceGroupName, - String locationName, String longTermRetentionServerName) { - final Boolean onlyLatestPerDatabase = null; - final DatabaseState databaseState = null; - return new PagedIterable<>(listByResourceGroupServerAsync(resourceGroupName, locationName, - longTermRetentionServerName, onlyLatestPerDatabase, databaseState)); + @ServiceMethod(returns = ReturnType.SINGLE) + public LongTermRetentionBackupOperationResultInner updateByResourceGroup(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters) { + return updateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters).block(); } /** - * Lists the long term retention backups for a given server based on resource groups. + * Updates an existing long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param longTermRetentionServerName The name of the server. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @param longTermRetentionDatabaseName The name of the database. + * @param backupName The backup name. + * @param parameters The requested backup resource 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 list of long term retention backups as paginated response with {@link PagedIterable}. + * @return a LongTermRetentionBackup operation result resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupServer(String resourceGroupName, - String locationName, String longTermRetentionServerName, Boolean onlyLatestPerDatabase, - DatabaseState databaseState, Context context) { - return new PagedIterable<>(listByResourceGroupServerAsync(resourceGroupName, locationName, - longTermRetentionServerName, onlyLatestPerDatabase, databaseState, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public LongTermRetentionBackupOperationResultInner updateByResourceGroup(String resourceGroupName, + String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, + String backupName, UpdateLongTermRetentionBackupParameters parameters, Context context) { + return updateByResourceGroupAsync(resourceGroupName, locationName, longTermRetentionServerName, + longTermRetentionDatabaseName, backupName, parameters, context).block(); } /** @@ -6455,7 +3580,7 @@ public PagedIterable listByResourceGroupServer(Str * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { + private Mono> listByLocationNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -6465,7 +3590,7 @@ private Mono> listByDatabaseNextSing } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByLocationNext(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())); @@ -6483,7 +3608,7 @@ private Mono> listByDatabaseNextSing * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + private Mono> listByLocationNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -6494,7 +3619,7 @@ private Mono> listByDatabaseNextSing } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -6510,8 +3635,7 @@ private Mono> listByDatabaseNextSing * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupDatabaseNextSinglePageAsync(String nextLink) { + private Mono> listByServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -6520,8 +3644,8 @@ private Mono> listByDatabaseNextSing new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.listByResourceGroupDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -6539,8 +3663,8 @@ private Mono> listByDatabaseNextSing * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupDatabaseNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByServerNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -6550,7 +3674,7 @@ private Mono> listByDatabaseNextSing } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + return 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)); } @@ -6566,7 +3690,7 @@ private Mono> listByDatabaseNextSing * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(String nextLink) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -6576,7 +3700,7 @@ private Mono> listByLocationNextSing } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByDatabaseNext(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())); @@ -6594,7 +3718,7 @@ private Mono> listByLocationNextSing * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(String nextLink, + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -6605,7 +3729,7 @@ private Mono> listByLocationNextSing } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -6621,7 +3745,8 @@ private Mono> listByLocationNextSing * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync(String nextLink) { + private Mono> + listByResourceGroupLocationNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -6630,8 +3755,8 @@ private Mono> listByServerNextSingle 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)) + return FluxUtil.withContext( + context -> service.listByResourceGroupLocationNext(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())); @@ -6649,8 +3774,8 @@ private Mono> listByServerNextSingle * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync(String nextLink, - Context context) { + private Mono> + listByResourceGroupLocationNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -6660,7 +3785,7 @@ private Mono> listByServerNextSingle } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByResourceGroupLocationNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -6677,7 +3802,7 @@ private Mono> listByServerNextSingle */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByResourceGroupLocationNextSinglePageAsync(String nextLink) { + listByResourceGroupServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -6686,8 +3811,9 @@ private Mono> listByServerNextSingle new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.listByResourceGroupLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil + .withContext( + context -> service.listByResourceGroupServerNext(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())); @@ -6706,7 +3832,7 @@ private Mono> listByServerNextSingle */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByResourceGroupLocationNextSinglePageAsync(String nextLink, Context context) { + listByResourceGroupServerNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -6716,7 +3842,7 @@ private Mono> listByServerNextSingle } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupLocationNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByResourceGroupServerNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -6733,7 +3859,7 @@ private Mono> listByServerNextSingle */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByResourceGroupServerNextSinglePageAsync(String nextLink) { + listByResourceGroupDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -6742,9 +3868,8 @@ private Mono> listByServerNextSingle new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupServerNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil.withContext( + context -> service.listByResourceGroupDatabaseNext(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())); @@ -6763,7 +3888,7 @@ private Mono> listByServerNextSingle */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByResourceGroupServerNextSinglePageAsync(String nextLink, Context context) { + listByResourceGroupDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -6773,7 +3898,7 @@ private Mono> listByServerNextSingle } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupServerNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByResourceGroupDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionManagedInstanceBackupsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionManagedInstanceBackupsClientImpl.java index 64ac3a838a88..ecd0cbd3f946 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionManagedInstanceBackupsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionManagedInstanceBackupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -31,8 +31,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.LongTermRetentionManagedInstanceBackupsClient; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceLongTermRetentionBackupInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedInstanceLongTermRetentionBackupListResult; import com.azure.resourcemanager.sql.models.DatabaseState; +import com.azure.resourcemanager.sql.models.ManagedInstanceLongTermRetentionBackupListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -68,116 +68,114 @@ public final class LongTermRetentionManagedInstanceBackupsClientImpl * The interface defining all the services for SqlManagementClientLongTermRetentionManagedInstanceBackups to be used * by the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientLongTermRetentionManagedInstanceBackups") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientL") public interface LongTermRetentionManagedInstanceBackupsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @PathParam("backupName") String backupName, + Mono> listByLocation( + @HostParam("$host") String endpoint, @PathParam("locationName") String locationName, + @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, + @QueryParam("databaseState") DatabaseState databaseState, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @PathParam("backupName") String backupName, - Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupDatabase( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, + Mono> listByDatabase( + @HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, - @QueryParam("databaseState") DatabaseState databaseState, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("databaseState") DatabaseState databaseState, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("backupName") String backupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("backupName") String backupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, + Mono> listByInstance( + @HostParam("$host") String endpoint, @PathParam("locationName") String locationName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, - @QueryParam("databaseState") DatabaseState databaseState, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("databaseState") DatabaseState databaseState, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, + Mono> listByResourceGroupLocation( + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("locationName") String locationName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, - @QueryParam("databaseState") DatabaseState databaseState, @QueryParam("$skip") Long skip, - @QueryParam("$top") Long top, @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("databaseState") DatabaseState databaseState, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, + Mono> listByResourceGroupDatabase( + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("locationName") String locationName, @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("databaseName") String databaseName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, - @QueryParam("databaseState") DatabaseState databaseState, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("databaseState") DatabaseState databaseState, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupLocation( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("locationName") String locationName, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("databaseName") String databaseName, @PathParam("backupName") String backupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, - @QueryParam("databaseState") DatabaseState databaseState, @QueryParam("$skip") Long skip, - @QueryParam("$top") Long top, @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("databaseName") String databaseName, @PathParam("backupName") String backupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @@ -185,20 +183,20 @@ Mono> listByResourceG @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupInstance( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("locationName") String locationName, @PathParam("managedInstanceName") String managedInstanceName, @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, - @QueryParam("databaseState") DatabaseState databaseState, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("databaseState") DatabaseState databaseState, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByLocationNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -206,31 +204,31 @@ Mono> listByResourceG @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @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> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByInstanceNext( + @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> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByResourceGroupLocationNext( + @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> listByResourceGroupLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByResourceGroupDatabaseNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -238,202 +236,199 @@ Mono> listByResourceG @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a long term retention backup for a managed database. + * Lists the long term retention backups for managed databases in a given location. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup for a managed database along with {@link Response} on successful completion - * of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String locationName, String managedInstanceName, String databaseName, - String backupName) { + private Mono> + listByLocationSinglePageAsync(String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } - if (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName 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"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, managedInstanceName, databaseName, - backupName, accept, context)) + .withContext( + context -> service.listByLocation(this.client.getEndpoint(), locationName, onlyLatestPerDatabase, + databaseState, this.client.getSubscriptionId(), 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())); } /** - * Gets a long term retention backup for a managed database. + * Lists the long term retention backups for managed databases in a given location. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 long term retention backup for a managed database along with {@link Response} on successful completion - * of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String locationName, String managedInstanceName, String databaseName, - String backupName, Context context) { + private Mono> listByLocationSinglePageAsync( + String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } - if (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName 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.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, managedInstanceName, databaseName, - backupName, accept, context); + return service + .listByLocation(this.client.getEndpoint(), locationName, onlyLatestPerDatabase, databaseState, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a long term retention backup for a managed database. + * Lists the long term retention backups for managed databases in a given location. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup for a managed database on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, - String locationName, String managedInstanceName, String databaseName, String backupName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, locationName, managedInstanceName, databaseName, - backupName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByLocationAsync(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** - * Gets a long term retention backup for a managed database. + * Lists the long term retention backups for managed databases in a given location. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 backups for managed database(s) as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByLocationAsync(String locationName) { + final Boolean onlyLatestPerDatabase = null; + final DatabaseState databaseState = null; + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); + } + + /** + * Lists the long term retention backups for managed databases in a given location. + * + * @param locationName The location of the database. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 long term retention backup for a managed database along with {@link Response}. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String locationName, String managedInstanceName, String databaseName, - String backupName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, locationName, managedInstanceName, databaseName, - backupName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedFlux<>( + () -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState, context), + nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); } /** - * Gets a long term retention backup for a managed database. + * Lists the long term retention backups for managed databases in a given location. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup for a managed database. + * @return a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceLongTermRetentionBackupInner getByResourceGroup(String resourceGroupName, String locationName, - String managedInstanceName, String databaseName, String backupName) { - return getByResourceGroupWithResponse(resourceGroupName, locationName, managedInstanceName, databaseName, - backupName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String locationName) { + final Boolean onlyLatestPerDatabase = null; + final DatabaseState databaseState = null; + return new PagedIterable<>(listByLocationAsync(locationName, onlyLatestPerDatabase, databaseState)); } /** - * Deletes a long term retention backup. + * Lists the long term retention backups for managed databases in a given location. + * + * @param locationName The location of the database. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @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 backups for managed database(s) as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String locationName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedIterable<>(listByLocationAsync(locationName, onlyLatestPerDatabase, databaseState, context)); + } + + /** + * Lists all long term retention backups for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, - String locationName, String managedInstanceName, String databaseName, String backupName) { + private Mono> listByDatabaseSinglePageAsync( + String locationName, String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState) { 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } @@ -444,45 +439,44 @@ public Mono>> deleteByResourceGroupWithResponseAsync(S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName 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"; return FluxUtil - .withContext(context -> service.deleteByResourceGroup(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, locationName, - managedInstanceName, databaseName, backupName, context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), locationName, managedInstanceName, + databaseName, onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), + 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())); } /** - * Deletes a long term retention backup. + * Lists all long term retention backups for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, - String locationName, String managedInstanceName, String databaseName, String backupName, Context context) { + private Mono> listByDatabaseSinglePageAsync( + String locationName, String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, + DatabaseState databaseState, 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } @@ -493,110 +487,133 @@ private Mono>> deleteByResourceGroupWithResponseAsync( if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName 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.deleteByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, managedInstanceName, databaseName, - backupName, context); + return service + .listByDatabase(this.client.getEndpoint(), locationName, managedInstanceName, databaseName, + onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Deletes a long term retention backup. + * Lists all long term retention backups for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteByResourceGroupAsync(String resourceGroupName, - String locationName, String managedInstanceName, String databaseName, String backupName) { - Mono>> mono = deleteByResourceGroupWithResponseAsync(resourceGroupName, locationName, - managedInstanceName, databaseName, backupName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String locationName, + String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(locationName, managedInstanceName, databaseName, + onlyLatestPerDatabase, databaseState), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** - * Deletes a long term retention backup. + * Lists all long term retention backups for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. - * @param backupName The backup name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 backups for managed database(s) as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String locationName, + String managedInstanceName, String databaseName) { + final Boolean onlyLatestPerDatabase = null; + final DatabaseState databaseState = null; + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(locationName, managedInstanceName, databaseName, + onlyLatestPerDatabase, databaseState), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * Lists all long term retention backups for a managed database. + * + * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteByResourceGroupAsync(String resourceGroupName, - String locationName, String managedInstanceName, String databaseName, String backupName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteByResourceGroupWithResponseAsync(resourceGroupName, locationName, - managedInstanceName, databaseName, backupName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String locationName, + String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, + Context context) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(locationName, managedInstanceName, databaseName, + onlyLatestPerDatabase, databaseState, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Deletes a long term retention backup. + * Lists all long term retention backups for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, - String managedInstanceName, String databaseName, String backupName) { - return this - .beginDeleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, - backupName) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String locationName, + String managedInstanceName, String databaseName) { + final Boolean onlyLatestPerDatabase = null; + final DatabaseState databaseState = null; + return new PagedIterable<>( + listByDatabaseAsync(locationName, managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState)); } /** - * Deletes a long term retention backup. + * Lists all long term retention backups for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, - String managedInstanceName, String databaseName, String backupName, Context context) { - return this - .beginDeleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, - backupName, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String locationName, + String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, + Context context) { + return new PagedIterable<>(listByDatabaseAsync(locationName, managedInstanceName, databaseName, + onlyLatestPerDatabase, databaseState, context)); } /** - * Deletes a long term retention backup. + * Gets a long term retention backup for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -604,19 +621,44 @@ public SyncPoller, Void> beginDeleteByResourceGroup(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 {@link Mono} that completes when a successful response is received. + * @return a long term retention backup for a managed database along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteByResourceGroupAsync(String resourceGroupName, String locationName, + public Mono> getWithResponseAsync(String locationName, String managedInstanceName, String databaseName, String backupName) { - return beginDeleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, - backupName).last().flatMap(this.client::getLroFinalResultOrError); + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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"; + return FluxUtil + .withContext( + context -> service.get(this.client.getEndpoint(), locationName, managedInstanceName, databaseName, + backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a long term retention backup. + * Gets a long term retention backup for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -625,19 +667,42 @@ public Mono deleteByResourceGroupAsync(String resourceGroupName, String lo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 long term retention backup for a managed database along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteByResourceGroupAsync(String resourceGroupName, String locationName, + private Mono> getWithResponseAsync(String locationName, String managedInstanceName, String databaseName, String backupName, Context context) { - return beginDeleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, - backupName, context).last().flatMap(this.client::getLroFinalResultOrError); + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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.get(this.client.getEndpoint(), locationName, managedInstanceName, databaseName, backupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Deletes a long term retention backup. + * Gets a long term retention backup for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -645,18 +710,18 @@ private Mono deleteByResourceGroupAsync(String resourceGroupName, String l * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a long term retention backup for a managed database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteByResourceGroup(String resourceGroupName, String locationName, String managedInstanceName, + public Mono getAsync(String locationName, String managedInstanceName, String databaseName, String backupName) { - deleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, backupName) - .block(); + return getWithResponseAsync(locationName, managedInstanceName, databaseName, backupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Deletes a long term retention backup. + * Gets a long term retention backup for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. @@ -665,45 +730,51 @@ public void deleteByResourceGroup(String resourceGroupName, 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 a long term retention backup for a managed database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteByResourceGroup(String resourceGroupName, String locationName, String managedInstanceName, - String databaseName, String backupName, Context context) { - deleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, backupName, - context).block(); + public Response getWithResponse(String locationName, + String managedInstanceName, String databaseName, String backupName, Context context) { + return getWithResponseAsync(locationName, managedInstanceName, databaseName, backupName, context).block(); } /** - * Lists all long term retention backups for a managed database. + * Gets a long term retention backup for a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a long term retention backup for a managed database. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupDatabaseSinglePageAsync( - String resourceGroupName, String locationName, String managedInstanceName, String databaseName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + public ManagedInstanceLongTermRetentionBackupInner get(String locationName, String managedInstanceName, + String databaseName, String backupName) { + return getWithResponse(locationName, managedInstanceName, databaseName, backupName, Context.NONE).getValue(); + } + + /** + * Deletes a long term retention backup. + * + * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 locationName, String managedInstanceName, + String databaseName, 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } @@ -714,49 +785,39 @@ private Mono> listByR if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroupDatabase(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, locationName, - managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState, accept, context)) - .>map( - res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)) + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), locationName, managedInstanceName, + databaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all long term retention backups for a managed database. + * Deletes a long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @param backupName The backup name. * @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 ManagedInstanceLongTermRetentionBackup list 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> listByResourceGroupDatabaseSinglePageAsync( - String resourceGroupName, String locationName, String managedInstanceName, String databaseName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + private Mono>> deleteWithResponseAsync(String locationName, String managedInstanceName, + String databaseName, String backupName, 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } @@ -767,139 +828,102 @@ private Mono> listByR if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - final String accept = "application/json"; + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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.")); + } context = this.client.mergeContext(context); - return service - .listByResourceGroupDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, managedInstanceName, databaseName, - onlyLatestPerDatabase, databaseState, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all long term retention backups for a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupDatabaseAsync( - String resourceGroupName, String locationName, String managedInstanceName, String databaseName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState) { - return new PagedFlux<>( - () -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, managedInstanceName, - databaseName, onlyLatestPerDatabase, databaseState), - nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink)); + return service.delete(this.client.getEndpoint(), locationName, managedInstanceName, databaseName, backupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** - * Lists all long term retention backups for a managed database. + * Deletes a long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. + * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupDatabaseAsync( - String resourceGroupName, String locationName, String managedInstanceName, String databaseName) { - final Boolean onlyLatestPerDatabase = null; - final DatabaseState databaseState = null; - return new PagedFlux<>( - () -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, managedInstanceName, - databaseName, onlyLatestPerDatabase, databaseState), - nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String locationName, String managedInstanceName, + String databaseName, String backupName) { + Mono>> mono + = deleteWithResponseAsync(locationName, managedInstanceName, databaseName, backupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Lists all long term retention backups for a managed database. + * Deletes a long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @param backupName The backup name. * @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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupDatabaseAsync( - String resourceGroupName, String locationName, String managedInstanceName, String databaseName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, managedInstanceName, - databaseName, onlyLatestPerDatabase, databaseState, context), - nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String locationName, String managedInstanceName, + String databaseName, String backupName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(locationName, managedInstanceName, databaseName, backupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Lists all long term retention backups for a managed database. + * Deletes a long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. + * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupDatabase( - String resourceGroupName, String locationName, String managedInstanceName, String databaseName) { - final Boolean onlyLatestPerDatabase = null; - final DatabaseState databaseState = null; - return new PagedIterable<>(listByResourceGroupDatabaseAsync(resourceGroupName, locationName, - managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String locationName, String managedInstanceName, + String databaseName, String backupName) { + return this.beginDeleteAsync(locationName, managedInstanceName, databaseName, backupName).getSyncPoller(); } /** - * Lists all long term retention backups for a managed database. + * Deletes a long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the managed database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @param backupName The backup name. * @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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupDatabase( - String resourceGroupName, String locationName, String managedInstanceName, String databaseName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedIterable<>(listByResourceGroupDatabaseAsync(resourceGroupName, locationName, - managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String locationName, String managedInstanceName, + String databaseName, String backupName, Context context) { + return this.beginDeleteAsync(locationName, managedInstanceName, databaseName, backupName, context) + .getSyncPoller(); } /** - * Gets a long term retention backup for a managed database. + * Deletes a long term retention backup. * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. @@ -908,43 +932,17 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup for a managed database along with {@link Response} on successful completion - * of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String locationName, - String managedInstanceName, String databaseName, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName 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(), locationName, managedInstanceName, databaseName, backupName, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public Mono deleteAsync(String locationName, String managedInstanceName, String databaseName, + String backupName) { + return beginDeleteAsync(locationName, managedInstanceName, databaseName, backupName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a long term retention backup for a managed database. + * Deletes a long term retention backup. * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. @@ -954,41 +952,17 @@ public Mono> getWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup for a managed database along with {@link Response} on successful completion - * of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String locationName, - String managedInstanceName, String databaseName, String backupName, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - locationName, managedInstanceName, databaseName, backupName, accept, context); + private Mono deleteAsync(String locationName, String managedInstanceName, String databaseName, + String backupName, Context context) { + return beginDeleteAsync(locationName, managedInstanceName, databaseName, backupName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a long term retention backup for a managed database. + * Deletes a long term retention backup. * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. @@ -997,17 +971,14 @@ private Mono> getWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup for a managed database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String locationName, String managedInstanceName, - String databaseName, String backupName) { - return getWithResponseAsync(locationName, managedInstanceName, databaseName, backupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public void delete(String locationName, String managedInstanceName, String databaseName, String backupName) { + deleteAsync(locationName, managedInstanceName, databaseName, backupName).block(); } /** - * Gets a long term retention backup for a managed database. + * Deletes a long term retention backup. * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. @@ -1017,55 +988,33 @@ public Mono getAsync(String locatio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup for a managed database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String locationName, - String managedInstanceName, String databaseName, String backupName, Context context) { - return getWithResponseAsync(locationName, managedInstanceName, databaseName, backupName, context).block(); - } - - /** - * Gets a long term retention backup for a managed database. - * - * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention backup for a managed database. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceLongTermRetentionBackupInner get(String locationName, String managedInstanceName, - String databaseName, String backupName) { - return getWithResponse(locationName, managedInstanceName, databaseName, backupName, Context.NONE).getValue(); + public void delete(String locationName, String managedInstanceName, String databaseName, String backupName, + Context context) { + deleteAsync(locationName, managedInstanceName, databaseName, backupName, context).block(); } /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given managed instance. * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(String locationName, String managedInstanceName, - String databaseName, String backupName) { + private Mono> listByInstanceSinglePageAsync( + String locationName, String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { 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.")); } @@ -1073,256 +1022,203 @@ public Mono>> deleteWithResponseAsync(String locationN return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName 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"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, managedInstanceName, databaseName, backupName, context)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), locationName, managedInstanceName, + onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), 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())); } /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given managed instance. * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String locationName, String managedInstanceName, - String databaseName, String backupName, Context context) { + private Mono> listByInstanceSinglePageAsync( + String locationName, String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, + 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - locationName, managedInstanceName, databaseName, backupName, context); - } - - /** - * Deletes a long term retention backup. - * - * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 locationName, String managedInstanceName, - String databaseName, String backupName) { - Mono>> mono - = deleteWithResponseAsync(locationName, managedInstanceName, databaseName, backupName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a long term retention backup. - * - * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. - * @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 locationName, String managedInstanceName, - String databaseName, String backupName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(locationName, managedInstanceName, databaseName, backupName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a long term retention backup. - * - * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 locationName, String managedInstanceName, - String databaseName, String backupName) { - return this.beginDeleteAsync(locationName, managedInstanceName, databaseName, backupName).getSyncPoller(); + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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 + .listByInstance(this.client.getEndpoint(), locationName, managedInstanceName, onlyLatestPerDatabase, + databaseState, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given managed instance. * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. - * @param context The context to associate with this operation. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String locationName, String managedInstanceName, - String databaseName, String backupName, Context context) { - return this.beginDeleteAsync(locationName, managedInstanceName, databaseName, backupName, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByInstanceAsync(String locationName, + String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(locationName, managedInstanceName, + onlyLatestPerDatabase, databaseState), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given managed instance. * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String locationName, String managedInstanceName, String databaseName, - String backupName) { - return beginDeleteAsync(locationName, managedInstanceName, databaseName, backupName).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByInstanceAsync(String locationName, + String managedInstanceName) { + final Boolean onlyLatestPerDatabase = null; + final DatabaseState databaseState = null; + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(locationName, managedInstanceName, + onlyLatestPerDatabase, databaseState), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given managed instance. * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 a list of long term retention backups for managed database(s) as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String locationName, String managedInstanceName, String databaseName, - String backupName, Context context) { - return beginDeleteAsync(locationName, managedInstanceName, databaseName, backupName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByInstanceAsync(String locationName, + String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(locationName, managedInstanceName, + onlyLatestPerDatabase, databaseState, context), + nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given managed instance. * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String locationName, String managedInstanceName, String databaseName, String backupName) { - deleteAsync(locationName, managedInstanceName, databaseName, backupName).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String locationName, + String managedInstanceName) { + final Boolean onlyLatestPerDatabase = null; + final DatabaseState databaseState = null; + return new PagedIterable<>( + listByInstanceAsync(locationName, managedInstanceName, onlyLatestPerDatabase, databaseState)); } /** - * Deletes a long term retention backup. + * Lists the long term retention backups for a given managed instance. * * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param backupName The backup name. + * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. + * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 backups for managed database(s) as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String locationName, String managedInstanceName, String databaseName, String backupName, - Context context) { - deleteAsync(locationName, managedInstanceName, databaseName, backupName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String locationName, + String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedIterable<>( + listByInstanceAsync(locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, context)); } /** - * Lists all long term retention backups for a managed database. + * Lists the long term retention backups for managed databases in a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String locationName, String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, - DatabaseState databaseState) { + private Mono> listByResourceGroupLocationSinglePageAsync( + String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } - if (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, managedInstanceName, databaseName, onlyLatestPerDatabase, - databaseState, accept, context)) + .withContext(context -> service.listByResourceGroupLocation(this.client.getEndpoint(), resourceGroupName, + locationName, onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .>map( res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -1330,196 +1226,208 @@ private Mono> listByD } /** - * Lists all long term retention backups for a managed database. + * Lists the long term retention backups for managed databases in a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String locationName, String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, - DatabaseState databaseState, Context context) { + private Mono> listByResourceGroupLocationSinglePageAsync( + String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, + 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } - if (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName 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 - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - locationName, managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState, accept, context) + .listByResourceGroupLocation(this.client.getEndpoint(), resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Lists all long term retention backups for a managed database. + * Lists the long term retention backups for managed databases in a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String locationName, - String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(locationName, managedInstanceName, databaseName, - onlyLatestPerDatabase, databaseState), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + public PagedFlux listByResourceGroupLocationAsync( + String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + return new PagedFlux<>(() -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState), + nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink)); } /** - * Lists all long term retention backups for a managed database. + * Lists the long term retention backups for managed databases in a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed 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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String locationName, - String managedInstanceName, String databaseName) { + public PagedFlux + listByResourceGroupLocationAsync(String resourceGroupName, String locationName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(locationName, managedInstanceName, databaseName, - onlyLatestPerDatabase, databaseState), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, + onlyLatestPerDatabase, databaseState), + nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink)); } /** - * Lists all long term retention backups for a managed database. + * Lists the long term retention backups for managed databases in a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String locationName, - String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, + private PagedFlux listByResourceGroupLocationAsync( + String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(locationName, managedInstanceName, databaseName, + return new PagedFlux<>(() -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, onlyLatestPerDatabase, databaseState, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink, context)); } /** - * Lists all long term retention backups for a managed database. + * Lists the long term retention backups for managed databases in a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed 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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String locationName, - String managedInstanceName, String databaseName) { + public PagedIterable + listByResourceGroupLocation(String resourceGroupName, String locationName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; return new PagedIterable<>( - listByDatabaseAsync(locationName, managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState)); + listByResourceGroupLocationAsync(resourceGroupName, locationName, onlyLatestPerDatabase, databaseState)); } /** - * Lists all long term retention backups for a managed database. + * Lists the long term retention backups for managed databases in a given location. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. * @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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String locationName, - String managedInstanceName, String databaseName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, + public PagedIterable listByResourceGroupLocation( + String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedIterable<>(listByDatabaseAsync(locationName, managedInstanceName, databaseName, + return new PagedIterable<>(listByResourceGroupLocationAsync(resourceGroupName, locationName, onlyLatestPerDatabase, databaseState, context)); } /** - * Lists the long term retention backups for managed databases in a given location. + * Lists all long term retention backups for a managed database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync( - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Long skip, Long top, - String filter) { + private Mono> listByResourceGroupDatabaseSinglePageAsync( + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState) { 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, onlyLatestPerDatabase, databaseState, skip, top, filter, - accept, context)) + .withContext(context -> service.listByResourceGroupDatabase(this.client.getEndpoint(), resourceGroupName, + locationName, managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map( res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -1527,182 +1435,210 @@ private Mono> listByL } /** - * Lists the long term retention backups for managed databases in a given location. + * Lists all long term retention backups for a managed database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @param filter An OData filter expression that filters elements in the collection. * @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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync( - String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Long skip, Long top, - String filter, Context context) { + private Mono> listByResourceGroupDatabaseSinglePageAsync( + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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 - .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - locationName, onlyLatestPerDatabase, databaseState, skip, top, filter, accept, context) + .listByResourceGroupDatabase(this.client.getEndpoint(), resourceGroupName, locationName, + managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Lists the long term retention backups for managed databases in a given location. + * Lists all long term retention backups for a managed database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByLocationAsync(String locationName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState, Long skip, Long top, String filter) { + public PagedFlux listByResourceGroupDatabaseAsync( + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState) { return new PagedFlux<>( - () -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState, skip, top, filter), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); + () -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, managedInstanceName, + databaseName, onlyLatestPerDatabase, databaseState), + nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink)); } /** - * Lists the long term retention backups for managed databases in a given location. + * Lists all long term retention backups for a managed database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed 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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByLocationAsync(String locationName) { + public PagedFlux listByResourceGroupDatabaseAsync( + String resourceGroupName, String locationName, String managedInstanceName, String databaseName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; - final Long skip = null; - final Long top = null; - final String filter = null; return new PagedFlux<>( - () -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState, skip, top, filter), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); + () -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, managedInstanceName, + databaseName, onlyLatestPerDatabase, databaseState), + nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink)); } /** - * Lists the long term retention backups for managed databases in a given location. + * Lists all long term retention backups for a managed database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @param filter An OData filter expression that filters elements in the collection. * @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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String locationName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState, Long skip, Long top, String filter, - Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, onlyLatestPerDatabase, databaseState, - skip, top, filter, context), nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + private PagedFlux listByResourceGroupDatabaseAsync( + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupDatabaseSinglePageAsync(resourceGroupName, locationName, managedInstanceName, + databaseName, onlyLatestPerDatabase, databaseState, context), + nextLink -> listByResourceGroupDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Lists the long term retention backups for managed databases in a given location. + * Lists all long term retention backups for a managed database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed 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 response of a ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String locationName) { + public PagedIterable listByResourceGroupDatabase( + String resourceGroupName, String locationName, String managedInstanceName, String databaseName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; - final Long skip = null; - final Long top = null; - final String filter = null; - return new PagedIterable<>( - listByLocationAsync(locationName, onlyLatestPerDatabase, databaseState, skip, top, filter)); + return new PagedIterable<>(listByResourceGroupDatabaseAsync(resourceGroupName, locationName, + managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState)); } /** - * Lists the long term retention backups for managed databases in a given location. + * Lists all long term retention backups for a managed database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @param filter An OData filter expression that filters elements in the collection. * @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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String locationName, - Boolean onlyLatestPerDatabase, DatabaseState databaseState, Long skip, Long top, String filter, - Context context) { - return new PagedIterable<>( - listByLocationAsync(locationName, onlyLatestPerDatabase, databaseState, skip, top, filter, context)); + public PagedIterable listByResourceGroupDatabase( + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, + Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { + return new PagedIterable<>(listByResourceGroupDatabaseAsync(resourceGroupName, locationName, + managedInstanceName, databaseName, onlyLatestPerDatabase, databaseState, context)); } /** - * Lists the long term retention backups for a given managed instance. + * Gets a long term retention backup for a managed database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @param databaseName The name of the managed database. + * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a long term retention backup for a managed database along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String locationName, String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { + public Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, + 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -1711,42 +1647,51 @@ private Mono> listByI return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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"; return FluxUtil - .withContext(context -> service.listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, managedInstanceName, onlyLatestPerDatabase, - databaseState, accept, context)) - .>map( - res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, + locationName, managedInstanceName, databaseName, backupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists the long term retention backups for a given managed instance. + * Gets a long term retention backup for a managed database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @param databaseName The name of the managed database. + * @param backupName The backup name. * @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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a long term retention backup for a managed database along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync( - String locationName, String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, - Context context) { + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, + String backupName, 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -1755,340 +1700,370 @@ private Mono> listByI return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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 - .listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, locationName, + managedInstanceName, databaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context); } /** - * Lists the long term retention backups for a given managed instance. + * Gets a long term retention backup for a managed database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. + * @param databaseName The name of the managed database. + * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedFlux}. + * @return a long term retention backup for a managed database on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String locationName, - String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(locationName, managedInstanceName, - onlyLatestPerDatabase, databaseState), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, String backupName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, locationName, managedInstanceName, databaseName, + backupName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists the long term retention backups for a given managed instance. + * Gets a long term retention backup for a managed database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. + * @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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedFlux}. + * @return a long term retention backup for a managed database along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String locationName, - String managedInstanceName) { - final Boolean onlyLatestPerDatabase = null; - final DatabaseState databaseState = null; - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(locationName, managedInstanceName, - onlyLatestPerDatabase, databaseState), nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String locationName, String managedInstanceName, String databaseName, + String backupName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, locationName, managedInstanceName, databaseName, + backupName, context).block(); } /** - * Lists the long term retention backups for a given managed instance. + * Gets a long term retention backup for a managed database. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @param context The context to associate with this operation. + * @param databaseName The name of the managed database. + * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedFlux}. + * @return a long term retention backup for a managed database. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync(String locationName, - String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(locationName, managedInstanceName, - onlyLatestPerDatabase, databaseState, context), - nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedInstanceLongTermRetentionBackupInner getByResourceGroup(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName) { + return getByResourceGroupWithResponse(resourceGroupName, locationName, managedInstanceName, databaseName, + backupName, Context.NONE).getValue(); } /** - * Lists the long term retention backups for a given managed instance. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedIterable}. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String locationName, - String managedInstanceName) { - final Boolean onlyLatestPerDatabase = null; - final DatabaseState databaseState = null; - return new PagedIterable<>( - listByInstanceAsync(locationName, managedInstanceName, onlyLatestPerDatabase, databaseState)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, String backupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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.")); + } + return FluxUtil + .withContext(context -> service.deleteByResourceGroup(this.client.getEndpoint(), resourceGroupName, + locationName, managedInstanceName, databaseName, backupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a long term retention backup. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteByResourceGroupWithResponseAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, String backupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName 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.")); + } + context = this.client.mergeContext(context); + return service.deleteByResourceGroup(this.client.getEndpoint(), resourceGroupName, locationName, + managedInstanceName, databaseName, backupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + context); } /** - * Lists the long term retention backups for a given managed instance. + * Deletes a long term retention backup. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @param context The context to associate with this operation. + * @param databaseName The name of the managed database. + * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedIterable}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String locationName, - String managedInstanceName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, Context context) { - return new PagedIterable<>( - listByInstanceAsync(locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteByResourceGroupAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, String backupName) { + Mono>> mono = deleteByResourceGroupWithResponseAsync(resourceGroupName, locationName, + managedInstanceName, databaseName, backupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Lists the long term retention backups for managed databases in a given location. + * Deletes a long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @param filter An OData filter expression that filters elements in the collection. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. + * @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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupLocationSinglePageAsync( - String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, - Long skip, Long top, String filter) { - 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroupLocation(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, locationName, - onlyLatestPerDatabase, databaseState, skip, top, filter, 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) + private PollerFlux, Void> beginDeleteByResourceGroupAsync(String resourceGroupName, + String locationName, String managedInstanceName, String databaseName, String backupName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteByResourceGroupWithResponseAsync(resourceGroupName, locationName, + managedInstanceName, databaseName, backupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Lists the long term retention backups for managed databases in a given location. + * Deletes a long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @param filter An OData filter expression that filters elements in the collection. - * @param context The context to associate with this operation. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupLocationSinglePageAsync( - String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, - Long skip, Long top, String filter, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroupLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, onlyLatestPerDatabase, databaseState, - skip, top, filter, 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, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName) { + return this + .beginDeleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, + backupName) + .getSyncPoller(); } /** - * Lists the long term retention backups for managed databases in a given location. + * Deletes a long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @param filter An OData filter expression that filters elements in the collection. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. + * @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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupLocationAsync( - String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, - Long skip, Long top, String filter) { - return new PagedFlux<>( - () -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, onlyLatestPerDatabase, - databaseState, skip, top, filter), - nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteByResourceGroup(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName, Context context) { + return this + .beginDeleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, + backupName, context) + .getSyncPoller(); } /** - * Lists the long term retention backups for managed databases in a given location. + * Deletes a long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedFlux}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux - listByResourceGroupLocationAsync(String resourceGroupName, String locationName) { - final Boolean onlyLatestPerDatabase = null; - final DatabaseState databaseState = null; - final Long skip = null; - final Long top = null; - final String filter = null; - return new PagedFlux<>( - () -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, onlyLatestPerDatabase, - databaseState, skip, top, filter), - nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteByResourceGroupAsync(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName) { + return beginDeleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, + backupName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Lists the long term retention backups for managed databases in a given location. + * Deletes a long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @param filter An OData filter expression that filters elements in the collection. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. * @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 ManagedInstanceLongTermRetentionBackup list 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 listByResourceGroupLocationAsync( - String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, - Long skip, Long top, String filter, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupLocationSinglePageAsync(resourceGroupName, locationName, onlyLatestPerDatabase, - databaseState, skip, top, filter, context), - nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteByResourceGroupAsync(String resourceGroupName, String locationName, + String managedInstanceName, String databaseName, String backupName, Context context) { + return beginDeleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, + backupName, context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Lists the long term retention backups for managed databases in a given location. + * Deletes a long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable - listByResourceGroupLocation(String resourceGroupName, String locationName) { - final Boolean onlyLatestPerDatabase = null; - final DatabaseState databaseState = null; - final Long skip = null; - final Long top = null; - final String filter = null; - return new PagedIterable<>(listByResourceGroupLocationAsync(resourceGroupName, locationName, - onlyLatestPerDatabase, databaseState, skip, top, filter)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteByResourceGroup(String resourceGroupName, String locationName, String managedInstanceName, + String databaseName, String backupName) { + deleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, backupName) + .block(); } /** - * Lists the long term retention backups for managed databases in a given location. + * Deletes a long term retention backup. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. - * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. - * @param databaseState Whether to query against just live databases, just deleted databases, or all databases. - * @param skip The number of elements in the collection to skip. - * @param top The number of elements to return from the collection. - * @param filter An OData filter expression that filters elements in the collection. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param backupName The backup name. * @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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with - * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroupLocation( - String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, DatabaseState databaseState, - Long skip, Long top, String filter, Context context) { - return new PagedIterable<>(listByResourceGroupLocationAsync(resourceGroupName, locationName, - onlyLatestPerDatabase, databaseState, skip, top, filter, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteByResourceGroup(String resourceGroupName, String locationName, String managedInstanceName, + String databaseName, String backupName, Context context) { + deleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, backupName, + context).block(); } /** * Lists the long term retention backups for a given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -2096,8 +2071,8 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupInstanceSinglePageAsync( @@ -2107,10 +2082,6 @@ private Mono> listByR 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.")); @@ -2122,11 +2093,15 @@ private Mono> listByR return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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"; return FluxUtil - .withContext(context -> service.listByResourceGroupInstance(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, locationName, - managedInstanceName, onlyLatestPerDatabase, databaseState, accept, context)) + .withContext(context -> service.listByResourceGroupInstance(this.client.getEndpoint(), resourceGroupName, + locationName, managedInstanceName, onlyLatestPerDatabase, databaseState, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map( res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -2136,7 +2111,8 @@ private Mono> listByR /** * Lists the long term retention backups for a given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -2145,8 +2121,8 @@ private Mono> listByR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupInstanceSinglePageAsync( @@ -2156,10 +2132,6 @@ private Mono> listByR 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.")); @@ -2171,12 +2143,16 @@ private Mono> listByR return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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 - .listByResourceGroupInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, managedInstanceName, - onlyLatestPerDatabase, databaseState, accept, context) + .listByResourceGroupInstance(this.client.getEndpoint(), resourceGroupName, locationName, + managedInstanceName, onlyLatestPerDatabase, databaseState, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -2184,7 +2160,8 @@ private Mono> listByR /** * Lists the long term retention backups for a given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -2192,7 +2169,7 @@ private Mono> listByR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -2208,13 +2185,14 @@ public PagedFlux listByResourceGrou /** * Lists the long term retention backups for a given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -2231,7 +2209,8 @@ public PagedFlux listByResourceGrou /** * Lists the long term retention backups for a given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -2240,7 +2219,7 @@ public PagedFlux listByResourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -2256,13 +2235,14 @@ private PagedFlux listByResourceGro /** * Lists the long term retention backups for a given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -2277,7 +2257,8 @@ private PagedFlux listByResourceGro /** * Lists the long term retention backups for a given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @param managedInstanceName The name of the managed instance. * @param onlyLatestPerDatabase Whether or not to only get the latest backup for each database. @@ -2286,7 +2267,7 @@ private PagedFlux listByResourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation as paginated response with + * @return a list of long term retention backups for managed database(s) as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -2304,12 +2285,12 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByResourceGroupDatabaseNextSinglePageAsync(String nextLink) { + listByLocationNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2318,8 +2299,8 @@ public PagedIterable listByResource new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.listByResourceGroupDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil + .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -2334,12 +2315,12 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByResourceGroupDatabaseNextSinglePageAsync(String nextLink, Context context) { + listByLocationNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2349,7 +2330,7 @@ public PagedIterable listByResource } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -2361,8 +2342,8 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -2391,8 +2372,8 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -2418,12 +2399,12 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByLocationNextSinglePageAsync(String nextLink) { + listByInstanceNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2433,7 +2414,7 @@ public PagedIterable listByResource } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -2448,12 +2429,12 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByLocationNextSinglePageAsync(String nextLink, Context context) { + listByInstanceNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2463,7 +2444,7 @@ public PagedIterable listByResource } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -2475,12 +2456,12 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByInstanceNextSinglePageAsync(String nextLink) { + listByResourceGroupLocationNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2489,8 +2470,8 @@ public PagedIterable listByResource new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil.withContext( + context -> service.listByResourceGroupLocationNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -2505,12 +2486,12 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByInstanceNextSinglePageAsync(String nextLink, Context context) { + listByResourceGroupLocationNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2520,7 +2501,7 @@ public PagedIterable listByResource } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByResourceGroupLocationNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -2532,12 +2513,12 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByResourceGroupLocationNextSinglePageAsync(String nextLink) { + listByResourceGroupDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2547,7 +2528,7 @@ public PagedIterable listByResource } final String accept = "application/json"; return FluxUtil.withContext( - context -> service.listByResourceGroupLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -2562,12 +2543,12 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listByResourceGroupLocationNextSinglePageAsync(String nextLink, Context context) { + listByResourceGroupDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2577,7 +2558,7 @@ public PagedIterable listByResource } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupLocationNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByResourceGroupDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -2589,8 +2570,8 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -2619,8 +2600,8 @@ public PagedIterable listByResource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ManagedInstanceLongTermRetentionBackup list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of long term retention backups for managed database(s) along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionPoliciesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionPoliciesClientImpl.java index 571f2e0f0003..8c9c2570088c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionPoliciesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -32,7 +32,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.LongTermRetentionPoliciesClient; import com.azure.resourcemanager.sql.fluent.models.LongTermRetentionPolicyInner; -import com.azure.resourcemanager.sql.implementation.models.LongTermRetentionPolicyListResult; +import com.azure.resourcemanager.sql.models.LongTermRetentionPolicyListResult; import com.azure.resourcemanager.sql.models.LongTermRetentionPolicyName; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -67,73 +67,235 @@ public final class LongTermRetentionPoliciesClientImpl implements LongTermRetent * The interface defining all the services for SqlManagementClientLongTermRetentionPolicies to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientLongTermRetentionPolicies") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientL") public interface LongTermRetentionPoliciesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, - @PathParam("policyName") LongTermRetentionPolicyName policyName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("policyName") LongTermRetentionPolicyName policyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") LongTermRetentionPolicyInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, + @PathParam("policyName") LongTermRetentionPolicyName policyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") LongTermRetentionPolicyInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's long term retention policy along with {@link Response} on successful completion of + * @return a database's long term retention policy along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, LongTermRetentionPolicyName policyName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; + return FluxUtil + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a database's long term retention policy along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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 + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); + } + + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + } + + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param policyName The policy name. Should always be Default. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a database's long term retention policy along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, LongTermRetentionPolicyName policyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -147,16 +309,22 @@ public Mono> getWithResponseAsync(String if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, policyName, accept, context)) + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -174,10 +342,6 @@ private Mono> getWithResponseAsync(String 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.")); @@ -191,16 +355,21 @@ private Mono> getWithResponseAsync(String if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, policyName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, policyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -219,7 +388,8 @@ public Mono getAsync(String resourceGroupName, Str /** * Gets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -238,7 +408,8 @@ public Response getWithResponse(String resourceGro /** * Gets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -254,9 +425,10 @@ public LongTermRetentionPolicyInner get(String resourceGroupName, String serverN } /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -273,10 +445,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -290,24 +458,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, policyName, contentType, - accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -326,10 +498,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -343,23 +511,26 @@ private Mono>> createOrUpdateWithResponseAsync(String if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, policyName, contentType, - accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -381,9 +552,10 @@ public PollerFlux, LongTermRetentionPol } /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -407,9 +579,10 @@ private PollerFlux, LongTermRetentionPo } /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -428,9 +601,10 @@ public SyncPoller, LongTermRetentionPol } /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -451,9 +625,10 @@ public SyncPoller, LongTermRetentionPol } /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -471,9 +646,10 @@ public Mono createOrUpdateAsync(String resourceGro } /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -494,9 +670,10 @@ private Mono createOrUpdateAsync(String resourceGr } /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -513,9 +690,10 @@ public LongTermRetentionPolicyInner createOrUpdate(String resourceGroupName, Str } /** - * Set or update a database's long term retention policy. + * Sets a database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -533,164 +711,6 @@ public LongTermRetentionPolicyInner createOrUpdate(String resourceGroupName, Str .block(); } - /** - * Gets a database's long term retention policy. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's long term retention policy along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, 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 a database's long term retention policy. - * - * @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 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 database's long term retention policy along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a database's long term retention policy. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's long term retention policy as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Gets a database's long term retention policy. - * - * @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 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 database's long term retention policy as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a database's long term retention policy. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's long term retention policy as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); - } - - /** - * Gets a database's long term retention policy. - * - * @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 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 database's long term retention policy as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); - } - /** * Get the next page of items. * @@ -698,7 +718,7 @@ public PagedIterable listByDatabase(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 database's long term retention policy along with {@link PagedResponse} on successful completion of + * @return a list of long term retention policies along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -726,7 +746,7 @@ private Mono> listByDatabaseNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a database's long term retention policy along with {@link PagedResponse} on successful completion of + * @return a list of long term retention policies along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowOptionsOperationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowOptionsOperationsClientImpl.java index 18fbab0b9cac..ce6129500605 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowOptionsOperationsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowOptionsOperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -54,27 +54,28 @@ public final class MaintenanceWindowOptionsOperationsClientImpl implements Maint * The interface defining all the services for SqlManagementClientMaintenanceWindowOptionsOperations to be used by * the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientMaintenanceWindowOptionsOperations") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface MaintenanceWindowOptionsOperationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/maintenanceWindowOptions/current") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @QueryParam("maintenanceWindowOptionsName") String maintenanceWindowOptionsName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of available maintenance windows. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -89,10 +90,6 @@ public Mono> getWithResponseAsync(String 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.")); @@ -107,20 +104,25 @@ public Mono> getWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter maintenanceWindowOptionsName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, - maintenanceWindowOptionsName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + maintenanceWindowOptionsName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of available maintenance windows. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -136,10 +138,6 @@ private Mono> getWithResponseAsync(Strin 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.")); @@ -154,18 +152,24 @@ private Mono> getWithResponseAsync(Strin return Mono.error( new IllegalArgumentException("Parameter maintenanceWindowOptionsName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, maintenanceWindowOptionsName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + maintenanceWindowOptionsName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** * Gets a list of available maintenance windows. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -182,9 +186,10 @@ public Mono getAsync(String resourceGroupName, St /** * Gets a list of available maintenance windows. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -202,9 +207,10 @@ public Response getWithResponse(String resourceGr /** * Gets a list of available maintenance windows. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows options for. * @param maintenanceWindowOptionsName Maintenance window options name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowsOperationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowsOperationsClientImpl.java index 6683de3abe97..d6e77ae749cf 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowsOperationsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowsOperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -56,39 +56,39 @@ public final class MaintenanceWindowsOperationsClientImpl implements Maintenance * The interface defining all the services for SqlManagementClientMaintenanceWindowsOperations to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientMaintenanceWindowsOperations") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface MaintenanceWindowsOperationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/maintenanceWindows/current") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, - @QueryParam("maintenanceWindowName") String maintenanceWindowName, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("maintenanceWindowName") String maintenanceWindowName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/maintenanceWindows/current") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @QueryParam("maintenanceWindowName") String maintenanceWindowName, - @HeaderParam("Content-Type") String contentType, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") MaintenanceWindowsInner parameters, Context context); } /** * Gets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -103,10 +103,6 @@ public Mono> getWithResponseAsync(String resou 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.")); @@ -121,20 +117,24 @@ public Mono> getWithResponseAsync(String resou return Mono .error(new IllegalArgumentException("Parameter maintenanceWindowName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, maintenanceWindowName, - accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + maintenanceWindowName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -150,10 +150,6 @@ private Mono> getWithResponseAsync(String reso 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.")); @@ -168,18 +164,23 @@ private Mono> getWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter maintenanceWindowName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, maintenanceWindowName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + maintenanceWindowName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -196,9 +197,10 @@ public Mono getAsync(String resourceGroupName, String s /** * Gets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -216,9 +218,10 @@ public Response getWithResponse(String resourceGroupNam /** * Gets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to get maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -235,9 +238,10 @@ public MaintenanceWindowsInner get(String resourceGroupName, String serverName, /** * Sets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -252,10 +256,6 @@ public Mono> createOrUpdateWithResponseAsync(String resourceGroup 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.")); @@ -270,25 +270,29 @@ public Mono> createOrUpdateWithResponseAsync(String resourceGroup return Mono .error(new IllegalArgumentException("Parameter maintenanceWindowName 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 contentType = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, maintenanceWindowName, - contentType, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, maintenanceWindowName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Sets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @param parameters The parameters parameter. * @param context The context to associate with this operation. @@ -304,10 +308,6 @@ private Mono> createOrUpdateWithResponseAsync(String resourceGrou 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.")); @@ -322,24 +322,27 @@ private Mono> createOrUpdateWithResponseAsync(String resourceGrou return Mono .error(new IllegalArgumentException("Parameter maintenanceWindowName 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 contentType = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, maintenanceWindowName, - contentType, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + maintenanceWindowName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Sets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -357,9 +360,10 @@ public Mono createOrUpdateAsync(String resourceGroupName, String serverNam /** * Sets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @param parameters The parameters parameter. * @param context The context to associate with this operation. @@ -378,9 +382,10 @@ public Response createOrUpdateWithResponse(String resourceGroupName, Strin /** * Sets maintenance windows settings for a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database to set maintenance windows for. * @param maintenanceWindowName Maintenance window name. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedBackupShortTermRetentionPoliciesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedBackupShortTermRetentionPoliciesClientImpl.java index f1ccfaf2811b..d4555fb49ae0 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedBackupShortTermRetentionPoliciesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedBackupShortTermRetentionPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ManagedBackupShortTermRetentionPoliciesClient; import com.azure.resourcemanager.sql.fluent.models.ManagedBackupShortTermRetentionPolicyInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedBackupShortTermRetentionPolicyListResult; +import com.azure.resourcemanager.sql.models.ManagedBackupShortTermRetentionPolicyListResult; import com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -70,69 +70,240 @@ public final class ManagedBackupShortTermRetentionPoliciesClientImpl * The interface defining all the services for SqlManagementClientManagedBackupShortTermRetentionPolicies to be used * by the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedBackupShortTermRetentionPolicies") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedBackupShortTermRetentionPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDatabase( + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("policyName") ManagedShortTermRetentionPolicyName policyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("policyName") ManagedShortTermRetentionPolicyName policyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedBackupShortTermRetentionPolicyInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedBackupShortTermRetentionPolicyInner parameters, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("policyName") ManagedShortTermRetentionPolicyName policyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedBackupShortTermRetentionPolicyInner parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedBackupShortTermRetentionPolicyInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a managed database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a managed database's short term retention policy list along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, String databaseName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; + return FluxUtil + .withContext( + context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a managed database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a managed database's short term retention policy list along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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 + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a managed database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a managed database's short term retention policy list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * Gets a managed database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a managed database's short term retention policy list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a managed database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a managed database's short term retention policy list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); + } + + /** + * Gets a managed database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a managed database's short term retention policy list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, context)); + } + /** * Gets a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -149,10 +320,6 @@ public Mono> getWithRespons 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.")); @@ -167,18 +334,23 @@ public Mono> getWithRespons if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, policyName, - accept, context)) + .withContext( + context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -197,10 +369,6 @@ private Mono> getWithRespon 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.")); @@ -215,16 +383,21 @@ private Mono> getWithRespon if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, policyName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, policyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -243,7 +416,8 @@ public Mono getAsync(String resource /** * Gets a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -263,7 +437,8 @@ public Response getWithResponse(Stri /** * Gets a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. @@ -282,10 +457,11 @@ public ManagedBackupShortTermRetentionPolicyInner get(String resourceGroupName, /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -300,10 +476,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -318,27 +490,31 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, policyName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, policyName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -354,10 +530,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -372,26 +544,29 @@ private Mono>> createOrUpdateWithResponseAsync(String if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, policyName, - contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -414,10 +589,11 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -443,10 +619,11 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -466,10 +643,11 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -492,10 +670,11 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -514,10 +693,11 @@ public Mono createOrUpdateAsync(Stri /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -536,10 +716,11 @@ private Mono createOrUpdateAsync(Str /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -557,10 +738,11 @@ public ManagedBackupShortTermRetentionPolicyInner createOrUpdate(String resource /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -579,10 +761,11 @@ public ManagedBackupShortTermRetentionPolicyInner createOrUpdate(String resource /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -597,10 +780,6 @@ public Mono>> updateWithResponseAsync(String resourceG 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.")); @@ -615,27 +794,31 @@ public Mono>> updateWithResponseAsync(String resourceG if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, policyName, - contentType, accept, parameters, context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -651,10 +834,6 @@ private Mono>> updateWithResponseAsync(String resource 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.")); @@ -669,25 +848,29 @@ private Mono>> updateWithResponseAsync(String resource if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, policyName, contentType, accept, parameters, context); + return service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -710,10 +893,11 @@ private Mono>> updateWithResponseAsync(String resource /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -739,10 +923,11 @@ private Mono>> updateWithResponseAsync(String resource /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -761,10 +946,11 @@ private Mono>> updateWithResponseAsync(String resource /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -786,10 +972,11 @@ private Mono>> updateWithResponseAsync(String resource /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -807,10 +994,11 @@ public Mono updateAsync(String resou /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -830,10 +1018,11 @@ private Mono updateAsync(String reso /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -850,10 +1039,11 @@ public ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupNam /** * Updates a managed database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -869,168 +1059,6 @@ public ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupNam .block(); } - /** - * Gets a managed database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database's short term retention policy list along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, String databaseName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, 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 a managed database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database's short term retention policy list along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a managed database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database's short term retention policy list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Gets a managed database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database's short term retention policy list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a managed database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database's short term retention policy list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); - } - - /** - * Gets a managed database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database's short term retention policy list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, context)); - } - /** * Get the next page of items. * @@ -1038,8 +1066,8 @@ public PagedIterable listByDatabase( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed database's short term retention policy list along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of short term retention policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -1068,8 +1096,8 @@ public PagedIterable listByDatabase( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed database's short term retention policy list along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of short term retention policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseAdvancedThreatProtectionSettingsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseAdvancedThreatProtectionSettingsClientImpl.java deleted file mode 100644 index 4c68d749dfec..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseAdvancedThreatProtectionSettingsClientImpl.java +++ /dev/null @@ -1,666 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.sql.fluent.ManagedDatabaseAdvancedThreatProtectionSettingsClient; -import com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseAdvancedThreatProtectionInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedDatabaseAdvancedThreatProtectionListResult; -import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * ManagedDatabaseAdvancedThreatProtectionSettingsClient. - */ -public final class ManagedDatabaseAdvancedThreatProtectionSettingsClientImpl - implements ManagedDatabaseAdvancedThreatProtectionSettingsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedDatabaseAdvancedThreatProtectionSettingsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of ManagedDatabaseAdvancedThreatProtectionSettingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedDatabaseAdvancedThreatProtectionSettingsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(ManagedDatabaseAdvancedThreatProtectionSettingsService.class, - client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientManagedDatabaseAdvancedThreatProtectionSettings to - * be used by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedDatabaseAdvancedThreatProtectionSettings") - public interface ManagedDatabaseAdvancedThreatProtectionSettingsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedDatabaseAdvancedThreatProtectionInner parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/advancedThreatProtectionSettings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced 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 managed database's Advanced Threat Protection state along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (advancedThreatProtectionName == null) { - return Mono.error( - new IllegalArgumentException("Parameter advancedThreatProtectionName 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, managedInstanceName, databaseName, - advancedThreatProtectionName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced 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 managed database's Advanced Threat Protection state along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (advancedThreatProtectionName == null) { - return Mono.error( - new IllegalArgumentException("Parameter advancedThreatProtectionName 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, managedInstanceName, databaseName, advancedThreatProtectionName, accept, context); - } - - /** - * Gets a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced 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 managed database's Advanced Threat Protection state on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, - String managedInstanceName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, advancedThreatProtectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced 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 managed database's Advanced Threat Protection state along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String managedInstanceName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, - Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, advancedThreatProtectionName, - context).block(); - } - - /** - * Gets a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced 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 managed database's Advanced Threat Protection state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedDatabaseAdvancedThreatProtectionInner get(String resourceGroupName, String managedInstanceName, - String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName) { - return getWithResponse(resourceGroupName, managedInstanceName, databaseName, advancedThreatProtectionName, - Context.NONE).getValue(); - } - - /** - * Creates or updates a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed database Advanced 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 managed database Advanced Threat Protection along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedDatabaseAdvancedThreatProtectionInner 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (advancedThreatProtectionName == null) { - return Mono.error( - new IllegalArgumentException("Parameter advancedThreatProtectionName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - advancedThreatProtectionName, contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed database Advanced 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 managed database Advanced Threat Protection along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedDatabaseAdvancedThreatProtectionInner 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (advancedThreatProtectionName == null) { - return Mono.error( - new IllegalArgumentException("Parameter advancedThreatProtectionName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - advancedThreatProtectionName, contentType, accept, parameters, context); - } - - /** - * Creates or updates a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed database Advanced 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 managed database Advanced Threat Protection on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, - String managedInstanceName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedDatabaseAdvancedThreatProtectionInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, - advancedThreatProtectionName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed database Advanced 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 managed database Advanced Threat Protection along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String managedInstanceName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedDatabaseAdvancedThreatProtectionInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, - advancedThreatProtectionName, parameters, context).block(); - } - - /** - * Creates or updates a managed database's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed database Advanced 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 managed database Advanced Threat Protection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedDatabaseAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, - String managedInstanceName, String databaseName, AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedDatabaseAdvancedThreatProtectionInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, managedInstanceName, databaseName, - advancedThreatProtectionName, parameters, Context.NONE).getValue(); - } - - /** - * Gets a list of managed database's Advanced Threat Protection states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's Advanced Threat Protection states along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, String databaseName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, 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 a list of managed database's Advanced Threat Protection states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's Advanced Threat Protection states along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of managed database's Advanced Threat Protection states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's Advanced Threat Protection states as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of managed database's Advanced Threat Protection states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's Advanced Threat Protection states as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed database's Advanced Threat Protection states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's Advanced Threat Protection states as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); - } - - /** - * Gets a list of managed database's Advanced Threat Protection states. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's Advanced Threat Protection states as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, 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 managed database's Advanced Threat Protection states along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByDatabaseNextSinglePageAsync(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.listByDatabaseNext(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. - * @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 managed database's Advanced Threat Protection states along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByDatabaseNextSinglePageAsync(String nextLink, Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseColumnsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseColumnsClientImpl.java index 4bedbc7e981c..c63c103cc067 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseColumnsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseColumnsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseColumnsClient; import com.azure.resourcemanager.sql.fluent.models.DatabaseColumnInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseColumnListResult; +import com.azure.resourcemanager.sql.models.DatabaseColumnListResult; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -63,90 +63,90 @@ public final class ManagedDatabaseColumnsClientImpl implements ManagedDatabaseCo * The interface defining all the services for SqlManagementClientManagedDatabaseColumns to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedDatabaseColumns") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseColumnsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/columns") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, + @QueryParam(value = "schema", multipleQueryParams = true) List schema, + @QueryParam(value = "table", multipleQueryParams = true) List table, + @QueryParam(value = "column", multipleQueryParams = true) List column, + @QueryParam(value = "orderBy", multipleQueryParams = true) List orderBy, + @QueryParam("$skiptoken") String skiptoken, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByTable(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByTable(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, @PathParam("tableName") String tableName, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/columns") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @QueryParam(value = "schema", multipleQueryParams = true) List schema, - @QueryParam(value = "table", multipleQueryParams = true) List table, - @QueryParam(value = "column", multipleQueryParams = true) List column, - @QueryParam(value = "orderBy", multipleQueryParams = true) List orderBy, - @QueryParam("$skiptoken") String skiptoken, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByTableNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByDatabaseNext( + @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> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByTableNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Get managed database column. + * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. + * @param skiptoken An opaque token that identifies a starting point in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed database column along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, List schema, List table, List column, + List orderBy, String skiptoken) { 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.")); @@ -158,50 +158,58 @@ public Mono> getWithResponseAsync(String resourceG if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (schemaName == null) { - return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); - } - if (tableName == null) { - return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); - } - if (columnName == null) { - return Mono.error(new IllegalArgumentException("Parameter columnName 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"; + List schemaConverted = (schema == null) + ? new ArrayList<>() + : schema.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List tableConverted = (table == null) + ? new ArrayList<>() + : table.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List columnConverted = (column == null) + ? new ArrayList<>() + : column.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, schemaName, - tableName, columnName, accept, context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, schemaConverted, tableConverted, columnConverted, orderByConverted, + skiptoken, this.client.getSubscriptionId(), 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())); } /** - * Get managed database column. + * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. + * @param skiptoken An opaque token that identifies a starting point in the collection. * @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 managed database column along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, - Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, List schema, List table, List column, + List orderBy, String skiptoken, 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.")); @@ -213,89 +221,163 @@ private Mono> getWithResponseAsync(String resource if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (schemaName == null) { - return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); - } - if (tableName == null) { - return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); - } - if (columnName == null) { - return Mono.error(new IllegalArgumentException("Parameter columnName 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"; + List schemaConverted = (schema == null) + ? new ArrayList<>() + : schema.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List tableConverted = (table == null) + ? new ArrayList<>() + : table.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List columnConverted = (column == null) + ? new ArrayList<>() + : column.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); + List orderByConverted = (orderBy == null) + ? new ArrayList<>() + : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, accept, context); + return service + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + schemaConverted, tableConverted, columnConverted, orderByConverted, skiptoken, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Get managed database column. + * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. + * @param skiptoken An opaque token that identifies a starting point in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed database column on successful completion of {@link Mono}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, - columnName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, List schema, List table, List column, List orderBy, + String skiptoken) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + schema, table, column, orderBy, skiptoken), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** - * Get managed database column. + * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 database columns as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName) { + final List schema = null; + final List table = null; + final List column = null; + final List orderBy = null; + final String skiptoken = null; + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + schema, table, column, orderBy, skiptoken), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * List managed database columns. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. + * @param skiptoken An opaque token that identifies a starting point in the collection. * @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 managed database column along with {@link Response}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, - columnName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, List schema, List table, List column, List orderBy, + String skiptoken, Context context) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + schema, table, column, orderBy, skiptoken, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Get managed database column. + * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed database column. + * @return a list of database columns as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseColumnInner get(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName) { - return getWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, - Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName) { + final List schema = null; + final List table = null; + final List column = null; + final List orderBy = null; + final String skiptoken = null; + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, schema, + table, column, orderBy, skiptoken)); + } + + /** + * List managed database columns. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schema The schema parameter. + * @param table The table parameter. + * @param column The column parameter. + * @param orderBy The orderBy parameter. + * @param skiptoken An opaque token that identifies a starting point in the collection. + * @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 database columns as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName, List schema, List table, List column, List orderBy, + String skiptoken, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, schema, + table, column, orderBy, skiptoken, context)); } /** * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -304,8 +386,7 @@ public DatabaseColumnInner get(String resourceGroupName, String managedInstanceN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByTableSinglePageAsync(String resourceGroupName, @@ -314,10 +395,6 @@ private Mono> listByTableSinglePageAsync(Stri 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.")); @@ -335,11 +412,15 @@ private Mono> listByTableSinglePageAsync(Stri if (tableName == null) { return Mono.error(new IllegalArgumentException("Parameter tableName 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"; return FluxUtil - .withContext(context -> service.listByTable(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, schemaName, - tableName, filter, accept, context)) + .withContext(context -> service.listByTable(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, schemaName, tableName, filter, this.client.getSubscriptionId(), + 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())); @@ -348,7 +429,8 @@ private Mono> listByTableSinglePageAsync(Stri /** * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -358,8 +440,7 @@ private Mono> listByTableSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByTableSinglePageAsync(String resourceGroupName, @@ -369,10 +450,6 @@ private Mono> listByTableSinglePageAsync(Stri 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.")); @@ -390,11 +467,15 @@ private Mono> listByTableSinglePageAsync(Stri if (tableName == null) { return Mono.error(new IllegalArgumentException("Parameter tableName 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 - .listByTable(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, filter, accept, context) + .listByTable(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, filter, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -402,7 +483,8 @@ private Mono> listByTableSinglePageAsync(Stri /** * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -411,7 +493,7 @@ private Mono> listByTableSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation as paginated response with {@link PagedFlux}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByTableAsync(String resourceGroupName, String managedInstanceName, @@ -423,7 +505,8 @@ public PagedFlux listByTableAsync(String resourceGroupName, /** * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -431,7 +514,7 @@ public PagedFlux listByTableAsync(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 the response of a DatabaseColumn list operation as paginated response with {@link PagedFlux}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByTableAsync(String resourceGroupName, String managedInstanceName, @@ -444,7 +527,8 @@ public PagedFlux listByTableAsync(String resourceGroupName, /** * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -454,7 +538,7 @@ public PagedFlux listByTableAsync(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 the response of a DatabaseColumn list operation as paginated response with {@link PagedFlux}. + * @return a list of database columns as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByTableAsync(String resourceGroupName, String managedInstanceName, @@ -466,7 +550,8 @@ private PagedFlux listByTableAsync(String resourceGroupName /** * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -474,7 +559,7 @@ private PagedFlux listByTableAsync(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 the response of a DatabaseColumn list operation as paginated response with {@link PagedIterable}. + * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByTable(String resourceGroupName, String managedInstanceName, @@ -487,7 +572,8 @@ public PagedIterable listByTable(String resourceGroupName, /** * List managed database columns. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -497,7 +583,7 @@ public PagedIterable listByTable(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 the response of a DatabaseColumn list operation as paginated response with {@link PagedIterable}. + * @return a list of database columns as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByTable(String resourceGroupName, String managedInstanceName, @@ -507,34 +593,27 @@ public PagedIterable listByTable(String resourceGroupName, } /** - * List managed database columns. + * Get managed database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schema The schema parameter. - * @param table The table parameter. - * @param column The column parameter. - * @param orderBy The orderBy parameter. - * @param skiptoken An opaque token that identifies a starting point in the collection. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return managed database column along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String managedInstanceName, String databaseName, List schema, List table, List column, - List orderBy, String skiptoken) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName) { 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.")); @@ -546,58 +625,51 @@ private Mono> listByDatabaseSinglePageAsync(S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (schemaName == null) { + return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); + } + if (tableName == null) { + return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); + } + if (columnName == null) { + return Mono.error(new IllegalArgumentException("Parameter columnName 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"; - List schemaConverted = (schema == null) - ? new ArrayList<>() - : schema.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List tableConverted = (table == null) - ? new ArrayList<>() - : table.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List columnConverted = (column == null) - ? new ArrayList<>() - : column.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List orderByConverted = (orderBy == null) - ? new ArrayList<>() - : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, schemaConverted, - tableConverted, columnConverted, orderByConverted, skiptoken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, schemaName, tableName, columnName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List managed database columns. + * Get managed database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schema The schema parameter. - * @param table The table parameter. - * @param column The column parameter. - * @param orderBy The orderBy parameter. - * @param skiptoken An opaque token that identifies a starting point in the collection. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @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 DatabaseColumn list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return managed database column along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String managedInstanceName, String databaseName, List schema, List table, List column, - List orderBy, String skiptoken, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, + 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.")); @@ -609,147 +681,90 @@ private Mono> listByDatabaseSinglePageAsync(S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (schemaName == null) { + return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); + } + if (tableName == null) { + return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); + } + if (columnName == null) { + return Mono.error(new IllegalArgumentException("Parameter columnName 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"; - List schemaConverted = (schema == null) - ? new ArrayList<>() - : schema.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List tableConverted = (table == null) - ? new ArrayList<>() - : table.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List columnConverted = (column == null) - ? new ArrayList<>() - : column.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); - List orderByConverted = (orderBy == null) - ? new ArrayList<>() - : orderBy.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, schemaConverted, tableConverted, columnConverted, - orderByConverted, skiptoken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, columnName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * List managed database columns. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param schema The schema parameter. - * @param table The table parameter. - * @param column The column parameter. - * @param orderBy The orderBy parameter. - * @param skiptoken An opaque token that identifies a starting point in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseColumn list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, List schema, List table, List column, List orderBy, - String skiptoken) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, - schema, table, column, orderBy, skiptoken), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * List managed database columns. + * Get managed database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation as paginated response with {@link PagedFlux}. + * @return managed database column on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, - String databaseName) { - final List schema = null; - final List table = null; - final List column = null; - final List orderBy = null; - final String skiptoken = null; - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, - schema, table, column, orderBy, skiptoken), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List managed database columns. + * Get managed database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schema The schema parameter. - * @param table The table parameter. - * @param column The column parameter. - * @param orderBy The orderBy parameter. - * @param skiptoken An opaque token that identifies a starting point in the collection. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @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 DatabaseColumn list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, List schema, List table, List column, List orderBy, - String skiptoken, Context context) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, - schema, table, column, orderBy, skiptoken, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * List managed database columns. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 response of a DatabaseColumn list operation as paginated response with {@link PagedIterable}. + * @return managed database column along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, - String databaseName) { - final List schema = null; - final List table = null; - final List column = null; - final List orderBy = null; - final String skiptoken = null; - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, schema, - table, column, orderBy, skiptoken)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, Context context) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName, context).block(); } /** - * List managed database columns. + * Get managed database column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schema The schema parameter. - * @param table The table parameter. - * @param column The column parameter. - * @param orderBy The orderBy parameter. - * @param skiptoken An opaque token that identifies a starting point in the collection. - * @param context The context to associate with this operation. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation as paginated response with {@link PagedIterable}. + * @return managed database column. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, - String databaseName, List schema, List table, List column, List orderBy, - String skiptoken, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, schema, - table, column, orderBy, skiptoken, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseColumnInner get(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName) { + return getWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, + Context.NONE).getValue(); } /** @@ -759,11 +774,10 @@ public PagedIterable listByDatabase(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 the response of a DatabaseColumn list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByTableNextSinglePageAsync(String nextLink) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -773,7 +787,7 @@ private Mono> listByTableNextSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByTableNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByDatabaseNext(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())); @@ -787,11 +801,11 @@ private Mono> listByTableNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByTableNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByDatabaseNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -801,7 +815,7 @@ private Mono> listByTableNextSinglePageAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByTableNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -813,11 +827,10 @@ private Mono> listByTableNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { + private Mono> listByTableNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -827,7 +840,7 @@ private Mono> listByDatabaseNextSinglePageAsy } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByTableNext(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())); @@ -841,12 +854,10 @@ private Mono> listByDatabaseNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseColumn list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database columns along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync(String nextLink, - Context context) { + private Mono> listByTableNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -856,7 +867,7 @@ private Mono> listByDatabaseNextSinglePageAsy } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByTableNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseMoveOperationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseMoveOperationsClientImpl.java deleted file mode 100644 index 91d8f94902ad..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseMoveOperationsClientImpl.java +++ /dev/null @@ -1,467 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.resourcemanager.sql.fluent.ManagedDatabaseMoveOperationsClient; -import com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseMoveOperationResultInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedDatabaseMoveOperationListResult; -import java.util.UUID; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ManagedDatabaseMoveOperationsClient. - */ -public final class ManagedDatabaseMoveOperationsClientImpl implements ManagedDatabaseMoveOperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedDatabaseMoveOperationsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of ManagedDatabaseMoveOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedDatabaseMoveOperationsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(ManagedDatabaseMoveOperationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientManagedDatabaseMoveOperations to be used by the - * proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedDatabaseMoveOperations") - public interface ManagedDatabaseMoveOperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/managedDatabaseMoveOperationResults/{operationId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @PathParam("operationId") UUID operationId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/managedDatabaseMoveOperationResults") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @QueryParam("onlyLatestPerDatabase") Boolean onlyLatestPerDatabase, @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a managed database move operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @param operationId The ID of the managed database move 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 managed database move operation along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String locationName, UUID operationId) { - 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId 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, locationName, operationId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a managed database move operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @param operationId The ID of the managed database move 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 a managed database move operation along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String locationName, UUID operationId, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId 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, locationName, operationId, accept, context); - } - - /** - * Gets a managed database move operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @param operationId The ID of the managed database move 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 managed database move operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String locationName, - UUID operationId) { - return getWithResponseAsync(resourceGroupName, locationName, operationId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a managed database move operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @param operationId The ID of the managed database move 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 a managed database move operation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String locationName, UUID operationId, Context context) { - return getWithResponseAsync(resourceGroupName, locationName, operationId, context).block(); - } - - /** - * Gets a managed database move operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @param operationId The ID of the managed database move 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 managed database move operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedDatabaseMoveOperationResultInner get(String resourceGroupName, String locationName, - UUID operationId) { - return getWithResponse(resourceGroupName, locationName, operationId, Context.NONE).getValue(); - } - - /** - * Lists managed database move operations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @param onlyLatestPerDatabase Whether or not to only get the latest operation for each database. Has higher - * priority than $filter. - * @param filter An OData filter expression that filters elements in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 managed database move operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync( - String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, String filter) { - 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, onlyLatestPerDatabase, filter, 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 managed database move operations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @param onlyLatestPerDatabase Whether or not to only get the latest operation for each database. Has higher - * priority than $filter. - * @param filter An OData filter expression that filters elements in the collection. - * @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 managed database move operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync( - String resourceGroupName, String locationName, Boolean onlyLatestPerDatabase, String filter, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, locationName, onlyLatestPerDatabase, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists managed database move operations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @param onlyLatestPerDatabase Whether or not to only get the latest operation for each database. Has higher - * priority than $filter. - * @param filter An OData filter expression that filters elements in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 managed database move operations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByLocationAsync(String resourceGroupName, - String locationName, Boolean onlyLatestPerDatabase, String filter) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(resourceGroupName, locationName, onlyLatestPerDatabase, filter), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); - } - - /** - * Lists managed database move operations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 managed database move operations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByLocationAsync(String resourceGroupName, - String locationName) { - final Boolean onlyLatestPerDatabase = null; - final String filter = null; - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(resourceGroupName, locationName, onlyLatestPerDatabase, filter), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); - } - - /** - * Lists managed database move operations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @param onlyLatestPerDatabase Whether or not to only get the latest operation for each database. Has higher - * priority than $filter. - * @param filter An OData filter expression that filters elements in the collection. - * @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 managed database move operations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String resourceGroupName, - String locationName, Boolean onlyLatestPerDatabase, String filter, Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(resourceGroupName, locationName, - onlyLatestPerDatabase, filter, context), nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists managed database move operations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 managed database move operations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String resourceGroupName, - String locationName) { - final Boolean onlyLatestPerDatabase = null; - final String filter = null; - return new PagedIterable<>(listByLocationAsync(resourceGroupName, locationName, onlyLatestPerDatabase, filter)); - } - - /** - * Lists managed database move operations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @param onlyLatestPerDatabase Whether or not to only get the latest operation for each database. Has higher - * priority than $filter. - * @param filter An OData filter expression that filters elements in the collection. - * @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 managed database move operations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String resourceGroupName, - String locationName, Boolean onlyLatestPerDatabase, String filter, Context context) { - return new PagedIterable<>( - listByLocationAsync(resourceGroupName, locationName, onlyLatestPerDatabase, filter, 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 managed database move operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByLocationNextSinglePageAsync(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.listByLocationNext(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. - * @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 managed database move operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByLocationNextSinglePageAsync(String nextLink, Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseQueriesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseQueriesClientImpl.java index ec1a9e106cdd..9eda99917fd6 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseQueriesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseQueriesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -28,7 +28,7 @@ import com.azure.resourcemanager.sql.fluent.ManagedDatabaseQueriesClient; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceQueryInner; import com.azure.resourcemanager.sql.fluent.models.QueryStatisticsInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedInstanceQueryStatistics; +import com.azure.resourcemanager.sql.models.ManagedInstanceQueryStatistics; import com.azure.resourcemanager.sql.models.QueryTimeGrainType; import reactor.core.publisher.Mono; @@ -61,45 +61,46 @@ public final class ManagedDatabaseQueriesClientImpl implements ManagedDatabaseQu * The interface defining all the services for SqlManagementClientManagedDatabaseQueries to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedDatabaseQueries") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseQueriesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/queries/{queryId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("queryId") String queryId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/queries/{queryId}/statistics") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByQuery(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByQuery(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("queryId") String queryId, @QueryParam("startTime") String startTime, @QueryParam("endTime") String endTime, - @QueryParam("interval") QueryTimeGrainType interval, @HeaderParam("Accept") String accept, Context context); + @QueryParam("interval") QueryTimeGrainType interval, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByQueryNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Get query by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -115,10 +116,6 @@ public Mono> getWithResponseAsync(String res 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.")); @@ -133,18 +130,22 @@ public Mono> getWithResponseAsync(String res if (queryId == null) { return Mono.error(new IllegalArgumentException("Parameter queryId 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, queryId, accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, queryId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get query by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -161,10 +162,6 @@ private Mono> getWithResponseAsync(String re 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.")); @@ -179,16 +176,21 @@ private Mono> getWithResponseAsync(String re if (queryId == null) { return Mono.error(new IllegalArgumentException("Parameter queryId 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, queryId, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, queryId, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Get query by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -207,7 +209,8 @@ public Mono getAsync(String resourceGroupName, String /** * Get query by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -226,7 +229,8 @@ public Response getWithResponse(String resourceGroupN /** * Get query by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -244,7 +248,8 @@ public ManagedInstanceQueryInner get(String resourceGroupName, String managedIns /** * Get query execution statistics by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -265,10 +270,6 @@ private Mono> listByQuerySinglePageAsync(Str 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.")); @@ -283,11 +284,15 @@ private Mono> listByQuerySinglePageAsync(Str if (queryId == null) { return Mono.error(new IllegalArgumentException("Parameter queryId 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"; return FluxUtil - .withContext(context -> service.listByQuery(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, queryId, - startTime, endTime, interval, accept, context)) + .withContext(context -> service.listByQuery(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, queryId, startTime, endTime, interval, + this.client.getSubscriptionId(), 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())); @@ -296,7 +301,8 @@ private Mono> listByQuerySinglePageAsync(Str /** * Get query execution statistics by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -318,10 +324,6 @@ private Mono> listByQuerySinglePageAsync(Str 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.")); @@ -336,11 +338,15 @@ private Mono> listByQuerySinglePageAsync(Str if (queryId == null) { return Mono.error(new IllegalArgumentException("Parameter queryId 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 - .listByQuery(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, queryId, startTime, endTime, interval, accept, + .listByQuery(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, queryId, + startTime, endTime, interval, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); @@ -349,7 +355,8 @@ private Mono> listByQuerySinglePageAsync(Str /** * Get query execution statistics by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -371,7 +378,8 @@ public PagedFlux listByQueryAsync(String resourceGroupName /** * Get query execution statistics by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -393,7 +401,8 @@ public PagedFlux listByQueryAsync(String resourceGroupName /** * Get query execution statistics by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -418,7 +427,8 @@ private PagedFlux listByQueryAsync(String resourceGroupNam /** * Get query execution statistics by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -440,7 +450,8 @@ public PagedIterable listByQuery(String resourceGroupName, /** * Get query execution statistics by query id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param queryId The queryId parameter. @@ -468,8 +479,8 @@ public PagedIterable listByQuery(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 query execution statistics by query id along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return execution statistics for one particular query along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByQueryNextSinglePageAsync(String nextLink) { @@ -496,8 +507,8 @@ private Mono> listByQueryNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return query execution statistics by query id along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return execution statistics for one particular query along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByQueryNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRecommendedSensitivityLabelsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRecommendedSensitivityLabelsClientImpl.java index 4a1679fc473c..066544d6f34d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRecommendedSensitivityLabelsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRecommendedSensitivityLabelsClientImpl.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -57,25 +56,26 @@ public final class ManagedDatabaseRecommendedSensitivityLabelsClientImpl * The interface defining all the services for SqlManagementClientManagedDatabaseRecommendedSensitivityLabels to be * used by the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedDatabaseRecommendedSensitivityLabels") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseRecommendedSensitivityLabelsService { - @Headers({ "Accept: application/json;q=0.9" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") RecommendedSensitivityLabelUpdateList parameters, Context context); } /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -91,10 +91,6 @@ public Mono> updateWithResponseAsync(String resourceGroupName, St 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.")); @@ -106,23 +102,26 @@ public Mono> updateWithResponseAsync(String resourceGroupName, St if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, contentType, - parameters, context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -139,10 +138,6 @@ private Mono> updateWithResponseAsync(String resourceGroupName, S 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.")); @@ -154,21 +149,25 @@ private Mono> updateWithResponseAsync(String resourceGroupName, S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, contentType, parameters, context); + return service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -187,7 +186,8 @@ public Mono updateAsync(String resourceGroupName, String managedInstanceNa /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -207,7 +207,8 @@ public Response updateWithResponse(String resourceGroupName, String manage /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The parameters parameter. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRestoreDetailsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRestoreDetailsClientImpl.java index 292c92ea3978..5d19b2c8a329 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRestoreDetailsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRestoreDetailsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -55,26 +55,27 @@ public final class ManagedDatabaseRestoreDetailsClientImpl implements ManagedDat * The interface defining all the services for SqlManagementClientManagedDatabaseRestoreDetails to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedDatabaseRestoreDetails") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseRestoreDetailsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/restoreDetails/{restoreDetailsName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("restoreDetailsName") RestoreDetailsName restoreDetailsName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** * Gets managed database restore details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. @@ -90,10 +91,6 @@ public Mono> getWithResponseA 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.")); @@ -109,18 +106,23 @@ public Mono> getWithResponseA return Mono .error(new IllegalArgumentException("Parameter restoreDetailsName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - restoreDetailsName, accept, context)) + .withContext( + context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + restoreDetailsName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets managed database restore details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. @@ -137,10 +139,6 @@ private Mono> getWithResponse 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.")); @@ -156,16 +154,21 @@ private Mono> getWithResponse return Mono .error(new IllegalArgumentException("Parameter restoreDetailsName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, restoreDetailsName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + restoreDetailsName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets managed database restore details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. @@ -184,7 +187,8 @@ public Mono getAsync(String resourceGr /** * Gets managed database restore details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. @@ -204,7 +208,8 @@ public Response getWithResponse(String /** * Gets managed database restore details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param restoreDetailsName The name of the restore details to retrieve. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSchemasClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSchemasClientImpl.java index 2179229bc333..caeee822e09f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSchemasClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSchemasClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseSchemasClient; import com.azure.resourcemanager.sql.fluent.models.DatabaseSchemaInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseSchemaListResult; +import com.azure.resourcemanager.sql.models.DatabaseSchemaListResult; import reactor.core.publisher.Mono; /** @@ -59,29 +59,29 @@ public final class ManagedDatabaseSchemasClientImpl implements ManagedDatabaseSc * The interface defining all the services for SqlManagementClientManagedDatabaseSchemas to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedDatabaseSchemas") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseSchemasService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("databaseName") String databaseName, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @QueryParam("$filter") String filter, + @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -89,33 +89,30 @@ Mono> listByDatabase(@HostParam("endpoint") S @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Get managed database schema. + * List managed database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed database schema along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database schemas along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String schemaName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String filter) { 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.")); @@ -127,41 +124,41 @@ public Mono> getWithResponseAsync(String resourceG if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (schemaName == null) { - return Mono.error(new IllegalArgumentException("Parameter schemaName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, schemaName, + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, filter, this.client.getSubscriptionId(), 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())); } /** - * Get managed database schema. + * List managed database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. + * @param filter An OData filter expression that filters elements in the collection. * @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 managed database schema along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database schemas along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String schemaName, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String filter, 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.")); @@ -173,96 +170,143 @@ private Mono> getWithResponseAsync(String resource if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (schemaName == null) { - return Mono.error(new IllegalArgumentException("Parameter schemaName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, schemaName, accept, context); + return service + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, filter, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Get managed database schema. + * List managed database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed database schema on successful completion of {@link Mono}. + * @return a list of database schemas as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String filter) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, filter), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** - * Get managed database schema. + * List managed database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 database schemas as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName) { + final String filter = null; + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, filter), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * List managed database schemas. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param filter An OData filter expression that filters elements in the collection. * @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 managed database schema along with {@link Response}. + * @return a list of database schemas as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String filter, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, filter, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Get managed database schema. + * List managed database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed database schema. + * @return a list of database schemas as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseSchemaInner get(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName) { - return getWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName) { + final String filter = null; + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, filter)); } /** * List managed database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. + * @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 database schemas as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, + String databaseName, String filter, Context context) { + return new PagedIterable<>( + listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, filter, context)); + } + + /** + * Get managed database schema. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseSchema list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return managed database schema along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String filter) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName) { 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.")); @@ -274,41 +318,42 @@ private Mono> listByDatabaseSinglePageAsync(S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (schemaName == null) { + return Mono.error(new IllegalArgumentException("Parameter schemaName 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"; return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, filter, accept, - context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext( + context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + schemaName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List managed database schemas. + * Get managed database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param filter An OData filter expression that filters elements in the collection. + * @param schemaName The name of the schema. * @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 DatabaseSchema list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return managed database schema along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String filter, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, 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.")); @@ -320,112 +365,77 @@ private Mono> listByDatabaseSinglePageAsync(S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (schemaName == null) { + return Mono.error(new IllegalArgumentException("Parameter schemaName 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 - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List managed database schemas. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param filter An OData filter expression that filters elements in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseSchema list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String filter) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, filter), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, schemaName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * List managed database schemas. + * Get managed database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param schemaName The name of the schema. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseSchema list operation as paginated response with {@link PagedFlux}. + * @return managed database schema on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, - String databaseName) { - final String filter = null; - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, filter), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List managed database schemas. + * Get managed database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param filter An OData filter expression that filters elements in the collection. + * @param schemaName The name of the schema. * @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 DatabaseSchema list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String filter, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, filter, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * List managed database schemas. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 response of a DatabaseSchema list operation as paginated response with {@link PagedIterable}. + * @return managed database schema along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, - String databaseName) { - final String filter = null; - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, filter)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, Context context) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, context).block(); } /** - * List managed database schemas. + * Get managed database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param filter An OData filter expression that filters elements in the collection. - * @param context The context to associate with this operation. + * @param schemaName The name of the schema. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseSchema list operation as paginated response with {@link PagedIterable}. + * @return managed database schema. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String managedInstanceName, - String databaseName, String filter, Context context) { - return new PagedIterable<>( - listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, filter, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseSchemaInner get(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName) { + return getWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, Context.NONE) + .getValue(); } /** @@ -435,8 +445,7 @@ public PagedIterable listByDatabase(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 the response of a DatabaseSchema list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database schemas along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -463,8 +472,7 @@ private Mono> listByDatabaseNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseSchema list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database schemas along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityAlertPoliciesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityAlertPoliciesClientImpl.java index f4ee2c4925aa..91d48dbd208e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityAlertPoliciesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityAlertPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -29,7 +29,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseSecurityAlertPoliciesClient; import com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseSecurityAlertPolicyInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedDatabaseSecurityAlertPolicyListResult; +import com.azure.resourcemanager.sql.models.ManagedDatabaseSecurityAlertPolicyListResult; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; import reactor.core.publisher.Mono; @@ -64,59 +64,229 @@ public final class ManagedDatabaseSecurityAlertPoliciesClientImpl * The interface defining all the services for SqlManagementClientManagedDatabaseSecurityAlertPolicies to be used by * the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedDatabaseSecurityAlertPolicies") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseSecurityAlertPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("securityAlertPolicyName") SecurityAlertPolicyName securityAlertPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("securityAlertPolicyName") SecurityAlertPolicyName securityAlertPolicyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedDatabaseSecurityAlertPolicyInner parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedDatabaseSecurityAlertPolicyInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of managed database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policies are defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed database's security alert policies along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, String databaseName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; + return FluxUtil + .withContext( + context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of managed database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policies are defined. + * @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 managed database's security alert policies along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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 + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of managed database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policies are defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed database's security alert policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of managed database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policies are defined. + * @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 managed database's security alert policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of managed database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policies are defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed database's security alert policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); + } + + /** + * Gets a list of managed database's security alert policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the security alert policies are defined. + * @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 managed database's security alert policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, context)); + } + /** * Gets a managed database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -131,10 +301,6 @@ public Mono> getWithResponseAs 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.")); @@ -150,20 +316,25 @@ public Mono> getWithResponseAs return Mono.error( new IllegalArgumentException("Parameter securityAlertPolicyName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - securityAlertPolicyName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -180,10 +351,6 @@ private Mono> getWithResponseA 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.")); @@ -199,18 +366,23 @@ private Mono> getWithResponseA return Mono.error( new IllegalArgumentException("Parameter securityAlertPolicyName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, securityAlertPolicyName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a managed database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -227,9 +399,10 @@ public Mono getAsync(String resourceGro /** * Gets a managed database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -248,9 +421,10 @@ public Response getWithResponse(String /** * Gets a managed database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -267,9 +441,10 @@ public ManagedDatabaseSecurityAlertPolicyInner get(String resourceGroupName, Str /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -286,10 +461,6 @@ public Mono> createOrUpdateWit 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.")); @@ -305,26 +476,30 @@ public Mono> createOrUpdateWit return Mono.error( new IllegalArgumentException("Parameter securityAlertPolicyName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - securityAlertPolicyName, contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, securityAlertPolicyName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @param context The context to associate with this operation. @@ -343,10 +518,6 @@ private Mono> createOrUpdateWi 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.")); @@ -362,25 +533,29 @@ private Mono> createOrUpdateWi return Mono.error( new IllegalArgumentException("Parameter securityAlertPolicyName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - securityAlertPolicyName, contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -399,9 +574,10 @@ public Mono createOrUpdateAsync(String /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @param context The context to associate with this operation. @@ -421,9 +597,10 @@ public Response createOrUpdateWithRespo /** * Creates or updates a database's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The database security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -439,168 +616,6 @@ public ManagedDatabaseSecurityAlertPolicyInner createOrUpdate(String resourceGro parameters, Context.NONE).getValue(); } - /** - * Gets a list of managed database's security alert policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's security alert policies along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, String databaseName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, 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 a list of managed database's security alert policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's security alert policies along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of managed database's security alert policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's security alert policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of managed database's security alert policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's security alert policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed database's security alert policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's security alert policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); - } - - /** - * Gets a list of managed database's security alert policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's security alert policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, context)); - } - /** * Get the next page of items. * @@ -608,7 +623,7 @@ public PagedIterable listByDatabase(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 list of managed database's security alert policies along with {@link PagedResponse} on successful + * @return a list of the managed database's security alert policies along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -638,7 +653,7 @@ public PagedIterable listByDatabase(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 list of managed database's security alert policies along with {@link PagedResponse} on successful + * @return a list of the managed database's security alert policies along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityEventsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityEventsClientImpl.java index f9fb05436432..6e530d2d63f1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityEventsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityEventsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseSecurityEventsClient; import com.azure.resourcemanager.sql.fluent.models.SecurityEventInner; -import com.azure.resourcemanager.sql.implementation.models.SecurityEventCollection; +import com.azure.resourcemanager.sql.models.SecurityEventCollection; import reactor.core.publisher.Mono; /** @@ -59,19 +59,19 @@ public final class ManagedDatabaseSecurityEventsClientImpl implements ManagedDat * The interface defining all the services for SqlManagementClientManagedDatabaseSecurityEvents to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedDatabaseSecurityEvents") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseSecurityEventsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityEvents") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @QueryParam("$filter") String filter, @QueryParam("$skip") Long skip, @QueryParam("$top") Long top, @QueryParam("$skiptoken") String skiptoken, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -79,16 +79,17 @@ Mono> listByDatabase(@HostParam("endpoint") St @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of security events. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security events are retrieved. * @param filter An OData filter expression that filters elements in the collection. * @param skip The number of elements in the collection to skip. * @param top The number of elements to return from the collection. @@ -105,10 +106,6 @@ private Mono> listByDatabaseSinglePageAsync(St 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.")); @@ -120,11 +117,15 @@ private Mono> listByDatabaseSinglePageAsync(St if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, filter, skip, - top, skiptoken, accept, context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, filter, skip, top, skiptoken, this.client.getSubscriptionId(), + 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())); @@ -133,9 +134,10 @@ private Mono> listByDatabaseSinglePageAsync(St /** * Gets a list of security events. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security events are retrieved. * @param filter An OData filter expression that filters elements in the collection. * @param skip The number of elements in the collection to skip. * @param top The number of elements to return from the collection. @@ -154,10 +156,6 @@ private Mono> listByDatabaseSinglePageAsync(St 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.")); @@ -169,11 +167,15 @@ private Mono> listByDatabaseSinglePageAsync(St if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, filter, skip, top, skiptoken, accept, context) + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, filter, + skip, top, skiptoken, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -181,9 +183,10 @@ private Mono> listByDatabaseSinglePageAsync(St /** * Gets a list of security events. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security events are retrieved. * @param filter An OData filter expression that filters elements in the collection. * @param skip The number of elements in the collection to skip. * @param top The number of elements to return from the collection. @@ -203,9 +206,10 @@ public PagedFlux listByDatabaseAsync(String resourceGroupNam /** * Gets a list of security events. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security events are retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -225,9 +229,10 @@ public PagedFlux listByDatabaseAsync(String resourceGroupNam /** * Gets a list of security events. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security events are retrieved. * @param filter An OData filter expression that filters elements in the collection. * @param skip The number of elements in the collection to skip. * @param top The number of elements to return from the collection. @@ -248,9 +253,10 @@ private PagedFlux listByDatabaseAsync(String resourceGroupNa /** * Gets a list of security events. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security events are retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -270,9 +276,10 @@ public PagedIterable listByDatabase(String resourceGroupName /** * Gets a list of security events. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security events are retrieved. * @param filter An OData filter expression that filters elements in the collection. * @param skip The number of elements in the collection to skip. * @param top The number of elements to return from the collection. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSensitivityLabelsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSensitivityLabelsClientImpl.java index 13599b4dd5ed..c547d98f28db 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSensitivityLabelsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSensitivityLabelsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -32,9 +32,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseSensitivityLabelsClient; import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelInner; -import com.azure.resourcemanager.sql.implementation.models.SensitivityLabelListResult; -import com.azure.resourcemanager.sql.models.CurrentSensitivityLabelSource; -import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelSource; +import com.azure.resourcemanager.sql.models.SensitivityLabelListResult; import com.azure.resourcemanager.sql.models.SensitivityLabelSource; import com.azure.resourcemanager.sql.models.SensitivityLabelUpdateList; import reactor.core.publisher.Mono; @@ -68,117 +66,119 @@ public final class ManagedDatabaseSensitivityLabelsClientImpl implements Managed * The interface defining all the services for SqlManagementClientManagedDatabaseSensitivityLabels to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedDatabaseSensitivityLabels") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseSensitivityLabelsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listCurrentByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("databaseName") String databaseName, @QueryParam("$skipToken") String skipToken, + @QueryParam("$count") Boolean count, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SensitivityLabelUpdateList parameters, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listRecommendedByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("databaseName") String databaseName, @QueryParam("$skipToken") String skipToken, + @QueryParam("includeDisabledRecommendations") Boolean includeDisabledRecommendations, + @QueryParam("$filter") String filter, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, @PathParam("sensitivityLabelSource") SensitivityLabelSource sensitivityLabelSource, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, - @PathParam("sensitivityLabelSource") CurrentSensitivityLabelSource sensitivityLabelSource, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") SensitivityLabelInner parameters, Context context); + @PathParam("sensitivityLabelSource") String sensitivityLabelSource, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SensitivityLabelInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, - @PathParam("sensitivityLabelSource") CurrentSensitivityLabelSource sensitivityLabelSource, Context context); + @PathParam("sensitivityLabelSource") String sensitivityLabelSource, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> disableRecommendation(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> disableRecommendation(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, - @PathParam("sensitivityLabelSource") RecommendedSensitivityLabelSource sensitivityLabelSource, + @PathParam("sensitivityLabelSource") String sensitivityLabelSource, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> enableRecommendation(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> enableRecommendation(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, - @PathParam("sensitivityLabelSource") RecommendedSensitivityLabelSource sensitivityLabelSource, + @PathParam("sensitivityLabelSource") String sensitivityLabelSource, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listCurrentByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @QueryParam("$skipToken") String skipToken, - @QueryParam("$count") Boolean count, @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, - @BodyParam("application/json") SensitivityLabelUpdateList parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRecommendedByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @QueryParam("$skipToken") String skipToken, - @QueryParam("includeDisabledRecommendations") Boolean includeDisabledRecommendations, - @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/sensitivityLabels") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -186,7 +186,7 @@ Mono> listByDatabase(@HostParam("endpoint") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listCurrentByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -194,7 +194,7 @@ Mono> listCurrentByDatabaseNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listRecommendedByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -202,38 +202,33 @@ Mono> listRecommendedByDatabaseNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param skipToken The skipToken parameter. + * @param count The count parameter. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity label of a given column along with {@link Response} on successful completion of + * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, - SensitivityLabelSource sensitivityLabelSource) { + private Mono> listCurrentByDatabaseSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean count, String filter) { 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.")); @@ -245,56 +240,45 @@ public Mono> getWithResponseAsync(String resourc if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (schemaName == null) { - return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); - } - if (tableName == null) { - return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); - } - if (columnName == null) { - return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); - } - if (sensitivityLabelSource == null) { - return Mono.error( - new IllegalArgumentException("Parameter sensitivityLabelSource 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, schemaName, - tableName, columnName, sensitivityLabelSource, accept, context)) + .withContext(context -> service.listCurrentByDatabase(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, skipToken, count, filter, this.client.getSubscriptionId(), + 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())); } /** - * Gets the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param skipToken The skipToken parameter. + * @param count The count parameter. + * @param filter An OData filter expression that filters elements in the collection. * @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 sensitivity label of a given column along with {@link Response} on successful completion of + * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, - SensitivityLabelSource sensitivityLabelSource, Context context) { + private Mono> listCurrentByDatabaseSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean count, String filter, + 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.")); @@ -306,123 +290,154 @@ private Mono> getWithResponseAsync(String resour if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (schemaName == null) { - return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); - } - if (tableName == null) { - return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); - } - if (columnName == null) { - return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); - } - if (sensitivityLabelSource == null) { - return Mono.error( - new IllegalArgumentException("Parameter sensitivityLabelSource 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, - sensitivityLabelSource, accept, context); + return service + .listCurrentByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + skipToken, count, filter, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param skipToken The skipToken parameter. + * @param count The count parameter. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity label of a given column on successful completion of {@link Mono}. + * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, - SensitivityLabelSource sensitivityLabelSource) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean count, String filter) { + return new PagedFlux<>(() -> listCurrentByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, + databaseName, skipToken, count, filter), nextLink -> listCurrentByDatabaseNextSinglePageAsync(nextLink)); } /** - * Gets the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { + final String skipToken = null; + final Boolean count = null; + final String filter = null; + return new PagedFlux<>(() -> listCurrentByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, + databaseName, skipToken, count, filter), nextLink -> listCurrentByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * Gets the sensitivity labels of a given database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param skipToken The skipToken parameter. + * @param count The count parameter. + * @param filter An OData filter expression that filters elements in the collection. * @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 sensitivity label of a given column along with {@link Response}. + * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, - SensitivityLabelSource sensitivityLabelSource, Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean count, String filter, + Context context) { + return new PagedFlux<>(() -> listCurrentByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, + databaseName, skipToken, count, filter, context), + nextLink -> listCurrentByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Gets the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity label of a given column. + * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SensitivityLabelInner get(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource) { - return getWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, - sensitivityLabelSource, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listCurrentByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName) { + final String skipToken = null; + final Boolean count = null; + final String filter = null; + return new PagedIterable<>( + listCurrentByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, skipToken, count, filter)); } /** - * Creates or updates the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. - * @param parameters The column sensitivity label resource. + * @param skipToken The skipToken parameter. + * @param count The count parameter. + * @param filter An OData filter expression that filters elements in the collection. + * @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 sensitivity label along with {@link Response} on successful completion of {@link Mono}. + * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listCurrentByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean count, String filter, + Context context) { + return new PagedIterable<>(listCurrentByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, + skipToken, count, filter, context)); + } + + /** + * Update sensitivity labels of a given database using an operations batch. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param parameters The parameters 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource, SensitivityLabelInner parameters) { + public Mono> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, SensitivityLabelUpdateList 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.")); @@ -434,62 +449,42 @@ public Mono> createOrUpdateWithResponseAsync(Str if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (schemaName == null) { - return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); - } - if (tableName == null) { - return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); - } - if (columnName == null) { - return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); - } - if (sensitivityLabelSource == null) { - return Mono.error( - new IllegalArgumentException("Parameter sensitivityLabelSource 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 contentType = "application/json"; - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, schemaName, - tableName, columnName, sensitivityLabelSource, contentType, accept, parameters, context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates the sensitivity label of a given column. + * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. - * @param parameters The column sensitivity label resource. + * @param parameters The parameters 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 sensitivity label along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource, SensitivityLabelInner parameters, Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, SensitivityLabelUpdateList 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.")); @@ -501,132 +496,103 @@ private Mono> createOrUpdateWithResponseAsync(St if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (schemaName == null) { - return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); - } - if (tableName == null) { - return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); - } - if (columnName == null) { - return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); - } - if (sensitivityLabelSource == null) { - return Mono.error( - new IllegalArgumentException("Parameter sensitivityLabelSource 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 contentType = "application/json"; - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, schemaName, - tableName, columnName, sensitivityLabelSource, contentType, accept, parameters, context); + return service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** - * Creates or updates the sensitivity label of a given column. + * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. - * @param parameters The column sensitivity label resource. + * @param parameters The parameters 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 sensitivity label on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource, SensitivityLabelInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, - tableName, columnName, sensitivityLabelSource, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono updateAsync(String resourceGroupName, String managedInstanceName, String databaseName, + SensitivityLabelUpdateList parameters) { + return updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters) + .flatMap(ignored -> Mono.empty()); } /** - * Creates or updates the sensitivity label of a given column. + * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. - * @param parameters The column sensitivity label resource. + * @param parameters The parameters 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 sensitivity label along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource, SensitivityLabelInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, - tableName, columnName, sensitivityLabelSource, parameters, context).block(); + public Response updateWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, + SensitivityLabelUpdateList parameters, Context context) { + return updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) + .block(); } /** - * Creates or updates the sensitivity label of a given column. + * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. - * @param parameters The column sensitivity label resource. + * @param parameters The parameters 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 sensitivity label. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SensitivityLabelInner createOrUpdate(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource, SensitivityLabelInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, parameters, Context.NONE).getValue(); + public void update(String resourceGroupName, String managedInstanceName, String databaseName, + SensitivityLabelUpdateList parameters) { + updateWithResponse(resourceGroupName, managedInstanceName, databaseName, parameters, Context.NONE); } /** - * Deletes the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param skipToken The skipToken parameter. + * @param includeDisabledRecommendations Specifies whether to include disabled recommendations or not. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 sensitivity labels of a given database along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource) { + private Mono> listRecommendedByDatabaseSinglePageAsync( + String resourceGroupName, String managedInstanceName, String databaseName, String skipToken, + Boolean includeDisabledRecommendations, String filter) { 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.")); @@ -638,54 +604,45 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (schemaName == null) { - return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); - } - if (tableName == null) { - return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); - } - if (columnName == null) { - return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); - } - if (sensitivityLabelSource == null) { - return Mono.error( - new IllegalArgumentException("Parameter sensitivityLabelSource 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"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, schemaName, - tableName, columnName, sensitivityLabelSource, context)) + .withContext(context -> service.listRecommendedByDatabase(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, skipToken, includeDisabledRecommendations, filter, + this.client.getSubscriptionId(), 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())); } /** - * Deletes the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param skipToken The skipToken parameter. + * @param includeDisabledRecommendations Specifies whether to include disabled recommendations or not. + * @param filter An OData filter expression that filters elements in the collection. * @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 sensitivity labels of a given database along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource, Context context) { + private Mono> listRecommendedByDatabaseSinglePageAsync( + String resourceGroupName, String managedInstanceName, String databaseName, String skipToken, + Boolean includeDisabledRecommendations, String filter, 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.")); @@ -697,96 +654,146 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (schemaName == null) { - return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); - } - if (tableName == null) { - return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); - } - if (columnName == null) { - return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); - } - if (sensitivityLabelSource == null) { - return Mono.error( - new IllegalArgumentException("Parameter sensitivityLabelSource 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.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, - sensitivityLabelSource, context); + return service + .listRecommendedByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + skipToken, includeDisabledRecommendations, filter, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Deletes the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param skipToken The skipToken parameter. + * @param includeDisabledRecommendations Specifies whether to include disabled recommendations or not. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName, CurrentSensitivityLabelSource sensitivityLabelSource) { - return deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource).flatMap(ignored -> Mono.empty()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean includeDisabledRecommendations, + String filter) { + return new PagedFlux<>( + () -> listRecommendedByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + skipToken, includeDisabledRecommendations, filter), + nextLink -> listRecommendedByDatabaseNextSinglePageAsync(nextLink)); } /** - * Deletes the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { + final String skipToken = null; + final Boolean includeDisabledRecommendations = null; + final String filter = null; + return new PagedFlux<>( + () -> listRecommendedByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + skipToken, includeDisabledRecommendations, filter), + nextLink -> listRecommendedByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * Gets the sensitivity labels of a given database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param skipToken The skipToken parameter. + * @param includeDisabledRecommendations Specifies whether to include disabled recommendations or not. + * @param filter An OData filter expression that filters elements in the collection. * @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 the sensitivity labels of a given database as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName, CurrentSensitivityLabelSource sensitivityLabelSource, - Context context) { - return deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean includeDisabledRecommendations, + String filter, Context context) { + return new PagedFlux<>( + () -> listRecommendedByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + skipToken, includeDisabledRecommendations, filter, context), + nextLink -> listRecommendedByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Deletes the sensitivity label of a given column. + * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param tableName The name of the table. - * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, - String tableName, String columnName, CurrentSensitivityLabelSource sensitivityLabelSource) { - deleteWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, - sensitivityLabelSource, Context.NONE); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRecommendedByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName) { + final String skipToken = null; + final Boolean includeDisabledRecommendations = null; + final String filter = null; + return new PagedIterable<>(listRecommendedByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, + skipToken, includeDisabledRecommendations, filter)); } /** - * Disables sensitivity recommendations on a given column. + * Gets the sensitivity labels of a given database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param skipToken The skipToken parameter. + * @param includeDisabledRecommendations Specifies whether to include disabled recommendations or not. + * @param filter An OData filter expression that filters elements in the collection. + * @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 sensitivity labels of a given database as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRecommendedByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, String skipToken, Boolean includeDisabledRecommendations, + String filter, Context context) { + return new PagedIterable<>(listRecommendedByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, + skipToken, includeDisabledRecommendations, filter, context)); + } + + /** + * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -796,20 +803,17 @@ public void delete(String resourceGroupName, String managedInstanceName, 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 {@link Response} on successful completion of {@link Mono}. + * @return the sensitivity label of a given column along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> disableRecommendationWithResponseAsync(String resourceGroupName, + public Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource) { + SensitivityLabelSource sensitivityLabelSource) { 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.")); @@ -834,17 +838,23 @@ public Mono> disableRecommendationWithResponseAsync(String resour return Mono.error( new IllegalArgumentException("Parameter sensitivityLabelSource 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"; return FluxUtil - .withContext(context -> service.disableRecommendation(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, - databaseName, schemaName, tableName, columnName, sensitivityLabelSource, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Disables sensitivity recommendations on a given column. + * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -855,20 +865,17 @@ public Mono> disableRecommendationWithResponseAsync(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 {@link Response} on successful completion of {@link Mono}. + * @return the sensitivity label of a given column along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> disableRecommendationWithResponseAsync(String resourceGroupName, + private Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource, Context context) { + SensitivityLabelSource sensitivityLabelSource, 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.")); @@ -893,16 +900,22 @@ private Mono> disableRecommendationWithResponseAsync(String resou return Mono.error( new IllegalArgumentException("Parameter sensitivityLabelSource 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.disableRecommendation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, schemaName, - tableName, columnName, sensitivityLabelSource, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context); } /** - * Disables sensitivity recommendations on a given column. + * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -912,20 +925,21 @@ private Mono> disableRecommendationWithResponseAsync(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 A {@link Mono} that completes when a successful response is received. + * @return the sensitivity label of a given column on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono disableRecommendationAsync(String resourceGroupName, String managedInstanceName, + public Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource) { - return disableRecommendationWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, - tableName, columnName, sensitivityLabelSource).flatMap(ignored -> Mono.empty()); + SensitivityLabelSource sensitivityLabelSource) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName, sensitivityLabelSource).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Disables sensitivity recommendations on a given column. + * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -936,20 +950,21 @@ public Mono disableRecommendationAsync(String resourceGroupName, String ma * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 the sensitivity label of a given column along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response disableRecommendationWithResponse(String resourceGroupName, String managedInstanceName, + public Response getWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource, Context context) { - return disableRecommendationWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, - tableName, columnName, sensitivityLabelSource, context).block(); + SensitivityLabelSource sensitivityLabelSource, Context context) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName, sensitivityLabelSource, context).block(); } /** - * Disables sensitivity recommendations on a given column. + * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -959,42 +974,39 @@ public Response disableRecommendationWithResponse(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 the sensitivity label of a given column. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void disableRecommendation(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource) { - disableRecommendationWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, Context.NONE); + public SensitivityLabelInner get(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource) { + return getWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, + sensitivityLabelSource, Context.NONE).getValue(); } /** - * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). + * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param parameters The column sensitivity label 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 {@link Response} on successful completion of {@link Mono}. + * @return a sensitivity label along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> enableRecommendationWithResponseAsync(String resourceGroupName, + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource) { + SensitivityLabelInner 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.")); @@ -1015,45 +1027,49 @@ public Mono> enableRecommendationWithResponseAsync(String resourc if (columnName == null) { return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } - if (sensitivityLabelSource == null) { - return Mono.error( - new IllegalArgumentException("Parameter sensitivityLabelSource 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 sensitivityLabelSource = "current"; + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.enableRecommendation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, schemaName, - tableName, columnName, sensitivityLabelSource, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). + * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param parameters The column sensitivity label 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 {@link Response} on successful completion of {@link Mono}. + * @return a sensitivity label along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> enableRecommendationWithResponseAsync(String resourceGroupName, + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource, Context context) { + SensitivityLabelInner 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.")); @@ -1074,111 +1090,116 @@ private Mono> enableRecommendationWithResponseAsync(String resour if (columnName == null) { return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } - if (sensitivityLabelSource == null) { - return Mono.error( - new IllegalArgumentException("Parameter sensitivityLabelSource 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 sensitivityLabelSource = "current"; + final String accept = "application/json"; context = this.client.mergeContext(context); - return service.enableRecommendation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, schemaName, - tableName, columnName, sensitivityLabelSource, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + schemaName, tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** - * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). + * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param parameters The column sensitivity label 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. + * @return a sensitivity label on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono enableRecommendationAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource) { - return enableRecommendationWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, - tableName, columnName, sensitivityLabelSource).flatMap(ignored -> Mono.empty()); + public Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, columnName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). + * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param parameters The column sensitivity label 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 {@link Response}. + * @return a sensitivity label along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response enableRecommendationWithResponse(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource, Context context) { - return enableRecommendationWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, - tableName, columnName, sensitivityLabelSource, context).block(); + public Response createOrUpdateWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, + SensitivityLabelInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, columnName, parameters, context).block(); } /** - * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). + * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. + * @param parameters The column sensitivity label 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 sensitivity label. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void enableRecommendation(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource) { - enableRecommendationWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, Context.NONE); + public SensitivityLabelInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName, parameters, Context.NONE).getValue(); } /** - * Gets the sensitivity labels of a given database. + * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param skipToken The skipToken parameter. - * @param count The count parameter. - * @param filter An OData filter expression that filters elements in the collection. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database 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> listCurrentByDatabaseSinglePageAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String skipToken, Boolean count, String filter) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName) { 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.")); @@ -1190,44 +1211,50 @@ private Mono> listCurrentByDatabaseSinglePa if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - final String accept = "application/json"; + if (schemaName == null) { + return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); + } + if (tableName == null) { + return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); + } + if (columnName == null) { + return Mono.error(new IllegalArgumentException("Parameter columnName 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 sensitivityLabelSource = "current"; return FluxUtil - .withContext(context -> service.listCurrentByDatabase(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, - databaseName, skipToken, count, filter, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the sensitivity labels of a given database. + * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param skipToken The skipToken parameter. - * @param count The count parameter. - * @param filter An OData filter expression that filters elements in the collection. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @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 sensitivity labels of a given database 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> listCurrentByDatabaseSinglePageAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String skipToken, Boolean count, String filter, - Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, 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.")); @@ -1239,149 +1266,114 @@ private Mono> listCurrentByDatabaseSinglePa if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - final String accept = "application/json"; + if (schemaName == null) { + return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); + } + if (tableName == null) { + return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); + } + if (columnName == null) { + return Mono.error(new IllegalArgumentException("Parameter columnName 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 sensitivityLabelSource = "current"; context = this.client.mergeContext(context); - return service - .listCurrentByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, skipToken, count, - filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the sensitivity labels of a given database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param skipToken The skipToken parameter. - * @param count The count parameter. - * @param filter An OData filter expression that filters elements in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String skipToken, Boolean count, String filter) { - return new PagedFlux<>(() -> listCurrentByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, - databaseName, skipToken, count, filter), nextLink -> listCurrentByDatabaseNextSinglePageAsync(nextLink)); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + schemaName, tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** - * Gets the sensitivity labels of a given database. + * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName) { - final String skipToken = null; - final Boolean count = null; - final String filter = null; - return new PagedFlux<>(() -> listCurrentByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, - databaseName, skipToken, count, filter), nextLink -> listCurrentByDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName) { + return deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName).flatMap(ignored -> Mono.empty()); } /** - * Gets the sensitivity labels of a given database. + * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param skipToken The skipToken parameter. - * @param count The count parameter. - * @param filter An OData filter expression that filters elements in the collection. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @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 sensitivity labels of a given database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listCurrentByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String skipToken, Boolean count, String filter, - Context context) { - return new PagedFlux<>(() -> listCurrentByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, - databaseName, skipToken, count, filter, context), - nextLink -> listCurrentByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the sensitivity labels of a given database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 sensitivity labels of a given database as paginated response with {@link PagedIterable}. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listCurrentByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName) { - final String skipToken = null; - final Boolean count = null; - final String filter = null; - return new PagedIterable<>( - listCurrentByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, skipToken, count, filter)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName, Context context) { + return deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName, context).block(); } /** - * Gets the sensitivity labels of a given database. + * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param skipToken The skipToken parameter. - * @param count The count parameter. - * @param filter An OData filter expression that filters elements in the collection. - * @param context The context to associate with this operation. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listCurrentByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, String skipToken, Boolean count, String filter, - Context context) { - return new PagedIterable<>(listCurrentByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, - skipToken, count, filter, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, + String tableName, String columnName) { + deleteWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, + Context.NONE); } /** - * Update sensitivity labels of a given database using an operations batch. + * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The parameters parameter. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, SensitivityLabelUpdateList parameters) { + public Mono> disableRecommendationWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName) { 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.")); @@ -1393,26 +1385,37 @@ public Mono> updateWithResponseAsync(String resourceGroupName, St if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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(); + if (schemaName == null) { + return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); + } + if (tableName == null) { + return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); + } + if (columnName == null) { + return Mono.error(new IllegalArgumentException("Parameter columnName 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 contentType = "application/json"; + final String sensitivityLabelSource = "recommended"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, contentType, - parameters, context)) + .withContext(context -> service.disableRecommendation(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update sensitivity labels of a given database using an operations batch. + * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The parameters parameter. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @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. @@ -1420,15 +1423,12 @@ public Mono> updateWithResponseAsync(String resourceGroupName, St * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, SensitivityLabelUpdateList parameters, Context context) { + private Mono> disableRecommendationWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, + 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.")); + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1441,43 +1441,58 @@ private Mono> updateWithResponseAsync(String resourceGroupName, S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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(); + if (schemaName == null) { + return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); + } + if (tableName == null) { + return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); + } + if (columnName == null) { + return Mono.error(new IllegalArgumentException("Parameter columnName 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 contentType = "application/json"; + final String sensitivityLabelSource = "recommended"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, contentType, parameters, context); + return service.disableRecommendation(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, schemaName, tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** - * Update sensitivity labels of a given database using an operations batch. + * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The parameters parameter. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 updateAsync(String resourceGroupName, String managedInstanceName, String databaseName, - SensitivityLabelUpdateList parameters) { - return updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters) - .flatMap(ignored -> Mono.empty()); + public Mono disableRecommendationAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName) { + return disableRecommendationWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, columnName).flatMap(ignored -> Mono.empty()); } /** - * Update sensitivity labels of a given database using an operations batch. + * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The parameters parameter. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @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. @@ -1485,56 +1500,55 @@ public Mono updateAsync(String resourceGroupName, String managedInstanceNa * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, - SensitivityLabelUpdateList parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) - .block(); + public Response disableRecommendationWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, Context context) { + return disableRecommendationWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, columnName, context).block(); } /** - * Update sensitivity labels of a given database using an operations batch. + * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The parameters parameter. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 update(String resourceGroupName, String managedInstanceName, String databaseName, - SensitivityLabelUpdateList parameters) { - updateWithResponse(resourceGroupName, managedInstanceName, databaseName, parameters, Context.NONE); + public void disableRecommendation(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName) { + disableRecommendationWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName, Context.NONE); } /** - * Gets the sensitivity labels of a given database. + * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param skipToken The skipToken parameter. - * @param includeDisabledRecommendations Specifies whether to include disabled recommendations or not. - * @param filter An OData filter expression that filters elements in the collection. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database 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> listRecommendedByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String skipToken, - Boolean includeDisabledRecommendations, String filter) { + public Mono> enableRecommendationWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName) { 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.")); @@ -1546,44 +1560,51 @@ private Mono> listRecommendedByDatabaseSing if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - final String accept = "application/json"; + if (schemaName == null) { + return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); + } + if (tableName == null) { + return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); + } + if (columnName == null) { + return Mono.error(new IllegalArgumentException("Parameter columnName 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 sensitivityLabelSource = "recommended"; return FluxUtil - .withContext(context -> service.listRecommendedByDatabase(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, - databaseName, skipToken, includeDisabledRecommendations, filter, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.enableRecommendation(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the sensitivity labels of a given database. + * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param skipToken The skipToken parameter. - * @param includeDisabledRecommendations Specifies whether to include disabled recommendations or not. - * @param filter An OData filter expression that filters elements in the collection. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @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 sensitivity labels of a given database 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> listRecommendedByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName, String skipToken, - Boolean includeDisabledRecommendations, String filter, Context context) { + private Mono> enableRecommendationWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, + 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.")); @@ -1595,136 +1616,97 @@ private Mono> listRecommendedByDatabaseSing if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - final String accept = "application/json"; + if (schemaName == null) { + return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); + } + if (tableName == null) { + return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); + } + if (columnName == null) { + return Mono.error(new IllegalArgumentException("Parameter columnName 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 sensitivityLabelSource = "recommended"; context = this.client.mergeContext(context); - return service - .listRecommendedByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, skipToken, - includeDisabledRecommendations, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the sensitivity labels of a given database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param skipToken The skipToken parameter. - * @param includeDisabledRecommendations Specifies whether to include disabled recommendations or not. - * @param filter An OData filter expression that filters elements in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String skipToken, Boolean includeDisabledRecommendations, - String filter) { - return new PagedFlux<>( - () -> listRecommendedByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, - skipToken, includeDisabledRecommendations, filter), - nextLink -> listRecommendedByDatabaseNextSinglePageAsync(nextLink)); + return service.enableRecommendation(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, schemaName, tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** - * Gets the sensitivity labels of a given database. + * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName) { - final String skipToken = null; - final Boolean includeDisabledRecommendations = null; - final String filter = null; - return new PagedFlux<>( - () -> listRecommendedByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, - skipToken, includeDisabledRecommendations, filter), - nextLink -> listRecommendedByDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono enableRecommendationAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName) { + return enableRecommendationWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, columnName).flatMap(ignored -> Mono.empty()); } /** - * Gets the sensitivity labels of a given database. + * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param skipToken The skipToken parameter. - * @param includeDisabledRecommendations Specifies whether to include disabled recommendations or not. - * @param filter An OData filter expression that filters elements in the collection. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @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 sensitivity labels of a given database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRecommendedByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String skipToken, Boolean includeDisabledRecommendations, - String filter, Context context) { - return new PagedFlux<>( - () -> listRecommendedByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, - skipToken, includeDisabledRecommendations, filter, context), - nextLink -> listRecommendedByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the sensitivity labels of a given database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 sensitivity labels of a given database as paginated response with {@link PagedIterable}. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRecommendedByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName) { - final String skipToken = null; - final Boolean includeDisabledRecommendations = null; - final String filter = null; - return new PagedIterable<>(listRecommendedByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, - skipToken, includeDisabledRecommendations, filter)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response enableRecommendationWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, String columnName, Context context) { + return enableRecommendationWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, columnName, context).block(); } /** - * Gets the sensitivity labels of a given database. + * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param skipToken The skipToken parameter. - * @param includeDisabledRecommendations Specifies whether to include disabled recommendations or not. - * @param filter An OData filter expression that filters elements in the collection. - * @param context The context to associate with this operation. + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRecommendedByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, String skipToken, Boolean includeDisabledRecommendations, - String filter, Context context) { - return new PagedIterable<>(listRecommendedByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, - skipToken, includeDisabledRecommendations, filter, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void enableRecommendation(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName, String columnName) { + enableRecommendationWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + columnName, Context.NONE); } /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -1741,10 +1723,6 @@ private Mono> listByDatabaseSinglePageAsync 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.")); @@ -1756,11 +1734,15 @@ private Mono> listByDatabaseSinglePageAsync if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, filter, accept, - context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, filter, this.client.getSubscriptionId(), 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())); @@ -1769,7 +1751,8 @@ private Mono> listByDatabaseSinglePageAsync /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -1787,10 +1770,6 @@ private Mono> listByDatabaseSinglePageAsync 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.")); @@ -1802,11 +1781,15 @@ private Mono> listByDatabaseSinglePageAsync if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, filter, accept, context) + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, filter, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -1814,7 +1797,8 @@ private Mono> listByDatabaseSinglePageAsync /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -1834,7 +1818,8 @@ public PagedFlux listByDatabaseAsync(String resourceGroup /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1854,7 +1839,8 @@ public PagedFlux listByDatabaseAsync(String resourceGroup /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -1875,7 +1861,8 @@ private PagedFlux listByDatabaseAsync(String resourceGrou /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1893,7 +1880,8 @@ public PagedIterable listByDatabase(String resourceGroupN /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param filter An OData filter expression that filters elements in the collection. @@ -1917,8 +1905,7 @@ public PagedIterable listByDatabase(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 the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listCurrentByDatabaseNextSinglePageAsync(String nextLink) { @@ -1946,8 +1933,7 @@ private Mono> listCurrentByDatabaseNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listCurrentByDatabaseNextSinglePageAsync(String nextLink, @@ -1973,8 +1959,7 @@ private Mono> listCurrentByDatabaseNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRecommendedByDatabaseNextSinglePageAsync(String nextLink) { @@ -2002,8 +1987,7 @@ private Mono> listRecommendedByDatabaseNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRecommendedByDatabaseNextSinglePageAsync(String nextLink, @@ -2029,8 +2013,7 @@ private Mono> listRecommendedByDatabaseNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -2057,8 +2040,7 @@ private Mono> listByDatabaseNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTablesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTablesClientImpl.java index 2633b5b5931e..a454a500568c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTablesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTablesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseTablesClient; import com.azure.resourcemanager.sql.fluent.models.DatabaseTableInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseTableListResult; +import com.azure.resourcemanager.sql.models.DatabaseTableListResult; import reactor.core.publisher.Mono; /** @@ -59,64 +59,61 @@ public final class ManagedDatabaseTablesClientImpl implements ManagedDatabaseTab * The interface defining all the services for SqlManagementClientManagedDatabaseTables to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedDatabaseTables") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseTablesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listBySchema(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, - @PathParam("tableName") String tableName, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySchema(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, - @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); + @PathParam("tableName") String tableName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySchemaNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Get managed database table. + * List managed database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed database table along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database tables along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName) { + private Mono> listBySchemaSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String filter) { 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.")); @@ -131,42 +128,42 @@ public Mono> getWithResponseAsync(String resourceGr if (schemaName == null) { return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); } - if (tableName == null) { - return Mono.error(new IllegalArgumentException("Parameter tableName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, schemaName, - tableName, accept, context)) + .withContext(context -> service.listBySchema(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, schemaName, filter, this.client.getSubscriptionId(), + 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())); } /** - * Get managed database table. + * List managed database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. + * @param filter An OData filter expression that filters elements in the collection. * @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 managed database table along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database tables along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String schemaName, String tableName, Context context) { + private Mono> listBySchemaSinglePageAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String filter, 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.")); @@ -181,101 +178,149 @@ private Mono> getWithResponseAsync(String resourceG if (schemaName == null) { return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); } - if (tableName == null) { - return Mono.error(new IllegalArgumentException("Parameter tableName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, accept, context); + return service + .listBySchema(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, schemaName, + filter, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Get managed database table. + * List managed database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed database table on successful completion of {@link Mono}. + * @return a list of database tables as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listBySchemaAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String filter) { + return new PagedFlux<>( + () -> listBySchemaSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, filter), + nextLink -> listBySchemaNextSinglePageAsync(nextLink)); } /** - * Get managed database table. + * List managed database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 database tables as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listBySchemaAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName) { + final String filter = null; + return new PagedFlux<>( + () -> listBySchemaSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, filter), + nextLink -> listBySchemaNextSinglePageAsync(nextLink)); + } + + /** + * List managed database tables. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param filter An OData filter expression that filters elements in the collection. * @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 managed database table along with {@link Response}. + * @return a list of database tables as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String tableName, Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, - context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySchemaAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String filter, Context context) { + return new PagedFlux<>(() -> listBySchemaSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + schemaName, filter, context), nextLink -> listBySchemaNextSinglePageAsync(nextLink, context)); } /** - * Get managed database table. + * List managed database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param tableName The name of the table. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed database table. + * @return a list of database tables as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseTableInner get(String resourceGroupName, String managedInstanceName, String databaseName, - String schemaName, String tableName) { - return getWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, - Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySchema(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName) { + final String filter = null; + return new PagedIterable<>( + listBySchemaAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, filter)); } /** * List managed database tables. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param filter An OData filter expression that filters elements in the collection. + * @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 database tables as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySchema(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String filter, Context context) { + return new PagedIterable<>( + listBySchemaAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, filter, context)); + } + + /** + * Get managed database table. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param schemaName The name of the schema. + * @param tableName The name of the table. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseTable list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return managed database table along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySchemaSinglePageAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String schemaName, String filter) { + public Mono> getWithResponseAsync(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName) { 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.")); @@ -290,42 +335,43 @@ private Mono> listBySchemaSinglePageAsync(Stri if (schemaName == null) { return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); } + if (tableName == null) { + return Mono.error(new IllegalArgumentException("Parameter tableName 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"; return FluxUtil - .withContext(context -> service.listBySchema(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, schemaName, - filter, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, schemaName, tableName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List managed database tables. + * Get managed database table. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param filter An OData filter expression that filters elements in the collection. + * @param tableName The name of the table. * @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 DatabaseTable list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return managed database table along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySchemaSinglePageAsync(String resourceGroupName, - String managedInstanceName, String databaseName, String schemaName, String filter, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, String schemaName, String tableName, 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.")); @@ -340,117 +386,81 @@ private Mono> listBySchemaSinglePageAsync(Stri if (schemaName == null) { return Mono.error(new IllegalArgumentException("Parameter schemaName is required and cannot be null.")); } + if (tableName == null) { + return Mono.error(new IllegalArgumentException("Parameter tableName 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 - .listBySchema(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, schemaName, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List managed database tables. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @param filter An OData filter expression that filters elements in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseTable list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBySchemaAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String filter) { - return new PagedFlux<>( - () -> listBySchemaSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, filter), - nextLink -> listBySchemaNextSinglePageAsync(nextLink)); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, schemaName, + tableName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * List managed database tables. + * Get managed database table. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. + * @param tableName The name of the table. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseTable list operation as paginated response with {@link PagedFlux}. + * @return managed database table on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBySchemaAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName) { - final String filter = null; - return new PagedFlux<>( - () -> listBySchemaSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, filter), - nextLink -> listBySchemaNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List managed database tables. + * Get managed database table. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param filter An OData filter expression that filters elements in the collection. + * @param tableName The name of the table. * @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 DatabaseTable list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySchemaAsync(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String filter, Context context) { - return new PagedFlux<>(() -> listBySchemaSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, - schemaName, filter, context), nextLink -> listBySchemaNextSinglePageAsync(nextLink, context)); - } - - /** - * List managed database tables. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param schemaName The name of the schema. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseTable list operation as paginated response with {@link PagedIterable}. + * @return managed database table along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySchema(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName) { - final String filter = null; - return new PagedIterable<>( - listBySchemaAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, filter)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + String databaseName, String schemaName, String tableName, Context context) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + context).block(); } /** - * List managed database tables. + * Get managed database table. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param schemaName The name of the schema. - * @param filter An OData filter expression that filters elements in the collection. - * @param context The context to associate with this operation. + * @param tableName The name of the table. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseTable list operation as paginated response with {@link PagedIterable}. + * @return managed database table. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySchema(String resourceGroupName, String managedInstanceName, - String databaseName, String schemaName, String filter, Context context) { - return new PagedIterable<>( - listBySchemaAsync(resourceGroupName, managedInstanceName, databaseName, schemaName, filter, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseTableInner get(String resourceGroupName, String managedInstanceName, String databaseName, + String schemaName, String tableName) { + return getWithResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, + Context.NONE).getValue(); } /** @@ -460,8 +470,7 @@ public PagedIterable listBySchema(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 the response of a DatabaseTable list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database tables along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySchemaNextSinglePageAsync(String nextLink) { @@ -488,8 +497,7 @@ private Mono> listBySchemaNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 DatabaseTable list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of database tables along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySchemaNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTransparentDataEncryptionsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTransparentDataEncryptionsClientImpl.java index 3a36e3490bca..c31422a9aee3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTransparentDataEncryptionsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTransparentDataEncryptionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -29,7 +29,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseTransparentDataEncryptionsClient; import com.azure.resourcemanager.sql.fluent.models.ManagedTransparentDataEncryptionInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedTransparentDataEncryptionListResult; +import com.azure.resourcemanager.sql.models.ManagedTransparentDataEncryptionListResult; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionName; import reactor.core.publisher.Mono; @@ -64,75 +64,71 @@ public final class ManagedDatabaseTransparentDataEncryptionsClientImpl * The interface defining all the services for SqlManagementClientManagedDatabaseTransparentDataEncryptions to be * used by the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedDatabaseTransparentDataEncryptions") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseTransparentDataEncryptionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption/{tdeName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @PathParam("tdeName") TransparentDataEncryptionName tdeName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption/{tdeName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption/{tdeName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("tdeName") TransparentDataEncryptionName tdeName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedTransparentDataEncryptionInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption/{tdeName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("tdeName") TransparentDataEncryptionName tdeName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedTransparentDataEncryptionInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a managed database's transparent data encryption. + * Gets a list of managed database's transparent data encryptions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param tdeName The name of the transparent data encryption configuration. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed database's transparent data encryption along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of managed database's transparent data encryptions along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, String databaseName) { 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.")); @@ -144,42 +140,41 @@ public Mono> getWithResponseAsyn if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (tdeName == null) { - return Mono.error(new IllegalArgumentException("Parameter tdeName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, tdeName, accept, - context)) + .withContext( + context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), 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())); } /** - * Gets a managed database's transparent data encryption. + * Gets a list of managed database's transparent data encryptions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param tdeName The name of the transparent data encryption configuration. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @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 managed database's transparent data encryption along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of managed database's transparent data encryptions along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, Context context) { + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String managedInstanceName, String databaseName, 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.")); @@ -191,97 +186,120 @@ private Mono> getWithResponseAsy if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (tdeName == null) { - return Mono.error(new IllegalArgumentException("Parameter tdeName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, tdeName, accept, context); + return service + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a managed database's transparent data encryption. + * Gets a list of managed database's transparent data encryptions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param tdeName The name of the transparent data encryption configuration. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed database's transparent data encryption on successful completion of {@link Mono}. + * @return a list of managed database's transparent data encryptions as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String managedInstanceName, - String databaseName, TransparentDataEncryptionName tdeName) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, tdeName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** - * Gets a managed database's transparent data encryption. + * Gets a list of managed database's transparent data encryptions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param tdeName The name of the transparent data encryption configuration. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @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 managed database's transparent data encryption along with {@link Response}. + * @return a list of managed database's transparent data encryptions as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, tdeName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Gets a managed database's transparent data encryption. + * Gets a list of managed database's transparent data encryptions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param tdeName The name of the transparent data encryption configuration. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed database's transparent data encryption. + * @return a list of managed database's transparent data encryptions as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedTransparentDataEncryptionInner get(String resourceGroupName, String managedInstanceName, - String databaseName, TransparentDataEncryptionName tdeName) { - return getWithResponse(resourceGroupName, managedInstanceName, databaseName, tdeName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); } /** - * Updates a database's transparent data encryption configuration. + * Gets a list of managed database's transparent data encryptions. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. + * @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 managed database's transparent data encryptions as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, context)); + } + + /** + * Gets a managed database's transparent data encryption. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. - * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed database transparent data encryption state along with {@link Response} on successful completion - * of {@link Mono}. + * @return a managed database's transparent data encryption along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, - TransparentDataEncryptionName tdeName, ManagedTransparentDataEncryptionInner parameters) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName) { 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.")); @@ -296,47 +314,39 @@ public Mono> createOrUpdateWithR if (tdeName == null) { return Mono.error(new IllegalArgumentException("Parameter tdeName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, tdeName, - contentType, accept, parameters, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, tdeName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a database's transparent data encryption configuration. + * Gets a managed database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. - * @param parameters The database transparent data encryption. * @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 managed database transparent data encryption state along with {@link Response} on successful completion - * of {@link Mono}. + * @return a managed database's transparent data encryption along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, - TransparentDataEncryptionName tdeName, ManagedTransparentDataEncryptionInner parameters, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, 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.")); @@ -351,105 +361,98 @@ private Mono> createOrUpdateWith if (tdeName == null) { return Mono.error(new IllegalArgumentException("Parameter tdeName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, tdeName, contentType, - accept, parameters, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, tdeName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Updates a database's transparent data encryption configuration. + * Gets a managed database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. - * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed database transparent data encryption state on successful completion of {@link Mono}. + * @return a managed database's transparent data encryption on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, - String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, - ManagedTransparentDataEncryptionInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, tdeName, - parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String databaseName, TransparentDataEncryptionName tdeName) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, tdeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Updates a database's transparent data encryption configuration. + * Gets a managed database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. - * @param parameters The database transparent data encryption. * @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 managed database transparent data encryption state along with {@link Response}. + * @return a managed database's transparent data encryption along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, - ManagedTransparentDataEncryptionInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, tdeName, - parameters, context).block(); + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, Context context) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, tdeName, context).block(); } /** - * Updates a database's transparent data encryption configuration. + * Gets a managed database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. - * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed database transparent data encryption state. + * @return a managed database's transparent data encryption. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedTransparentDataEncryptionInner createOrUpdate(String resourceGroupName, String managedInstanceName, - String databaseName, TransparentDataEncryptionName tdeName, ManagedTransparentDataEncryptionInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, managedInstanceName, databaseName, tdeName, parameters, - Context.NONE).getValue(); + public ManagedTransparentDataEncryptionInner get(String resourceGroupName, String managedInstanceName, + String databaseName, TransparentDataEncryptionName tdeName) { + return getWithResponse(resourceGroupName, managedInstanceName, databaseName, tdeName, Context.NONE).getValue(); } /** - * Gets a list of managed database's transparent data encryptions. + * Updates a database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. + * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 managed database's transparent data encryptions along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a managed database transparent data encryption state along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, String databaseName) { + public Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String managedInstanceName, String databaseName, + TransparentDataEncryptionName tdeName, ManagedTransparentDataEncryptionInner 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.")); @@ -461,39 +464,50 @@ public ManagedTransparentDataEncryptionInner createOrUpdate(String resourceGroup if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (tdeName == null) { + return Mono.error(new IllegalArgumentException("Parameter tdeName 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.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, tdeName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of managed database's transparent data encryptions. + * Updates a database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. + * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. * @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 managed database's transparent data encryptions along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a managed database transparent data encryption state along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String managedInstanceName, String databaseName, + TransparentDataEncryptionName tdeName, ManagedTransparentDataEncryptionInner 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.")); @@ -505,89 +519,88 @@ private Mono> listByDatabas if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (tdeName == null) { + return Mono.error(new IllegalArgumentException("Parameter tdeName 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"; context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + tdeName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Gets a list of managed database's transparent data encryptions. + * Updates a database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. + * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 managed database's transparent data encryptions as paginated response with {@link PagedFlux}. + * @return a managed database transparent data encryption state on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, + ManagedTransparentDataEncryptionInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, tdeName, + parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of managed database's transparent data encryptions. + * Updates a database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the managed database for which the security alert policy is defined. + * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. * @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 managed database's transparent data encryptions as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed database's transparent data encryptions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a list of managed database's transparent data encryptions as paginated response with - * {@link PagedIterable}. + * @return a managed database transparent data encryption state along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, + String managedInstanceName, String databaseName, TransparentDataEncryptionName tdeName, + ManagedTransparentDataEncryptionInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, tdeName, + parameters, context).block(); } /** - * Gets a list of managed database's transparent data encryptions. + * Updates a database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param context The context to associate with this operation. + * @param databaseName The name of the managed database for which the security alert policy is defined. + * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 managed database's transparent data encryptions as paginated response with - * {@link PagedIterable}. + * @return a managed database transparent data encryption state. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedTransparentDataEncryptionInner createOrUpdate(String resourceGroupName, String managedInstanceName, + String databaseName, TransparentDataEncryptionName tdeName, ManagedTransparentDataEncryptionInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, managedInstanceName, databaseName, tdeName, parameters, + Context.NONE).getValue(); } /** @@ -597,8 +610,8 @@ public PagedIterable listByDatabase(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 managed database's transparent data encryptions along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of managed transparent data encryptions along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -626,8 +639,8 @@ public PagedIterable listByDatabase(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 managed database's transparent data encryptions along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of managed transparent data encryptions along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java index e4cd57ad1536..43c65137f620 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -62,57 +62,58 @@ public final class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl * SqlManagementClientManagedDatabaseVulnerabilityAssessmentRuleBaselines to be used by the proxy service to perform * REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedDatabaseVulnerabilityAssessmentRuleBaselines") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseVulnerabilityAssessmentRuleBaselinesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, @PathParam("ruleId") String ruleId, @PathParam("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, @PathParam("ruleId") String ruleId, @PathParam("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, @PathParam("ruleId") String ruleId, - @PathParam("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, Context context); + @PathParam("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); } /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -134,10 +135,6 @@ public Mono> getWithR 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.")); @@ -159,18 +156,23 @@ public Mono> getWithR if (baselineName == null) { return Mono.error(new IllegalArgumentException("Parameter baselineName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - vulnerabilityAssessmentName, ruleId, baselineName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -193,10 +195,6 @@ private Mono> getWith 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.")); @@ -218,17 +216,22 @@ private Mono> getWith if (baselineName == null) { return Mono.error(new IllegalArgumentException("Parameter baselineName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, ruleId, baselineName, - accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); } /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -251,7 +254,8 @@ public Mono getAsync(String re /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -275,7 +279,8 @@ public Response getWithRespons /** * Gets a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -298,7 +303,8 @@ public DatabaseVulnerabilityAssessmentRuleBaselineInner get(String resourceGroup /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -322,10 +328,6 @@ public Mono> createOr 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.")); @@ -347,24 +349,28 @@ public Mono> createOr if (baselineName == null) { return Mono.error(new IllegalArgumentException("Parameter baselineName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - vulnerabilityAssessmentName, ruleId, baselineName, contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, vulnerabilityAssessmentName, ruleId, baselineName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -389,10 +395,6 @@ private Mono> createO 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.")); @@ -414,23 +416,27 @@ private Mono> createO if (baselineName == null) { return Mono.error(new IllegalArgumentException("Parameter baselineName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - vulnerabilityAssessmentName, ruleId, baselineName, contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -456,7 +462,8 @@ public Mono createOrUpdateAsyn /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -483,7 +490,8 @@ public Response createOrUpdate /** * Creates or updates a database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -508,7 +516,8 @@ public DatabaseVulnerabilityAssessmentRuleBaselineInner createOrUpdate(String re /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -528,10 +537,6 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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.")); @@ -553,17 +558,22 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St if (baselineName == null) { return Mono.error(new IllegalArgumentException("Parameter baselineName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - vulnerabilityAssessmentName, ruleId, baselineName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -584,10 +594,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -609,16 +615,21 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (baselineName == null) { return Mono.error(new IllegalArgumentException("Parameter baselineName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, ruleId, baselineName, - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, ruleId, baselineName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -641,7 +652,8 @@ public Mono deleteAsync(String resourceGroupName, String managedInstanceNa /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -665,7 +677,8 @@ public Response deleteWithResponse(String resourceGroupName, String manage /** * Removes the database's vulnerability assessment rule baseline. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentScansClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentScansClientImpl.java index 3b9dd2558400..c06da1e8b750 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentScansClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentScansClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -32,8 +32,8 @@ import com.azure.resourcemanager.sql.fluent.ManagedDatabaseVulnerabilityAssessmentScansClient; import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentScansExportInner; import com.azure.resourcemanager.sql.fluent.models.VulnerabilityAssessmentScanRecordInner; -import com.azure.resourcemanager.sql.implementation.models.VulnerabilityAssessmentScanRecordListResult; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; +import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentScanRecordListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -69,93 +69,88 @@ public final class ManagedDatabaseVulnerabilityAssessmentScansClientImpl * The interface defining all the services for SqlManagementClientManagedDatabaseVulnerabilityAssessmentScans to be * used by the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedDatabaseVulnerabilityAssessmentScans") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseVulnerabilityAssessmentScansService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("scanId") String scanId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> export(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> export(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, @HeaderParam("Accept") String accept, Context context); + @PathParam("scanId") String scanId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> initiateScan(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> initiateScan(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, Context context); + @PathParam("scanId") String scanId, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database along with {@link Response} on successful completion + * @return a list of vulnerability assessment scan records along with {@link PagedResponse} on successful completion * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId) { + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName) { 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.")); @@ -171,44 +166,43 @@ public Mono> getWithResponseAsy return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } - if (scanId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanId 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - vulnerabilityAssessmentName, scanId, accept, context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, vulnerabilityAssessmentName, this.client.getSubscriptionId(), + 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())); } /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @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 vulnerability assessment scan record of a database along with {@link Response} on successful completion + * @return a list of vulnerability assessment scan records along with {@link PagedResponse} on successful completion * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, Context context) { + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, 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.")); @@ -224,102 +218,127 @@ private Mono> getWithResponseAs return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } - if (scanId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanId 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, accept, context); + return service.listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database on successful completion of {@link Mono}. + * @return a list of vulnerability assessment scan records as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String managedInstanceName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, - scanId).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @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 vulnerability assessment scan record of a database along with {@link Response}. + * @return a list of vulnerability assessment scan records as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, - scanId, context).block(); + Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database. + * @return a list of vulnerability assessment scan records as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String managedInstanceName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { - return getWithResponse(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, - scanId, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + return new PagedIterable<>( + listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName)); } /** * Lists the vulnerability assessment scans of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @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 vulnerability assessment scan records as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, context)); + } + + /** + * Gets a vulnerability assessment scan record of a database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VulnerabilityAssessmentScanRecord list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a vulnerability assessment scan record of a database along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String scanId) { 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.")); @@ -335,42 +354,45 @@ private Mono> listByDataba return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } + if (scanId == null) { + return Mono.error(new IllegalArgumentException("Parameter scanId 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"; return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - vulnerabilityAssessmentName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists the vulnerability assessment scans of a database. + * Gets a vulnerability assessment scan record of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @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 VulnerabilityAssessmentScanRecord list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a vulnerability assessment scan record of a database along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + String scanId, 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.")); @@ -386,109 +408,94 @@ private Mono> listByDataba return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); } + if (scanId == null) { + return Mono.error(new IllegalArgumentException("Parameter scanId 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 - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** - * Lists the vulnerability assessment scans of a database. + * Gets a vulnerability assessment scan record of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedFlux}. + * @return a vulnerability assessment scan record of a database on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, - vulnerabilityAssessmentName), nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + scanId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists the vulnerability assessment scans of a database. + * Gets a vulnerability assessment scan record of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @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 VulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedFlux}. + * @return a vulnerability assessment scan record of a database along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, - vulnerabilityAssessmentName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the vulnerability assessment scans of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 VulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { - return new PagedIterable<>( - listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName)); + String scanId, Context context) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + scanId, context).block(); } /** - * Lists the vulnerability assessment scans of a database. + * Gets a vulnerability assessment scan record of a database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param context The context to associate with this operation. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 VulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedIterable}. + * @return a vulnerability assessment scan record of a database. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, - vulnerabilityAssessmentName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public VulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String managedInstanceName, + String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { + return getWithResponse(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + scanId, Context.NONE).getValue(); } /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -503,10 +510,6 @@ public Mono> exportWit 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.")); @@ -525,22 +528,27 @@ public Mono> exportWit if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId 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"; return FluxUtil - .withContext(context -> service.export(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - vulnerabilityAssessmentName, scanId, accept, context)) + .withContext(context -> service.export(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -556,10 +564,6 @@ private Mono> exportWi 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.")); @@ -578,20 +582,26 @@ private Mono> exportWi if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId 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.export(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, accept, context); + return service.export(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -608,11 +618,12 @@ public Mono exportAsync(String /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -630,11 +641,12 @@ public Response exportWithRespo /** * Convert an existing scan result to a human readable format. If already exists nothing happens. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan 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. @@ -650,7 +662,8 @@ public DatabaseVulnerabilityAssessmentScansExportInner export(String resourceGro /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -668,10 +681,6 @@ public Mono>> initiateScanWithResponseAsync(String res 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.")); @@ -690,17 +699,22 @@ public Mono>> initiateScanWithResponseAsync(String res if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId 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.")); + } return FluxUtil - .withContext(context -> service.initiateScan(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - vulnerabilityAssessmentName, scanId, context)) + .withContext(context -> service.initiateScan(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), + this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -719,10 +733,6 @@ private Mono>> initiateScanWithResponseAsync(String re 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.")); @@ -741,16 +751,20 @@ private Mono>> initiateScanWithResponseAsync(String re if (scanId == null) { return Mono.error(new IllegalArgumentException("Parameter scanId 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.")); + } context = this.client.mergeContext(context); - return service.initiateScan(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - vulnerabilityAssessmentName, scanId, context); + return service.initiateScan(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, scanId, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -773,7 +787,8 @@ public PollerFlux, Void> beginInitiateScanAsync(String resource /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -798,7 +813,8 @@ private PollerFlux, Void> beginInitiateScanAsync(String resourc /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -820,7 +836,8 @@ public SyncPoller, Void> beginInitiateScan(String resourceGroup /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -843,7 +860,8 @@ public SyncPoller, Void> beginInitiateScan(String resourceGroup /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -863,7 +881,8 @@ public Mono initiateScanAsync(String resourceGroupName, String managedInst /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -884,7 +903,8 @@ private Mono initiateScanAsync(String resourceGroupName, String managedIns /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -903,7 +923,8 @@ public void initiateScan(String resourceGroupName, String managedInstanceName, S /** * Executes a Vulnerability Assessment database scan. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -927,8 +948,8 @@ public void initiateScan(String resourceGroupName, String managedInstanceName, 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 the response of a VulnerabilityAssessmentScanRecord list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of vulnerability assessment scan records along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -956,8 +977,8 @@ public void initiateScan(String resourceGroupName, String managedInstanceName, 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 the response of a VulnerabilityAssessmentScanRecord list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of vulnerability assessment scan records along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentsClientImpl.java index b3fecd8ecc0b..045b518736ea 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -29,8 +29,8 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseVulnerabilityAssessmentsClient; -import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseVulnerabilityAssessmentListResult; +import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentAutoGeneratedInner; +import com.azure.resourcemanager.sql.models.DatabaseVulnerabilityAssessmentListResultAutoGenerated; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import reactor.core.publisher.Mono; @@ -65,88 +65,256 @@ public final class ManagedDatabaseVulnerabilityAssessmentsClientImpl * The interface defining all the services for SqlManagementClientManagedDatabaseVulnerabilityAssessments to be used * by the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedDatabaseVulnerabilityAssessments") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabaseVulnerabilityAssessmentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDatabase( + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, + Mono> createOrUpdate( + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") DatabaseVulnerabilityAssessmentInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByDatabaseNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets the database's vulnerability assessment. + * Lists the vulnerability assessments of a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the database's vulnerability assessment along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of the database's vulnerability assessments along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, String databaseName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; + return FluxUtil + .withContext( + context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), 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())); + } + + /** + * Lists the vulnerability assessments of a managed database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @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 database's vulnerability assessments along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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 + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists the vulnerability assessments of a managed database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 database's vulnerability assessments as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * Lists the vulnerability assessments of a managed database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @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 database's vulnerability assessments as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists the vulnerability assessments of a managed database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 database's vulnerability assessments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); + } + + /** + * Lists the vulnerability assessments of a managed database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @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 database's vulnerability assessments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, context)); + } + + /** + * Gets the database's vulnerability assessment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the database for which the vulnerability assessment is defined. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the database's vulnerability assessment along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -162,18 +330,23 @@ public Mono> getWithResponseAsync return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - vulnerabilityAssessmentName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -185,17 +358,13 @@ public Mono> getWithResponseAsync * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context) { + private Mono> getWithResponseAsync( + String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, 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.")); @@ -211,16 +380,21 @@ private Mono> getWithResponseAsyn return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -230,8 +404,8 @@ private Mono> getWithResponseAsyn * @return the database's vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String managedInstanceName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { + public Mono getAsync(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -239,7 +413,8 @@ public Mono getAsync(String resourceGroupN /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -250,7 +425,7 @@ public Mono getAsync(String resourceGroupN * @return the database's vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, + public Response getWithResponse(String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, @@ -260,7 +435,8 @@ public Response getWithResponse(String res /** * Gets the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -270,7 +446,7 @@ public Response getWithResponse(String res * @return the database's vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseVulnerabilityAssessmentInner get(String resourceGroupName, String managedInstanceName, + public DatabaseVulnerabilityAssessmentAutoGeneratedInner get(String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName) { return getWithResponse(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, Context.NONE).getValue(); @@ -279,7 +455,8 @@ public DatabaseVulnerabilityAssessmentInner get(String resourceGroupName, String /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -290,17 +467,14 @@ public DatabaseVulnerabilityAssessmentInner get(String resourceGroupName, String * @return a database vulnerability assessment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( + public Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String managedInstanceName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, DatabaseVulnerabilityAssessmentInner parameters) { + VulnerabilityAssessmentName vulnerabilityAssessmentName, + DatabaseVulnerabilityAssessmentAutoGeneratedInner 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.")); @@ -316,24 +490,28 @@ public Mono> createOrUpdateWithRe return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - vulnerabilityAssessmentName, contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, vulnerabilityAssessmentName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -345,18 +523,14 @@ public Mono> createOrUpdateWithRe * @return a database vulnerability assessment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String managedInstanceName, String databaseName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, DatabaseVulnerabilityAssessmentInner parameters, - Context context) { + VulnerabilityAssessmentName vulnerabilityAssessmentName, + DatabaseVulnerabilityAssessmentAutoGeneratedInner 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.")); @@ -372,23 +546,27 @@ private Mono> createOrUpdateWithR return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - vulnerabilityAssessmentName, contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -399,9 +577,9 @@ private Mono> createOrUpdateWithR * @return a database vulnerability assessment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, + public Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters) { + DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters) { return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -409,7 +587,8 @@ public Mono createOrUpdateAsync(String res /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -421,9 +600,10 @@ public Mono createOrUpdateAsync(String res * @return a database vulnerability assessment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters, Context context) { + public Response createOrUpdateWithResponse( + String resourceGroupName, String managedInstanceName, String databaseName, + VulnerabilityAssessmentName vulnerabilityAssessmentName, + DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, parameters, context).block(); } @@ -431,7 +611,8 @@ public Response createOrUpdateWithResponse /** * Creates or updates the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -442,9 +623,9 @@ public Response createOrUpdateWithResponse * @return a database vulnerability assessment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseVulnerabilityAssessmentInner createOrUpdate(String resourceGroupName, String managedInstanceName, - String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - DatabaseVulnerabilityAssessmentInner parameters) { + public DatabaseVulnerabilityAssessmentAutoGeneratedInner createOrUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, + DatabaseVulnerabilityAssessmentAutoGeneratedInner parameters) { return createOrUpdateWithResponse(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, parameters, Context.NONE).getValue(); } @@ -452,7 +633,8 @@ public DatabaseVulnerabilityAssessmentInner createOrUpdate(String resourceGroupN /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -468,10 +650,6 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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.")); @@ -487,17 +665,22 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - vulnerabilityAssessmentName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -514,10 +697,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -533,15 +712,20 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -560,7 +744,8 @@ public Mono deleteAsync(String resourceGroupName, String managedInstanceNa /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -580,7 +765,8 @@ public Response deleteWithResponse(String resourceGroupName, String manage /** * Removes the database's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. @@ -595,171 +781,6 @@ public void delete(String resourceGroupName, String managedInstanceName, String Context.NONE); } - /** - * Lists the vulnerability assessments of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database for which the vulnerability assessment is defined. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, String databaseName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, 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 vulnerability assessments of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database for which the vulnerability assessment is defined. - * @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 DatabaseVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the vulnerability assessments of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database for which the vulnerability assessment is defined. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseVulnerabilityAssessment list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Lists the vulnerability assessments of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database for which the vulnerability assessment is defined. - * @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 DatabaseVulnerabilityAssessment list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the vulnerability assessments of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database for which the vulnerability assessment is defined. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 DatabaseVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); - } - - /** - * Lists the vulnerability assessments of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database for which the vulnerability assessment is defined. - * @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 DatabaseVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, context)); - } - /** * Get the next page of items. * @@ -767,11 +788,11 @@ public PagedIterable listByDatabase(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 response of a DatabaseVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of the database's vulnerability assessments along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> + private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -783,8 +804,9 @@ public PagedIterable listByDatabase(String final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByDatabaseNext(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())); } @@ -796,12 +818,12 @@ public PagedIterable listByDatabase(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 response of a DatabaseVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of the database's vulnerability assessments along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync(String nextLink, - Context context) { + private Mono> + listByDatabaseNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabasesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabasesClientImpl.java index 02b944679c85..58e7f8da100d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabasesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabasesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -35,8 +35,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ManagedDatabasesClient; import com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedDatabaseListResult; import com.azure.resourcemanager.sql.models.CompleteDatabaseRestoreDefinition; +import com.azure.resourcemanager.sql.models.ManagedDatabaseListResult; import com.azure.resourcemanager.sql.models.ManagedDatabaseMoveDefinition; import com.azure.resourcemanager.sql.models.ManagedDatabaseStartMoveDefinition; import com.azure.resourcemanager.sql.models.ManagedDatabaseUpdate; @@ -73,131 +73,123 @@ public final class ManagedDatabasesClientImpl implements ManagedDatabasesClient * The interface defining all the services for SqlManagementClientManagedDatabases to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedDatabases") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedDatabasesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}") - @ExpectedResponses({ 200, 201, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ManagedDatabaseInner parameters, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ManagedDatabaseUpdate parameters, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedDatabaseInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases") - @ExpectedResponses({ 200 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedDatabaseUpdate parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/cancelMove") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> cancelMove(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> cancelMove(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedDatabaseMoveDefinition parameters, Context context); - @Headers({ "Accept: application/json;q=0.9" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/completeMove") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> completeMove(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> completeMove(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedDatabaseMoveDefinition parameters, Context context); - @Headers({ "Accept: application/json;q=0.9" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/completeRestore") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> completeRestore(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> completeRestore(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") CompleteDatabaseRestoreDefinition parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/reevaluateInaccessibleDatabaseState") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reevaluateInaccessibleDatabaseState(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/startMove") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> startMove(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> startMove(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedDatabaseStartMoveDefinition parameters, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/inaccessibleManagedDatabases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listInaccessibleByInstance(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listInaccessibleByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -205,14 +197,164 @@ Mono> listByInstanceNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listInaccessibleByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of managed databases. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed databases along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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"; + return FluxUtil + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of managed databases. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 managed databases along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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 + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of managed databases. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed databases as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of managed databases. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 managed databases as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName, + Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of managed databases. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed databases as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, String managedInstanceName) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); + } + + /** + * Gets a list of managed databases. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 managed databases as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + Context context) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); + } + /** * Gets a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -227,10 +369,6 @@ public Mono> getWithResponseAsync(String resource 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.")); @@ -242,17 +380,22 @@ public Mono> getWithResponseAsync(String resource if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -268,10 +411,6 @@ private Mono> getWithResponseAsync(String resourc 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.")); @@ -283,16 +422,21 @@ private Mono> getWithResponseAsync(String resourc if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -310,7 +454,8 @@ public Mono getAsync(String resourceGroupName, String mana /** * Gets a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param context The context to associate with this operation. @@ -328,7 +473,8 @@ public Response getWithResponse(String resourceGroupName, /** * Gets a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -344,7 +490,8 @@ public ManagedDatabaseInner get(String resourceGroupName, String managedInstance /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -360,10 +507,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -375,24 +518,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, contentType, - accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -409,10 +556,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -424,23 +567,26 @@ private Mono>> createOrUpdateWithResponseAsync(String if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -461,7 +607,8 @@ public PollerFlux, ManagedDatabaseInner> beginC /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -485,7 +632,8 @@ private PollerFlux, ManagedDatabaseInner> begin /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -504,7 +652,8 @@ public SyncPoller, ManagedDatabaseInner> beginC /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -525,7 +674,8 @@ public SyncPoller, ManagedDatabaseInner> beginC /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -544,7 +694,8 @@ public Mono createOrUpdateAsync(String resourceGroupName, /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -565,7 +716,8 @@ private Mono createOrUpdateAsync(String resourceGroupName, /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -583,7 +735,8 @@ public ManagedDatabaseInner createOrUpdate(String resourceGroupName, String mana /** * Creates a new database or updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The requested database resource state. @@ -600,28 +753,24 @@ public ManagedDatabaseInner createOrUpdate(String resourceGroupName, String mana } /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 managed database resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { 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.")); @@ -633,44 +782,36 @@ public Mono>> updateWithResponseAsync(String resourceG if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, contentType, - accept, parameters, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 managed database resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, 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.")); @@ -682,199 +823,187 @@ private Mono>> updateWithResponseAsync(String resource if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, contentType, accept, parameters, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 the {@link PollerFlux} for polling of a managed database resource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedDatabaseInner> beginUpdateAsync(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String databaseName) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedDatabaseInner.class, ManagedDatabaseInner.class, this.client.getContext()); + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 the {@link PollerFlux} for polling of a managed database resource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedDatabaseInner> beginUpdateAsync( - String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters, - Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + String databaseName, Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedDatabaseInner.class, ManagedDatabaseInner.class, context); + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 the {@link SyncPoller} for polling of a managed database resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedDatabaseInner> beginUpdate(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { - return this.beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String databaseName) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName).getSyncPoller(); } /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 the {@link SyncPoller} for polling of a managed database resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedDatabaseInner> beginUpdate(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) - .getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + String databaseName, Context context) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName, context).getSyncPoller(); } /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 managed database resource on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedDatabaseUpdate parameters) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters).last() + public Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName) { + return beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 managed database resource 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 managedInstanceName, - String databaseName, ManagedDatabaseUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context).last() + private Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, + Context context) { + return beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedDatabaseInner update(String resourceGroupName, String managedInstanceName, String databaseName, - ManagedDatabaseUpdate parameters) { - return updateAsync(resourceGroupName, managedInstanceName, databaseName, parameters).block(); + public void delete(String resourceGroupName, String managedInstanceName, String databaseName) { + deleteAsync(resourceGroupName, managedInstanceName, databaseName).block(); } /** - * Updates an existing database. + * Deletes a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. - * @param parameters The requested database resource 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 managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedDatabaseInner update(String resourceGroupName, String managedInstanceName, String databaseName, - ManagedDatabaseUpdate parameters, Context context) { - return updateAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context).block(); + public void delete(String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + deleteAsync(resourceGroupName, managedInstanceName, databaseName, context).block(); } /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 the {@link Response} on successful completion of {@link Mono}. + * @return a managed database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName) { + public Mono>> updateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseUpdate 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.")); @@ -886,35 +1015,44 @@ public Mono>> deleteWithResponseAsync(String resourceG if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 the {@link Response} on successful completion of {@link Mono}. + * @return a managed database resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseUpdate 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.")); @@ -926,302 +1064,193 @@ private Mono>> deleteWithResponseAsync(String resource if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, context); + return service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of a managed database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, - String databaseName) { + public PollerFlux, ManagedDatabaseInner> beginUpdateAsync(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + = updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedDatabaseInner.class, ManagedDatabaseInner.class, this.client.getContext()); } /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of a managed database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, - String databaseName, Context context) { + private PollerFlux, ManagedDatabaseInner> beginUpdateAsync( + String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters, + Context context) { context = this.client.mergeContext(context); Mono>> mono - = deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = updateWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedDatabaseInner.class, ManagedDatabaseInner.class, context); } /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of a managed database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, - String databaseName) { - return this.beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName).getSyncPoller(); + public SyncPoller, ManagedDatabaseInner> beginUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters).getSyncPoller(); } /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of a managed database resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, - String databaseName, Context context) { - return this.beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName, context).getSyncPoller(); + public SyncPoller, ManagedDatabaseInner> beginUpdate(String resourceGroupName, + String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context) + .getSyncPoller(); } /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 {@link Mono} that completes when a successful response is received. + * @return a managed database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName).last() + public Mono updateAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseUpdate parameters) { + return beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 {@link Mono} that completes when a successful response is received. + * @return a managed database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, - Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName, context).last() + private Mono updateAsync(String resourceGroupName, String managedInstanceName, + String databaseName, ManagedDatabaseUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String managedInstanceName, String databaseName) { - deleteAsync(resourceGroupName, managedInstanceName, databaseName).block(); + public ManagedDatabaseInner update(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseUpdate parameters) { + return updateAsync(resourceGroupName, managedInstanceName, databaseName, parameters).block(); } /** - * Deletes a managed database. + * Updates an existing database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. + * @param parameters The requested database resource 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 managed database resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String managedInstanceName, String databaseName, Context context) { - deleteAsync(resourceGroupName, managedInstanceName, databaseName, context).block(); - } - - /** - * Gets a list of managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed databases along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync(String resourceGroupName, - String managedInstanceName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, 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 a list of managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed databases along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync(String resourceGroupName, - String managedInstanceName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed databases as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed databases as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName, - Context context) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed databases as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, String managedInstanceName) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); - } - - /** - * Gets a list of managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed databases as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, - Context context) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); + public ManagedDatabaseInner update(String resourceGroupName, String managedInstanceName, String databaseName, + ManagedDatabaseUpdate parameters, Context context) { + return updateAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context).block(); } /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1237,10 +1266,6 @@ public Mono>> cancelMoveWithResponseAsync(String resou 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.")); @@ -1252,23 +1277,27 @@ public Mono>> cancelMoveWithResponseAsync(String resou if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; return FluxUtil - .withContext(context -> service.cancelMove(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, contentType, - parameters, context)) + .withContext( + context -> service.cancelMove(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1285,10 +1314,6 @@ private Mono>> cancelMoveWithResponseAsync(String reso 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.")); @@ -1300,22 +1325,25 @@ private Mono>> cancelMoveWithResponseAsync(String reso if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; context = this.client.mergeContext(context); - return service.cancelMove(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, contentType, - parameters, context); + return service.cancelMove(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1336,7 +1364,8 @@ public PollerFlux, Void> beginCancelMoveAsync(String resourceGr /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1359,7 +1388,8 @@ private PollerFlux, Void> beginCancelMoveAsync(String resourceG /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1378,7 +1408,8 @@ public SyncPoller, Void> beginCancelMove(String resourceGroupNa /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1398,7 +1429,8 @@ public SyncPoller, Void> beginCancelMove(String resourceGroupNa /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1417,7 +1449,8 @@ public Mono cancelMoveAsync(String resourceGroupName, String managedInstan /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1437,7 +1470,8 @@ private Mono cancelMoveAsync(String resourceGroupName, String managedInsta /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1454,7 +1488,8 @@ public void cancelMove(String resourceGroupName, String managedInstanceName, Str /** * Cancels a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the cancel managed database move operation. @@ -1472,7 +1507,8 @@ public void cancelMove(String resourceGroupName, String managedInstanceName, Str /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -1488,10 +1524,6 @@ public Mono>> completeMoveWithResponseAsync(String res 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.")); @@ -1503,23 +1535,27 @@ public Mono>> completeMoveWithResponseAsync(String res if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; return FluxUtil - .withContext(context -> service.completeMove(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, contentType, - parameters, context)) + .withContext( + context -> service.completeMove(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -1536,10 +1572,6 @@ private Mono>> completeMoveWithResponseAsync(String re 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.")); @@ -1551,22 +1583,25 @@ private Mono>> completeMoveWithResponseAsync(String re if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; context = this.client.mergeContext(context); - return service.completeMove(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, contentType, - parameters, context); + return service.completeMove(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -1587,7 +1622,8 @@ public PollerFlux, Void> beginCompleteMoveAsync(String resource /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -1610,7 +1646,8 @@ private PollerFlux, Void> beginCompleteMoveAsync(String resourc /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -1629,7 +1666,8 @@ public SyncPoller, Void> beginCompleteMove(String resourceGroup /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -1649,7 +1687,8 @@ public SyncPoller, Void> beginCompleteMove(String resourceGroup /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -1668,7 +1707,8 @@ public Mono completeMoveAsync(String resourceGroupName, String managedInst /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -1688,7 +1728,8 @@ private Mono completeMoveAsync(String resourceGroupName, String managedIns /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -1705,7 +1746,8 @@ public void completeMove(String resourceGroupName, String managedInstanceName, S /** * Completes a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the complete managed database move operation. @@ -1723,7 +1765,8 @@ public void completeMove(String resourceGroupName, String managedInstanceName, S /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -1739,10 +1782,6 @@ public Mono>> completeRestoreWithResponseAsync(String 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.")); @@ -1754,23 +1793,27 @@ public Mono>> completeRestoreWithResponseAsync(String if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; return FluxUtil - .withContext(context -> service.completeRestore(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, contentType, - parameters, context)) + .withContext( + context -> service.completeRestore(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -1788,10 +1831,6 @@ private Mono>> completeRestoreWithResponseAsync(String 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.")); @@ -1803,22 +1842,25 @@ private Mono>> completeRestoreWithResponseAsync(String if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; context = this.client.mergeContext(context); - return service.completeRestore(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, contentType, - parameters, context); + return service.completeRestore(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -1839,7 +1881,8 @@ public PollerFlux, Void> beginCompleteRestoreAsync(String resou /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -1863,7 +1906,8 @@ private PollerFlux, Void> beginCompleteRestoreAsync(String reso /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -1882,7 +1926,8 @@ public SyncPoller, Void> beginCompleteRestore(String resourceGr /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -1902,7 +1947,8 @@ public SyncPoller, Void> beginCompleteRestore(String resourceGr /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -1921,7 +1967,8 @@ public Mono completeRestoreAsync(String resourceGroupName, String managedI /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -1942,7 +1989,8 @@ private Mono completeRestoreAsync(String resourceGroupName, String managed /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -1959,7 +2007,8 @@ public void completeRestore(String resourceGroupName, String managedInstanceName /** * Completes the restore operation on a managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters The definition for completing the restore of this managed database. @@ -1974,248 +2023,11 @@ public void completeRestore(String resourceGroupName, String managedInstanceName completeRestoreAsync(resourceGroupName, managedInstanceName, databaseName, parameters, context).block(); } - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> reevaluateInaccessibleDatabaseStateWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.reevaluateInaccessibleDatabaseState(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, - databaseName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reevaluateInaccessibleDatabaseStateWithResponseAsync( - String resourceGroupName, String managedInstanceName, String databaseName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.reevaluateInaccessibleDatabaseState(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, accept, context); - } - - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedDatabaseInner> - beginReevaluateInaccessibleDatabaseStateAsync(String resourceGroupName, String managedInstanceName, - String databaseName) { - Mono>> mono = reevaluateInaccessibleDatabaseStateWithResponseAsync(resourceGroupName, - managedInstanceName, databaseName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedDatabaseInner.class, ManagedDatabaseInner.class, this.client.getContext()); - } - - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 PollerFlux} for polling of a managed database resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedDatabaseInner> - beginReevaluateInaccessibleDatabaseStateAsync(String resourceGroupName, String managedInstanceName, - String databaseName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = reevaluateInaccessibleDatabaseStateWithResponseAsync(resourceGroupName, - managedInstanceName, databaseName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedDatabaseInner.class, ManagedDatabaseInner.class, context); - } - - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedDatabaseInner> beginReevaluateInaccessibleDatabaseState( - String resourceGroupName, String managedInstanceName, String databaseName) { - return this.beginReevaluateInaccessibleDatabaseStateAsync(resourceGroupName, managedInstanceName, databaseName) - .getSyncPoller(); - } - - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedDatabaseInner> beginReevaluateInaccessibleDatabaseState( - String resourceGroupName, String managedInstanceName, String databaseName, Context context) { - return this - .beginReevaluateInaccessibleDatabaseStateAsync(resourceGroupName, managedInstanceName, databaseName, - context) - .getSyncPoller(); - } - - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono reevaluateInaccessibleDatabaseStateAsync(String resourceGroupName, - String managedInstanceName, String databaseName) { - return beginReevaluateInaccessibleDatabaseStateAsync(resourceGroupName, managedInstanceName, databaseName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reevaluateInaccessibleDatabaseStateAsync(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { - return beginReevaluateInaccessibleDatabaseStateAsync(resourceGroupName, managedInstanceName, databaseName, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedDatabaseInner reevaluateInaccessibleDatabaseState(String resourceGroupName, - String managedInstanceName, String databaseName) { - return reevaluateInaccessibleDatabaseStateAsync(resourceGroupName, managedInstanceName, databaseName).block(); - } - - /** - * Reevaluates the inaccessibility state of a managed database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a managed database resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedDatabaseInner reevaluateInaccessibleDatabaseState(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { - return reevaluateInaccessibleDatabaseStateAsync(resourceGroupName, managedInstanceName, databaseName, context) - .block(); - } - /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2231,10 +2043,6 @@ public Mono>> startMoveWithResponseAsync(String resour 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.")); @@ -2246,23 +2054,26 @@ public Mono>> startMoveWithResponseAsync(String resour if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; return FluxUtil - .withContext(context -> service.startMove(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, contentType, - parameters, context)) + .withContext(context -> service.startMove(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2280,10 +2091,6 @@ private Mono>> startMoveWithResponseAsync(String resou 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.")); @@ -2295,22 +2102,25 @@ private Mono>> startMoveWithResponseAsync(String resou if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; context = this.client.mergeContext(context); - return service.startMove(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, contentType, - parameters, context); + return service.startMove(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2331,7 +2141,8 @@ public PollerFlux, Void> beginStartMoveAsync(String resourceGro /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2354,7 +2165,8 @@ private PollerFlux, Void> beginStartMoveAsync(String resourceGr /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2373,7 +2185,8 @@ public SyncPoller, Void> beginStartMove(String resourceGroupNam /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2393,7 +2206,8 @@ public SyncPoller, Void> beginStartMove(String resourceGroupNam /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2412,7 +2226,8 @@ public Mono startMoveAsync(String resourceGroupName, String managedInstanc /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2432,7 +2247,8 @@ private Mono startMoveAsync(String resourceGroupName, String managedInstan /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2449,7 +2265,8 @@ public void startMove(String resourceGroupName, String managedInstanceName, Stri /** * Starts a managed database move operation. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param parameters Parameters of the start managed database move operation. @@ -2467,7 +2284,8 @@ public void startMove(String resourceGroupName, String managedInstanceName, Stri /** * Gets a list of inaccessible managed databases in a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2482,10 +2300,6 @@ public void startMove(String resourceGroupName, String managedInstanceName, Stri 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.")); @@ -2494,11 +2308,14 @@ public void startMove(String resourceGroupName, String managedInstanceName, Stri return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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"; return FluxUtil - .withContext( - context -> service.listInaccessibleByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context)) + .withContext(context -> service.listInaccessibleByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); @@ -2507,7 +2324,8 @@ public void startMove(String resourceGroupName, String managedInstanceName, Stri /** * Gets a list of inaccessible managed databases in a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2523,10 +2341,6 @@ private Mono> listInaccessibleByInstanceSing 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.")); @@ -2535,11 +2349,15 @@ private Mono> listInaccessibleByInstanceSing return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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 - .listInaccessibleByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context) + .listInaccessibleByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -2547,7 +2365,8 @@ private Mono> listInaccessibleByInstanceSing /** * Gets a list of inaccessible managed databases in a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2565,7 +2384,8 @@ public PagedFlux listInaccessibleByInstanceAsync(String re /** * Gets a list of inaccessible managed databases in a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2585,7 +2405,8 @@ private PagedFlux listInaccessibleByInstanceAsync(String r /** * Gets a list of inaccessible managed databases in a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2602,7 +2423,8 @@ public PagedIterable listInaccessibleByInstance(String res /** * Gets a list of inaccessible managed databases in a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2677,8 +2499,7 @@ private Mono> listByInstanceNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 inaccessible managed databases in a managed instance along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of managed databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listInaccessibleByInstanceNextSinglePageAsync(String nextLink) { @@ -2706,8 +2527,7 @@ private Mono> listInaccessibleByInstanceNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 inaccessible managed databases in a managed instance along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of managed databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listInaccessibleByInstanceNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAdministratorsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAdministratorsClientImpl.java index a2f4938bf2a5..af12a1972c7c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAdministratorsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAdministratorsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,8 +33,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ManagedInstanceAdministratorsClient; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceAdministratorInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedInstanceAdministratorListResult; import com.azure.resourcemanager.sql.models.AdministratorName; +import com.azure.resourcemanager.sql.models.ManagedInstanceAdministratorListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -68,49 +68,51 @@ public final class ManagedInstanceAdministratorsClientImpl implements ManagedIns * The interface defining all the services for SqlManagementClientManagedInstanceAdministrators to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedInstanceAdministrators") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstanceAdministratorsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByInstance(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("administratorName") AdministratorName administratorName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("administratorName") AdministratorName administratorName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("administratorName") AdministratorName administratorName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedInstanceAdministratorInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedInstanceAdministratorInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("administratorName") AdministratorName administratorName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, + @PathParam("administratorName") AdministratorName administratorName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @@ -118,14 +120,168 @@ Mono> listByInstance(@HostParam @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of managed instance administrators. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed instance administrators along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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"; + return FluxUtil + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of managed instance administrators. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 managed instance administrators along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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 + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of managed instance administrators. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed instance administrators as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of managed instance administrators. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 managed instance administrators as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of managed instance administrators. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed instance administrators as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); + } + + /** + * Gets a list of managed instance administrators. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 managed instance administrators as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); + } + /** * Gets a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -140,10 +296,6 @@ public Mono> getWithResponseAsync(St 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.")); @@ -156,18 +308,22 @@ public Mono> getWithResponseAsync(St return Mono .error(new IllegalArgumentException("Parameter administratorName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, administratorName, accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + administratorName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -183,10 +339,6 @@ private Mono> getWithResponseAsync(S 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.")); @@ -199,16 +351,21 @@ private Mono> getWithResponseAsync(S return Mono .error(new IllegalArgumentException("Parameter administratorName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, administratorName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, administratorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -226,7 +383,8 @@ public Mono getAsync(String resourceGroupName /** * Gets a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -244,7 +402,8 @@ public Response getWithResponse(String resour /** * Gets a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -261,7 +420,8 @@ public ManagedInstanceAdministratorInner get(String resourceGroupName, String ma /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -278,10 +438,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -294,24 +450,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter administratorName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, administratorName, contentType, - accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, administratorName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -330,10 +490,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -346,23 +502,27 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter administratorName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, administratorName, contentType, - accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + administratorName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -385,7 +545,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -410,7 +571,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -430,7 +592,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -452,7 +615,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -471,7 +635,8 @@ public Mono createOrUpdateAsync(String resour /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -493,7 +658,8 @@ private Mono createOrUpdateAsync(String resou /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -511,7 +677,8 @@ public ManagedInstanceAdministratorInner createOrUpdate(String resourceGroupName /** * Creates or updates a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param parameters The requested administrator parameters. @@ -531,7 +698,8 @@ public ManagedInstanceAdministratorInner createOrUpdate(String resourceGroupName /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -546,10 +714,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -562,16 +726,21 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter administratorName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, administratorName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + administratorName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -587,10 +756,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -603,15 +768,20 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter administratorName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, administratorName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, administratorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -631,7 +801,8 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -653,7 +824,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -670,7 +842,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -689,7 +862,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -707,7 +881,8 @@ public Mono deleteAsync(String resourceGroupName, String managedInstanceNa /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -726,7 +901,8 @@ private Mono deleteAsync(String resourceGroupName, String managedInstanceN /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -741,7 +917,8 @@ public void delete(String resourceGroupName, String managedInstanceName, Adminis /** * Deletes a managed instance administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param administratorName The administratorName parameter. * @param context The context to associate with this operation. @@ -755,153 +932,6 @@ public void delete(String resourceGroupName, String managedInstanceName, Adminis deleteAsync(resourceGroupName, managedInstanceName, administratorName, context).block(); } - /** - * Gets a list of managed instance administrators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instance administrators along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, 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 a list of managed instance administrators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed instance administrators along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of managed instance administrators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instance administrators as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of managed instance administrators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed instance administrators as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed instance administrators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instance administrators as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); - } - - /** - * Gets a list of managed instance administrators. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed instance administrators as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); - } - /** * Get the next page of items. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAdvancedThreatProtectionSettingsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAdvancedThreatProtectionSettingsClientImpl.java deleted file mode 100644 index 407c43dbcffd..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAdvancedThreatProtectionSettingsClientImpl.java +++ /dev/null @@ -1,749 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.fluent.ManagedInstanceAdvancedThreatProtectionSettingsClient; -import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceAdvancedThreatProtectionInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedInstanceAdvancedThreatProtectionListResult; -import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; -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 - * ManagedInstanceAdvancedThreatProtectionSettingsClient. - */ -public final class ManagedInstanceAdvancedThreatProtectionSettingsClientImpl - implements ManagedInstanceAdvancedThreatProtectionSettingsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedInstanceAdvancedThreatProtectionSettingsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of ManagedInstanceAdvancedThreatProtectionSettingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedInstanceAdvancedThreatProtectionSettingsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(ManagedInstanceAdvancedThreatProtectionSettingsService.class, - client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientManagedInstanceAdvancedThreatProtectionSettings to - * be used by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedInstanceAdvancedThreatProtectionSettings") - public interface ManagedInstanceAdvancedThreatProtectionSettingsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedInstanceAdvancedThreatProtectionInner parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/advancedThreatProtectionSettings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a managed instance's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced 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 managed instance's Advanced Threat Protection state along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, AdvancedThreatProtectionName advancedThreatProtectionName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (advancedThreatProtectionName == null) { - return Mono.error( - new IllegalArgumentException("Parameter advancedThreatProtectionName 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, managedInstanceName, advancedThreatProtectionName, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a managed instance's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced 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 managed instance's Advanced Threat Protection state along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, AdvancedThreatProtectionName advancedThreatProtectionName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (advancedThreatProtectionName == null) { - return Mono.error( - new IllegalArgumentException("Parameter advancedThreatProtectionName 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, managedInstanceName, advancedThreatProtectionName, accept, context); - } - - /** - * Get a managed instance's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced 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 managed instance's Advanced Threat Protection state on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, - String managedInstanceName, AdvancedThreatProtectionName advancedThreatProtectionName) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, advancedThreatProtectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a managed instance's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced 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 managed instance's Advanced Threat Protection state along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String managedInstanceName, AdvancedThreatProtectionName advancedThreatProtectionName, Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, advancedThreatProtectionName, context) - .block(); - } - - /** - * Get a managed instance's Advanced Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced 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 managed instance's Advanced Threat Protection state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceAdvancedThreatProtectionInner get(String resourceGroupName, String managedInstanceName, - AdvancedThreatProtectionName advancedThreatProtectionName) { - return getWithResponse(resourceGroupName, managedInstanceName, advancedThreatProtectionName, Context.NONE) - .getValue(); - } - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 managed instance Advanced Threat Protection along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (advancedThreatProtectionName == null) { - return Mono.error( - new IllegalArgumentException("Parameter advancedThreatProtectionName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, advancedThreatProtectionName, - contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 managed instance Advanced Threat Protection along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (advancedThreatProtectionName == null) { - return Mono.error( - new IllegalArgumentException("Parameter advancedThreatProtectionName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, advancedThreatProtectionName, - contentType, accept, parameters, context); - } - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 the {@link PollerFlux} for polling of a managed instance Advanced Threat Protection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - PollerFlux, ManagedInstanceAdvancedThreatProtectionInner> - beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner parameters) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, - advancedThreatProtectionName, parameters); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), ManagedInstanceAdvancedThreatProtectionInner.class, - ManagedInstanceAdvancedThreatProtectionInner.class, this.client.getContext()); - } - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 the {@link PollerFlux} for polling of a managed instance Advanced Threat Protection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, ManagedInstanceAdvancedThreatProtectionInner> - beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, - advancedThreatProtectionName, parameters, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), ManagedInstanceAdvancedThreatProtectionInner.class, - ManagedInstanceAdvancedThreatProtectionInner.class, context); - } - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 the {@link SyncPoller} for polling of a managed instance Advanced Threat Protection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, ManagedInstanceAdvancedThreatProtectionInner> - beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner parameters) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, advancedThreatProtectionName, parameters) - .getSyncPoller(); - } - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 the {@link SyncPoller} for polling of a managed instance Advanced Threat Protection. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, ManagedInstanceAdvancedThreatProtectionInner> - beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, - AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner parameters, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, advancedThreatProtectionName, parameters, - context) - .getSyncPoller(); - } - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 managed instance Advanced Threat Protection on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, - String managedInstanceName, AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, advancedThreatProtectionName, - parameters).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 managed instance Advanced Threat Protection on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String managedInstanceName, AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, advancedThreatProtectionName, - parameters, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 managed instance Advanced Threat Protection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, - String managedInstanceName, AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner parameters) { - return createOrUpdateAsync(resourceGroupName, managedInstanceName, advancedThreatProtectionName, parameters) - .block(); - } - - /** - * Creates or updates Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. - * @param parameters The managed instance Advanced 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 managed instance Advanced Threat Protection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceAdvancedThreatProtectionInner createOrUpdate(String resourceGroupName, - String managedInstanceName, AdvancedThreatProtectionName advancedThreatProtectionName, - ManagedInstanceAdvancedThreatProtectionInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, managedInstanceName, advancedThreatProtectionName, parameters, - context).block(); - } - - /** - * Get the managed instance's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 instance's Advanced Threat Protection settings along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, 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 managed instance's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 instance's Advanced Threat Protection settings along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the managed instance's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 instance's Advanced Threat Protection settings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Get the managed instance's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 instance's Advanced Threat Protection settings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the managed instance's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 instance's Advanced Threat Protection settings as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); - } - - /** - * Get the managed instance's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 instance's Advanced Threat Protection settings as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, 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 the managed instance's Advanced Threat Protection settings along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceNextSinglePageAsync(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.listByInstanceNext(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. - * @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 instance's Advanced Threat Protection settings along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceNextSinglePageAsync(String nextLink, Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAzureADOnlyAuthenticationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAzureADOnlyAuthenticationsClientImpl.java index 21de93da9ad7..9ab40f60e3b9 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAzureADOnlyAuthenticationsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAzureADOnlyAuthenticationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,8 +33,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ManagedInstanceAzureADOnlyAuthenticationsClient; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceAzureADOnlyAuthenticationInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedInstanceAzureADOnlyAuthListResult; import com.azure.resourcemanager.sql.models.AuthenticationName; +import com.azure.resourcemanager.sql.models.ManagedInstanceAzureADOnlyAuthListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -70,49 +70,51 @@ public final class ManagedInstanceAzureADOnlyAuthenticationsClientImpl * The interface defining all the services for SqlManagementClientManagedInstanceAzureADOnlyAuthentications to be * used by the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedInstanceAzureADOnlyAuthentications") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstanceAzureADOnlyAuthenticationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByInstance(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("authenticationName") AuthenticationName authenticationName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("authenticationName") AuthenticationName authenticationName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedInstanceAzureADOnlyAuthenticationInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedInstanceAzureADOnlyAuthenticationInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("authenticationName") AuthenticationName authenticationName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, + @PathParam("authenticationName") AuthenticationName authenticationName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @@ -120,14 +122,173 @@ Mono> listByInstance(@HostPar @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Azure Active Directory only authentications along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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"; + return FluxUtil + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 Azure Active Directory only authentications along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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 + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Azure Active Directory only authentications as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 Azure Active Directory only authentications as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Azure Active Directory only authentications as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); + } + + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 Azure Active Directory only authentications as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); + } + /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -143,10 +304,6 @@ public Mono> getWithResp 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.")); @@ -159,18 +316,22 @@ public Mono> getWithResp return Mono .error(new IllegalArgumentException("Parameter authenticationName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, authenticationName, accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + authenticationName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -187,10 +348,6 @@ private Mono> getWithRes 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.")); @@ -203,16 +360,21 @@ private Mono> getWithRes return Mono .error(new IllegalArgumentException("Parameter authenticationName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, authenticationName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, authenticationName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -230,7 +392,8 @@ public Mono getAsync(String resou /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -248,7 +411,8 @@ public Response getWithResponse(S /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -266,7 +430,8 @@ public ManagedInstanceAzureADOnlyAuthenticationInner get(String resourceGroupNam * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -285,10 +450,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -301,17 +462,20 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter authenticationName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, authenticationName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, authenticationName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -319,7 +483,8 @@ public Mono>> createOrUpdateWithResponseAsync(String r * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -339,10 +504,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -355,24 +516,28 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter authenticationName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, authenticationName, contentType, - accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + authenticationName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -399,7 +564,8 @@ private Mono>> createOrUpdateWithResponseAsync(String * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -429,7 +595,8 @@ private Mono>> createOrUpdateWithResponseAsync(String * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -452,7 +619,8 @@ private Mono>> createOrUpdateWithResponseAsync(String * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -477,7 +645,8 @@ private Mono>> createOrUpdateWithResponseAsync(String * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -499,7 +668,8 @@ public Mono createOrUpdateAsync(S * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -523,7 +693,8 @@ private Mono createOrUpdateAsync( * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -544,7 +715,8 @@ public ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate(String resou * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -566,7 +738,8 @@ public ManagedInstanceAzureADOnlyAuthenticationInner createOrUpdate(String resou /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -581,10 +754,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -597,16 +766,21 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter authenticationName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, authenticationName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + authenticationName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -622,10 +796,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -638,15 +808,20 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter authenticationName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, authenticationName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, authenticationName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -666,7 +841,8 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -688,7 +864,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -705,7 +882,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -724,7 +902,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -742,7 +921,8 @@ public Mono deleteAsync(String resourceGroupName, String managedInstanceNa /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -761,7 +941,8 @@ private Mono deleteAsync(String resourceGroupName, String managedInstanceN /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -776,7 +957,8 @@ public void delete(String resourceGroupName, String managedInstanceName, Authent /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -790,158 +972,6 @@ public void delete(String resourceGroupName, String managedInstanceName, Authent deleteAsync(resourceGroupName, managedInstanceName, authenticationName, context).block(); } - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Azure Active Directory only authentications along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, 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 a list of server Azure Active Directory only authentications. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 Azure Active Directory only authentications along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Azure Active Directory only authentications as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 Azure Active Directory only authentications as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Azure Active Directory only authentications as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); - } - - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 Azure Active Directory only authentications as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); - } - /** * Get the next page of items. * @@ -949,8 +979,8 @@ public PagedIterable listByInstan * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Azure Active Directory only authentications along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of active directory only authentications along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -979,8 +1009,8 @@ public PagedIterable listByInstan * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Azure Active Directory only authentications along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of active directory only authentications along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceDtcsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceDtcsClientImpl.java deleted file mode 100644 index 6891771fdc7f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceDtcsClientImpl.java +++ /dev/null @@ -1,706 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.fluent.ManagedInstanceDtcsClient; -import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceDtcInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedInstanceDtcListResult; -import com.azure.resourcemanager.sql.models.DtcName; -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 ManagedInstanceDtcsClient. - */ -public final class ManagedInstanceDtcsClientImpl implements ManagedInstanceDtcsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedInstanceDtcsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of ManagedInstanceDtcsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedInstanceDtcsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(ManagedInstanceDtcsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientManagedInstanceDtcs to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedInstanceDtcs") - public interface ManagedInstanceDtcsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dtc/{dtcName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @PathParam("dtcName") DtcName dtcName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dtc/{dtcName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @PathParam("dtcName") DtcName dtcName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedInstanceDtcInner parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dtc") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedInstance(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed instance DTC settings along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, DtcName dtcName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (dtcName == null) { - return Mono.error(new IllegalArgumentException("Parameter dtcName 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, managedInstanceName, dtcName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @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 managed instance DTC settings along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, DtcName dtcName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (dtcName == null) { - return Mono.error(new IllegalArgumentException("Parameter dtcName 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, managedInstanceName, dtcName, accept, context); - } - - /** - * Gets managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed instance DTC settings on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String managedInstanceName, - DtcName dtcName) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, dtcName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @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 managed instance DTC settings along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String managedInstanceName, - DtcName dtcName, Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, dtcName, context).block(); - } - - /** - * Gets managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed instance DTC settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceDtcInner get(String resourceGroupName, String managedInstanceName, DtcName dtcName) { - return getWithResponse(resourceGroupName, managedInstanceName, dtcName, Context.NONE).getValue(); - } - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 sQL Managed Instance DTC along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, DtcName dtcName, ManagedInstanceDtcInner 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (dtcName == null) { - return Mono.error(new IllegalArgumentException("Parameter dtcName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, dtcName, contentType, accept, - parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 sQL Managed Instance DTC along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, DtcName dtcName, ManagedInstanceDtcInner 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (dtcName == null) { - return Mono.error(new IllegalArgumentException("Parameter dtcName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, dtcName, contentType, accept, - parameters, context); - } - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 {@link PollerFlux} for polling of sQL Managed Instance DTC. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedInstanceDtcInner> beginCreateOrUpdateAsync( - String resourceGroupName, String managedInstanceName, DtcName dtcName, ManagedInstanceDtcInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, dtcName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedInstanceDtcInner.class, ManagedInstanceDtcInner.class, - this.client.getContext()); - } - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 {@link PollerFlux} for polling of sQL Managed Instance DTC. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedInstanceDtcInner> beginCreateOrUpdateAsync( - String resourceGroupName, String managedInstanceName, DtcName dtcName, ManagedInstanceDtcInner parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, dtcName, parameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedInstanceDtcInner.class, ManagedInstanceDtcInner.class, context); - } - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 {@link SyncPoller} for polling of sQL Managed Instance DTC. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedInstanceDtcInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, DtcName dtcName, ManagedInstanceDtcInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, dtcName, parameters) - .getSyncPoller(); - } - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 {@link SyncPoller} for polling of sQL Managed Instance DTC. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedInstanceDtcInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, DtcName dtcName, ManagedInstanceDtcInner parameters, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, dtcName, parameters, context) - .getSyncPoller(); - } - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 sQL Managed Instance DTC on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, - DtcName dtcName, ManagedInstanceDtcInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, dtcName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 sQL Managed Instance DTC on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, - DtcName dtcName, ManagedInstanceDtcInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, dtcName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 sQL Managed Instance DTC. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceDtcInner createOrUpdate(String resourceGroupName, String managedInstanceName, DtcName dtcName, - ManagedInstanceDtcInner parameters) { - return createOrUpdateAsync(resourceGroupName, managedInstanceName, dtcName, parameters).block(); - } - - /** - * Updates managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param dtcName The name of the managed instance DTC. - * @param parameters Managed instance DTC 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 sQL Managed Instance DTC. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceDtcInner createOrUpdate(String resourceGroupName, String managedInstanceName, DtcName dtcName, - ManagedInstanceDtcInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, managedInstanceName, dtcName, parameters, context).block(); - } - - /** - * Gets a list of managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instance DTC settings along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceSinglePageAsync(String resourceGroupName, - String managedInstanceName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByManagedInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, 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 a list of managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed instance DTC settings along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceSinglePageAsync(String resourceGroupName, - String managedInstanceName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByManagedInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instance DTC settings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByManagedInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed instance DTC settings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instance DTC settings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName)); - } - - /** - * Gets a list of managed instance DTC settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed instance DTC settings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, 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 managed instance DTC settings along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceNextSinglePageAsync(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.listByManagedInstanceNext(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. - * @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 managed instance DTC settings along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceNextSinglePageAsync(String nextLink, - Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceEncryptionProtectorsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceEncryptionProtectorsClientImpl.java index 54f423015c25..149b45b78cd1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceEncryptionProtectorsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceEncryptionProtectorsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,8 +33,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ManagedInstanceEncryptionProtectorsClient; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceEncryptionProtectorInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedInstanceEncryptionProtectorListResult; import com.azure.resourcemanager.sql.models.EncryptionProtectorName; +import com.azure.resourcemanager.sql.models.ManagedInstanceEncryptionProtectorListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -68,65 +68,221 @@ public final class ManagedInstanceEncryptionProtectorsClientImpl implements Mana * The interface defining all the services for SqlManagementClientManagedInstanceEncryptionProtectors to be used by * the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedInstanceEncryptionProtectors") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstanceEncryptionProtectorsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedInstanceEncryptionProtectorInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedInstanceEncryptionProtectorInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}/revalidate") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> revalidate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> revalidate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, Context context); + @PathParam("encryptionProtectorName") EncryptionProtectorName encryptionProtectorName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of managed instance encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed instance encryption protectors along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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"; + return FluxUtil + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of managed instance encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 managed instance encryption protectors along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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 + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of managed instance encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed instance encryption protectors as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of managed instance encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 managed instance encryption protectors as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of managed instance encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed instance encryption protectors as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); + } + + /** + * Gets a list of managed instance encryption protectors. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 managed instance encryption protectors as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); + } + /** * Gets a managed instance encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -142,10 +298,6 @@ public Mono> getWithResponseAs 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.")); @@ -158,18 +310,22 @@ public Mono> getWithResponseAs return Mono.error( new IllegalArgumentException("Parameter encryptionProtectorName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, encryptionProtectorName, - accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + encryptionProtectorName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed instance encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @param context The context to associate with this operation. @@ -186,10 +342,6 @@ private Mono> getWithResponseA 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.")); @@ -202,16 +354,21 @@ private Mono> getWithResponseA return Mono.error( new IllegalArgumentException("Parameter encryptionProtectorName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, encryptionProtectorName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, encryptionProtectorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a managed instance encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -229,7 +386,8 @@ public Mono getAsync(String resourceGro /** * Gets a managed instance encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @param context The context to associate with this operation. @@ -247,7 +405,8 @@ public Response getWithResponse(String /** * Gets a managed instance encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -265,9 +424,10 @@ public ManagedInstanceEncryptionProtectorInner get(String resourceGroupName, Str /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -283,10 +443,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -299,26 +455,30 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono.error( new IllegalArgumentException("Parameter encryptionProtectorName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, encryptionProtectorName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, encryptionProtectorName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -335,10 +495,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -351,25 +507,29 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter encryptionProtectorName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, encryptionProtectorName, - contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + encryptionProtectorName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -391,9 +551,10 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -418,9 +579,10 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -439,9 +601,10 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -463,9 +626,10 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -484,9 +648,10 @@ public Mono createOrUpdateAsync(String /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -505,9 +670,10 @@ private Mono createOrUpdateAsync(String /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -523,9 +689,10 @@ public ManagedInstanceEncryptionProtectorInner createOrUpdate(String resourceGro /** * Updates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector to be updated. * @param parameters The requested encryption protector resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -541,160 +708,13 @@ public ManagedInstanceEncryptionProtectorInner createOrUpdate(String resourceGro .block(); } - /** - * Gets a list of managed instance encryption protectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instance encryption protectors along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, 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 a list of managed instance encryption protectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed instance encryption protectors along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of managed instance encryption protectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instance encryption protectors as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of managed instance encryption protectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed instance encryption protectors as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed instance encryption protectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instance encryption protectors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); - } - - /** - * Gets a list of managed instance encryption protectors. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed instance encryption protectors as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); - } - /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -707,10 +727,6 @@ public Mono>> revalidateWithResponseAsync(String resou 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.")); @@ -723,19 +739,24 @@ public Mono>> revalidateWithResponseAsync(String resou return Mono.error( new IllegalArgumentException("Parameter encryptionProtectorName 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.")); + } return FluxUtil - .withContext(context -> service.revalidate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, encryptionProtectorName, - context)) + .withContext( + context -> service.revalidate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + encryptionProtectorName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -749,10 +770,6 @@ private Mono>> revalidateWithResponseAsync(String reso 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.")); @@ -765,17 +782,22 @@ private Mono>> revalidateWithResponseAsync(String reso return Mono.error( new IllegalArgumentException("Parameter encryptionProtectorName 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.")); + } context = this.client.mergeContext(context); - return service.revalidate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, encryptionProtectorName, context); + return service.revalidate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + encryptionProtectorName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -793,9 +815,10 @@ public PollerFlux, Void> beginRevalidateAsync(String resourceGr /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -815,9 +838,10 @@ private PollerFlux, Void> beginRevalidateAsync(String resourceG /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -833,9 +857,10 @@ public SyncPoller, Void> beginRevalidate(String resourceGroupNa /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -852,9 +877,10 @@ public SyncPoller, Void> beginRevalidate(String resourceGroupNa /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -870,9 +896,10 @@ public Mono revalidateAsync(String resourceGroupName, String managedInstan /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -889,9 +916,10 @@ private Mono revalidateAsync(String resourceGroupName, String managedInsta /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. @@ -905,9 +933,10 @@ public void revalidate(String resourceGroupName, String managedInstanceName, /** * Revalidates an existing encryption protector. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be retrieved. + * @param encryptionProtectorName The name of the encryption protector 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. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceKeysClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceKeysClientImpl.java index b16cd5a994c5..3bd07bd6d65c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceKeysClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceKeysClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ManagedInstanceKeysClient; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceKeyInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedInstanceKeyListResult; +import com.azure.resourcemanager.sql.models.ManagedInstanceKeyListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,62 +67,243 @@ public final class ManagedInstanceKeysClientImpl implements ManagedInstanceKeysC * The interface defining all the services for SqlManagementClientManagedInstanceKeys to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedInstanceKeys") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstanceKeysService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByInstance(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("managedInstanceName") String managedInstanceName, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("keyName") String keyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("keyName") String keyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedInstanceKeyInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedInstanceKeyInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("keyName") String keyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of managed instance keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param filter An OData filter expression that filters elements in the collection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed instance keys along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, String filter) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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"; + return FluxUtil + .withContext( + context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + filter, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of managed instance keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param filter An OData filter expression that filters elements in the collection. + * @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 managed instance keys along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, String filter, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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 + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, filter, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of managed instance keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param filter An OData filter expression that filters elements in the collection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed instance keys as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName, + String filter) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, filter), + nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of managed instance keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed instance keys as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + final String filter = null; + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, filter), + nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of managed instance keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param filter An OData filter expression that filters elements in the collection. + * @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 managed instance keys as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName, + String filter, Context context) { + return new PagedFlux<>( + () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, filter, context), + nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of managed instance keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed instance keys as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, String managedInstanceName) { + final String filter = null; + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, filter)); + } + + /** + * Gets a list of managed instance keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param filter An OData filter expression that filters elements in the collection. + * @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 managed instance keys as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, + String filter, Context context) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, filter, context)); + } + /** * Gets a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -137,10 +318,6 @@ public Mono> getWithResponseAsync(String resou 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.")); @@ -152,17 +329,22 @@ public Mono> getWithResponseAsync(String resou if (keyName == null) { return Mono.error(new IllegalArgumentException("Parameter keyName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, keyName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + keyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @param context The context to associate with this operation. @@ -178,10 +360,6 @@ private Mono> getWithResponseAsync(String reso 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.")); @@ -193,16 +371,21 @@ private Mono> getWithResponseAsync(String reso if (keyName == null) { return Mono.error(new IllegalArgumentException("Parameter keyName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, keyName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, keyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -220,7 +403,8 @@ public Mono getAsync(String resourceGroupName, String m /** * Gets a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @param context The context to associate with this operation. @@ -238,7 +422,8 @@ public Response getWithResponse(String resourceGroupNam /** * Gets a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param keyName The name of the managed instance key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -254,9 +439,10 @@ public ManagedInstanceKeyInner get(String resourceGroupName, String managedInsta /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -270,10 +456,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -285,26 +467,30 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (keyName == null) { return Mono.error(new IllegalArgumentException("Parameter keyName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, keyName, contentType, accept, - parameters, context)) + .withContext( + context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + keyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -319,10 +505,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -334,25 +516,28 @@ private Mono>> createOrUpdateWithResponseAsync(String if (keyName == null) { return Mono.error(new IllegalArgumentException("Parameter keyName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, keyName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, keyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -372,9 +557,10 @@ public PollerFlux, ManagedInstanceKeyInner> /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -396,9 +582,10 @@ private PollerFlux, ManagedInstanceKeyInner> /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -415,9 +602,10 @@ public SyncPoller, ManagedInstanceKeyInner> /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -436,9 +624,10 @@ public SyncPoller, ManagedInstanceKeyInner> /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -455,9 +644,10 @@ public Mono createOrUpdateAsync(String resourceGroupNam /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -475,9 +665,10 @@ private Mono createOrUpdateAsync(String resourceGroupNa /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -493,9 +684,10 @@ public ManagedInstanceKeyInner createOrUpdate(String resourceGroupName, String m /** * Creates or updates a managed instance key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be operated on (updated or created). * @param parameters The requested managed instance key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -512,9 +704,10 @@ public ManagedInstanceKeyInner createOrUpdate(String resourceGroupName, String m /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -527,10 +720,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -542,18 +731,23 @@ public Mono>> deleteWithResponseAsync(String resourceG if (keyName == null) { return Mono.error(new IllegalArgumentException("Parameter keyName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, keyName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + keyName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @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. @@ -567,10 +761,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -582,17 +772,22 @@ private Mono>> deleteWithResponseAsync(String resource if (keyName == null) { return Mono.error(new IllegalArgumentException("Parameter keyName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, keyName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, keyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -610,9 +805,10 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @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. @@ -632,9 +828,10 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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,9 +846,10 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @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. @@ -667,9 +865,10 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -684,9 +883,10 @@ public Mono deleteAsync(String resourceGroupName, String managedInstanceNa /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @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. @@ -703,9 +903,10 @@ private Mono deleteAsync(String resourceGroupName, String managedInstanceN /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -718,9 +919,10 @@ public void delete(String resourceGroupName, String managedInstanceName, String /** * Deletes the managed instance key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param keyName The name of the managed instance key to be retrieved. + * @param keyName The name of the managed instance key to be deleted. * @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. @@ -731,177 +933,6 @@ public void delete(String resourceGroupName, String managedInstanceName, String deleteAsync(resourceGroupName, managedInstanceName, keyName, context).block(); } - /** - * Gets a list of managed instance keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param filter An OData filter expression that filters elements in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instance keys along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync(String resourceGroupName, - String managedInstanceName, String filter) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, filter, 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 a list of managed instance keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param filter An OData filter expression that filters elements in the collection. - * @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 managed instance keys along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync(String resourceGroupName, - String managedInstanceName, String filter, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of managed instance keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param filter An OData filter expression that filters elements in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instance keys as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName, - String filter) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, filter), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of managed instance keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instance keys as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName) { - final String filter = null; - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, filter), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of managed instance keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param filter An OData filter expression that filters elements in the collection. - * @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 managed instance keys as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync(String resourceGroupName, String managedInstanceName, - String filter, Context context) { - return new PagedFlux<>( - () -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, filter, context), - nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed instance keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instance keys as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, String managedInstanceName) { - final String filter = null; - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, filter)); - } - - /** - * Gets a list of managed instance keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param filter An OData filter expression that filters elements in the collection. - * @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 managed instance keys as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, String managedInstanceName, - String filter, Context context) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, filter, context)); - } - /** * Get the next page of items. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceLongTermRetentionPoliciesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceLongTermRetentionPoliciesClientImpl.java index a7c09c106e35..fd4b98bea9d3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceLongTermRetentionPoliciesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceLongTermRetentionPoliciesClientImpl.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -33,7 +32,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ManagedInstanceLongTermRetentionPoliciesClient; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceLongTermRetentionPolicyInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedInstanceLongTermRetentionPolicyListResult; +import com.azure.resourcemanager.sql.models.ManagedInstanceLongTermRetentionPolicyListResult; import com.azure.resourcemanager.sql.models.ManagedInstanceLongTermRetentionPolicyName; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -70,69 +69,227 @@ public final class ManagedInstanceLongTermRetentionPoliciesClientImpl * The interface defining all the services for SqlManagementClientManagedInstanceLongTermRetentionPolicies to be * used by the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedInstanceLongTermRetentionPolicies") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstanceLongTermRetentionPoliciesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, + Mono> listByDatabase( + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("policyName") ManagedInstanceLongTermRetentionPolicyName policyName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("policyName") ManagedInstanceLongTermRetentionPolicyName policyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedInstanceLongTermRetentionPolicyInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("databaseName") String databaseName, @PathParam("policyName") ManagedInstanceLongTermRetentionPolicyName policyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedInstanceLongTermRetentionPolicyInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a database's long term retention policy along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, String databaseName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; + return FluxUtil + .withContext( + context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + databaseName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a database's long term retention policy along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String managedInstanceName, String databaseName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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 + .listByDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); + } + + /** + * Gets a database's long term retention policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, + String managedInstanceName, String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, context)); + } + /** * Gets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -149,10 +306,6 @@ public Mono> getWithRespon 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.")); @@ -167,18 +320,23 @@ public Mono> getWithRespon if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, policyName, - accept, context)) + .withContext( + context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -197,10 +355,6 @@ private Mono> getWithRespo 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.")); @@ -215,16 +369,21 @@ private Mono> getWithRespo if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, policyName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, policyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -243,7 +402,8 @@ public Mono getAsync(String resourc /** * Gets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -263,7 +423,8 @@ public Response getWithResponse(Str /** * Gets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -282,7 +443,8 @@ public ManagedInstanceLongTermRetentionPolicyInner get(String resourceGroupName, /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -300,10 +462,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -318,24 +476,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, policyName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, databaseName, policyName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -354,10 +516,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -372,23 +530,26 @@ private Mono>> createOrUpdateWithResponseAsync(String if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, policyName, - contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, databaseName, + policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -415,7 +576,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -444,7 +606,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -468,7 +631,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -494,7 +658,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -516,7 +681,8 @@ public Mono createOrUpdateAsync(Str /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -538,7 +704,8 @@ private Mono createOrUpdateAsync(St /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -559,7 +726,8 @@ public ManagedInstanceLongTermRetentionPolicyInner createOrUpdate(String resourc /** * Sets a managed database's long term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param databaseName The name of the database. * @param policyName The policy name. Should always be Default. @@ -579,451 +747,43 @@ public ManagedInstanceLongTermRetentionPolicyInner createOrUpdate(String resourc } /** - * Deletes a managed database's long term retention policy. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. + * @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 long term retention policy along with {@link Response} on successful completion of {@link Mono}. + * @return a list of long term retention policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName) { + private Mono> + listByDatabaseNextSinglePageAsync(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.")); } - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName 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, managedInstanceName, databaseName, policyName, - accept, context)) + .withContext(context -> service.listByDatabaseNext(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())); } /** - * Deletes a managed database's long term retention policy. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. + * @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 long term retention policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName 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, managedInstanceName, databaseName, policyName, accept, context); - } - - /** - * Deletes a managed database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 long term retention policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, policyName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a managed database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. - * @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 long term retention policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, policyName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a managed database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 long term retention policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName) { - return this.beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName, policyName).getSyncPoller(); - } - - /** - * Deletes a managed database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. - * @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 long term retention policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedInstanceLongTermRetentionPolicyName policyName, Context context) { - return this.beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName, policyName, context) - .getSyncPoller(); - } - - /** - * Deletes a managed database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a long term retention policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName, policyName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a managed database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. - * @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 long term retention policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, databaseName, policyName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a managed database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 managedInstanceName, String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName) { - deleteAsync(resourceGroupName, managedInstanceName, databaseName, policyName).block(); - } - - /** - * Deletes a managed database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param policyName The policy name. Should always be Default. - * @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 managedInstanceName, String databaseName, - ManagedInstanceLongTermRetentionPolicyName policyName, Context context) { - deleteAsync(resourceGroupName, managedInstanceName, databaseName, policyName, context).block(); - } - - /** - * Gets a database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a database's long term retention policy along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, String databaseName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, 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 a database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a database's long term retention policy along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync( - String resourceGroupName, String managedInstanceName, String databaseName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Gets a database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); - } - - /** - * Gets a database's long term retention policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 a database's long term retention policy as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, 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 database's long term retention policy along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByDatabaseNextSinglePageAsync(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.listByDatabaseNext(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. - * @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 database's long term retention policy along with {@link PagedResponse} on successful completion of + * @return a list of long term retention policies along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceOperationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceOperationsClientImpl.java index 3c9d0fe58253..92898a660074 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceOperationsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceOperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -28,7 +28,8 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ManagedInstanceOperationsClient; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceOperationInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedInstanceOperationListResult; +import com.azure.resourcemanager.sql.models.ManagedInstanceOperationListResult; +import java.util.UUID; import reactor.core.publisher.Mono; /** @@ -60,37 +61,37 @@ public final class ManagedInstanceOperationsClientImpl implements ManagedInstanc * The interface defining all the services for SqlManagementClientManagedInstanceOperations to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedInstanceOperations") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstanceOperationsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByManagedInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @PathParam("operationId") String operationId, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedInstance(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedInstanceName") String managedInstanceName, @PathParam("operationId") UUID operationId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}/cancel") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> cancel(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> cancel(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @PathParam("operationId") String operationId, + @PathParam("managedInstanceName") String managedInstanceName, @PathParam("operationId") UUID operationId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @@ -98,33 +99,29 @@ Mono> cancel(@HostParam("endpoint") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByManagedInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a management operation on a managed instance. + * Gets a list of operations performed on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param operationId The operationId 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 management operation on a managed instance along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of operations performed on the managed instance along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String operationId) { + private Mono> + listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { 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.")); @@ -133,40 +130,39 @@ public Mono> getWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, operationId, accept, context)) + .withContext(context -> service.listByManagedInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); } /** - * Gets a management operation on a managed instance. + * Gets a list of operations performed on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param operationId The operationId 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 management operation on a managed instance along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of operations performed on the managed instance along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String operationId, Context context) { + private Mono> + listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, 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.")); @@ -175,89 +171,112 @@ private Mono> getWithResponseAsync(Strin return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, operationId, accept, context); + return service + .listByManagedInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a management operation on a managed instance. + * Gets a list of operations performed on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param operationId The operationId 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 management operation on a managed instance on successful completion of {@link Mono}. + * @return a list of operations performed on the managed instance as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String managedInstanceName, - String operationId) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, operationId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); } /** - * Gets a management operation on a managed instance. + * Gets a list of operations performed on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param operationId The operationId 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 management operation on a managed instance along with {@link Response}. + * @return a list of operations performed on the managed instance as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String managedInstanceName, - String operationId, Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, operationId, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>( + () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); } /** - * Gets a management operation on a managed instance. + * Gets a list of operations performed on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param operationId The operationId 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 management operation on a managed instance. + * @return a list of operations performed on the managed instance as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceOperationInner get(String resourceGroupName, String managedInstanceName, String operationId) { - return getWithResponse(resourceGroupName, managedInstanceName, operationId, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName) { + return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets a list of operations performed on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @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 operations performed on the managed instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of operations performed on the managed instance as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, context)); + } + + /** + * Gets a management operation on a managed instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param operationId The operationId 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 management operation on a managed instance along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, UUID operationId) { 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.")); @@ -266,39 +285,41 @@ public ManagedInstanceOperationInner get(String resourceGroupName, String manage return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId 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"; return FluxUtil - .withContext( - context -> service.listByManagedInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + operationId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of operations performed on the managed instance. + * Gets a management operation on a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param operationId The operationId 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 list of operations performed on the managed instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a management operation on a managed instance along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, UUID operationId, 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.")); @@ -307,88 +328,79 @@ public ManagedInstanceOperationInner get(String resourceGroupName, String manage return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId 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 - .listByManagedInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, operationId, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Gets a list of operations performed on the managed instance. + * Gets a management operation on a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param operationId The operationId 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 list of operations performed on the managed instance as paginated response with {@link PagedFlux}. + * @return a management operation on a managed instance on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByManagedInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String managedInstanceName, + UUID operationId) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, operationId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of operations performed on the managed instance. + * Gets a management operation on a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param operationId The operationId 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 list of operations performed on the managed instance as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of operations performed on the managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 operations performed on the managed instance as paginated response with {@link PagedIterable}. + * @return a management operation on a managed instance along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String managedInstanceName, + UUID operationId, Context context) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, operationId, context).block(); } /** - * Gets a list of operations performed on the managed instance. + * Gets a management operation on a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param context The context to associate with this operation. + * @param operationId The operationId 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 list of operations performed on the managed instance as paginated response with {@link PagedIterable}. + * @return a management operation on a managed instance. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedInstanceOperationInner get(String resourceGroupName, String managedInstanceName, UUID operationId) { + return getWithResponse(resourceGroupName, managedInstanceName, operationId, Context.NONE).getValue(); } /** * Cancels the asynchronous operation on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -398,15 +410,11 @@ public PagedIterable listByManagedInstance(String */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> cancelWithResponseAsync(String resourceGroupName, String managedInstanceName, - String operationId) { + UUID operationId) { 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.")); @@ -418,16 +426,21 @@ public Mono> cancelWithResponseAsync(String resourceGroupName, St if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId 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.")); + } return FluxUtil - .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, operationId, context)) + .withContext(context -> service.cancel(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + operationId, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Cancels the asynchronous operation on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -438,15 +451,11 @@ public Mono> cancelWithResponseAsync(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> cancelWithResponseAsync(String resourceGroupName, String managedInstanceName, - String operationId, Context context) { + UUID operationId, 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.")); @@ -458,15 +467,20 @@ private Mono> cancelWithResponseAsync(String resourceGroupName, S if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId 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.")); + } context = this.client.mergeContext(context); - return service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, operationId, context); + return service.cancel(this.client.getEndpoint(), resourceGroupName, managedInstanceName, operationId, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Cancels the asynchronous operation on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -475,7 +489,7 @@ private Mono> cancelWithResponseAsync(String resourceGroupName, S * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono cancelAsync(String resourceGroupName, String managedInstanceName, String operationId) { + public Mono cancelAsync(String resourceGroupName, String managedInstanceName, UUID operationId) { return cancelWithResponseAsync(resourceGroupName, managedInstanceName, operationId) .flatMap(ignored -> Mono.empty()); } @@ -483,7 +497,8 @@ public Mono cancelAsync(String resourceGroupName, String managedInstanceNa /** * Cancels the asynchronous operation on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -493,7 +508,7 @@ public Mono cancelAsync(String resourceGroupName, String managedInstanceNa * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response cancelWithResponse(String resourceGroupName, String managedInstanceName, String operationId, + public Response cancelWithResponse(String resourceGroupName, String managedInstanceName, UUID operationId, Context context) { return cancelWithResponseAsync(resourceGroupName, managedInstanceName, operationId, context).block(); } @@ -501,7 +516,8 @@ public Response cancelWithResponse(String resourceGroupName, String manage /** * Cancels the asynchronous operation on the managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -509,7 +525,7 @@ public Response cancelWithResponse(String resourceGroupName, String manage * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void cancel(String resourceGroupName, String managedInstanceName, String operationId) { + public void cancel(String resourceGroupName, String managedInstanceName, UUID operationId) { cancelWithResponse(resourceGroupName, managedInstanceName, operationId, Context.NONE); } @@ -520,7 +536,7 @@ public void cancel(String resourceGroupName, String managedInstanceName, 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 operations performed on the managed instance along with {@link PagedResponse} on successful + * @return the response to a list managed instance operations request along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -550,7 +566,7 @@ public void cancel(String resourceGroupName, String managedInstanceName, 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 operations performed on the managed instance along with {@link PagedResponse} on successful + * @return the response to a list managed instance operations request along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateEndpointConnectionsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateEndpointConnectionsClientImpl.java index ab466b2df73c..be62b93d4fb3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateEndpointConnectionsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateEndpointConnectionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ManagedInstancePrivateEndpointConnectionsClient; import com.azure.resourcemanager.sql.fluent.models.ManagedInstancePrivateEndpointConnectionInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedInstancePrivateEndpointConnectionListResult; +import com.azure.resourcemanager.sql.models.ManagedInstancePrivateEndpointConnectionListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -69,50 +69,51 @@ public final class ManagedInstancePrivateEndpointConnectionsClientImpl * The interface defining all the services for SqlManagementClientManagedInstancePrivateEndpointConnections to be * used by the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedInstancePrivateEndpointConnections") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstancePrivateEndpointConnectionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedInstance( + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedInstancePrivateEndpointConnectionInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedInstancePrivateEndpointConnectionInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedInstance( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @@ -120,14 +121,170 @@ Mono> listByManaged @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByManagedInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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"; + return FluxUtil + .withContext(context -> service.listByManagedInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 all private endpoint connections on a server along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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 + .listByManagedInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); + } + + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 all private endpoint connections on a server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux + listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName, Context context) { + return new PagedFlux<>( + () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName) { + return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName)); + } + + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 all private endpoint connections on a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, context)); + } + /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -142,10 +299,6 @@ public Mono> getWithResp 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.")); @@ -158,18 +311,23 @@ public Mono> getWithResp return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, privateEndpointConnectionName, - accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. @@ -185,10 +343,6 @@ private Mono> getWithRes 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.")); @@ -201,16 +355,22 @@ private Mono> getWithRes return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, privateEndpointConnectionName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context); } /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -228,7 +388,8 @@ public Mono getAsync(String resou /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. @@ -247,7 +408,8 @@ public Response getWithResponse(S /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -265,9 +427,10 @@ public ManagedInstancePrivateEndpointConnectionInner get(String resourceGroupNam /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -282,10 +445,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -298,26 +457,30 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, privateEndpointConnectionName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, privateEndpointConnectionName, this.client.getSubscriptionId(), + this.client.getApiVersion(), 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -333,10 +496,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -349,25 +508,29 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, privateEndpointConnectionName, - contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -390,9 +553,10 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -418,9 +582,10 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -440,9 +605,10 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -464,9 +630,10 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -484,9 +651,10 @@ public Mono createOrUpdateAsync(S /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -505,9 +673,10 @@ private Mono createOrUpdateAsync( /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -525,9 +694,10 @@ public ManagedInstancePrivateEndpointConnectionInner createOrUpdate(String resou /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -546,9 +716,10 @@ public ManagedInstancePrivateEndpointConnectionInner createOrUpdate(String resou /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -561,10 +732,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -577,19 +744,23 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, privateEndpointConnectionName, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -603,10 +774,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -619,17 +786,22 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, privateEndpointConnectionName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -647,9 +819,10 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -669,9 +842,10 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -687,9 +861,10 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -706,9 +881,10 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -724,9 +900,10 @@ public Mono deleteAsync(String resourceGroupName, String managedInstanceNa /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -743,9 +920,10 @@ private Mono deleteAsync(String resourceGroupName, String managedInstanceN /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -758,9 +936,10 @@ public void delete(String resourceGroupName, String managedInstanceName, String /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -772,156 +951,6 @@ public void delete(String resourceGroupName, String managedInstanceName, String deleteAsync(resourceGroupName, managedInstanceName, privateEndpointConnectionName, context).block(); } - /** - * Gets all private endpoint connections on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByManagedInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, 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 all private endpoint connections on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 all private endpoint connections on a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByManagedInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets all private endpoint connections on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByManagedInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Gets all private endpoint connections on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 all private endpoint connections on a server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux - listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all private endpoint connections on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName)); - } - - /** - * Gets all private endpoint connections on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 all private endpoint connections on a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, context)); - } - /** * Get the next page of items. * @@ -929,7 +958,7 @@ public PagedIterable listByManage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 a list of private endpoint connections along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -960,7 +989,7 @@ public PagedIterable listByManage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 a list of private endpoint connections along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateLinkResourcesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateLinkResourcesClientImpl.java index 96fd6aab5d43..8f8355ab225e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateLinkResourcesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateLinkResourcesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ManagedInstancePrivateLinkResourcesClient; import com.azure.resourcemanager.sql.fluent.models.ManagedInstancePrivateLinkInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedInstancePrivateLinkListResult; +import com.azure.resourcemanager.sql.models.ManagedInstancePrivateLinkListResult; import reactor.core.publisher.Mono; /** @@ -59,62 +59,57 @@ public final class ManagedInstancePrivateLinkResourcesClientImpl implements Mana * The interface defining all the services for SqlManagementClientManagedInstancePrivateLinkResources to be used by * the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedInstancePrivateLinkResources") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstancePrivateLinkResourcesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateLinkResources/{groupName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByManagedInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @PathParam("groupName") String groupName, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateLinkResources") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateLinkResources/{groupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedInstance( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedInstanceName") String managedInstanceName, @PathParam("groupName") String groupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByManagedInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a private link resource for SQL server. + * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param groupName The name of the private link 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 private link resource for SQL server along with {@link Response} on successful completion of + * @return the private link resources for SQL server along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String groupName) { + private Mono> + listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { 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.")); @@ -123,40 +118,39 @@ public Mono> getWithResponseAsync(Stri return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, groupName, accept, context)) + .withContext(context -> service.listByManagedInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); } /** - * Gets a private link resource for SQL server. + * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param groupName The name of the private link 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 private link resource for SQL server along with {@link Response} on successful completion of + * @return the private link resources for SQL server along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String groupName, Context context) { + private Mono> + listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, 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.")); @@ -165,89 +159,112 @@ private Mono> getWithResponseAsync(Str return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, groupName, accept, context); + return service + .listByManagedInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a private link resource for SQL server. + * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param groupName The name of the private link 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 private link resource for SQL server on successful completion of {@link Mono}. + * @return the private link resources for SQL server as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String managedInstanceName, - String groupName) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, groupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); } /** - * Gets a private link resource for SQL server. + * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param groupName The name of the private link 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 private link resource for SQL server along with {@link Response}. + * @return the private link resources for SQL server as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String managedInstanceName, String groupName, Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, groupName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>( + () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); } /** - * Gets a private link resource for SQL server. + * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param groupName The name of the private link 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 private link resource for SQL server. + * @return the private link resources for SQL server as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstancePrivateLinkInner get(String resourceGroupName, String managedInstanceName, String groupName) { - return getWithResponse(resourceGroupName, managedInstanceName, groupName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName) { + return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @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 link resources for SQL server along with {@link PagedResponse} on successful completion of + * @return the private link resources for SQL server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, context)); + } + + /** + * Gets a private link resource for SQL server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param groupName The name of the private link 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 private link resource for SQL server along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String groupName) { 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.")); @@ -256,39 +273,41 @@ public ManagedInstancePrivateLinkInner get(String resourceGroupName, String mana return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName 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"; return FluxUtil - .withContext( - context -> service.listByManagedInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + groupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the private link resources for SQL server. + * Gets a private link resource for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param groupName The name of the private link 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 private link resources for SQL server along with {@link PagedResponse} on successful completion of + * @return a private link resource for SQL server along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String groupName, 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.")); @@ -297,82 +316,72 @@ public ManagedInstancePrivateLinkInner get(String resourceGroupName, String mana return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName 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 - .listByManagedInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, groupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Gets the private link resources for SQL server. + * Gets a private link resource for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param groupName The name of the private link 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 private link resources for SQL server as paginated response with {@link PagedFlux}. + * @return a private link resource for SQL server on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByManagedInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String groupName) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, groupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets the private link resources for SQL server. + * Gets a private link resource for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param groupName The name of the private link 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 private link resources for SQL server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the private link resources for SQL server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 link resources for SQL server as paginated response with {@link PagedIterable}. + * @return a private link resource for SQL server along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String groupName, Context context) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, groupName, context).block(); } /** - * Gets the private link resources for SQL server. + * Gets a private link resource for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param context The context to associate with this operation. + * @param groupName The name of the private link 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 private link resources for SQL server as paginated response with {@link PagedIterable}. + * @return a private link resource for SQL server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedInstancePrivateLinkInner get(String resourceGroupName, String managedInstanceName, String groupName) { + return getWithResponse(resourceGroupName, managedInstanceName, groupName, Context.NONE).getValue(); } /** @@ -382,7 +391,7 @@ public PagedIterable listByManagedInstance(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 link resources for SQL server along with {@link PagedResponse} on successful completion of + * @return a list of private link resources along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -412,7 +421,7 @@ public PagedIterable listByManagedInstance(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 link resources for SQL server along with {@link PagedResponse} on successful completion of + * @return a list of private link resources along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceTdeCertificatesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceTdeCertificatesClientImpl.java index ce09b902f9ce..a148ced3f750 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceTdeCertificatesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceTdeCertificatesClientImpl.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -60,25 +59,25 @@ public final class ManagedInstanceTdeCertificatesClientImpl implements ManagedIn * The interface defining all the services for SqlManagementClientManagedInstanceTdeCertificates to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedInstanceTdeCertificates") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstanceTdeCertificatesService { - @Headers({ "Accept: application/json;q=0.9" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> create(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") TdeCertificate parameters, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") TdeCertificate parameters, Context context); } /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -93,10 +92,6 @@ public Mono>> createWithResponseAsync(String resourceG 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.")); @@ -105,21 +100,26 @@ public Mono>> createWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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 contentType = "application/json"; - return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, contentType, parameters, context)) + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -135,10 +135,6 @@ private Mono>> createWithResponseAsync(String resource 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.")); @@ -147,21 +143,25 @@ private Mono>> createWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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 contentType = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, contentType, parameters, context); + return service.create(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -181,7 +181,8 @@ public PollerFlux, Void> beginCreateAsync(String resourceGroupN /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -203,7 +204,8 @@ private PollerFlux, Void> beginCreateAsync(String resourceGroup /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -220,7 +222,8 @@ public SyncPoller, Void> beginCreate(String resourceGroupName, /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -238,7 +241,8 @@ public SyncPoller, Void> beginCreate(String resourceGroupName, /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -255,7 +259,8 @@ public Mono createAsync(String resourceGroupName, String managedInstanceNa /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -274,7 +279,8 @@ private Mono createAsync(String resourceGroupName, String managedInstanceN /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -289,7 +295,8 @@ public void create(String resourceGroupName, String managedInstanceName, TdeCert /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceVulnerabilityAssessmentsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceVulnerabilityAssessmentsClientImpl.java index 83c3ea482233..abda186d9a2d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceVulnerabilityAssessmentsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceVulnerabilityAssessmentsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ManagedInstanceVulnerabilityAssessmentsClient; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceVulnerabilityAssessmentInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedInstanceVulnerabilityAssessmentListResult; +import com.azure.resourcemanager.sql.models.ManagedInstanceVulnerabilityAssessmentListResult; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import reactor.core.publisher.Mono; @@ -65,52 +65,51 @@ public final class ManagedInstanceVulnerabilityAssessmentsClientImpl * The interface defining all the services for SqlManagementClientManagedInstanceVulnerabilityAssessments to be used * by the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedInstanceVulnerabilityAssessments") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedInstanceVulnerabilityAssessmentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByInstance( + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedInstanceVulnerabilityAssessmentInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedInstanceVulnerabilityAssessmentInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @@ -118,15 +117,172 @@ Mono> listByInstance( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets the managed instance's vulnerability assessment policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 instance's vulnerability assessment policies along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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"; + return FluxUtil + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets the managed instance's vulnerability assessment policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. + * @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 instance's vulnerability assessment policies along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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 + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets the managed instance's vulnerability assessment policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 instance's vulnerability assessment policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + } + + /** + * Gets the managed instance's vulnerability assessment policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. + * @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 instance's vulnerability assessment policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the managed instance's vulnerability assessment policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 instance's vulnerability assessment policies as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); + } + + /** + * Gets the managed instance's vulnerability assessment policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessments is defined. + * @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 instance's vulnerability assessment policies as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); + } + /** * Gets the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -141,10 +297,6 @@ public Mono> getWithRespon 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.")); @@ -157,19 +309,24 @@ public Mono> getWithRespon return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, - accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -185,10 +342,6 @@ private Mono> getWithRespo 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.")); @@ -201,17 +354,22 @@ private Mono> getWithRespo return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -228,8 +386,9 @@ public Mono getAsync(String resourc /** * Gets the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -247,8 +406,9 @@ public Response getWithResponse(Str /** * Gets the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -267,8 +427,9 @@ public ManagedInstanceVulnerabilityAssessmentInner get(String resourceGroupName, * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -285,10 +446,6 @@ public Mono> createOrUpdat 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.")); @@ -301,17 +458,20 @@ public Mono> createOrUpdat return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, vulnerabilityAssessmentName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -320,8 +480,9 @@ public Mono> createOrUpdat * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @param context The context to associate with this operation. @@ -339,10 +500,6 @@ private Mono> createOrUpda 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.")); @@ -355,17 +512,20 @@ private Mono> createOrUpda return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, - contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** @@ -373,8 +533,9 @@ private Mono> createOrUpda * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -395,8 +556,9 @@ public Mono createOrUpdateAsync(Str * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @param context The context to associate with this operation. @@ -418,8 +580,9 @@ public Response createOrUpdateWithR * assessment with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -438,8 +601,9 @@ public ManagedInstanceVulnerabilityAssessmentInner createOrUpdate(String resourc /** * Removes the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -453,10 +617,6 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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.")); @@ -469,18 +629,22 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Removes the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -495,10 +659,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -511,16 +671,21 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Removes the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -537,8 +702,9 @@ public Mono deleteAsync(String resourceGroupName, String managedInstanceNa /** * Removes the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -556,8 +722,9 @@ public Response deleteWithResponse(String resourceGroupName, String manage /** * Removes the managed instance's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -569,156 +736,6 @@ public void delete(String resourceGroupName, String managedInstanceName, deleteWithResponse(resourceGroupName, managedInstanceName, vulnerabilityAssessmentName, Context.NONE); } - /** - * Gets the managed instance's vulnerability assessment policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 instance's vulnerability assessment policies along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, 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 managed instance's vulnerability assessment policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 instance's vulnerability assessment policies along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the managed instance's vulnerability assessment policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 instance's vulnerability assessment policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Gets the managed instance's vulnerability assessment policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 instance's vulnerability assessment policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the managed instance's vulnerability assessment policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 instance's vulnerability assessment policies as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); - } - - /** - * Gets the managed instance's vulnerability assessment policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 instance's vulnerability assessment policies as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); - } - /** * Get the next page of items. * @@ -726,7 +743,7 @@ public PagedIterable listByInstance * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 instance's vulnerability assessment policies along with {@link PagedResponse} on successful + * @return a list of the ManagedInstance's vulnerability assessments along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -756,7 +773,7 @@ public PagedIterable listByInstance * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 instance's vulnerability assessment policies along with {@link PagedResponse} on successful + * @return a list of the ManagedInstance's vulnerability assessments along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancesClientImpl.java index a24f1ff97923..db49657cb6e8 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -39,17 +39,15 @@ import com.azure.resourcemanager.sql.fluent.ManagedInstancesClient; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceInner; import com.azure.resourcemanager.sql.fluent.models.OutboundEnvironmentEndpointInner; -import com.azure.resourcemanager.sql.fluent.models.RefreshExternalGovernanceStatusOperationResultMIInner; import com.azure.resourcemanager.sql.fluent.models.TopQueriesInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedInstanceListResult; -import com.azure.resourcemanager.sql.implementation.models.OutboundEnvironmentEndpointCollection; -import com.azure.resourcemanager.sql.implementation.models.TopQueriesListResult; import com.azure.resourcemanager.sql.models.AggregationFunctionType; +import com.azure.resourcemanager.sql.models.ManagedInstanceListResult; import com.azure.resourcemanager.sql.models.ManagedInstanceUpdate; -import com.azure.resourcemanager.sql.models.ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest; import com.azure.resourcemanager.sql.models.MetricType; +import com.azure.resourcemanager.sql.models.OutboundEnvironmentEndpointCollection; import com.azure.resourcemanager.sql.models.QueryTimeGrainType; import com.azure.resourcemanager.sql.models.ReplicaType; +import com.azure.resourcemanager.sql.models.TopQueriesListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -84,217 +82,166 @@ public final class ManagedInstancesClientImpl implements InnerSupportsGet> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @QueryParam("$expand") String expand, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}") - @ExpectedResponses({ 200, 201, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedInstanceInner parameters, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedInstanceUpdate parameters, Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("$expand") String expand, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}") - @ExpectedResponses({ 200, 202, 204 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByInstancePool(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, Context context); + @PathParam("instancePoolName") String instancePoolName, @QueryParam("$expand") String expand, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$expand") String expand, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/failover") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failover(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @QueryParam("replicaType") ReplicaType replicaType, Context context); + @PathParam("managedInstanceName") String managedInstanceName, @QueryParam("$expand") String expand, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/outboundNetworkDependenciesEndpoints") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listOutboundNetworkDependenciesByManagedInstance( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedInstanceInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/reevaluateInaccessibleDatabaseState") - @ExpectedResponses({ 200, 202 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reevaluateInaccessibleDatabaseState(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, Context context); + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/refreshExternalGovernanceStatus") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> refreshStatus(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedInstanceUpdate parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/start") + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/failover") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> failover(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedInstanceName") String managedInstanceName, + @QueryParam("replicaType") ReplicaType replicaType, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/stop") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/outboundNetworkDependenciesEndpoints") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); + Mono> listOutboundNetworkDependenciesByManagedInstance( + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/topqueries") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedInstance(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByManagedInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @QueryParam("numberOfQueries") Integer numberOfQueries, @QueryParam("databases") String databases, @QueryParam("startTime") String startTime, @QueryParam("endTime") String endTime, @QueryParam("interval") QueryTimeGrainType interval, @QueryParam("aggregationFunction") AggregationFunctionType aggregationFunction, - @QueryParam("observationMetric") MetricType observationMetric, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Accept: application/json;q=0.9" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/validateAzureKeyVaultEncryptionKey") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validateAzureKeyVaultEncryptionKey(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @HeaderParam("Content-Type") String contentType, - @BodyParam("application/json") ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstancePool(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("instancePoolName") String instancePoolName, @QueryParam("$expand") String expand, + @QueryParam("observationMetric") MetricType observationMetric, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByInstancePoolNext( + @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> listOutboundNetworkDependenciesByManagedInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + 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) - Mono> listByManagedInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listOutboundNetworkDependenciesByManagedInstanceNext( + @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> listByInstancePoolNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByManagedInstanceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a managed instance. + * Gets a list of all managed instances in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed instance along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all managed instances in the subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String managedInstanceName, String expand) { + private Mono> listSinglePageAsync(String expand) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -303,36 +250,28 @@ public Mono> getByResourceGroupWithResponseAsync( 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, expand, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), expand, this.client.getSubscriptionId(), + 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())); } /** - * Gets a managed instance. + * Gets a list of all managed instances in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. * @param expand The child resources to include in the response. * @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 managed instance along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all managed instances in the subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String managedInstanceName, String expand, Context context) { + private Mono> listSinglePageAsync(String expand, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -341,1674 +280,574 @@ private Mono> getByResourceGroupWithResponseAsync 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName 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, managedInstanceName, expand, accept, context); + return service + .list(this.client.getEndpoint(), expand, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a managed instance. + * Gets a list of all managed instances in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed instance on successful completion of {@link Mono}. + * @return a list of all managed instances in the subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String managedInstanceName) { + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String expand) { + return new PagedFlux<>(() -> listSinglePageAsync(expand), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of all managed instances in the 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 a list of all managed instances in the subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { final String expand = null; - return getByResourceGroupWithResponseAsync(resourceGroupName, managedInstanceName, expand) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return new PagedFlux<>(() -> listSinglePageAsync(expand), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Gets a managed instance. + * Gets a list of all managed instances in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. * @param expand The child resources to include in the response. * @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 managed instance along with {@link Response}. + * @return a list of all managed instances in the subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String managedInstanceName, String expand, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, managedInstanceName, expand, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String expand, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(expand, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Gets a managed instance. + * Gets a list of all managed instances in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a managed instance. + * @return a list of all managed instances in the subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceInner getByResourceGroup(String resourceGroupName, String managedInstanceName) { + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { final String expand = null; - return getByResourceGroupWithResponse(resourceGroupName, managedInstanceName, expand, Context.NONE).getValue(); + return new PagedIterable<>(listAsync(expand)); } /** - * Creates or updates a managed instance. + * Gets a list of all managed instances in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource state. + * @param expand The child resources to include in the response. + * @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 an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all managed instances in the subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String expand, Context context) { + return new PagedIterable<>(listAsync(expand, context)); + } + + /** + * Gets a list of all managed instances in an instance pool. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The instance pool name. + * @param expand The child resources to include in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 all managed instances in an instance pool along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, ManagedInstanceInner parameters) { + private Mono> listByInstancePoolSinglePageAsync(String resourceGroupName, + String instancePoolName, String expand) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (managedInstanceName == null) { + if (instancePoolName == null) { return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter instancePoolName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, contentType, accept, - parameters, context)) + .withContext( + context -> service.listByInstancePool(this.client.getEndpoint(), resourceGroupName, instancePoolName, + expand, this.client.getSubscriptionId(), 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())); } /** - * Creates or updates a managed instance. + * Gets a list of all managed instances in an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The instance pool name. + * @param expand The child resources to include in the response. * @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 an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all managed instances in an instance pool along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, ManagedInstanceInner parameters, Context context) { + private Mono> listByInstancePoolSinglePageAsync(String resourceGroupName, + String instancePoolName, String expand, 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 (managedInstanceName == null) { + if (instancePoolName == null) { return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter instancePoolName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, contentType, accept, parameters, - context); + return service + .listByInstancePool(this.client.getEndpoint(), resourceGroupName, instancePoolName, expand, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Creates or updates a managed instance. + * Gets a list of all managed instances in an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The instance pool name. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedInstanceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedInstanceInner.class, ManagedInstanceInner.class, this.client.getContext()); - } - - /** - * Creates or updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 the {@link PollerFlux} for polling of an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedInstanceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedInstanceInner.class, ManagedInstanceInner.class, context); - } - - /** - * Creates or updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 the {@link SyncPoller} for polling of an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedInstanceInner> - beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters).getSyncPoller(); - } - - /** - * Creates or updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 the {@link SyncPoller} for polling of an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedInstanceInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters, context) - .getSyncPoller(); - } - - /** - * Creates or updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, - ManagedInstanceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, - ManagedInstanceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceInner createOrUpdate(String resourceGroupName, String managedInstanceName, - ManagedInstanceInner parameters) { - return createOrUpdateAsync(resourceGroupName, managedInstanceName, parameters).block(); - } - - /** - * Creates or updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceInner createOrUpdate(String resourceGroupName, String managedInstanceName, - ManagedInstanceInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, managedInstanceName, parameters, context).block(); - } - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, - String managedInstanceName, ManagedInstanceUpdate 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, contentType, accept, - parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String managedInstanceName, ManagedInstanceUpdate 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, contentType, accept, parameters, context); - } - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 the {@link PollerFlux} for polling of an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedInstanceInner> beginUpdateAsync(String resourceGroupName, - String managedInstanceName, ManagedInstanceUpdate parameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, managedInstanceName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedInstanceInner.class, ManagedInstanceInner.class, this.client.getContext()); - } - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 the {@link PollerFlux} for polling of an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedInstanceInner> beginUpdateAsync( - String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, managedInstanceName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedInstanceInner.class, ManagedInstanceInner.class, context); - } - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 the {@link SyncPoller} for polling of an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedInstanceInner> beginUpdate(String resourceGroupName, - String managedInstanceName, ManagedInstanceUpdate parameters) { - return this.beginUpdateAsync(resourceGroupName, managedInstanceName, parameters).getSyncPoller(); - } - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 the {@link SyncPoller} for polling of an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedInstanceInner> beginUpdate(String resourceGroupName, - String managedInstanceName, ManagedInstanceUpdate parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, managedInstanceName, parameters, context).getSyncPoller(); - } - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String managedInstanceName, - ManagedInstanceUpdate parameters) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String managedInstanceName, - ManagedInstanceUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, managedInstanceName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceInner update(String resourceGroupName, String managedInstanceName, - ManagedInstanceUpdate parameters) { - return updateAsync(resourceGroupName, managedInstanceName, parameters).block(); - } - - /** - * Updates a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The requested managed instance resource 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 an Azure SQL managed instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceInner update(String resourceGroupName, String managedInstanceName, - ManagedInstanceUpdate parameters, Context context) { - return updateAsync(resourceGroupName, managedInstanceName, parameters, context).block(); - } - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managedInstanceName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String managedInstanceName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, context); - } - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managedInstanceName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, managedInstanceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managedInstanceName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, managedInstanceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managedInstanceName) { - return this.beginDeleteAsync(resourceGroupName, managedInstanceName).getSyncPoller(); - } - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managedInstanceName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, managedInstanceName, context).getSyncPoller(); - } - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managedInstanceName) { - return beginDeleteAsync(resourceGroupName, managedInstanceName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managedInstanceName, Context context) { - return beginDeleteAsync(resourceGroupName, managedInstanceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 managedInstanceName) { - deleteAsync(resourceGroupName, managedInstanceName).block(); - } - - /** - * Deletes a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managedInstanceName, Context context) { - deleteAsync(resourceGroupName, managedInstanceName, context).block(); - } - - /** - * Gets a list of managed instances in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param expand The child resources to include in the response. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instances in a resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String expand) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, expand, 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 a list of managed instances in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param expand The child resources to include in the response. - * @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 managed instances in a resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String expand, 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, expand, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of managed instances in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param expand The child resources to include in the response. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instances in a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of managed instances 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. - * @throws ManagementException 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 managed instances in a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final String expand = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of managed instances in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param expand The child resources to include in the response. - * @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 managed instances in a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand, - Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed instances 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. - * @throws ManagementException 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 managed instances in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final String expand = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, expand)); - } - - /** - * Gets a list of managed instances in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param expand The child resources to include in the response. - * @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 managed instances in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String expand, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, expand, context)); - } - - /** - * Gets a list of all managed instances in the subscription. - * - * @param expand The child resources to include in the response. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 all managed instances in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String expand) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), expand, 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 a list of all managed instances in the subscription. - * - * @param expand The child resources to include in the response. - * @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 all managed instances in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String expand, 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(), expand, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of all managed instances in the subscription. - * - * @param expand The child resources to include in the response. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 all managed instances in the subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String expand) { - return new PagedFlux<>(() -> listSinglePageAsync(expand), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of all managed instances in the 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 a list of all managed instances in the subscription as paginated response with {@link PagedFlux}. + * @return a list of all managed instances in an instance pool as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - final String expand = null; - return new PagedFlux<>(() -> listSinglePageAsync(expand), nextLink -> listNextSinglePageAsync(nextLink)); + public PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName, + String expand) { + return new PagedFlux<>(() -> listByInstancePoolSinglePageAsync(resourceGroupName, instancePoolName, expand), + nextLink -> listByInstancePoolNextSinglePageAsync(nextLink)); } /** - * Gets a list of all managed instances in the subscription. + * Gets a list of all managed instances in an instance pool. * - * @param expand The child resources to include in the response. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The instance pool name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 all managed instances in the subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String expand, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(expand, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of all managed instances in the 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 a list of all managed instances in the subscription as paginated response with {@link PagedIterable}. + * @return a list of all managed instances in an instance pool as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { + public PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName) { final String expand = null; - return new PagedIterable<>(listAsync(expand)); - } - - /** - * Gets a list of all managed instances in the subscription. - * - * @param expand The child resources to include in the response. - * @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 all managed instances in the subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String expand, Context context) { - return new PagedIterable<>(listAsync(expand, context)); - } - - /** - * Failovers a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param replicaType The type of replica to be failed over. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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>> failoverWithResponseAsync(String resourceGroupName, - String managedInstanceName, ReplicaType replicaType) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.failover(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, replicaType, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Failovers a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param replicaType The type of replica to be failed over. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverWithResponseAsync(String resourceGroupName, - String managedInstanceName, ReplicaType replicaType, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.failover(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, replicaType, context); - } - - /** - * Failovers a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param replicaType The type of replica to be failed over. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginFailoverAsync(String resourceGroupName, String managedInstanceName, - ReplicaType replicaType) { - Mono>> mono - = failoverWithResponseAsync(resourceGroupName, managedInstanceName, replicaType); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Failovers a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginFailoverAsync(String resourceGroupName, String managedInstanceName) { - final ReplicaType replicaType = null; - Mono>> mono - = failoverWithResponseAsync(resourceGroupName, managedInstanceName, replicaType); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Failovers a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param replicaType The type of replica to be failed over. - * @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> beginFailoverAsync(String resourceGroupName, String managedInstanceName, - ReplicaType replicaType, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = failoverWithResponseAsync(resourceGroupName, managedInstanceName, replicaType, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Failovers a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginFailover(String resourceGroupName, String managedInstanceName) { - final ReplicaType replicaType = null; - return this.beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType).getSyncPoller(); - } - - /** - * Failovers a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param replicaType The type of replica to be failed over. - * @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> beginFailover(String resourceGroupName, String managedInstanceName, - ReplicaType replicaType, Context context) { - return this.beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType, context).getSyncPoller(); - } - - /** - * Failovers a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param replicaType The type of replica to be failed over. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 failoverAsync(String resourceGroupName, String managedInstanceName, ReplicaType replicaType) { - return beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Failovers a managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 failoverAsync(String resourceGroupName, String managedInstanceName) { - final ReplicaType replicaType = null; - return beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType).last() - .flatMap(this.client::getLroFinalResultOrError); + return new PagedFlux<>(() -> listByInstancePoolSinglePageAsync(resourceGroupName, instancePoolName, expand), + nextLink -> listByInstancePoolNextSinglePageAsync(nextLink)); } /** - * Failovers a managed instance. + * Gets a list of all managed instances in an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param replicaType The type of replica to be failed over. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The instance pool name. + * @param expand The child resources to include in the response. * @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 a list of all managed instances in an instance pool as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverAsync(String resourceGroupName, String managedInstanceName, ReplicaType replicaType, - Context context) { - return beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName, + String expand, Context context) { + return new PagedFlux<>( + () -> listByInstancePoolSinglePageAsync(resourceGroupName, instancePoolName, expand, context), + nextLink -> listByInstancePoolNextSinglePageAsync(nextLink, context)); } /** - * Failovers a managed instance. + * Gets a list of all managed instances in an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The instance pool name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 all managed instances in an instance pool as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void failover(String resourceGroupName, String managedInstanceName) { - final ReplicaType replicaType = null; - failoverAsync(resourceGroupName, managedInstanceName, replicaType).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstancePool(String resourceGroupName, String instancePoolName) { + final String expand = null; + return new PagedIterable<>(listByInstancePoolAsync(resourceGroupName, instancePoolName, expand)); } /** - * Failovers a managed instance. + * Gets a list of all managed instances in an instance pool. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param replicaType The type of replica to be failed over. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param instancePoolName The instance pool name. + * @param expand The child resources to include in the response. * @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 all managed instances in an instance pool as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void failover(String resourceGroupName, String managedInstanceName, ReplicaType replicaType, - Context context) { - failoverAsync(resourceGroupName, managedInstanceName, replicaType, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstancePool(String resourceGroupName, String instancePoolName, + String expand, Context context) { + return new PagedIterable<>(listByInstancePoolAsync(resourceGroupName, instancePoolName, expand, context)); } /** - * Gets the collection of outbound network dependencies for the given managed instance. + * Gets a list of managed instances in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the collection of outbound network dependencies for the given managed instance along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of managed instances in a resource group along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesByManagedInstanceSinglePageAsync(String resourceGroupName, - String managedInstanceName) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String expand) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName 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"; return FluxUtil - .withContext(context -> service.listOutboundNetworkDependenciesByManagedInstance(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, expand, + this.client.getSubscriptionId(), 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())); } /** - * Gets the collection of outbound network dependencies for the given managed instance. + * Gets a list of managed instances in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param expand The child resources to include in the response. * @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 collection of outbound network dependencies for the given managed instance along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of managed instances in a resource group along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesByManagedInstanceSinglePageAsync(String resourceGroupName, - String managedInstanceName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String expand, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName 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 - .listOutboundNetworkDependenciesByManagedInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context) + .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, expand, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets the collection of outbound network dependencies for the given managed instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the collection of outbound network dependencies for the given managed instance as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux - listOutboundNetworkDependenciesByManagedInstanceAsync(String resourceGroupName, String managedInstanceName) { - return new PagedFlux<>( - () -> listOutboundNetworkDependenciesByManagedInstanceSinglePageAsync(resourceGroupName, - managedInstanceName), - nextLink -> listOutboundNetworkDependenciesByManagedInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Gets the collection of outbound network dependencies for the given managed instance. + * Gets a list of managed instances in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the collection of outbound network dependencies for the given managed instance as paginated response with - * {@link PagedFlux}. + * @return a list of managed instances in a resource group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listOutboundNetworkDependenciesByManagedInstanceAsync( - String resourceGroupName, String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listOutboundNetworkDependenciesByManagedInstanceSinglePageAsync(resourceGroupName, - managedInstanceName, context), - nextLink -> listOutboundNetworkDependenciesByManagedInstanceNextSinglePageAsync(nextLink, context)); + public PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Gets the collection of outbound network dependencies for the given managed instance. + * Gets a list of managed instances in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the collection of outbound network dependencies for the given managed instance as paginated response with - * {@link PagedIterable}. + * @return a list of managed instances in a resource group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable - listOutboundNetworkDependenciesByManagedInstance(String resourceGroupName, String managedInstanceName) { - return new PagedIterable<>( - listOutboundNetworkDependenciesByManagedInstanceAsync(resourceGroupName, managedInstanceName)); + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final String expand = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Gets the collection of outbound network dependencies for the given managed instance. + * Gets a list of managed instances in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param expand The child resources to include in the response. * @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 collection of outbound network dependencies for the given managed instance as paginated response with - * {@link PagedIterable}. + * @return a list of managed instances in a resource group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listOutboundNetworkDependenciesByManagedInstance( - String resourceGroupName, String managedInstanceName, Context context) { - return new PagedIterable<>( - listOutboundNetworkDependenciesByManagedInstanceAsync(resourceGroupName, managedInstanceName, context)); - } - - /** - * Reevaluates the inaccessibility state of all managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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>> - reevaluateInaccessibleDatabaseStateWithResponseAsync(String resourceGroupName, String managedInstanceName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.reevaluateInaccessibleDatabaseState(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Reevaluates the inaccessibility state of all managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reevaluateInaccessibleDatabaseStateWithResponseAsync( - String resourceGroupName, String managedInstanceName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.reevaluateInaccessibleDatabaseState(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, context); + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand, + Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Reevaluates the inaccessibility state of all managed databases. + * Gets a list of managed instances in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 list of managed instances in a resource group as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginReevaluateInaccessibleDatabaseStateAsync(String resourceGroupName, - String managedInstanceName) { - Mono>> mono - = reevaluateInaccessibleDatabaseStateWithResponseAsync(resourceGroupName, managedInstanceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final String expand = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, expand)); } /** - * Reevaluates the inaccessibility state of all managed databases. + * Gets a list of managed instances in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param expand The child resources to include in the response. * @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> beginReevaluateInaccessibleDatabaseStateAsync(String resourceGroupName, - String managedInstanceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = reevaluateInaccessibleDatabaseStateWithResponseAsync(resourceGroupName, managedInstanceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Reevaluates the inaccessibility state of all managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginReevaluateInaccessibleDatabaseState(String resourceGroupName, - String managedInstanceName) { - return this.beginReevaluateInaccessibleDatabaseStateAsync(resourceGroupName, managedInstanceName) - .getSyncPoller(); + * @return a list of managed instances in a resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, String expand, + Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, expand, context)); } /** - * Reevaluates the inaccessibility state of all managed databases. + * Gets a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param context The context to associate with this operation. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 managed instance along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginReevaluateInaccessibleDatabaseState(String resourceGroupName, - String managedInstanceName, Context context) { - return this.beginReevaluateInaccessibleDatabaseStateAsync(resourceGroupName, managedInstanceName, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String managedInstanceName, String expand) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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"; + return FluxUtil + .withContext( + context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + expand, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Reevaluates the inaccessibility state of all managed databases. + * Gets a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param expand The child resources to include in the response. + * @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 a managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono reevaluateInaccessibleDatabaseStateAsync(String resourceGroupName, String managedInstanceName) { - return beginReevaluateInaccessibleDatabaseStateAsync(resourceGroupName, managedInstanceName).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String managedInstanceName, String expand, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, managedInstanceName, expand, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Reevaluates the inaccessibility state of all managed databases. + * Gets a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @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 a managed instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reevaluateInaccessibleDatabaseStateAsync(String resourceGroupName, String managedInstanceName, - Context context) { - return beginReevaluateInaccessibleDatabaseStateAsync(resourceGroupName, managedInstanceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono getByResourceGroupAsync(String resourceGroupName, String managedInstanceName) { + final String expand = null; + return getByResourceGroupWithResponseAsync(resourceGroupName, managedInstanceName, expand) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Reevaluates the inaccessibility state of all managed databases. + * Gets a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param expand The child resources to include in the response. + * @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 managed instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void reevaluateInaccessibleDatabaseState(String resourceGroupName, String managedInstanceName) { - reevaluateInaccessibleDatabaseStateAsync(resourceGroupName, managedInstanceName).block(); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String managedInstanceName, String expand, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, managedInstanceName, expand, context).block(); } /** - * Reevaluates the inaccessibility state of all managed databases. + * Gets a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @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 managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void reevaluateInaccessibleDatabaseState(String resourceGroupName, String managedInstanceName, - Context context) { - reevaluateInaccessibleDatabaseStateAsync(resourceGroupName, managedInstanceName, context).block(); + public ManagedInstanceInner getByResourceGroup(String resourceGroupName, String managedInstanceName) { + final String expand = null; + return getByResourceGroupWithResponse(resourceGroupName, managedInstanceName, expand, Context.NONE).getValue(); } /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 an RefreshExternalGovernanceStatus operation result resource along with {@link Response} on successful - * completion of {@link Mono}. + * @return an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> refreshStatusWithResponseAsync(String resourceGroupName, - String managedInstanceName) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, ManagedInstanceInner 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.")); @@ -2017,36 +856,43 @@ public Mono>> refreshStatusWithResponseAsync(String re return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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.refreshStatus(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context)) + .withContext( + context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 an RefreshExternalGovernanceStatus operation result resource along with {@link Response} on successful - * completion of {@link Mono}. + * @return an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshStatusWithResponseAsync(String resourceGroupName, - String managedInstanceName, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String managedInstanceName, ManagedInstanceInner 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.")); @@ -2055,181 +901,197 @@ private Mono>> refreshStatusWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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"; context = this.client.mergeContext(context); - return service.refreshStatus(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 the {@link PollerFlux} for polling of an RefreshExternalGovernanceStatus operation result resource. + * @return the {@link PollerFlux} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - PollerFlux, RefreshExternalGovernanceStatusOperationResultMIInner> - beginRefreshStatusAsync(String resourceGroupName, String managedInstanceName) { - Mono>> mono = refreshStatusWithResponseAsync(resourceGroupName, managedInstanceName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), RefreshExternalGovernanceStatusOperationResultMIInner.class, - RefreshExternalGovernanceStatusOperationResultMIInner.class, this.client.getContext()); + public PollerFlux, ManagedInstanceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedInstanceInner.class, ManagedInstanceInner.class, this.client.getContext()); } /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 the {@link PollerFlux} for polling of an RefreshExternalGovernanceStatus operation result resource. + * @return the {@link PollerFlux} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, RefreshExternalGovernanceStatusOperationResultMIInner> - beginRefreshStatusAsync(String resourceGroupName, String managedInstanceName, Context context) { + private PollerFlux, ManagedInstanceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono - = refreshStatusWithResponseAsync(resourceGroupName, managedInstanceName, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), RefreshExternalGovernanceStatusOperationResultMIInner.class, - RefreshExternalGovernanceStatusOperationResultMIInner.class, context); + = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedInstanceInner.class, ManagedInstanceInner.class, context); } /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 the {@link SyncPoller} for polling of an RefreshExternalGovernanceStatus operation result resource. + * @return the {@link SyncPoller} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, RefreshExternalGovernanceStatusOperationResultMIInner> - beginRefreshStatus(String resourceGroupName, String managedInstanceName) { - return this.beginRefreshStatusAsync(resourceGroupName, managedInstanceName).getSyncPoller(); + public SyncPoller, ManagedInstanceInner> + beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters).getSyncPoller(); } /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 the {@link SyncPoller} for polling of an RefreshExternalGovernanceStatus operation result resource. + * @return the {@link SyncPoller} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, RefreshExternalGovernanceStatusOperationResultMIInner> - beginRefreshStatus(String resourceGroupName, String managedInstanceName, Context context) { - return this.beginRefreshStatusAsync(resourceGroupName, managedInstanceName, context).getSyncPoller(); + public SyncPoller, ManagedInstanceInner> beginCreateOrUpdate( + String resourceGroupName, String managedInstanceName, ManagedInstanceInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters, context) + .getSyncPoller(); } /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 an RefreshExternalGovernanceStatus operation result resource on successful completion of {@link Mono}. + * @return an Azure SQL managed instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono refreshStatusAsync(String resourceGroupName, - String managedInstanceName) { - return beginRefreshStatusAsync(resourceGroupName, managedInstanceName).last() + public Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + ManagedInstanceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 an RefreshExternalGovernanceStatus operation result resource on successful completion of {@link Mono}. + * @return an Azure SQL managed instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshStatusAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return beginRefreshStatusAsync(resourceGroupName, managedInstanceName, context).last() + private Mono createOrUpdateAsync(String resourceGroupName, String managedInstanceName, + ManagedInstanceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 an RefreshExternalGovernanceStatus operation result resource. + * @return an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RefreshExternalGovernanceStatusOperationResultMIInner refreshStatus(String resourceGroupName, - String managedInstanceName) { - return refreshStatusAsync(resourceGroupName, managedInstanceName).block(); + public ManagedInstanceInner createOrUpdate(String resourceGroupName, String managedInstanceName, + ManagedInstanceInner parameters) { + return createOrUpdateAsync(resourceGroupName, managedInstanceName, parameters).block(); } /** - * Refresh external governance enablement status. + * Creates or updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 an RefreshExternalGovernanceStatus operation result resource. + * @return an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RefreshExternalGovernanceStatusOperationResultMIInner refreshStatus(String resourceGroupName, - String managedInstanceName, Context context) { - return refreshStatusAsync(resourceGroupName, managedInstanceName, context).block(); + public ManagedInstanceInner createOrUpdate(String resourceGroupName, String managedInstanceName, + ManagedInstanceInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, managedInstanceName, parameters, context).block(); } /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> startWithResponseAsync(String resourceGroupName, + public Mono>> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName) { 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.")); @@ -2238,35 +1100,35 @@ public Mono>> startWithResponseAsync(String resourceGr return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } - final String accept = "application/json"; + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } return FluxUtil - .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @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 an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String resourceGroupName, + private Mono>> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, 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.")); @@ -2275,169 +1137,174 @@ private Mono>> startWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } - final String accept = "application/json"; + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } context = this.client.mergeContext(context); - return service.start(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an Azure SQL managed instance. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedInstanceInner> beginStartAsync(String resourceGroupName, - String managedInstanceName) { - Mono>> mono = startWithResponseAsync(resourceGroupName, managedInstanceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedInstanceInner.class, ManagedInstanceInner.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, managedInstanceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @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 an Azure SQL managed instance. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedInstanceInner> beginStartAsync(String resourceGroupName, - String managedInstanceName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String managedInstanceName, + Context context) { context = this.client.mergeContext(context); - Mono>> mono = startWithResponseAsync(resourceGroupName, managedInstanceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedInstanceInner.class, ManagedInstanceInner.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, managedInstanceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an Azure SQL managed instance. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedInstanceInner> beginStart(String resourceGroupName, - String managedInstanceName) { - return this.beginStartAsync(resourceGroupName, managedInstanceName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName).getSyncPoller(); } /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @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 an Azure SQL managed instance. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedInstanceInner> beginStart(String resourceGroupName, - String managedInstanceName, Context context) { - return this.beginStartAsync(resourceGroupName, managedInstanceName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String managedInstanceName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, managedInstanceName, context).getSyncPoller(); } /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL managed instance on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono startAsync(String resourceGroupName, String managedInstanceName) { - return beginStartAsync(resourceGroupName, managedInstanceName).last() + public Mono deleteAsync(String resourceGroupName, String managedInstanceName) { + return beginDeleteAsync(resourceGroupName, managedInstanceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @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 an Azure SQL managed instance on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String managedInstanceName, - Context context) { - return beginStartAsync(resourceGroupName, managedInstanceName, context).last() + private Mono deleteAsync(String resourceGroupName, String managedInstanceName, Context context) { + return beginDeleteAsync(resourceGroupName, managedInstanceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceInner start(String resourceGroupName, String managedInstanceName) { - return startAsync(resourceGroupName, managedInstanceName).block(); + public void delete(String resourceGroupName, String managedInstanceName) { + deleteAsync(resourceGroupName, managedInstanceName).block(); } /** - * Starts the managed instance. + * Deletes a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @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 an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceInner start(String resourceGroupName, String managedInstanceName, Context context) { - return startAsync(resourceGroupName, managedInstanceName, context).block(); + public void delete(String resourceGroupName, String managedInstanceName, Context context) { + deleteAsync(resourceGroupName, managedInstanceName, context).block(); } /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> stopWithResponseAsync(String resourceGroupName, - String managedInstanceName) { + public Mono>> updateWithResponseAsync(String resourceGroupName, + String managedInstanceName, ManagedInstanceUpdate 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.")); @@ -2446,18 +1313,29 @@ public Mono>> stopWithResponseAsync(String resourceGro return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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.stop(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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. @@ -2465,16 +1343,12 @@ public Mono>> stopWithResponseAsync(String resourceGro * @return an Azure SQL managed instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync(String resourceGroupName, String managedInstanceName, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String managedInstanceName, ManagedInstanceUpdate 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.")); @@ -2483,35 +1357,49 @@ private Mono>> stopWithResponseAsync(String resourceGr return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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"; context = this.client.mergeContext(context); - return service.stop(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context); + return service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 the {@link PollerFlux} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedInstanceInner> beginStopAsync(String resourceGroupName, - String managedInstanceName) { - Mono>> mono = stopWithResponseAsync(resourceGroupName, managedInstanceName); + public PollerFlux, ManagedInstanceInner> beginUpdateAsync(String resourceGroupName, + String managedInstanceName, ManagedInstanceUpdate parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, managedInstanceName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ManagedInstanceInner.class, ManagedInstanceInner.class, this.client.getContext()); } /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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. @@ -2519,35 +1407,40 @@ public PollerFlux, ManagedInstanceInner> beginS * @return the {@link PollerFlux} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedInstanceInner> beginStopAsync(String resourceGroupName, - String managedInstanceName, Context context) { + private PollerFlux, ManagedInstanceInner> beginUpdateAsync( + String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = stopWithResponseAsync(resourceGroupName, managedInstanceName, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, managedInstanceName, parameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ManagedInstanceInner.class, ManagedInstanceInner.class, context); } /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 the {@link SyncPoller} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedInstanceInner> beginStop(String resourceGroupName, - String managedInstanceName) { - return this.beginStopAsync(resourceGroupName, managedInstanceName).getSyncPoller(); + public SyncPoller, ManagedInstanceInner> beginUpdate(String resourceGroupName, + String managedInstanceName, ManagedInstanceUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, managedInstanceName, parameters).getSyncPoller(); } /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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. @@ -2555,32 +1448,37 @@ public SyncPoller, ManagedInstanceInner> beginS * @return the {@link SyncPoller} for polling of an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedInstanceInner> beginStop(String resourceGroupName, - String managedInstanceName, Context context) { - return this.beginStopAsync(resourceGroupName, managedInstanceName, context).getSyncPoller(); + public SyncPoller, ManagedInstanceInner> beginUpdate(String resourceGroupName, + String managedInstanceName, ManagedInstanceUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, managedInstanceName, parameters, context).getSyncPoller(); } /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 an Azure SQL managed instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono stopAsync(String resourceGroupName, String managedInstanceName) { - return beginStopAsync(resourceGroupName, managedInstanceName).last() + public Mono updateAsync(String resourceGroupName, String managedInstanceName, + ManagedInstanceUpdate parameters) { + return beginUpdateAsync(resourceGroupName, managedInstanceName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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. @@ -2588,32 +1486,37 @@ public Mono stopAsync(String resourceGroupName, String man * @return an Azure SQL managed instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String managedInstanceName, - Context context) { - return beginStopAsync(resourceGroupName, managedInstanceName, context).last() + private Mono updateAsync(String resourceGroupName, String managedInstanceName, + ManagedInstanceUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, managedInstanceName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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 an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceInner stop(String resourceGroupName, String managedInstanceName) { - return stopAsync(resourceGroupName, managedInstanceName).block(); + public ManagedInstanceInner update(String resourceGroupName, String managedInstanceName, + ManagedInstanceUpdate parameters) { + return updateAsync(resourceGroupName, managedInstanceName, parameters).block(); } /** - * Stops the managed instance. + * Updates a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param parameters The requested managed instance resource 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. @@ -2621,41 +1524,30 @@ public ManagedInstanceInner stop(String resourceGroupName, String managedInstanc * @return an Azure SQL managed instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedInstanceInner stop(String resourceGroupName, String managedInstanceName, Context context) { - return stopAsync(resourceGroupName, managedInstanceName, context).block(); + public ManagedInstanceInner update(String resourceGroupName, String managedInstanceName, + ManagedInstanceUpdate parameters, Context context) { + return updateAsync(resourceGroupName, managedInstanceName, parameters, context).block(); } /** - * Get top resource consuming queries of a managed instance. + * Failovers a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param numberOfQueries How many 'top queries' to return. Default is 5. - * @param databases Comma separated list of databases to be included into search. All DB's are included if this - * parameter is not specified. - * @param startTime Start time for observed period. - * @param endTime End time for observed period. - * @param interval The time step to be used to summarize the metric values. Default value is PT1H. - * @param aggregationFunction Aggregation function to be used, default value is 'sum'. - * @param observationMetric Metric to be used for ranking top queries. Default is 'cpu'. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. + * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return top resource consuming queries of a managed instance 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> listByManagedInstanceSinglePageAsync(String resourceGroupName, - String managedInstanceName, Integer numberOfQueries, String databases, String startTime, String endTime, - QueryTimeGrainType interval, AggregationFunctionType aggregationFunction, MetricType observationMetric) { + public Mono>> failoverWithResponseAsync(String resourceGroupName, + String managedInstanceName, ReplicaType replicaType) { 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.")); @@ -2664,50 +1556,36 @@ private Mono> listByManagedInstanceSinglePageAsyn return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } - final String accept = "application/json"; + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } return FluxUtil - .withContext( - context -> service.listByManagedInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, numberOfQueries, databases, - startTime, endTime, interval, aggregationFunction, observationMetric, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.failover(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + replicaType, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get top resource consuming queries of a managed instance. + * Failovers a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param numberOfQueries How many 'top queries' to return. Default is 5. - * @param databases Comma separated list of databases to be included into search. All DB's are included if this - * parameter is not specified. - * @param startTime Start time for observed period. - * @param endTime End time for observed period. - * @param interval The time step to be used to summarize the metric values. Default value is PT1H. - * @param aggregationFunction Aggregation function to be used, default value is 'sum'. - * @param observationMetric Metric to be used for ranking top queries. Default is 'cpu'. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. + * @param replicaType The type of replica to be failed over. * @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 top resource consuming queries of a managed instance 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> listByManagedInstanceSinglePageAsync(String resourceGroupName, - String managedInstanceName, Integer numberOfQueries, String databases, String startTime, String endTime, - QueryTimeGrainType interval, AggregationFunctionType aggregationFunction, MetricType observationMetric, - Context context) { + private Mono>> failoverWithResponseAsync(String resourceGroupName, + String managedInstanceName, ReplicaType replicaType, 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.")); @@ -2716,171 +1594,225 @@ private Mono> listByManagedInstanceSinglePageAsyn return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } - final String accept = "application/json"; + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } context = this.client.mergeContext(context); - return service - .listByManagedInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, numberOfQueries, databases, - startTime, endTime, interval, aggregationFunction, observationMetric, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.failover(this.client.getEndpoint(), resourceGroupName, managedInstanceName, replicaType, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** - * Get top resource consuming queries of a managed instance. + * Failovers a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param numberOfQueries How many 'top queries' to return. Default is 5. - * @param databases Comma separated list of databases to be included into search. All DB's are included if this - * parameter is not specified. - * @param startTime Start time for observed period. - * @param endTime End time for observed period. - * @param interval The time step to be used to summarize the metric values. Default value is PT1H. - * @param aggregationFunction Aggregation function to be used, default value is 'sum'. - * @param observationMetric Metric to be used for ranking top queries. Default is 'cpu'. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. + * @param replicaType The type of replica to be failed over. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return top resource consuming queries of a managed instance as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginFailoverAsync(String resourceGroupName, String managedInstanceName, + ReplicaType replicaType) { + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, managedInstanceName, replicaType); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Failovers a managed instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginFailoverAsync(String resourceGroupName, String managedInstanceName) { + final ReplicaType replicaType = null; + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, managedInstanceName, replicaType); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Failovers a managed instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. + * @param replicaType The type of replica to be failed over. + * @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> beginFailoverAsync(String resourceGroupName, String managedInstanceName, + ReplicaType replicaType, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, managedInstanceName, replicaType, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Failovers a managed instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginFailover(String resourceGroupName, String managedInstanceName) { + final ReplicaType replicaType = null; + return this.beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType).getSyncPoller(); + } + + /** + * Failovers a managed instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. + * @param replicaType The type of replica to be failed over. + * @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> beginFailover(String resourceGroupName, String managedInstanceName, + ReplicaType replicaType, Context context) { + return this.beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType, context).getSyncPoller(); + } + + /** + * Failovers a managed instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. + * @param replicaType The type of replica to be failed over. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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.COLLECTION) - public PagedFlux listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName, - Integer numberOfQueries, String databases, String startTime, String endTime, QueryTimeGrainType interval, - AggregationFunctionType aggregationFunction, MetricType observationMetric) { - return new PagedFlux<>( - () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, numberOfQueries, - databases, startTime, endTime, interval, aggregationFunction, observationMetric), - nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono failoverAsync(String resourceGroupName, String managedInstanceName, ReplicaType replicaType) { + return beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get top resource consuming queries of a managed instance. + * Failovers a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return top resource consuming queries of a managed instance as paginated response with {@link PagedFlux}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName) { - final Integer numberOfQueries = null; - final String databases = null; - final String startTime = null; - final String endTime = null; - final QueryTimeGrainType interval = null; - final AggregationFunctionType aggregationFunction = null; - final MetricType observationMetric = null; - return new PagedFlux<>( - () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, numberOfQueries, - databases, startTime, endTime, interval, aggregationFunction, observationMetric), - nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono failoverAsync(String resourceGroupName, String managedInstanceName) { + final ReplicaType replicaType = null; + return beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get top resource consuming queries of a managed instance. + * Failovers a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param numberOfQueries How many 'top queries' to return. Default is 5. - * @param databases Comma separated list of databases to be included into search. All DB's are included if this - * parameter is not specified. - * @param startTime Start time for observed period. - * @param endTime End time for observed period. - * @param interval The time step to be used to summarize the metric values. Default value is PT1H. - * @param aggregationFunction Aggregation function to be used, default value is 'sum'. - * @param observationMetric Metric to be used for ranking top queries. Default is 'cpu'. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. + * @param replicaType The type of replica to be failed over. * @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 top resource consuming queries of a managed instance as paginated response with {@link PagedFlux}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName, - Integer numberOfQueries, String databases, String startTime, String endTime, QueryTimeGrainType interval, - AggregationFunctionType aggregationFunction, MetricType observationMetric, Context context) { - return new PagedFlux<>( - () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, numberOfQueries, - databases, startTime, endTime, interval, aggregationFunction, observationMetric, context), - nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono failoverAsync(String resourceGroupName, String managedInstanceName, ReplicaType replicaType, + Context context) { + return beginFailoverAsync(resourceGroupName, managedInstanceName, replicaType, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get top resource consuming queries of a managed instance. + * Failovers a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return top resource consuming queries of a managed instance as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance(String resourceGroupName, String managedInstanceName) { - final Integer numberOfQueries = null; - final String databases = null; - final String startTime = null; - final String endTime = null; - final QueryTimeGrainType interval = null; - final AggregationFunctionType aggregationFunction = null; - final MetricType observationMetric = null; - return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, numberOfQueries, - databases, startTime, endTime, interval, aggregationFunction, observationMetric)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void failover(String resourceGroupName, String managedInstanceName) { + final ReplicaType replicaType = null; + failoverAsync(resourceGroupName, managedInstanceName, replicaType).block(); } /** - * Get top resource consuming queries of a managed instance. + * Failovers a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param numberOfQueries How many 'top queries' to return. Default is 5. - * @param databases Comma separated list of databases to be included into search. All DB's are included if this - * parameter is not specified. - * @param startTime Start time for observed period. - * @param endTime End time for observed period. - * @param interval The time step to be used to summarize the metric values. Default value is PT1H. - * @param aggregationFunction Aggregation function to be used, default value is 'sum'. - * @param observationMetric Metric to be used for ranking top queries. Default is 'cpu'. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance to failover. + * @param replicaType The type of replica to be failed over. * @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 top resource consuming queries of a managed instance as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance(String resourceGroupName, String managedInstanceName, - Integer numberOfQueries, String databases, String startTime, String endTime, QueryTimeGrainType interval, - AggregationFunctionType aggregationFunction, MetricType observationMetric, Context context) { - return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, numberOfQueries, - databases, startTime, endTime, interval, aggregationFunction, observationMetric, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void failover(String resourceGroupName, String managedInstanceName, ReplicaType replicaType, + Context context) { + failoverAsync(resourceGroupName, managedInstanceName, replicaType, context).block(); } /** - * Validates customer managed key. + * Gets the collection of outbound network dependencies for the given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 collection of outbound network dependencies for the given managed instance along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> validateAzureKeyVaultEncryptionKeyWithResponseAsync( - String resourceGroupName, String managedInstanceName, - ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters) { + private Mono> + listOutboundNetworkDependenciesByManagedInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName) { 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.")); @@ -2889,43 +1821,41 @@ public Mono>> validateAzureKeyVaultEncryptionKeyWithRe return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.validateAzureKeyVaultEncryptionKey(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, - contentType, parameters, context)) + .withContext(context -> service.listOutboundNetworkDependenciesByManagedInstance(this.client.getEndpoint(), + resourceGroupName, managedInstanceName, this.client.getSubscriptionId(), 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())); } /** - * Validates customer managed key. + * Gets the collection of outbound network dependencies for the given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key 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 Response} on successful completion of {@link Mono}. + * @return the collection of outbound network dependencies for the given managed instance along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateAzureKeyVaultEncryptionKeyWithResponseAsync( - String resourceGroupName, String managedInstanceName, - ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters, Context context) { + private Mono> + listOutboundNetworkDependenciesByManagedInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, 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.")); @@ -2934,338 +1864,338 @@ private Mono>> validateAzureKeyVaultEncryptionKeyWithR return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; - context = this.client.mergeContext(context); - return service.validateAzureKeyVaultEncryptionKey(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, contentType, parameters, context); - } - - /** - * Validates customer managed key. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginValidateAzureKeyVaultEncryptionKeyAsync(String resourceGroupName, - String managedInstanceName, ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters) { - Mono>> mono - = validateAzureKeyVaultEncryptionKeyWithResponseAsync(resourceGroupName, managedInstanceName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Validates customer managed key. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key 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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginValidateAzureKeyVaultEncryptionKeyAsync(String resourceGroupName, - String managedInstanceName, ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters, - Context context) { + final String accept = "application/json"; context = this.client.mergeContext(context); - Mono>> mono = validateAzureKeyVaultEncryptionKeyWithResponseAsync(resourceGroupName, - managedInstanceName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + return service + .listOutboundNetworkDependenciesByManagedInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Validates customer managed key. + * Gets the collection of outbound network dependencies for the given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 collection of outbound network dependencies for the given managed instance as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginValidateAzureKeyVaultEncryptionKey(String resourceGroupName, - String managedInstanceName, ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters) { - return this.beginValidateAzureKeyVaultEncryptionKeyAsync(resourceGroupName, managedInstanceName, parameters) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux + listOutboundNetworkDependenciesByManagedInstanceAsync(String resourceGroupName, String managedInstanceName) { + return new PagedFlux<>( + () -> listOutboundNetworkDependenciesByManagedInstanceSinglePageAsync(resourceGroupName, + managedInstanceName), + nextLink -> listOutboundNetworkDependenciesByManagedInstanceNextSinglePageAsync(nextLink)); } /** - * Validates customer managed key. + * Gets the collection of outbound network dependencies for the given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key 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 SyncPoller} for polling of long-running operation. + * @return the collection of outbound network dependencies for the given managed instance as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginValidateAzureKeyVaultEncryptionKey(String resourceGroupName, - String managedInstanceName, ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters, - Context context) { - return this - .beginValidateAzureKeyVaultEncryptionKeyAsync(resourceGroupName, managedInstanceName, parameters, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listOutboundNetworkDependenciesByManagedInstanceAsync( + String resourceGroupName, String managedInstanceName, Context context) { + return new PagedFlux<>( + () -> listOutboundNetworkDependenciesByManagedInstanceSinglePageAsync(resourceGroupName, + managedInstanceName, context), + nextLink -> listOutboundNetworkDependenciesByManagedInstanceNextSinglePageAsync(nextLink, context)); } /** - * Validates customer managed key. + * Gets the collection of outbound network dependencies for the given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 collection of outbound network dependencies for the given managed instance as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono validateAzureKeyVaultEncryptionKeyAsync(String resourceGroupName, String managedInstanceName, - ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters) { - return beginValidateAzureKeyVaultEncryptionKeyAsync(resourceGroupName, managedInstanceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable + listOutboundNetworkDependenciesByManagedInstance(String resourceGroupName, String managedInstanceName) { + return new PagedIterable<>( + listOutboundNetworkDependenciesByManagedInstanceAsync(resourceGroupName, managedInstanceName)); } /** - * Validates customer managed key. + * Gets the collection of outbound network dependencies for the given managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateAzureKeyVaultEncryptionKeyAsync(String resourceGroupName, String managedInstanceName, - ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters, Context context) { - return beginValidateAzureKeyVaultEncryptionKeyAsync(resourceGroupName, managedInstanceName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Validates customer managed key. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the collection of outbound network dependencies for the given managed instance as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void validateAzureKeyVaultEncryptionKey(String resourceGroupName, String managedInstanceName, - ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters) { - validateAzureKeyVaultEncryptionKeyAsync(resourceGroupName, managedInstanceName, parameters).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOutboundNetworkDependenciesByManagedInstance( + String resourceGroupName, String managedInstanceName, Context context) { + return new PagedIterable<>( + listOutboundNetworkDependenciesByManagedInstanceAsync(resourceGroupName, managedInstanceName, context)); } /** - * Validates customer managed key. + * Get top resource consuming queries of a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param parameters The validate azure key vault encryption key 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void validateAzureKeyVaultEncryptionKey(String resourceGroupName, String managedInstanceName, - ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest parameters, Context context) { - validateAzureKeyVaultEncryptionKeyAsync(resourceGroupName, managedInstanceName, parameters, context).block(); - } - - /** - * Gets a list of all managed instances in an instance pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param expand The child resources to include in the response. + * @param numberOfQueries How many 'top queries' to return. Default is 5. + * @param databases Comma separated list of databases to be included into search. All DB's are included if this + * parameter is not specified. + * @param startTime Start time for observed period. + * @param endTime End time for observed period. + * @param interval The time step to be used to summarize the metric values. Default value is PT1H. + * @param aggregationFunction Aggregation function to be used, default value is 'sum'. + * @param observationMetric Metric to be used for ranking top queries. Default is 'cpu'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 all managed instances in an instance pool along with {@link PagedResponse} on successful + * @return top resource consuming queries of a managed instance along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstancePoolSinglePageAsync(String resourceGroupName, - String instancePoolName, String expand) { + private Mono> listByManagedInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, Integer numberOfQueries, String databases, String startTime, String endTime, + QueryTimeGrainType interval, AggregationFunctionType aggregationFunction, MetricType observationMetric) { 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 (instancePoolName == null) { + if (managedInstanceName == null) { return Mono - .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter managedInstanceName 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"; return FluxUtil - .withContext(context -> service.listByInstancePool(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancePoolName, expand, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.listByManagedInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, numberOfQueries, databases, startTime, endTime, interval, aggregationFunction, + observationMetric, this.client.getSubscriptionId(), 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())); } /** - * Gets a list of all managed instances in an instance pool. + * Get top resource consuming queries of a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param expand The child resources to include in the response. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param numberOfQueries How many 'top queries' to return. Default is 5. + * @param databases Comma separated list of databases to be included into search. All DB's are included if this + * parameter is not specified. + * @param startTime Start time for observed period. + * @param endTime End time for observed period. + * @param interval The time step to be used to summarize the metric values. Default value is PT1H. + * @param aggregationFunction Aggregation function to be used, default value is 'sum'. + * @param observationMetric Metric to be used for ranking top queries. Default is 'cpu'. * @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 all managed instances in an instance pool along with {@link PagedResponse} on successful + * @return top resource consuming queries of a managed instance along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstancePoolSinglePageAsync(String resourceGroupName, - String instancePoolName, String expand, Context context) { + private Mono> listByManagedInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, Integer numberOfQueries, String databases, String startTime, String endTime, + QueryTimeGrainType interval, AggregationFunctionType aggregationFunction, MetricType observationMetric, + 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 (instancePoolName == null) { + if (managedInstanceName == null) { return Mono - .error(new IllegalArgumentException("Parameter instancePoolName is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter managedInstanceName 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 - .listByInstancePool(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, instancePoolName, expand, accept, context) + .listByManagedInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, numberOfQueries, + databases, startTime, endTime, interval, aggregationFunction, observationMetric, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a list of all managed instances in an instance pool. + * Get top resource consuming queries of a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param expand The child resources to include in the response. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param numberOfQueries How many 'top queries' to return. Default is 5. + * @param databases Comma separated list of databases to be included into search. All DB's are included if this + * parameter is not specified. + * @param startTime Start time for observed period. + * @param endTime End time for observed period. + * @param interval The time step to be used to summarize the metric values. Default value is PT1H. + * @param aggregationFunction Aggregation function to be used, default value is 'sum'. + * @param observationMetric Metric to be used for ranking top queries. Default is 'cpu'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 all managed instances in an instance pool as paginated response with {@link PagedFlux}. + * @return top resource consuming queries of a managed instance as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName, - String expand) { - return new PagedFlux<>(() -> listByInstancePoolSinglePageAsync(resourceGroupName, instancePoolName, expand), - nextLink -> listByInstancePoolNextSinglePageAsync(nextLink)); + public PagedFlux listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName, + Integer numberOfQueries, String databases, String startTime, String endTime, QueryTimeGrainType interval, + AggregationFunctionType aggregationFunction, MetricType observationMetric) { + return new PagedFlux<>( + () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, numberOfQueries, + databases, startTime, endTime, interval, aggregationFunction, observationMetric), + nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); } /** - * Gets a list of all managed instances in an instance pool. + * Get top resource consuming queries of a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 all managed instances in an instance pool as paginated response with {@link PagedFlux}. + * @return top resource consuming queries of a managed instance as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName) { - final String expand = null; - return new PagedFlux<>(() -> listByInstancePoolSinglePageAsync(resourceGroupName, instancePoolName, expand), - nextLink -> listByInstancePoolNextSinglePageAsync(nextLink)); + public PagedFlux listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName) { + final Integer numberOfQueries = null; + final String databases = null; + final String startTime = null; + final String endTime = null; + final QueryTimeGrainType interval = null; + final AggregationFunctionType aggregationFunction = null; + final MetricType observationMetric = null; + return new PagedFlux<>( + () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, numberOfQueries, + databases, startTime, endTime, interval, aggregationFunction, observationMetric), + nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); } /** - * Gets a list of all managed instances in an instance pool. + * Get top resource consuming queries of a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param expand The child resources to include in the response. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param numberOfQueries How many 'top queries' to return. Default is 5. + * @param databases Comma separated list of databases to be included into search. All DB's are included if this + * parameter is not specified. + * @param startTime Start time for observed period. + * @param endTime End time for observed period. + * @param interval The time step to be used to summarize the metric values. Default value is PT1H. + * @param aggregationFunction Aggregation function to be used, default value is 'sum'. + * @param observationMetric Metric to be used for ranking top queries. Default is 'cpu'. * @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 all managed instances in an instance pool as paginated response with {@link PagedFlux}. + * @return top resource consuming queries of a managed instance as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstancePoolAsync(String resourceGroupName, String instancePoolName, - String expand, Context context) { + private PagedFlux listByManagedInstanceAsync(String resourceGroupName, String managedInstanceName, + Integer numberOfQueries, String databases, String startTime, String endTime, QueryTimeGrainType interval, + AggregationFunctionType aggregationFunction, MetricType observationMetric, Context context) { return new PagedFlux<>( - () -> listByInstancePoolSinglePageAsync(resourceGroupName, instancePoolName, expand, context), - nextLink -> listByInstancePoolNextSinglePageAsync(nextLink, context)); + () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, numberOfQueries, + databases, startTime, endTime, interval, aggregationFunction, observationMetric, context), + nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); } /** - * Gets a list of all managed instances in an instance pool. + * Get top resource consuming queries of a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 all managed instances in an instance pool as paginated response with {@link PagedIterable}. + * @return top resource consuming queries of a managed instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstancePool(String resourceGroupName, String instancePoolName) { - final String expand = null; - return new PagedIterable<>(listByInstancePoolAsync(resourceGroupName, instancePoolName, expand)); + public PagedIterable listByManagedInstance(String resourceGroupName, String managedInstanceName) { + final Integer numberOfQueries = null; + final String databases = null; + final String startTime = null; + final String endTime = null; + final QueryTimeGrainType interval = null; + final AggregationFunctionType aggregationFunction = null; + final MetricType observationMetric = null; + return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, numberOfQueries, + databases, startTime, endTime, interval, aggregationFunction, observationMetric)); } /** - * Gets a list of all managed instances in an instance pool. + * Get top resource consuming queries of a managed instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param instancePoolName The name of the instance pool to be retrieved. - * @param expand The child resources to include in the response. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param numberOfQueries How many 'top queries' to return. Default is 5. + * @param databases Comma separated list of databases to be included into search. All DB's are included if this + * parameter is not specified. + * @param startTime Start time for observed period. + * @param endTime End time for observed period. + * @param interval The time step to be used to summarize the metric values. Default value is PT1H. + * @param aggregationFunction Aggregation function to be used, default value is 'sum'. + * @param observationMetric Metric to be used for ranking top queries. Default is 'cpu'. * @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 all managed instances in an instance pool as paginated response with {@link PagedIterable}. + * @return top resource consuming queries of a managed instance as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstancePool(String resourceGroupName, String instancePoolName, - String expand, Context context) { - return new PagedIterable<>(listByInstancePoolAsync(resourceGroupName, instancePoolName, expand, context)); + public PagedIterable listByManagedInstance(String resourceGroupName, String managedInstanceName, + Integer numberOfQueries, String databases, String startTime, String endTime, QueryTimeGrainType interval, + AggregationFunctionType aggregationFunction, MetricType observationMetric, Context context) { + return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, numberOfQueries, + databases, startTime, endTime, interval, aggregationFunction, observationMetric, context)); } /** @@ -3275,11 +2205,10 @@ public PagedIterable listByInstancePool(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 managed instances in a resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of managed instances along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -3288,9 +2217,7 @@ private Mono> listByResourceGroupNextSingleP new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -3304,12 +2231,10 @@ private Mono> listByResourceGroupNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 managed instances in a resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of managed instances along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -3319,7 +2244,7 @@ private Mono> listByResourceGroupNextSingleP } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, 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)); } @@ -3331,11 +2256,10 @@ private Mono> listByResourceGroupNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 all managed instances in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of managed instances along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listByInstancePoolNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -3344,7 +2268,9 @@ private Mono> listNextSinglePageAsync(String 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.listByInstancePoolNext(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())); @@ -3358,11 +2284,11 @@ 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 a list of all managed instances in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of managed instances along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByInstancePoolNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -3372,7 +2298,7 @@ private Mono> listNextSinglePageAsync(String } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByInstancePoolNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -3384,12 +2310,10 @@ 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 the collection of outbound network dependencies for the given managed instance along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of managed instances along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesByManagedInstanceNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -3399,9 +2323,9 @@ private Mono> listNextSinglePageAsync(String } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listOutboundNetworkDependenciesByManagedInstanceNext(nextLink, - this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .withContext( + context -> 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)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -3414,12 +2338,11 @@ 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 the collection of outbound network dependencies for the given managed instance along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of managed instances along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesByManagedInstanceNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -3429,8 +2352,7 @@ private Mono> listNextSinglePageAsync(String } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listOutboundNetworkDependenciesByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, 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)); } @@ -3442,11 +2364,12 @@ 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 top resource consuming queries of a managed instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a collection of endpoints that the managed instance service requires outbound network access to along + * with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceNextSinglePageAsync(String nextLink) { + private Mono> + listOutboundNetworkDependenciesByManagedInstanceNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -3456,10 +2379,10 @@ private Mono> listByManagedInstanceNextSinglePage } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.listOutboundNetworkDependenciesByManagedInstanceNext(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())); } @@ -3471,12 +2394,12 @@ private Mono> listByManagedInstanceNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return top resource consuming queries of a managed instance along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a collection of endpoints that the managed instance service requires outbound network access to along + * with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedInstanceNextSinglePageAsync(String nextLink, - Context context) { + private Mono> + listOutboundNetworkDependenciesByManagedInstanceNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -3486,7 +2409,8 @@ private Mono> listByManagedInstanceNextSinglePage } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context) + return service + .listOutboundNetworkDependenciesByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -3498,11 +2422,11 @@ private Mono> listByManagedInstanceNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 all managed instances in an instance pool along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of top resource consuming queries on managed instance along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstancePoolNextSinglePageAsync(String nextLink) { + private Mono> listByManagedInstanceNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -3513,9 +2437,9 @@ private Mono> listByInstancePoolNextSinglePa final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByInstancePoolNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + context -> service.listByManagedInstanceNext(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())); } @@ -3527,11 +2451,11 @@ private Mono> listByInstancePoolNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 all managed instances in an instance pool along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of top resource consuming queries on managed instance along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstancePoolNextSinglePageAsync(String nextLink, + private Mono> listByManagedInstanceNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -3542,7 +2466,7 @@ private Mono> listByInstancePoolNextSinglePa } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByInstancePoolNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedLedgerDigestUploadsOperationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedLedgerDigestUploadsOperationsClientImpl.java deleted file mode 100644 index 53d1490c8013..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedLedgerDigestUploadsOperationsClientImpl.java +++ /dev/null @@ -1,1055 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.fluent.ManagedLedgerDigestUploadsOperationsClient; -import com.azure.resourcemanager.sql.fluent.models.ManagedLedgerDigestUploadsInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedLedgerDigestUploadsListResult; -import com.azure.resourcemanager.sql.models.ManagedLedgerDigestUploadsName; -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 - * ManagedLedgerDigestUploadsOperationsClient. - */ -public final class ManagedLedgerDigestUploadsOperationsClientImpl - implements ManagedLedgerDigestUploadsOperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedLedgerDigestUploadsOperationsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of ManagedLedgerDigestUploadsOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedLedgerDigestUploadsOperationsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(ManagedLedgerDigestUploadsOperationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientManagedLedgerDigestUploadsOperations to be used by - * the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedLedgerDigestUploadsOperations") - public interface ManagedLedgerDigestUploadsOperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("ledgerDigestUploads") ManagedLedgerDigestUploadsName ledgerDigestUploads, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("ledgerDigestUploads") ManagedLedgerDigestUploadsName ledgerDigestUploads, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedLedgerDigestUploadsInner parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/ledgerDigestUploads") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}/disable") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> disable(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("databaseName") String databaseName, - @PathParam("ledgerDigestUploads") ManagedLedgerDigestUploadsName ledgerDigestUploads, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the current ledger digest upload configuration for a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 current ledger digest upload configuration for a database along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (ledgerDigestUploads == null) { - return Mono - .error(new IllegalArgumentException("Parameter ledgerDigestUploads 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, managedInstanceName, databaseName, - ledgerDigestUploads, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the current ledger digest upload configuration for a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 current ledger digest upload configuration for a database along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads, - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (ledgerDigestUploads == null) { - return Mono - .error(new IllegalArgumentException("Parameter ledgerDigestUploads 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, managedInstanceName, databaseName, ledgerDigestUploads, accept, context); - } - - /** - * Gets the current ledger digest upload configuration for a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 current ledger digest upload configuration for a database on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the current ledger digest upload configuration for a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 current ledger digest upload configuration for a database along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads, - Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads, context) - .block(); - } - - /** - * Gets the current ledger digest upload configuration for a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 current ledger digest upload configuration for a database. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedLedgerDigestUploadsInner get(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads) { - return getWithResponse(resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads, Context.NONE) - .getValue(); - } - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure SQL Database ledger digest upload settings along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads, - ManagedLedgerDigestUploadsInner 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (ledgerDigestUploads == null) { - return Mono - .error(new IllegalArgumentException("Parameter ledgerDigestUploads 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, - ledgerDigestUploads, contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @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 azure SQL Database ledger digest upload settings along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads, - ManagedLedgerDigestUploadsInner 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (ledgerDigestUploads == null) { - return Mono - .error(new IllegalArgumentException("Parameter ledgerDigestUploads 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads, - contentType, accept, parameters, context); - } - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedLedgerDigestUploadsInner> - beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads, ManagedLedgerDigestUploadsInner parameters) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, - databaseName, ledgerDigestUploads, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedLedgerDigestUploadsInner.class, ManagedLedgerDigestUploadsInner.class, - this.client.getContext()); - } - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedLedgerDigestUploadsInner> - beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads, ManagedLedgerDigestUploadsInner parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, - databaseName, ledgerDigestUploads, parameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedLedgerDigestUploadsInner.class, ManagedLedgerDigestUploadsInner.class, - context); - } - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedLedgerDigestUploadsInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads, ManagedLedgerDigestUploadsInner parameters) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads, - parameters) - .getSyncPoller(); - } - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedLedgerDigestUploadsInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads, ManagedLedgerDigestUploadsInner parameters, - Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads, - parameters, context) - .getSyncPoller(); - } - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure SQL Database ledger digest upload settings on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads, - ManagedLedgerDigestUploadsInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads, - parameters).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @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 azure SQL Database ledger digest upload settings on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads, - ManagedLedgerDigestUploadsInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads, - parameters, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedLedgerDigestUploadsInner createOrUpdate(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads, - ManagedLedgerDigestUploadsInner parameters) { - return createOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads, - parameters).block(); - } - - /** - * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads parameter. - * @param parameters The Ledger Digest Storage Endpoint. - * @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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedLedgerDigestUploadsInner createOrUpdate(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads, - ManagedLedgerDigestUploadsInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads, - parameters, context).block(); - } - - /** - * Gets all ledger digest upload settings on a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 all ledger digest upload settings on a database along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String managedInstanceName, String databaseName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, databaseName, 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 all ledger digest upload settings on a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 all ledger digest upload settings on a database along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String managedInstanceName, String databaseName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets all ledger digest upload settings on a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 all ledger digest upload settings on a database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Gets all ledger digest upload settings on a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 all ledger digest upload settings on a database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all ledger digest upload settings on a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 all ledger digest upload settings on a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)); - } - - /** - * Gets all ledger digest upload settings on a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the 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 all ledger digest upload settings on a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, - String managedInstanceName, String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName, context)); - } - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> disableWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (ledgerDigestUploads == null) { - return Mono - .error(new IllegalArgumentException("Parameter ledgerDigestUploads 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, managedInstanceName, databaseName, - ledgerDigestUploads, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> disableWithResponseAsync(String resourceGroupName, - String managedInstanceName, String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads, - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (ledgerDigestUploads == null) { - return Mono - .error(new IllegalArgumentException("Parameter ledgerDigestUploads is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.disable(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads, accept, context); - } - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ManagedLedgerDigestUploadsInner> beginDisableAsync( - String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads) { - Mono>> mono - = disableWithResponseAsync(resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedLedgerDigestUploadsInner.class, ManagedLedgerDigestUploadsInner.class, - this.client.getContext()); - } - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedLedgerDigestUploadsInner> beginDisableAsync( - String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = disableWithResponseAsync(resourceGroupName, managedInstanceName, - databaseName, ledgerDigestUploads, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedLedgerDigestUploadsInner.class, ManagedLedgerDigestUploadsInner.class, - context); - } - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedLedgerDigestUploadsInner> beginDisable( - String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads) { - return this.beginDisableAsync(resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads) - .getSyncPoller(); - } - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedLedgerDigestUploadsInner> beginDisable( - String resourceGroupName, String managedInstanceName, String databaseName, - ManagedLedgerDigestUploadsName ledgerDigestUploads, Context context) { - return this - .beginDisableAsync(resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads, context) - .getSyncPoller(); - } - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono disableAsync(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads) { - return beginDisableAsync(resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono disableAsync(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads, Context context) { - return beginDisableAsync(resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedLedgerDigestUploadsInner disable(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads) { - return disableAsync(resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads).block(); - } - - /** - * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the database. - * @param ledgerDigestUploads The ledgerDigestUploads 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 azure SQL Database ledger digest upload settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedLedgerDigestUploadsInner disable(String resourceGroupName, String managedInstanceName, - String databaseName, ManagedLedgerDigestUploadsName ledgerDigestUploads, Context context) { - return disableAsync(resourceGroupName, managedInstanceName, databaseName, ledgerDigestUploads, context).block(); - } - - /** - * 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 all ledger digest upload settings on a database along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync(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.listByDatabaseNext(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. - * @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 all ledger digest upload settings on a database along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync(String nextLink, - Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl.java index 69242a90b056..5de255c35c8a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient; import com.azure.resourcemanager.sql.fluent.models.ManagedBackupShortTermRetentionPolicyInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedBackupShortTermRetentionPolicyListResult; +import com.azure.resourcemanager.sql.models.ManagedBackupShortTermRetentionPolicyListResult; import com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -71,55 +71,56 @@ public final class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolic * SqlManagementClientManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, + Mono> listByRestorableDroppedDatabase( + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("restorableDroppedDatabaseId") String restorableDroppedDatabaseId, - @PathParam("policyName") ManagedShortTermRetentionPolicyName policyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("restorableDroppedDatabaseId") String restorableDroppedDatabaseId, @PathParam("policyName") ManagedShortTermRetentionPolicyName policyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedBackupShortTermRetentionPolicyInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}") + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("restorableDroppedDatabaseId") String restorableDroppedDatabaseId, @PathParam("policyName") ManagedShortTermRetentionPolicyName policyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedBackupShortTermRetentionPolicyInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedBackupShortTermRetentionPolicyInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies") - @ExpectedResponses({ 200 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByRestorableDroppedDatabase( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, @PathParam("restorableDroppedDatabaseId") String restorableDroppedDatabaseId, + @PathParam("policyName") ManagedShortTermRetentionPolicyName policyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedBackupShortTermRetentionPolicyInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -127,14 +128,192 @@ Mono> listByRestorable @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByRestorableDroppedDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a dropped database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByRestorableDroppedDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + } + if (restorableDroppedDatabaseId == null) { + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId 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"; + return FluxUtil + .withContext(context -> service.listByRestorableDroppedDatabase(this.client.getEndpoint(), + resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, this.client.getSubscriptionId(), + 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())); + } + + /** + * Gets a dropped database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByRestorableDroppedDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); + } + if (restorableDroppedDatabaseId == null) { + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId 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 + .listByRestorableDroppedDatabase(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a dropped database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByRestorableDroppedDatabaseAsync( + String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId) { + return new PagedFlux<>(() -> listByRestorableDroppedDatabaseSinglePageAsync(resourceGroupName, + managedInstanceName, restorableDroppedDatabaseId), + nextLink -> listByRestorableDroppedDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * Gets a dropped database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByRestorableDroppedDatabaseAsync( + String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, Context context) { + return new PagedFlux<>( + () -> listByRestorableDroppedDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, context), + nextLink -> listByRestorableDroppedDatabaseNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a dropped database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByRestorableDroppedDatabase( + String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId) { + return new PagedIterable<>( + listByRestorableDroppedDatabaseAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId)); + } + + /** + * Gets a dropped database's short term retention policy list. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByRestorableDroppedDatabase( + String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, Context context) { + return new PagedIterable<>(listByRestorableDroppedDatabaseAsync(resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, context)); + } + /** * Gets a dropped database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -152,10 +331,6 @@ public Mono> getWithRespons 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.")); @@ -171,18 +346,23 @@ public Mono> getWithRespons if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, - policyName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a dropped database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -201,10 +381,6 @@ private Mono> getWithRespon 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.")); @@ -220,16 +396,22 @@ private Mono> getWithRespon if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context); } /** * Gets a dropped database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -249,7 +431,8 @@ public Mono getAsync(String resource /** * Gets a dropped database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -270,7 +453,8 @@ public Response getWithResponse(Stri /** * Gets a dropped database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. * @param policyName The policy name. @@ -289,10 +473,11 @@ public ManagedBackupShortTermRetentionPolicyInner get(String resourceGroupName, /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -307,10 +492,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -326,27 +507,31 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, - policyName, contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, restorableDroppedDatabaseId, policyName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -362,10 +547,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -381,26 +562,30 @@ private Mono>> createOrUpdateWithResponseAsync(String if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, - policyName, contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context); } /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -424,10 +609,11 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -453,10 +639,11 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -477,10 +664,11 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -503,10 +691,11 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -524,10 +713,11 @@ public Mono createOrUpdateAsync(Stri /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -546,10 +736,11 @@ private Mono createOrUpdateAsync(Str /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -567,10 +758,11 @@ public ManagedBackupShortTermRetentionPolicyInner createOrUpdate(String resource /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -589,10 +781,11 @@ public ManagedBackupShortTermRetentionPolicyInner createOrUpdate(String resource /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -607,10 +800,6 @@ public Mono>> updateWithResponseAsync(String resourceG 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.")); @@ -626,27 +815,31 @@ public Mono>> updateWithResponseAsync(String resourceG if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, - policyName, contentType, accept, parameters, context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -662,10 +855,6 @@ private Mono>> updateWithResponseAsync(String resource 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.")); @@ -681,26 +870,30 @@ private Mono>> updateWithResponseAsync(String resource if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, policyName, contentType, accept, - parameters, context); + return service.update(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, policyName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context); } /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -723,10 +916,11 @@ private Mono>> updateWithResponseAsync(String resource /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -752,10 +946,11 @@ private Mono>> updateWithResponseAsync(String resource /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -776,10 +971,11 @@ private Mono>> updateWithResponseAsync(String resource /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -802,10 +998,11 @@ private Mono>> updateWithResponseAsync(String resource /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -823,10 +1020,11 @@ public Mono updateAsync(String resou /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -845,10 +1043,11 @@ private Mono updateAsync(String reso /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -866,10 +1065,11 @@ public ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupNam /** * Sets a database's short term retention policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param policyName The policy name. + * @param policyName The policy name. Should always be "default". * @param parameters The short term retention policy info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -885,177 +1085,6 @@ public ManagedBackupShortTermRetentionPolicyInner update(String resourceGroupNam context).block(); } - /** - * Gets a dropped database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByRestorableDroppedDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, - String restorableDroppedDatabaseId) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (restorableDroppedDatabaseId == null) { - return Mono.error( - new IllegalArgumentException("Parameter restorableDroppedDatabaseId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByRestorableDroppedDatabase(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, - restorableDroppedDatabaseId, 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 a dropped database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByRestorableDroppedDatabaseSinglePageAsync(String resourceGroupName, String managedInstanceName, - String restorableDroppedDatabaseId, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (restorableDroppedDatabaseId == null) { - return Mono.error( - new IllegalArgumentException("Parameter restorableDroppedDatabaseId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByRestorableDroppedDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a dropped database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByRestorableDroppedDatabaseAsync( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId) { - return new PagedFlux<>(() -> listByRestorableDroppedDatabaseSinglePageAsync(resourceGroupName, - managedInstanceName, restorableDroppedDatabaseId), - nextLink -> listByRestorableDroppedDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Gets a dropped database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByRestorableDroppedDatabaseAsync( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, Context context) { - return new PagedFlux<>( - () -> listByRestorableDroppedDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, - restorableDroppedDatabaseId, context), - nextLink -> listByRestorableDroppedDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a dropped database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByRestorableDroppedDatabase( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId) { - return new PagedIterable<>( - listByRestorableDroppedDatabaseAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId)); - } - - /** - * Gets a dropped database's short term retention policy list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 dropped database's short term retention policy list as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByRestorableDroppedDatabase( - String resourceGroupName, String managedInstanceName, String restorableDroppedDatabaseId, Context context) { - return new PagedIterable<>(listByRestorableDroppedDatabaseAsync(resourceGroupName, managedInstanceName, - restorableDroppedDatabaseId, context)); - } - /** * Get the next page of items. * @@ -1063,8 +1092,8 @@ public PagedIterable listByRestorabl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dropped database's short term retention policy list along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of short term retention policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -1094,8 +1123,8 @@ public PagedIterable listByRestorabl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dropped database's short term retention policy list along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of short term retention policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerDnsAliasesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerDnsAliasesClientImpl.java index ad55ca5a85e4..580056d6f839 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerDnsAliasesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerDnsAliasesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -34,9 +34,9 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ManagedServerDnsAliasesClient; import com.azure.resourcemanager.sql.fluent.models.ManagedServerDnsAliasInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedServerDnsAliasListResult; import com.azure.resourcemanager.sql.models.ManagedServerDnsAliasAcquisition; import com.azure.resourcemanager.sql.models.ManagedServerDnsAliasCreation; +import com.azure.resourcemanager.sql.models.ManagedServerDnsAliasListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -70,74 +70,233 @@ public final class ManagedServerDnsAliasesClientImpl implements ManagedServerDns * The interface defining all the services for SqlManagementClientManagedServerDnsAliases to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedServerDnsAliases") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedServerDnsAliasesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedInstance(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("dnsAliasName") String dnsAliasName, @HeaderParam("Accept") String accept, Context context); + @PathParam("dnsAliasName") String dnsAliasName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("dnsAliasName") String dnsAliasName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedServerDnsAliasCreation parameters, Context context); + @PathParam("dnsAliasName") String dnsAliasName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedServerDnsAliasCreation parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("dnsAliasName") String dnsAliasName, Context context); + @PathParam("dnsAliasName") String dnsAliasName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedInstance(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}/acquire") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> acquire(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> acquire(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("dnsAliasName") String dnsAliasName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedServerDnsAliasAcquisition parameters, Context context); + @PathParam("dnsAliasName") String dnsAliasName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedServerDnsAliasAcquisition parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByManagedInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of managed server DNS aliases for a managed server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed server DNS aliases for a managed server along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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"; + return FluxUtil + .withContext(context -> service.listByManagedInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of managed server DNS aliases for a managed server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 managed server DNS aliases for a managed server along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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 + .listByManagedInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of managed server DNS aliases for a managed server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed server DNS aliases for a managed server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of managed server DNS aliases for a managed server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 managed server DNS aliases for a managed server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>( + () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of managed server DNS aliases for a managed server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managed server DNS aliases for a managed server as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName) { + return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName)); + } + + /** + * Gets a list of managed server DNS aliases for a managed server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 managed server DNS aliases for a managed server as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedInstance(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, context)); + } + /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -152,10 +311,6 @@ public Mono> getWithResponseAsync(String re 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.")); @@ -167,17 +322,22 @@ public Mono> getWithResponseAsync(String re if (dnsAliasName == null) { return Mono.error(new IllegalArgumentException("Parameter dnsAliasName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, dnsAliasName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + dnsAliasName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -193,10 +353,6 @@ private Mono> getWithResponseAsync(String r 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.")); @@ -208,16 +364,21 @@ private Mono> getWithResponseAsync(String r if (dnsAliasName == null) { return Mono.error(new IllegalArgumentException("Parameter dnsAliasName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, dnsAliasName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -235,7 +396,8 @@ public Mono getAsync(String resourceGroupName, Strin /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -253,7 +415,8 @@ public Response getWithResponse(String resourceGroup /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -269,7 +432,8 @@ public ManagedServerDnsAliasInner get(String resourceGroupName, String managedIn /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -285,10 +449,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -300,24 +460,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (dnsAliasName == null) { return Mono.error(new IllegalArgumentException("Parameter dnsAliasName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, dnsAliasName, contentType, - accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, dnsAliasName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -334,10 +498,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -349,23 +509,26 @@ private Mono>> createOrUpdateWithResponseAsync(String if (dnsAliasName == null) { return Mono.error(new IllegalArgumentException("Parameter dnsAliasName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, dnsAliasName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -388,7 +551,8 @@ public PollerFlux, ManagedServerDnsAliasI /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -412,7 +576,8 @@ private PollerFlux, ManagedServerDnsAlias /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -432,7 +597,8 @@ public SyncPoller, ManagedServerDnsAliasI /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -453,7 +619,8 @@ public SyncPoller, ManagedServerDnsAliasI /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -472,7 +639,8 @@ public Mono createOrUpdateAsync(String resourceGroup /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -493,7 +661,8 @@ private Mono createOrUpdateAsync(String resourceGrou /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -511,7 +680,8 @@ public ManagedServerDnsAliasInner createOrUpdate(String resourceGroupName, Strin /** * Creates a managed server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -530,7 +700,8 @@ public ManagedServerDnsAliasInner createOrUpdate(String resourceGroupName, Strin /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -545,10 +716,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -560,16 +727,21 @@ public Mono>> deleteWithResponseAsync(String resourceG if (dnsAliasName == null) { return Mono.error(new IllegalArgumentException("Parameter dnsAliasName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, dnsAliasName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + dnsAliasName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -585,10 +757,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -600,15 +768,20 @@ private Mono>> deleteWithResponseAsync(String resource if (dnsAliasName == null) { return Mono.error(new IllegalArgumentException("Parameter dnsAliasName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, dnsAliasName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -628,7 +801,8 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -650,7 +824,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -667,7 +842,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -685,7 +861,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -702,7 +879,8 @@ public Mono deleteAsync(String resourceGroupName, String managedInstanceNa /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -721,7 +899,8 @@ private Mono deleteAsync(String resourceGroupName, String managedInstanceN /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -736,7 +915,8 @@ public void delete(String resourceGroupName, String managedInstanceName, String /** * Deletes the managed server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param context The context to associate with this operation. @@ -749,161 +929,11 @@ public void delete(String resourceGroupName, String managedInstanceName, String deleteAsync(resourceGroupName, managedInstanceName, dnsAliasName, context).block(); } - /** - * Gets a list of managed server DNS aliases for a managed server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed server DNS aliases for a managed server along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByManagedInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, 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 a list of managed server DNS aliases for a managed server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed server DNS aliases for a managed server along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByManagedInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of managed server DNS aliases for a managed server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed server DNS aliases for a managed server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByManagedInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of managed server DNS aliases for a managed server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed server DNS aliases for a managed server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed server DNS aliases for a managed server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed server DNS aliases for a managed server as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName)); - } - - /** - * Gets a list of managed server DNS aliases for a managed server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed server DNS aliases for a managed server as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, context)); - } - /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -919,10 +949,6 @@ public Mono>> acquireWithResponseAsync(String resource 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.")); @@ -934,24 +960,28 @@ public Mono>> acquireWithResponseAsync(String resource if (dnsAliasName == null) { return Mono.error(new IllegalArgumentException("Parameter dnsAliasName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.acquire(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, dnsAliasName, contentType, - accept, parameters, context)) + .withContext(context -> service.acquire(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + dnsAliasName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -968,10 +998,6 @@ private Mono>> acquireWithResponseAsync(String resourc 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.")); @@ -983,22 +1009,26 @@ private Mono>> acquireWithResponseAsync(String resourc if (dnsAliasName == null) { return Mono.error(new IllegalArgumentException("Parameter dnsAliasName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.acquire(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, dnsAliasName, contentType, accept, parameters, context); + return service.acquire(this.client.getEndpoint(), resourceGroupName, managedInstanceName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -1021,7 +1051,8 @@ public PollerFlux, ManagedServerDnsAliasI /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -1045,7 +1076,8 @@ private PollerFlux, ManagedServerDnsAlias /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -1064,7 +1096,8 @@ public SyncPoller, ManagedServerDnsAliasI /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -1085,7 +1118,8 @@ public SyncPoller, ManagedServerDnsAliasI /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -1104,7 +1138,8 @@ public Mono acquireAsync(String resourceGroupName, S /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -1124,7 +1159,8 @@ private Mono acquireAsync(String resourceGroupName, /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -1142,7 +1178,8 @@ public ManagedServerDnsAliasInner acquire(String resourceGroupName, String manag /** * Acquires managed server DNS alias from another managed server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param dnsAliasName The dnsAliasName parameter. * @param parameters The parameters parameter. @@ -1165,8 +1202,8 @@ public ManagedServerDnsAliasInner acquire(String resourceGroupName, String manag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 managed server DNS aliases for a managed server along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of managed server DNS aliases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByManagedInstanceNextSinglePageAsync(String nextLink) { @@ -1194,8 +1231,8 @@ private Mono> listByManagedInstanceNex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 managed server DNS aliases for a managed server along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of managed server DNS aliases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByManagedInstanceNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerSecurityAlertPoliciesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerSecurityAlertPoliciesClientImpl.java index 1fe676ae7284..ddc5fea9587e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerSecurityAlertPoliciesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerSecurityAlertPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -32,8 +32,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ManagedServerSecurityAlertPoliciesClient; import com.azure.resourcemanager.sql.fluent.models.ManagedServerSecurityAlertPolicyInner; -import com.azure.resourcemanager.sql.implementation.models.ManagedServerSecurityAlertPolicyListResult; -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; +import com.azure.resourcemanager.sql.models.ManagedServerSecurityAlertPolicyListResult; +import com.azure.resourcemanager.sql.models.SecurityAlertPolicyNameAutoGenerated; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,55 +67,209 @@ public final class ManagedServerSecurityAlertPoliciesClientImpl implements Manag * The interface defining all the services for SqlManagementClientManagedServerSecurityAlertPolicies to be used by * the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientManagedServerSecurityAlertPolicies") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientM") public interface ManagedServerSecurityAlertPoliciesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies/{securityAlertPolicyName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("securityAlertPolicyName") SecurityAlertPolicyName securityAlertPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies/{securityAlertPolicyName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies/{securityAlertPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("securityAlertPolicyName") SecurityAlertPolicyName securityAlertPolicyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ManagedServerSecurityAlertPolicyInner parameters, Context context); + @PathParam("securityAlertPolicyName") SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies/{securityAlertPolicyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("securityAlertPolicyName") SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ManagedServerSecurityAlertPolicyInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Get the managed server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 server's threat detection policies along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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"; + return FluxUtil + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); + } + + /** + * Get the managed server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 server's threat detection policies along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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 + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the managed server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 server's threat detection policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + } + + /** + * Get the managed server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 server's threat detection policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); + } + + /** + * Get the managed server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 server's threat detection policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); + } + + /** + * Get the managed server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 server's threat detection policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); + } + /** * Get a managed server's threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -126,15 +280,11 @@ Mono> listByInstanceNext( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, SecurityAlertPolicyName securityAlertPolicyName) { + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName) { 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.")); @@ -147,18 +297,22 @@ public Mono> getWithResponseAsyn return Mono.error( new IllegalArgumentException("Parameter securityAlertPolicyName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, securityAlertPolicyName, - accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a managed server's threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. @@ -170,15 +324,11 @@ public Mono> getWithResponseAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, SecurityAlertPolicyName securityAlertPolicyName, Context context) { + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, 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.")); @@ -191,16 +341,21 @@ private Mono> getWithResponseAsy return Mono.error( new IllegalArgumentException("Parameter securityAlertPolicyName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, securityAlertPolicyName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, securityAlertPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Get a managed server's threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -210,7 +365,7 @@ private Mono> getWithResponseAsy */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAsync(String resourceGroupName, String managedInstanceName, - SecurityAlertPolicyName securityAlertPolicyName) { + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName) { return getWithResponseAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -218,7 +373,8 @@ public Mono getAsync(String resourceGroup /** * Get a managed server's threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. @@ -229,14 +385,15 @@ public Mono getAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, - String managedInstanceName, SecurityAlertPolicyName securityAlertPolicyName, Context context) { + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, Context context) { return getWithResponseAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, context).block(); } /** * Get a managed server's threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -246,7 +403,7 @@ public Response getWithResponse(String re */ @ServiceMethod(returns = ReturnType.SINGLE) public ManagedServerSecurityAlertPolicyInner get(String resourceGroupName, String managedInstanceName, - SecurityAlertPolicyName securityAlertPolicyName) { + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName) { return getWithResponse(resourceGroupName, managedInstanceName, securityAlertPolicyName, Context.NONE) .getValue(); } @@ -254,7 +411,8 @@ public ManagedServerSecurityAlertPolicyInner get(String resourceGroupName, Strin /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -266,16 +424,12 @@ public ManagedServerSecurityAlertPolicyInner get(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, SecurityAlertPolicyName securityAlertPolicyName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner 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.")); @@ -288,24 +442,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono.error( new IllegalArgumentException("Parameter securityAlertPolicyName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, securityAlertPolicyName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, securityAlertPolicyName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -318,16 +476,12 @@ public Mono>> createOrUpdateWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, SecurityAlertPolicyName securityAlertPolicyName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner 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.")); @@ -340,23 +494,27 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter securityAlertPolicyName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, securityAlertPolicyName, - contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -368,7 +526,8 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ManagedServerSecurityAlertPolicyInner> beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, - SecurityAlertPolicyName securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters) { + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + ManagedServerSecurityAlertPolicyInner parameters) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters); return this.client.getLroResult( @@ -379,7 +538,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -392,8 +552,8 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedServerSecurityAlertPolicyInner> beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, - SecurityAlertPolicyName securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters, - Context context) { + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + ManagedServerSecurityAlertPolicyInner parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters, context); @@ -405,7 +565,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -417,7 +578,8 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedServerSecurityAlertPolicyInner> beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, - SecurityAlertPolicyName securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters) { + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + ManagedServerSecurityAlertPolicyInner parameters) { return this .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters) .getSyncPoller(); @@ -426,7 +588,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -439,8 +602,8 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedServerSecurityAlertPolicyInner> beginCreateOrUpdate(String resourceGroupName, String managedInstanceName, - SecurityAlertPolicyName securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters, - Context context) { + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + ManagedServerSecurityAlertPolicyInner parameters, Context context) { return this .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters, context) @@ -450,7 +613,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -461,7 +625,7 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync(String resourceGroupName, - String managedInstanceName, SecurityAlertPolicyName securityAlertPolicyName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters) .last() @@ -471,7 +635,8 @@ public Mono createOrUpdateAsync(String re /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -483,7 +648,7 @@ public Mono createOrUpdateAsync(String re */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, - String managedInstanceName, SecurityAlertPolicyName securityAlertPolicyName, + String managedInstanceName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters, context).last().flatMap(this.client::getLroFinalResultOrError); @@ -492,7 +657,8 @@ private Mono createOrUpdateAsync(String r /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -503,14 +669,16 @@ private Mono createOrUpdateAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) public ManagedServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, - SecurityAlertPolicyName securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters) { + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + ManagedServerSecurityAlertPolicyInner parameters) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters).block(); } /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param securityAlertPolicyName The name of the security alert policy. * @param parameters The managed server security alert policy. @@ -522,159 +690,12 @@ public ManagedServerSecurityAlertPolicyInner createOrUpdate(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) public ManagedServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String managedInstanceName, - SecurityAlertPolicyName securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ManagedServerSecurityAlertPolicyInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, managedInstanceName, securityAlertPolicyName, parameters, context) .block(); } - /** - * Get the managed server's threat detection policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server's threat detection policies along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, 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 managed server's threat detection policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 server's threat detection policies along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the managed server's threat detection policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server's threat detection policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Get the managed server's threat detection policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 server's threat detection policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the managed server's threat detection policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server's threat detection policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); - } - - /** - * Get the managed server's threat detection policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 server's threat detection policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); - } - /** * Get the next page of items. * @@ -682,8 +703,8 @@ public PagedIterable listByInstance(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 the managed server's threat detection policies along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of the managed Server's security alert policies along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -711,8 +732,8 @@ public PagedIterable listByInstance(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 the managed server's threat detection policies along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of the managed Server's security alert policies along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java deleted file mode 100644 index 6679d0c4046b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java +++ /dev/null @@ -1,680 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.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.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.fluent.NetworkSecurityPerimeterConfigurationsClient; -import com.azure.resourcemanager.sql.fluent.models.NetworkSecurityPerimeterConfigurationInner; -import com.azure.resourcemanager.sql.implementation.models.NetworkSecurityPerimeterConfigurationListResult; -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 - * NetworkSecurityPerimeterConfigurationsClient. - */ -public final class NetworkSecurityPerimeterConfigurationsClientImpl - implements NetworkSecurityPerimeterConfigurationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final NetworkSecurityPerimeterConfigurationsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of NetworkSecurityPerimeterConfigurationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - NetworkSecurityPerimeterConfigurationsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(NetworkSecurityPerimeterConfigurationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientNetworkSecurityPerimeterConfigurations to be used - * by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientNetworkSecurityPerimeterConfigurations") - public interface NetworkSecurityPerimeterConfigurationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/networkSecurityPerimeterConfigurations/{nspConfigName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("nspConfigName") String nspConfigName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/networkSecurityPerimeterConfigurations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("endpoint") 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" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/networkSecurityPerimeterConfigurations/{nspConfigName}/reconcile") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reconcile(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("nspConfigName") String nspConfigName, @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("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a network security perimeter configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 network security perimeter configuration along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String nspConfigName) { - 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 (nspConfigName == null) { - return Mono.error(new IllegalArgumentException("Parameter nspConfigName 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, nspConfigName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a network security perimeter configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 network security perimeter configuration along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String nspConfigName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (nspConfigName == null) { - return Mono.error(new IllegalArgumentException("Parameter nspConfigName 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, serverName, nspConfigName, accept, context); - } - - /** - * Gets a network security perimeter configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 network security perimeter configuration on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - String nspConfigName) { - return getWithResponseAsync(resourceGroupName, serverName, nspConfigName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a network security perimeter configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 network security perimeter configuration along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String serverName, String nspConfigName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, nspConfigName, context).block(); - } - - /** - * Gets a network security perimeter configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 network security perimeter configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkSecurityPerimeterConfigurationInner get(String resourceGroupName, String serverName, - String nspConfigName) { - return getWithResponse(resourceGroupName, serverName, nspConfigName, Context.NONE).getValue(); - } - - /** - * Gets a list of NSP configurations 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 NSP configurations for a 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())); - } - - /** - * Gets a list of NSP configurations 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 NSP configurations for a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByServerSinglePageAsync(String resourceGroupName, String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Gets a list of NSP configurations 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 NSP configurations for a 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)); - } - - /** - * Gets a list of NSP configurations 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 NSP configurations for a server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, - String serverName, Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of NSP configurations 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 NSP configurations for a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, - String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Gets a list of NSP configurations 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 NSP configurations for a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, - String serverName, Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); - } - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> reconcileWithResponseAsync(String resourceGroupName, String serverName, - String nspConfigName) { - 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 (nspConfigName == null) { - return Mono.error(new IllegalArgumentException("Parameter nspConfigName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.reconcile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, nspConfigName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reconcileWithResponseAsync(String resourceGroupName, String serverName, - String nspConfigName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (nspConfigName == null) { - return Mono.error(new IllegalArgumentException("Parameter nspConfigName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.reconcile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, nspConfigName, accept, context); - } - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - PollerFlux, NetworkSecurityPerimeterConfigurationInner> - beginReconcileAsync(String resourceGroupName, String serverName, String nspConfigName) { - Mono>> mono - = reconcileWithResponseAsync(resourceGroupName, serverName, nspConfigName); - return this.client - .getLroResult(mono, - this.client.getHttpPipeline(), NetworkSecurityPerimeterConfigurationInner.class, - NetworkSecurityPerimeterConfigurationInner.class, this.client.getContext()); - } - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, NetworkSecurityPerimeterConfigurationInner> - beginReconcileAsync(String resourceGroupName, String serverName, String nspConfigName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = reconcileWithResponseAsync(resourceGroupName, serverName, nspConfigName, context); - return this.client - .getLroResult(mono, - this.client.getHttpPipeline(), NetworkSecurityPerimeterConfigurationInner.class, - NetworkSecurityPerimeterConfigurationInner.class, context); - } - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, NetworkSecurityPerimeterConfigurationInner> - beginReconcile(String resourceGroupName, String serverName, String nspConfigName) { - return this.beginReconcileAsync(resourceGroupName, serverName, nspConfigName).getSyncPoller(); - } - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, NetworkSecurityPerimeterConfigurationInner> - beginReconcile(String resourceGroupName, String serverName, String nspConfigName, Context context) { - return this.beginReconcileAsync(resourceGroupName, serverName, nspConfigName, context).getSyncPoller(); - } - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono reconcileAsync(String resourceGroupName, String serverName, - String nspConfigName) { - return beginReconcileAsync(resourceGroupName, serverName, nspConfigName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reconcileAsync(String resourceGroupName, String serverName, - String nspConfigName, Context context) { - return beginReconcileAsync(resourceGroupName, serverName, nspConfigName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, String serverName, - String nspConfigName) { - return reconcileAsync(resourceGroupName, serverName, nspConfigName).block(); - } - - /** - * Reconcile network security perimeter configuration for SQL Resource Provider. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param nspConfigName The nspConfigName 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 nSP Configuration for a server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, String serverName, - String nspConfigName, Context context) { - return reconcileAsync(resourceGroupName, serverName, nspConfigName, context).block(); - } - - /** - * 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 NSP configurations for a 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. - * @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 NSP configurations for a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByServerNextSinglePageAsync(String nextLink, Context context) { - 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"; - context = this.client.mergeContext(context); - return 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)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/OperationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/OperationsClientImpl.java index 861c84cce6a3..1c37ef9d8e3b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/OperationsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.OperationsClient; import com.azure.resourcemanager.sql.fluent.models.OperationInner; -import com.azure.resourcemanager.sql.implementation.models.OperationListResult; +import com.azure.resourcemanager.sql.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -59,14 +59,14 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for SqlManagementClientOperations to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientOperations") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientO") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Sql/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,7 +74,7 @@ Mono> list(@HostParam("endpoint") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/OutboundFirewallRulesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/OutboundFirewallRulesClientImpl.java index 8085a533dee8..072c936b455a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/OutboundFirewallRulesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/OutboundFirewallRulesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -32,7 +32,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.OutboundFirewallRulesClient; import com.azure.resourcemanager.sql.fluent.models.OutboundFirewallRuleInner; -import com.azure.resourcemanager.sql.implementation.models.OutboundFirewallRuleListResult; +import com.azure.resourcemanager.sql.models.OutboundFirewallRuleListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -66,60 +66,208 @@ public final class OutboundFirewallRulesClientImpl implements OutboundFirewallRu * The interface defining all the services for SqlManagementClientOutboundFirewallRules to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientOutboundFirewallRules") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientO") public interface OutboundFirewallRulesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules/{outboundRuleFqdn}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("outboundRuleFqdn") String outboundRuleFqdn, @HeaderParam("Accept") String accept, - Context context); + @PathParam("outboundRuleFqdn") String outboundRuleFqdn, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules/{outboundRuleFqdn}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("outboundRuleFqdn") String outboundRuleFqdn, @HeaderParam("Accept") String accept, - Context context); + @PathParam("outboundRuleFqdn") String outboundRuleFqdn, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules/{outboundRuleFqdn}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("outboundRuleFqdn") String outboundRuleFqdn, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") 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); + @PathParam("outboundRuleFqdn") String outboundRuleFqdn, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets all outbound firewall rules on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 outbound firewall rules on a 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 (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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Gets all outbound firewall rules on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 all outbound firewall rules on a server along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets all outbound firewall rules on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 outbound firewall rules on a 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)); + } + + /** + * Gets all outbound firewall rules on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 all outbound firewall rules on a server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all outbound firewall rules on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 outbound firewall rules on a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Gets all outbound firewall rules on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 all outbound firewall rules on a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + /** * Gets an outbound firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,10 +282,6 @@ public Mono> getWithResponseAsync(String res 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.")); @@ -149,17 +293,22 @@ public Mono> getWithResponseAsync(String res return Mono .error(new IllegalArgumentException("Parameter outboundRuleFqdn 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, outboundRuleFqdn, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + outboundRuleFqdn, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an outbound firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -175,10 +324,6 @@ private Mono> getWithResponseAsync(String re 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.")); @@ -190,16 +335,21 @@ private Mono> getWithResponseAsync(String re return Mono .error(new IllegalArgumentException("Parameter outboundRuleFqdn 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, outboundRuleFqdn, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, outboundRuleFqdn, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets an outbound firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -217,7 +367,8 @@ public Mono getAsync(String resourceGroupName, String /** * Gets an outbound firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -235,7 +386,8 @@ public Response getWithResponse(String resourceGroupN /** * Gets an outbound firewall rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -251,7 +403,8 @@ public OutboundFirewallRuleInner get(String resourceGroupName, String serverName /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -267,10 +420,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -282,17 +431,22 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter outboundRuleFqdn 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"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, outboundRuleFqdn, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + outboundRuleFqdn, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -309,10 +463,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -324,16 +474,21 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter outboundRuleFqdn 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.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, outboundRuleFqdn, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, outboundRuleFqdn, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -354,7 +509,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -376,7 +532,8 @@ private PollerFlux, OutboundFirewallRuleIn /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -393,7 +550,8 @@ private PollerFlux, OutboundFirewallRuleIn /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -411,7 +569,8 @@ private PollerFlux, OutboundFirewallRuleIn /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -429,7 +588,8 @@ public Mono createOrUpdateAsync(String resourceGroupN /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -448,7 +608,8 @@ private Mono createOrUpdateAsync(String resourceGroup /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -465,7 +626,8 @@ public OutboundFirewallRuleInner createOrUpdate(String resourceGroupName, String /** * Create a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -483,7 +645,8 @@ public OutboundFirewallRuleInner createOrUpdate(String resourceGroupName, String /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -498,10 +661,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -513,16 +672,21 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter outboundRuleFqdn 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, outboundRuleFqdn, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + outboundRuleFqdn, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -538,10 +702,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -553,15 +713,20 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter outboundRuleFqdn 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, outboundRuleFqdn, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, outboundRuleFqdn, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -581,7 +746,8 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -603,7 +769,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -620,7 +787,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -638,7 +806,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -655,7 +824,8 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -674,7 +844,8 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -689,7 +860,8 @@ public void delete(String resourceGroupName, String serverName, String outboundR /** * Deletes a outbound firewall rule with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn The outboundRuleFqdn parameter. * @param context The context to associate with this operation. @@ -702,149 +874,6 @@ public void delete(String resourceGroupName, String serverName, String outboundR deleteAsync(resourceGroupName, serverName, outboundRuleFqdn, context).block(); } - /** - * Gets all outbound firewall rules 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 outbound firewall rules on a 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())); - } - - /** - * Gets all outbound firewall rules on 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 all outbound firewall rules on a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Gets all outbound firewall rules 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 outbound firewall rules on a 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)); - } - - /** - * Gets all outbound firewall rules on 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 all outbound firewall rules on a server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all outbound firewall rules 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 outbound firewall rules on a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Gets all outbound firewall rules on 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 all outbound firewall rules on a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); - } - /** * Get the next page of items. * @@ -852,8 +881,7 @@ public PagedIterable listByServer(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 outbound firewall rules on a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of outbound rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -880,8 +908,7 @@ private Mono> listByServerNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 outbound firewall rules on a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of outbound rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateEndpointConnectionsClientImpl.java index 6ae46045237a..6ecfbbaff2d2 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateEndpointConnectionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.sql.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.sql.implementation.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.sql.models.PrivateEndpointConnectionListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,60 +67,212 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi * The interface defining all the services for SqlManagementClientPrivateEndpointConnections to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientPrivateEndpointConnections") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientP") public interface PrivateEndpointConnectionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") PrivateEndpointConnectionInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PrivateEndpointConnectionInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") 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); + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 + * {@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 (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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 all private endpoint connections on a server along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePageAsync(nextLink)); + } + + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 all private endpoint connections on a server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Gets all private endpoint connections on a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 all private endpoint connections on a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -135,10 +287,6 @@ public Mono> getWithResponseAsync(Strin 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.")); @@ -150,10 +298,14 @@ public Mono> getWithResponseAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, accept, + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -161,7 +313,8 @@ public Mono> getWithResponseAsync(Strin /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -177,10 +330,6 @@ private Mono> getWithResponseAsync(Stri 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.")); @@ -192,16 +341,21 @@ private Mono> getWithResponseAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, privateEndpointConnectionName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, privateEndpointConnectionName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -219,7 +373,8 @@ public Mono getAsync(String resourceGroupName, S /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -237,7 +392,8 @@ public Response getWithResponse(String resourceG /** * Gets a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -254,9 +410,10 @@ public PrivateEndpointConnectionInner get(String resourceGroupName, String serve /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -270,10 +427,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -285,26 +438,30 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -320,10 +477,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -335,25 +488,29 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, contentType, - accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -374,9 +531,10 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -399,9 +557,10 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -419,9 +578,10 @@ public SyncPoller, PrivateEndpointCon /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -441,9 +601,10 @@ public SyncPoller, PrivateEndpointCon /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -460,9 +621,10 @@ public Mono createOrUpdateAsync(String resourceG /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -480,9 +642,10 @@ private Mono createOrUpdateAsync(String resource /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -498,9 +661,10 @@ public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, S /** * 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. * @param parameters The parameters parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -518,9 +682,10 @@ public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, S /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -533,10 +698,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -548,18 +709,23 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + privateEndpointConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), 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 resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -573,10 +739,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -588,17 +750,22 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, privateEndpointConnectionName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, privateEndpointConnectionName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -616,9 +783,10 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -638,9 +806,10 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -655,9 +824,10 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -674,9 +844,10 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -691,9 +862,10 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -710,9 +882,10 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -725,9 +898,10 @@ public void delete(String resourceGroupName, String serverName, String privateEn /** * Deletes a private endpoint connection with a given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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. @@ -739,149 +913,6 @@ public void delete(String resourceGroupName, String serverName, String privateEn deleteAsync(resourceGroupName, serverName, privateEndpointConnectionName, context).block(); } - /** - * Gets 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 - * {@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())); - } - - /** - * Gets 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. - * @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 all private endpoint connections on a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Gets 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}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePageAsync(nextLink)); - } - - /** - * Gets 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. - * @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 all private endpoint connections on a server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets 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}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Gets 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. - * @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 all private endpoint connections on a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); - } - /** * Get the next page of items. * @@ -889,7 +920,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 along with {@link PagedResponse} on successful completion of + * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -917,7 +948,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 all private endpoint connections on a server along with {@link PagedResponse} on successful completion of + * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateLinkResourcesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateLinkResourcesClientImpl.java index b8b41d08a8cb..c5ab0d95f486 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateLinkResourcesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.sql.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.sql.implementation.models.PrivateLinkResourceListResult; +import com.azure.resourcemanager.sql.models.PrivateLinkResourceListResult; import reactor.core.publisher.Mono; /** @@ -59,59 +59,55 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource * The interface defining all the services for SqlManagementClientPrivateLinkResources to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientPrivateLinkResources") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientP") public interface PrivateLinkResourcesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateLinkResources/{groupName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("groupName") String groupName, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateLinkResources") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateLinkResources/{groupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("groupName") String groupName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @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("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a private link resource for SQL server. + * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param groupName The name of the private link 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 private link resource for SQL server along with {@link Response} on successful completion of + * @return the private link resources for SQL server along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String groupName) { + 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.")); @@ -119,40 +115,39 @@ public Mono> getWithResponseAsync(String reso if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, groupName, accept, context)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); } /** - * Gets a private link resource for SQL server. + * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param groupName The name of the private link 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 private link resource for SQL server along with {@link Response} on successful completion of + * @return the private link resources for SQL server along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String groupName, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, 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.")); @@ -160,88 +155,109 @@ private Mono> getWithResponseAsync(String res if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, groupName, accept, context); + return service + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a private link resource for SQL server. + * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param groupName The name of the private link 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 private link resource for SQL server on successful completion of {@link Mono}. + * @return the private link resources for SQL server as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String groupName) { - return getWithResponseAsync(resourceGroupName, serverName, groupName) - .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 a private link resource for SQL server. + * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param groupName The name of the private link 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 private link resource for SQL server along with {@link Response}. + * @return the private link resources for SQL server as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String groupName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, groupName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** - * Gets a private link resource for SQL server. + * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param groupName The name of the private link 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 private link resource for SQL server. + * @return the private link resources for SQL server as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceInner get(String resourceGroupName, String serverName, String groupName) { - return getWithResponse(resourceGroupName, serverName, groupName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); } /** * Gets the private link resources for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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 private link resources for SQL server along with {@link PagedResponse} on successful completion of + * @return the private link resources for SQL server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + + /** + * Gets a private link resource for SQL server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param groupName The name of the private link 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 private link resource for SQL server along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String groupName) { 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.")); @@ -249,38 +265,41 @@ private Mono> listByServerSinglePageAsyn if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName 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"; 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)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, groupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the private link resources for SQL server. + * Gets a private link resource for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param groupName The name of the private link 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 private link resources for SQL server along with {@link PagedResponse} on successful completion of + * @return a private link resource for SQL server along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String groupName, 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.")); @@ -288,79 +307,71 @@ private Mono> listByServerSinglePageAsyn if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName 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 - .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)); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, groupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Gets the private link resources for SQL server. + * Gets a private link resource for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param groupName The name of the private link 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 private link resources for SQL server as paginated response with {@link PagedFlux}. + * @return a private link resource for SQL server on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, String groupName) { + return getWithResponseAsync(resourceGroupName, serverName, groupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets the private link resources for SQL server. + * Gets a private link resource for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param groupName The name of the private link 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 private link resources for SQL server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the private link resources for SQL 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 private link resources for SQL server as paginated response with {@link PagedIterable}. + * @return a private link resource for SQL server along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + String groupName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, groupName, context).block(); } /** - * Gets the private link resources for SQL server. + * Gets a private link resource for SQL server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param groupName The name of the private link 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 private link resources for SQL server as paginated response with {@link PagedIterable}. + * @return a private link resource for SQL server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourceInner get(String resourceGroupName, String serverName, String groupName) { + return getWithResponse(resourceGroupName, serverName, groupName, Context.NONE).getValue(); } /** @@ -370,7 +381,7 @@ public PagedIterable listByServer(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 private link resources for SQL server along with {@link PagedResponse} on successful completion of + * @return a list of private link resources along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -398,7 +409,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 the private link resources for SQL server along with {@link PagedResponse} on successful completion of + * @return a list of private link resources along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecommendedSensitivityLabelsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecommendedSensitivityLabelsClientImpl.java index 9377d06812b4..09c7a022e0e9 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecommendedSensitivityLabelsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecommendedSensitivityLabelsClientImpl.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -55,24 +54,25 @@ public final class RecommendedSensitivityLabelsClientImpl implements Recommended * The interface defining all the services for SqlManagementClientRecommendedSensitivityLabels to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientRecommendedSensitivityLabels") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientR") public interface RecommendedSensitivityLabelsService { - @Headers({ "Accept: application/json;q=0.9" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") RecommendedSensitivityLabelUpdateList parameters, Context context); } /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -88,10 +88,6 @@ public Mono> updateWithResponseAsync(String resourceGroupName, St 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.")); @@ -102,23 +98,26 @@ public Mono> updateWithResponseAsync(String resourceGroupName, St if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, contentType, parameters, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -135,10 +134,6 @@ private Mono> updateWithResponseAsync(String resourceGroupName, S 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.")); @@ -149,21 +144,25 @@ private Mono> updateWithResponseAsync(String resourceGroupName, S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, contentType, parameters, context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -182,7 +181,8 @@ public Mono updateAsync(String resourceGroupName, String serverName, Strin /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -201,7 +201,8 @@ public Response updateWithResponse(String resourceGroupName, String server /** * Update recommended sensitivity labels states of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableDatabasesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableDatabasesClientImpl.java index 386d2507851f..35f412fd0ed3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableDatabasesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableDatabasesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.RecoverableDatabasesClient; import com.azure.resourcemanager.sql.fluent.models.RecoverableDatabaseInner; -import com.azure.resourcemanager.sql.implementation.models.RecoverableDatabaseListResult; +import com.azure.resourcemanager.sql.models.RecoverableDatabaseListResult; import reactor.core.publisher.Mono; /** @@ -59,61 +59,55 @@ public final class RecoverableDatabasesClientImpl implements RecoverableDatabase * The interface defining all the services for SqlManagementClientRecoverableDatabases to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientRecoverableDatabases") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientR") public interface RecoverableDatabasesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @QueryParam("$expand") String expand, - @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @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("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a recoverable database. + * Gets a list of recoverable databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param expand The child resources to include in the response. - * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recoverable database along with {@link Response} on successful completion of {@link Mono}. + * @return a list of recoverable databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String expand, String filter) { + 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.")); @@ -121,42 +115,39 @@ public Mono> getWithResponseAsync(String reso if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, expand, filter, accept, - context)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); } /** - * Gets a recoverable database. + * Gets a list of recoverable databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param expand The child resources to include in the response. - * @param filter An OData filter expression that filters elements in the collection. * @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 recoverable database along with {@link Response} on successful completion of {@link Mono}. + * @return a list of recoverable databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String expand, String filter, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, 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.")); @@ -164,94 +155,108 @@ private Mono> getWithResponseAsync(String res if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, expand, filter, accept, context); + return service + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a recoverable database. + * Gets a list of recoverable databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the 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 a recoverable database on successful completion of {@link Mono}. + * @return a list of recoverable databases as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String databaseName) { - final String expand = null; - final String filter = null; - return getWithResponseAsync(resourceGroupName, serverName, databaseName, expand, filter) - .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 a recoverable database. + * Gets a list of recoverable databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param expand The child resources to include in the response. - * @param filter An OData filter expression that filters elements in the collection. * @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 recoverable database along with {@link Response}. + * @return a list of recoverable databases as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, String expand, String filter, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, expand, filter, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** - * Gets a recoverable database. + * Gets a list of recoverable databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the 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 a recoverable database. + * @return a list of recoverable databases as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoverableDatabaseInner get(String resourceGroupName, String serverName, String databaseName) { - final String expand = null; - final String filter = null; - return getWithResponse(resourceGroupName, serverName, databaseName, expand, filter, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); } /** * Gets a list of recoverable databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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 recoverable databases along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of recoverable databases as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + + /** + * Gets a recoverable database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 a recoverable database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName) { 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.")); @@ -259,38 +264,40 @@ private Mono> listByServerSinglePageAsyn if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; 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)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of recoverable databases. + * Gets a recoverable database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param databaseName The name of the 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 a list of recoverable databases along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a recoverable database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, 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.")); @@ -298,79 +305,71 @@ private Mono> listByServerSinglePageAsyn if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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 - .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)); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Gets a list of recoverable databases. + * Gets a recoverable database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param databaseName The name of the 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 a list of recoverable databases as paginated response with {@link PagedFlux}. + * @return a recoverable database on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, String databaseName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of recoverable databases. + * Gets a recoverable database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param databaseName The name of the 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 a list of recoverable databases as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of recoverable databases. - * - * @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 recoverable databases as paginated response with {@link PagedIterable}. + * @return a recoverable database along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, context).block(); } /** - * Gets a list of recoverable databases. + * Gets a recoverable database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param databaseName The name of the 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 a list of recoverable databases as paginated response with {@link PagedIterable}. + * @return a recoverable database. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public RecoverableDatabaseInner get(String resourceGroupName, String serverName, String databaseName) { + return getWithResponse(resourceGroupName, serverName, databaseName, Context.NONE).getValue(); } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableManagedDatabasesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableManagedDatabasesClientImpl.java index d25ddd9bcc2c..8c0ce2f399fd 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableManagedDatabasesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableManagedDatabasesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.RecoverableManagedDatabasesClient; import com.azure.resourcemanager.sql.fluent.models.RecoverableManagedDatabaseInner; -import com.azure.resourcemanager.sql.implementation.models.RecoverableManagedDatabaseListResult; +import com.azure.resourcemanager.sql.models.RecoverableManagedDatabaseListResult; import reactor.core.publisher.Mono; /** @@ -59,61 +59,58 @@ public final class RecoverableManagedDatabasesClientImpl implements RecoverableM * The interface defining all the services for SqlManagementClientRecoverableManagedDatabases to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientRecoverableManagedDatabases") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientR") public interface RecoverableManagedDatabasesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases/{recoverableDatabaseName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("recoverableDatabaseName") String recoverableDatabaseName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases/{recoverableDatabaseName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("recoverableDatabaseName") String recoverableDatabaseName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a recoverable managed database. + * Gets a list of recoverable managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param recoverableDatabaseName The recoverableDatabaseName 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 recoverable managed database along with {@link Response} on successful completion of {@link Mono}. + * @return a list of recoverable managed databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String recoverableDatabaseName) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName) { 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.")); @@ -122,41 +119,39 @@ public Mono> getWithResponseAsync(Stri return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } - if (recoverableDatabaseName == null) { - return Mono.error( - new IllegalArgumentException("Parameter recoverableDatabaseName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, recoverableDatabaseName, - accept, context)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); } /** - * Gets a recoverable managed database. + * Gets a list of recoverable managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param recoverableDatabaseName The recoverableDatabaseName 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 recoverable managed database along with {@link Response} on successful completion of {@link Mono}. + * @return a list of recoverable managed databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String recoverableDatabaseName, Context context) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, 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.")); @@ -165,92 +160,110 @@ private Mono> getWithResponseAsync(Str return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } - if (recoverableDatabaseName == null) { - return Mono.error( - new IllegalArgumentException("Parameter recoverableDatabaseName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, recoverableDatabaseName, accept, context); + return service + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a recoverable managed database. + * Gets a list of recoverable managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param recoverableDatabaseName The recoverableDatabaseName 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 recoverable managed database on successful completion of {@link Mono}. + * @return a list of recoverable managed databases as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String managedInstanceName, - String recoverableDatabaseName) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, recoverableDatabaseName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** - * Gets a recoverable managed database. + * Gets a list of recoverable managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param recoverableDatabaseName The recoverableDatabaseName 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 recoverable managed database along with {@link Response}. + * @return a list of recoverable managed databases as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String managedInstanceName, String recoverableDatabaseName, Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, recoverableDatabaseName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** - * Gets a recoverable managed database. + * Gets a list of recoverable managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param recoverableDatabaseName The recoverableDatabaseName 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 recoverable managed database. + * @return a list of recoverable managed databases as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecoverableManagedDatabaseInner get(String resourceGroupName, String managedInstanceName, - String recoverableDatabaseName) { - return getWithResponse(resourceGroupName, managedInstanceName, recoverableDatabaseName, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets a list of recoverable managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @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 recoverable managed databases along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of recoverable managed databases as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); + } + + /** + * Gets a recoverable managed database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param recoverableDatabaseName The recoverableDatabaseName 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 recoverable managed database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync(String resourceGroupName, - String managedInstanceName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String recoverableDatabaseName) { 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.")); @@ -259,38 +272,41 @@ private Mono> listByInstanceSingl return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } + if (recoverableDatabaseName == null) { + return Mono.error( + new IllegalArgumentException("Parameter recoverableDatabaseName 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"; return FluxUtil - .withContext(context -> service.listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + recoverableDatabaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of recoverable managed databases. + * Gets a recoverable managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param recoverableDatabaseName The recoverableDatabaseName 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 list of recoverable managed databases along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a recoverable managed database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync(String resourceGroupName, - String managedInstanceName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String recoverableDatabaseName, 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.")); @@ -299,81 +315,75 @@ private Mono> listByInstanceSingl return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } + if (recoverableDatabaseName == null) { + return Mono.error( + new IllegalArgumentException("Parameter recoverableDatabaseName 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 - .listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, recoverableDatabaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Gets a list of recoverable managed databases. + * Gets a recoverable managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param recoverableDatabaseName The recoverableDatabaseName 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 list of recoverable managed databases as paginated response with {@link PagedFlux}. + * @return a recoverable managed database on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String recoverableDatabaseName) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, recoverableDatabaseName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of recoverable managed databases. + * Gets a recoverable managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param recoverableDatabaseName The recoverableDatabaseName 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 list of recoverable managed databases as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of recoverable managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 recoverable managed databases as paginated response with {@link PagedIterable}. + * @return a recoverable managed database along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String recoverableDatabaseName, Context context) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, recoverableDatabaseName, context).block(); } /** - * Gets a list of recoverable managed databases. + * Gets a recoverable managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param context The context to associate with this operation. + * @param recoverableDatabaseName The recoverableDatabaseName 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 list of recoverable managed databases as paginated response with {@link PagedIterable}. + * @return a recoverable managed database. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public RecoverableManagedDatabaseInner get(String resourceGroupName, String managedInstanceName, + String recoverableDatabaseName) { + return getWithResponse(resourceGroupName, managedInstanceName, recoverableDatabaseName, Context.NONE) + .getValue(); } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ReplicationLinksClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ReplicationLinksClientImpl.java index aad025d40db6..76d22ede061d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ReplicationLinksClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ReplicationLinksClientImpl.java @@ -1,10 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -12,10 +11,8 @@ import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -35,8 +32,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ReplicationLinksClient; import com.azure.resourcemanager.sql.fluent.models.ReplicationLinkInner; -import com.azure.resourcemanager.sql.implementation.models.ReplicationLinkListResult; -import com.azure.resourcemanager.sql.models.ReplicationLinkUpdate; +import com.azure.resourcemanager.sql.models.ReplicationLinkListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -70,84 +66,65 @@ public final class ReplicationLinksClientImpl implements ReplicationLinksClient * The interface defining all the services for SqlManagementClientReplicationLinks to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientReplicationLinks") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientR") public interface ReplicationLinksService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @PathParam("linkId") String linkId, - @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @PathParam("linkId") String linkId, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ReplicationLinkInner parameters, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("linkId") String linkId, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ReplicationLinkUpdate parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @PathParam("linkId") String linkId, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("linkId") String linkId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failover(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> failover(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("linkId") String linkId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failoverAllowDataLoss(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> failoverAllowDataLoss(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("linkId") String linkId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/replicationLinks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -155,7 +132,7 @@ Mono> listByServer(@HostParam("endpoint") St @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -163,33 +140,30 @@ Mono> listByDatabaseNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a replication link. + * Gets a list of replication links on database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replication link along with {@link Response} on successful completion of {@link Mono}. + * @return a list of replication links on database along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String linkId) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName) { 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.")); @@ -200,138 +174,40 @@ public Mono> getWithResponseAsync(String resource if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (linkId == null) { - return Mono.error(new IllegalArgumentException("Parameter linkId 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, databaseName, linkId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a replication link. - * - * @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 linkId The name of the replication link. - * @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 replication link along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String linkId, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (linkId == null) { - return Mono.error(new IllegalArgumentException("Parameter linkId 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, serverName, databaseName, linkId, accept, context); - } - - /** - * Gets a replication link. - * - * @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 linkId The name of the replication link. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replication link on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String databaseName, - String linkId) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, linkId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return FluxUtil + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), 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())); } /** - * Gets a replication link. + * Gets a list of replication links on database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. * @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 replication link along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String databaseName, String linkId, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, linkId, context).block(); - } - - /** - * Gets a replication link. - * - * @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 linkId The name of the replication link. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replication link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationLinkInner get(String resourceGroupName, String serverName, String databaseName, String linkId) { - return getWithResponse(resourceGroupName, serverName, databaseName, linkId, Context.NONE).getValue(); - } - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 replication link along with {@link Response} on successful completion of {@link Mono}. + * @return a list of replication links on database along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String linkId, ReplicationLinkInner parameters) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, 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.")); @@ -342,269 +218,116 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (linkId == null) { - return Mono.error(new IllegalArgumentException("Parameter linkId 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, linkId, contentType, - accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 replication link along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, String linkId, ReplicationLinkInner 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (linkId == null) { - return Mono.error(new IllegalArgumentException("Parameter linkId 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, linkId, contentType, accept, - parameters, context); - } - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 a replication link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ReplicationLinkInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String databaseName, String linkId, - ReplicationLinkInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, linkId, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ReplicationLinkInner.class, ReplicationLinkInner.class, this.client.getContext()); - } - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 a replication link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationLinkInner> beginCreateOrUpdateAsync( - String resourceGroupName, String serverName, String databaseName, String linkId, - ReplicationLinkInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, linkId, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ReplicationLinkInner.class, ReplicationLinkInner.class, context); - } - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 a replication link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationLinkInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String databaseName, String linkId, - ReplicationLinkInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, linkId, parameters) - .getSyncPoller(); - } - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 a replication link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationLinkInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, String databaseName, String linkId, - ReplicationLinkInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, linkId, parameters, context) - .getSyncPoller(); + return service + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Updates the replication link type. + * Gets a list of replication links on database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. - * @param parameters The parameters 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 replication link on successful completion of {@link Mono}. + * @return a list of replication links on database as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String serverName, - String databaseName, String linkId, ReplicationLinkInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, linkId, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** - * Updates the replication link type. + * Gets a list of replication links on database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. - * @param parameters The parameters 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 replication link on successful completion of {@link Mono}. + * @return a list of replication links on database as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String serverName, - String databaseName, String linkId, ReplicationLinkInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, linkId, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Updates the replication link type. + * Gets a list of replication links on database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. - * @param parameters The parameters 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 replication link. + * @return a list of replication links on database as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationLinkInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, - String linkId, ReplicationLinkInner parameters) { - return createOrUpdateAsync(resourceGroupName, serverName, databaseName, linkId, parameters).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** - * Updates the replication link type. + * Gets a list of replication links on database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. - * @param parameters The parameters 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 replication link. + * @return a list of replication links on database as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationLinkInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, - String linkId, ReplicationLinkInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, serverName, databaseName, linkId, parameters, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** - * Updates the replication link type. + * Gets a replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. - * @param parameters The parameters 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 replication link along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String linkId, ReplicationLinkUpdate parameters) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String linkId) { 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.")); @@ -618,28 +341,25 @@ public Mono>> updateWithResponseAsync(String resourceG if (linkId == null) { return Mono.error(new IllegalArgumentException("Parameter linkId 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, linkId, contentType, - accept, parameters, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + linkId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the replication link type. + * Gets a replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. - * @param parameters The parameters 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. @@ -647,16 +367,12 @@ public Mono>> updateWithResponseAsync(String resourceG * @return a replication link along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String linkId, ReplicationLinkUpdate parameters, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String linkId, 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.")); @@ -666,196 +382,86 @@ private Mono>> updateWithResponseAsync(String resource } if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (linkId == null) { - return Mono.error(new IllegalArgumentException("Parameter linkId 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, linkId, contentType, accept, parameters, context); - } - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 a replication link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ReplicationLinkInner> beginUpdateAsync(String resourceGroupName, - String serverName, String databaseName, String linkId, ReplicationLinkUpdate parameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, serverName, databaseName, linkId, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ReplicationLinkInner.class, ReplicationLinkInner.class, this.client.getContext()); - } - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 a replication link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ReplicationLinkInner> beginUpdateAsync( - String resourceGroupName, String serverName, String databaseName, String linkId, - ReplicationLinkUpdate parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, serverName, databaseName, linkId, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ReplicationLinkInner.class, ReplicationLinkInner.class, context); - } - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 a replication link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationLinkInner> beginUpdate(String resourceGroupName, - String serverName, String databaseName, String linkId, ReplicationLinkUpdate parameters) { - return this.beginUpdateAsync(resourceGroupName, serverName, databaseName, linkId, parameters).getSyncPoller(); - } - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 a replication link. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ReplicationLinkInner> beginUpdate(String resourceGroupName, - String serverName, String databaseName, String linkId, ReplicationLinkUpdate parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, serverName, databaseName, linkId, parameters, context) - .getSyncPoller(); - } - - /** - * Updates the replication link type. - * - * @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 linkId The name of the replication link. - * @param parameters The parameters 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 replication link on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, - String linkId, ReplicationLinkUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, linkId, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + } + if (linkId == null) { + return Mono.error(new IllegalArgumentException("Parameter linkId 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.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, linkId, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Updates the replication link type. + * Gets a replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. - * @param parameters The parameters 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 replication link on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String serverName, String databaseName, - String linkId, ReplicationLinkUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, linkId, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String linkId) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, linkId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Updates the replication link type. + * Gets a replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. - * @param parameters The parameters 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 replication link. + * @return a replication link along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationLinkInner update(String resourceGroupName, String serverName, String databaseName, String linkId, - ReplicationLinkUpdate parameters) { - return updateAsync(resourceGroupName, serverName, databaseName, linkId, parameters).block(); + public Response getWithResponse(String resourceGroupName, String serverName, + String databaseName, String linkId, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, linkId, context).block(); } /** - * Updates the replication link type. + * Gets a replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. - * @param parameters The parameters 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 replication link. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicationLinkInner update(String resourceGroupName, String serverName, String databaseName, String linkId, - ReplicationLinkUpdate parameters, Context context) { - return updateAsync(resourceGroupName, serverName, databaseName, linkId, parameters, context).block(); + public ReplicationLinkInner get(String resourceGroupName, String serverName, String databaseName, String linkId) { + return getWithResponse(resourceGroupName, serverName, databaseName, linkId, Context.NONE).getValue(); } /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -868,10 +474,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -885,19 +487,24 @@ public Mono>> deleteWithResponseAsync(String resourceG if (linkId == null) { return Mono.error(new IllegalArgumentException("Parameter linkId 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, linkId, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, linkId, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -911,10 +518,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -928,18 +531,23 @@ private Mono>> deleteWithResponseAsync(String resource if (linkId == null) { return Mono.error(new IllegalArgumentException("Parameter linkId 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, linkId, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, linkId, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -957,10 +565,11 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -980,10 +589,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -998,10 +608,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -1017,10 +628,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -1035,10 +647,11 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -1055,10 +668,11 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -1071,10 +685,11 @@ public void delete(String resourceGroupName, String serverName, String databaseN /** * Deletes the replication link. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param linkId The name of the replication link. + * @param linkId The linkId 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. @@ -1086,168 +701,11 @@ public void delete(String resourceGroupName, String serverName, String databaseN deleteAsync(resourceGroupName, serverName, databaseName, linkId, context).block(); } - /** - * Gets a list of replication links on 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 replication links on database along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, 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 a list of replication links on 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 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 replication links on database along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of replication links on 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 replication links on database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of replication links on 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 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 replication links on database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of replication links on 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 replication links on database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); - } - - /** - * Gets a list of replication links on 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 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 replication links on database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); - } - /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1263,10 +721,6 @@ public Mono>> failoverWithResponseAsync(String resourc 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.")); @@ -1280,17 +734,22 @@ public Mono>> failoverWithResponseAsync(String resourc if (linkId == null) { return Mono.error(new IllegalArgumentException("Parameter linkId 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"; return FluxUtil - .withContext(context -> service.failover(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, linkId, accept, context)) + .withContext(context -> service.failover(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, linkId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1307,10 +766,6 @@ private Mono>> failoverWithResponseAsync(String resour 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.")); @@ -1324,16 +779,21 @@ private Mono>> failoverWithResponseAsync(String resour if (linkId == null) { return Mono.error(new IllegalArgumentException("Parameter linkId 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.failover(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, linkId, accept, context); + return service.failover(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, linkId, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1354,7 +814,8 @@ private Mono>> failoverWithResponseAsync(String resour /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1377,7 +838,8 @@ private PollerFlux, ReplicationLinkInner> begin /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1395,7 +857,8 @@ public SyncPoller, ReplicationLinkInner> beginF /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1414,7 +877,8 @@ public SyncPoller, ReplicationLinkInner> beginF /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1433,7 +897,8 @@ public Mono failoverAsync(String resourceGroupName, String /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1453,7 +918,8 @@ private Mono failoverAsync(String resourceGroupName, Strin /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1471,7 +937,8 @@ public ReplicationLinkInner failover(String resourceGroupName, String serverName /** * Fails over from the current primary server to this server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1490,7 +957,8 @@ public ReplicationLinkInner failover(String resourceGroupName, String serverName /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1506,10 +974,6 @@ public Mono>> failoverAllowDataLossWithResponseAsync(S 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.")); @@ -1523,18 +987,23 @@ public Mono>> failoverAllowDataLossWithResponseAsync(S if (linkId == null) { return Mono.error(new IllegalArgumentException("Parameter linkId 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"; return FluxUtil - .withContext(context -> service.failoverAllowDataLoss(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, - databaseName, linkId, accept, context)) + .withContext(context -> service.failoverAllowDataLoss(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, linkId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1551,10 +1020,6 @@ private Mono>> failoverAllowDataLossWithResponseAsync( 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.")); @@ -1568,16 +1033,21 @@ private Mono>> failoverAllowDataLossWithResponseAsync( if (linkId == null) { return Mono.error(new IllegalArgumentException("Parameter linkId 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.failoverAllowDataLoss(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, linkId, accept, context); + return service.failoverAllowDataLoss(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + linkId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1598,7 +1068,8 @@ public PollerFlux, ReplicationLinkInner> beginF /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1621,7 +1092,8 @@ private PollerFlux, ReplicationLinkInner> begin /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1640,7 +1112,8 @@ private PollerFlux, ReplicationLinkInner> begin /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1660,7 +1133,8 @@ public SyncPoller, ReplicationLinkInner> beginF /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1679,7 +1153,8 @@ public Mono failoverAllowDataLossAsync(String resourceGrou /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1699,7 +1174,8 @@ private Mono failoverAllowDataLossAsync(String resourceGro /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1717,7 +1193,8 @@ public ReplicationLinkInner failoverAllowDataLoss(String resourceGroupName, Stri /** * Fails over from the current primary server to this server allowing data loss. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param linkId The name of the replication link. @@ -1736,7 +1213,8 @@ public ReplicationLinkInner failoverAllowDataLoss(String resourceGroupName, Stri /** * Gets a list of replication links. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -1750,10 +1228,6 @@ private Mono> listByServerSinglePageAsync(St 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.")); @@ -1761,10 +1235,14 @@ private Mono> listByServerSinglePageAsync(St if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName 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"; return FluxUtil - .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); @@ -1773,7 +1251,8 @@ private Mono> listByServerSinglePageAsync(St /** * Gets a list of replication links. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1788,10 +1267,6 @@ private Mono> listByServerSinglePageAsync(St 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.")); @@ -1799,11 +1274,15 @@ private Mono> listByServerSinglePageAsync(St if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName 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 - .listByServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, accept, context) + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -1811,7 +1290,8 @@ private Mono> listByServerSinglePageAsync(St /** * Gets a list of replication links. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -1827,7 +1307,8 @@ public PagedFlux listByServerAsync(String resourceGroupNam /** * Gets a list of replication links. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1845,7 +1326,8 @@ private PagedFlux listByServerAsync(String resourceGroupNa /** * Gets a list of replication links. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -1860,7 +1342,8 @@ public PagedIterable listByServer(String resourceGroupName /** * Gets a list of replication links. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1881,8 +1364,7 @@ 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 replication links on database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of replication links along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -1909,8 +1391,7 @@ private Mono> listByDatabaseNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 replication links on database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of replication links along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedDatabasesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedDatabasesClientImpl.java index b2c659d92e90..eb1d528168e5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedDatabasesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedDatabasesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.RestorableDroppedDatabasesClient; import com.azure.resourcemanager.sql.fluent.models.RestorableDroppedDatabaseInner; -import com.azure.resourcemanager.sql.implementation.models.RestorableDroppedDatabaseListResult; +import com.azure.resourcemanager.sql.models.RestorableDroppedDatabaseListResult; import reactor.core.publisher.Mono; /** @@ -59,27 +59,26 @@ public final class RestorableDroppedDatabasesClientImpl implements RestorableDro * The interface defining all the services for SqlManagementClientRestorableDroppedDatabases to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientRestorableDroppedDatabases") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientR") public interface RestorableDroppedDatabasesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("restorableDroppedDatabaseId") String restorableDroppedDatabaseId, - @QueryParam("$expand") String expand, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("restorableDroppedDatabaseId") String restorableDroppedDatabaseId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -87,34 +86,29 @@ Mono> listByServer(@HostParam("end @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a restorable dropped database. + * Gets a list of restorable dropped databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param expand The child resources to include in the response. - * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a restorable dropped database along with {@link Response} on successful completion of {@link Mono}. + * @return a list of restorable dropped databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String restorableDroppedDatabaseId, String expand, String filter) { + 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.")); @@ -122,43 +116,39 @@ public Mono> getWithResponseAsync(Strin if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (restorableDroppedDatabaseId == null) { - return Mono.error( - new IllegalArgumentException("Parameter restorableDroppedDatabaseId 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, restorableDroppedDatabaseId, expand, - filter, accept, context)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); } /** - * Gets a restorable dropped database. + * Gets a list of restorable dropped databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param expand The child resources to include in the response. - * @param filter An OData filter expression that filters elements in the collection. * @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 restorable dropped database along with {@link Response} on successful completion of {@link Mono}. + * @return a list of restorable dropped databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String restorableDroppedDatabaseId, String expand, String filter, Context context) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, 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.")); @@ -166,99 +156,108 @@ private Mono> getWithResponseAsync(Stri if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (restorableDroppedDatabaseId == null) { - return Mono.error( - new IllegalArgumentException("Parameter restorableDroppedDatabaseId 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, restorableDroppedDatabaseId, expand, filter, accept, context); + return service + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a restorable dropped database. + * Gets a list of restorable dropped databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 restorable dropped database on successful completion of {@link Mono}. + * @return a list of restorable dropped databases as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - String restorableDroppedDatabaseId) { - final String expand = null; - final String filter = null; - return getWithResponseAsync(resourceGroupName, serverName, restorableDroppedDatabaseId, expand, filter) - .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 a restorable dropped database. + * Gets a list of restorable dropped databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId parameter. - * @param expand The child resources to include in the response. - * @param filter An OData filter expression that filters elements in the collection. * @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 restorable dropped database along with {@link Response}. + * @return a list of restorable dropped databases as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String restorableDroppedDatabaseId, String expand, String filter, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, restorableDroppedDatabaseId, expand, filter, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); } /** - * Gets a restorable dropped database. + * Gets a list of restorable dropped databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 restorable dropped database. + * @return a list of restorable dropped databases as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RestorableDroppedDatabaseInner get(String resourceGroupName, String serverName, - String restorableDroppedDatabaseId) { - final String expand = null; - final String filter = null; - return getWithResponse(resourceGroupName, serverName, restorableDroppedDatabaseId, expand, filter, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); } /** * Gets a list of restorable dropped databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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 restorable dropped databases along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of restorable dropped databases as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + + /** + * Gets a restorable dropped database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 restorable dropped database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String restorableDroppedDatabaseId) { 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.")); @@ -266,38 +265,40 @@ private Mono> listByServerSinglePa if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (restorableDroppedDatabaseId == null) { + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId 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"; - 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)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + restorableDroppedDatabaseId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of restorable dropped databases. + * Gets a restorable dropped database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 list of restorable dropped databases along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a restorable dropped database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String restorableDroppedDatabaseId, 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.")); @@ -305,79 +306,74 @@ private Mono> listByServerSinglePa if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (restorableDroppedDatabaseId == null) { + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId 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 - .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)); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, restorableDroppedDatabaseId, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Gets a list of restorable dropped databases. + * Gets a restorable dropped database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 list of restorable dropped databases as paginated response with {@link PagedFlux}. + * @return a restorable dropped database on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, + String restorableDroppedDatabaseId) { + return getWithResponseAsync(resourceGroupName, serverName, restorableDroppedDatabaseId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of restorable dropped databases. + * Gets a restorable dropped database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 list of restorable dropped databases as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of restorable dropped databases. - * - * @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 restorable dropped databases as paginated response with {@link PagedIterable}. + * @return a restorable dropped database along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + String restorableDroppedDatabaseId, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, restorableDroppedDatabaseId, context).block(); } /** - * Gets a list of restorable dropped databases. + * Gets a restorable dropped database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 list of restorable dropped databases as paginated response with {@link PagedIterable}. + * @return a restorable dropped database. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public RestorableDroppedDatabaseInner get(String resourceGroupName, String serverName, + String restorableDroppedDatabaseId) { + return getWithResponse(resourceGroupName, serverName, restorableDroppedDatabaseId, Context.NONE).getValue(); } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedManagedDatabasesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedManagedDatabasesClientImpl.java index 9898cce306b9..ccca73f706ed 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedManagedDatabasesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedManagedDatabasesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.RestorableDroppedManagedDatabasesClient; import com.azure.resourcemanager.sql.fluent.models.RestorableDroppedManagedDatabaseInner; -import com.azure.resourcemanager.sql.implementation.models.RestorableDroppedManagedDatabaseListResult; +import com.azure.resourcemanager.sql.models.RestorableDroppedManagedDatabaseListResult; import reactor.core.publisher.Mono; /** @@ -59,63 +59,58 @@ public final class RestorableDroppedManagedDatabasesClientImpl implements Restor * The interface defining all the services for SqlManagementClientRestorableDroppedManagedDatabases to be used by * the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientRestorableDroppedManagedDatabases") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientR") public interface RestorableDroppedManagedDatabasesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("restorableDroppedDatabaseId") String restorableDroppedDatabaseId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("restorableDroppedDatabaseId") String restorableDroppedDatabaseId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a restorable dropped managed database. + * Gets a list of restorable dropped managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 restorable dropped managed database along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of restorable dropped managed databases along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String restorableDroppedDatabaseId) { + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { 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.")); @@ -124,42 +119,39 @@ public Mono> getWithResponseAsyn return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } - if (restorableDroppedDatabaseId == null) { - return Mono.error( - new IllegalArgumentException("Parameter restorableDroppedDatabaseId 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, - accept, context)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); } /** - * Gets a restorable dropped managed database. + * Gets a list of restorable dropped managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 restorable dropped managed database along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of restorable dropped managed databases along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String restorableDroppedDatabaseId, Context context) { + private Mono> + listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, 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.")); @@ -168,93 +160,111 @@ private Mono> getWithResponseAsy return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } - if (restorableDroppedDatabaseId == null) { - return Mono.error( - new IllegalArgumentException("Parameter restorableDroppedDatabaseId 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, accept, context); + return service + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a restorable dropped managed database. + * Gets a list of restorable dropped managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 restorable dropped managed database on successful completion of {@link Mono}. + * @return a list of restorable dropped managed databases as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String managedInstanceName, - String restorableDroppedDatabaseId) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + nextLink -> listByInstanceNextSinglePageAsync(nextLink)); } /** - * Gets a restorable dropped managed database. + * Gets a list of restorable dropped managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 restorable dropped managed database along with {@link Response}. + * @return a list of restorable dropped managed databases as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String managedInstanceName, String restorableDroppedDatabaseId, Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); } /** - * Gets a restorable dropped managed database. + * Gets a list of restorable dropped managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 restorable dropped managed database. + * @return a list of restorable dropped managed databases as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RestorableDroppedManagedDatabaseInner get(String resourceGroupName, String managedInstanceName, - String restorableDroppedDatabaseId) { - return getWithResponse(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); } /** * Gets a list of restorable dropped managed databases. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @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 restorable dropped managed databases along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of restorable dropped managed databases as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); + } + + /** + * Gets a restorable dropped managed database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 restorable dropped managed database along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId) { 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.")); @@ -263,38 +273,43 @@ public RestorableDroppedManagedDatabaseInner get(String resourceGroupName, Strin return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } + if (restorableDroppedDatabaseId == null) { + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId 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"; return FluxUtil - .withContext(context -> service.listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of restorable dropped managed databases. + * Gets a restorable dropped managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 list of restorable dropped managed databases along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a restorable dropped managed database along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, 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.")); @@ -303,81 +318,76 @@ public RestorableDroppedManagedDatabaseInner get(String resourceGroupName, Strin return Mono .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); } + if (restorableDroppedDatabaseId == null) { + return Mono.error( + new IllegalArgumentException("Parameter restorableDroppedDatabaseId 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 - .listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + restorableDroppedDatabaseId, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Gets a list of restorable dropped managed databases. + * Gets a restorable dropped managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 list of restorable dropped managed databases as paginated response with {@link PagedFlux}. + * @return a restorable dropped managed database on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of restorable dropped managed databases. + * Gets a restorable dropped managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 list of restorable dropped managed databases as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of restorable dropped managed databases. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 restorable dropped managed databases as paginated response with {@link PagedIterable}. + * @return a restorable dropped managed database along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String managedInstanceName, String restorableDroppedDatabaseId, Context context) { + return getWithResponseAsync(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, context) + .block(); } /** - * Gets a list of restorable dropped managed databases. + * Gets a restorable dropped managed database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param context The context to associate with this operation. + * @param restorableDroppedDatabaseId The restorableDroppedDatabaseId 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 list of restorable dropped managed databases as paginated response with {@link PagedIterable}. + * @return a restorable dropped managed database. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public RestorableDroppedManagedDatabaseInner get(String resourceGroupName, String managedInstanceName, + String restorableDroppedDatabaseId) { + return getWithResponse(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, Context.NONE) + .getValue(); } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorePointsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorePointsClientImpl.java index afd54e06c5f4..f3e28703615f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorePointsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/RestorePointsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,8 +33,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.RestorePointsClient; import com.azure.resourcemanager.sql.fluent.models.RestorePointInner; -import com.azure.resourcemanager.sql.implementation.models.RestorePointListResult; import com.azure.resourcemanager.sql.models.CreateDatabaseRestorePointDefinition; +import com.azure.resourcemanager.sql.models.RestorePointListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -68,80 +68,78 @@ public final class RestorePointsClientImpl implements RestorePointsClient { * The interface defining all the services for SqlManagementClientRestorePoints to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientRestorePoints") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientR") public interface RestorePointsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @PathParam("restorePointName") String restorePointName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}") - @ExpectedResponses({ 200 }) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> create(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @PathParam("restorePointName") String restorePointName, - Context context); + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CreateDatabaseRestorePointDefinition parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("restorePointName") String restorePointName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints") - @ExpectedResponses({ 200, 201, 202 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") CreateDatabaseRestorePointDefinition parameters, Context context); + @PathParam("databaseName") String databaseName, @PathParam("restorePointName") String restorePointName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a restore point. + * Gets a list of database restore points. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a restore point along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database restore points along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String restorePointName) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName) { 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.")); @@ -152,42 +150,40 @@ public Mono> getWithResponseAsync(String resourceGro if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (restorePointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter restorePointName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, restorePointName, accept, - context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), 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())); } /** - * Gets a restore point. + * Gets a list of database restore points. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. * @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 restore point along with {@link Response} on successful completion of {@link Mono}. + * @return a list of database restore points along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String restorePointName, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, 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.")); @@ -198,95 +194,116 @@ private Mono> getWithResponseAsync(String resourceGr if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (restorePointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter restorePointName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, restorePointName, accept, context); + return service + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a restore point. + * Gets a list of database restore points. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a restore point on successful completion of {@link Mono}. + * @return a list of database restore points as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String databaseName, - String restorePointName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, restorePointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** - * Gets a restore point. + * Gets a list of database restore points. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. * @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 restore point along with {@link Response}. + * @return a list of database restore points as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - String restorePointName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, restorePointName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Gets a restore point. + * Gets a list of database restore points. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a restore point. + * @return a list of database restore points as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RestorePointInner get(String resourceGroupName, String serverName, String databaseName, - String restorePointName) { - return getWithResponse(resourceGroupName, serverName, databaseName, restorePointName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** - * Deletes a restore point. + * Gets a list of database restore points. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. + * @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 a list of database restore points as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + } + + /** + * Creates a restore point for a data warehouse. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param parameters The definition for creating the restore point of this 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 database restore points along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String restorePointName) { + public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, CreateDatabaseRestorePointDefinition 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.")); @@ -297,39 +314,44 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (restorePointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter restorePointName 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(); } - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, restorePointName, context)) + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.create(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a restore point. + * Creates a restore point for a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. + * @param parameters The definition for creating the restore point of this 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 Response} on successful completion of {@link Mono}. + * @return database restore points along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String restorePointName, Context context) { + private Mono>> createWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, CreateDatabaseRestorePointDefinition 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.")); @@ -340,250 +362,206 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (restorePointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter restorePointName 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"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, restorePointName, context); + return service.create(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Deletes a restore point. + * Creates a restore point for a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. + * @param parameters The definition for creating the restore point of this 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 A {@link Mono} that completes when a successful response is received. + * @return the {@link PollerFlux} for polling of database restore points. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, - String restorePointName) { - return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, restorePointName) - .flatMap(ignored -> Mono.empty()); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, RestorePointInner> beginCreateAsync(String resourceGroupName, + String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, serverName, databaseName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + RestorePointInner.class, RestorePointInner.class, this.client.getContext()); } /** - * Deletes a restore point. + * Creates a restore point for a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param restorePointName The name of the restore point. + * @param parameters The definition for creating the restore point of this 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 Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, - String restorePointName, Context context) { - return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, restorePointName, context).block(); - } - - /** - * Deletes a restore point. - * - * @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 restorePointName The name of the restore point. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 database restore points. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String serverName, String databaseName, String restorePointName) { - deleteWithResponse(resourceGroupName, serverName, databaseName, restorePointName, Context.NONE); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RestorePointInner> beginCreateAsync(String resourceGroupName, + String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + RestorePointInner.class, RestorePointInner.class, context); } /** - * Gets a list of database restore points. + * Creates a restore point for a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The definition for creating the restore point of this 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 a list of database restore points along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of database restore points. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, 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, RestorePointInner> beginCreate(String resourceGroupName, + String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters) { + return this.beginCreateAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller(); } /** - * Gets a list of database restore points. + * Creates a restore point for a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The definition for creating the restore point of this 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 a list of database restore points along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of database restore points. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, 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, RestorePointInner> beginCreate(String resourceGroupName, + String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters, Context context) { + return this.beginCreateAsync(resourceGroupName, serverName, databaseName, parameters, context).getSyncPoller(); } /** - * Gets a list of database restore points. + * Creates a restore point for a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The definition for creating the restore point of this 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 a list of database restore points as paginated response with {@link PagedFlux}. + * @return database restore points on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createAsync(String resourceGroupName, String serverName, String databaseName, + CreateDatabaseRestorePointDefinition parameters) { + return beginCreateAsync(resourceGroupName, serverName, databaseName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a list of database restore points. + * Creates a restore point for a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The definition for creating the restore point of this 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 a list of database restore points as paginated response with {@link PagedFlux}. + * @return database restore points on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String serverName, String databaseName, + CreateDatabaseRestorePointDefinition parameters, Context context) { + return beginCreateAsync(resourceGroupName, serverName, databaseName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a list of database restore points. + * Creates a restore point for a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The definition for creating the restore point of this 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 a list of database restore points as paginated response with {@link PagedIterable}. + * @return database restore points. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public RestorePointInner create(String resourceGroupName, String serverName, String databaseName, + CreateDatabaseRestorePointDefinition parameters) { + return createAsync(resourceGroupName, serverName, databaseName, parameters).block(); } /** - * Gets a list of database restore points. + * Creates a restore point for a data warehouse. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param parameters The definition for creating the restore point of this 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 a list of database restore points as paginated response with {@link PagedIterable}. + * @return database restore points. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public RestorePointInner create(String resourceGroupName, String serverName, String databaseName, + CreateDatabaseRestorePointDefinition parameters, Context context) { + return createAsync(resourceGroupName, serverName, databaseName, parameters, context).block(); } /** - * Creates a restore point for a data warehouse. + * Gets a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. + * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database restore points along with {@link Response} on successful completion of {@link Mono}. + * @return a restore point along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, CreateDatabaseRestorePointDefinition parameters) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String restorePointName) { 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.")); @@ -594,44 +572,42 @@ public Mono>> createWithResponseAsync(String resourceG if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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(); + if (restorePointName == null) { + return Mono + .error(new IllegalArgumentException("Parameter restorePointName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, contentType, accept, - parameters, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + restorePointName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a restore point for a data warehouse. + * Gets a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. + * @param restorePointName The name of the restore point. * @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 database restore points along with {@link Response} on successful completion of {@link Mono}. + * @return a restore point along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, CreateDatabaseRestorePointDefinition parameters, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String restorePointName, 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.")); @@ -642,173 +618,222 @@ private Mono>> createWithResponseAsync(String resource if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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(); + if (restorePointName == null) { + return Mono + .error(new IllegalArgumentException("Parameter restorePointName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, contentType, accept, parameters, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, restorePointName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Creates a restore point for a data warehouse. + * Gets a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. + * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 database restore points. + * @return a restore point on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, RestorePointInner> beginCreateAsync(String resourceGroupName, - String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, serverName, databaseName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RestorePointInner.class, RestorePointInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String restorePointName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, restorePointName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates a restore point for a data warehouse. + * Gets a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. + * @param restorePointName The name of the restore point. * @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 database restore points. + * @return a restore point along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RestorePointInner> beginCreateAsync(String resourceGroupName, - String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RestorePointInner.class, RestorePointInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String restorePointName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, restorePointName, context).block(); } /** - * Creates a restore point for a data warehouse. + * Gets a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. + * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 database restore points. + * @return a restore point. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RestorePointInner> beginCreate(String resourceGroupName, - String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters) { - return this.beginCreateAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public RestorePointInner get(String resourceGroupName, String serverName, String databaseName, + String restorePointName) { + return getWithResponse(resourceGroupName, serverName, databaseName, restorePointName, Context.NONE).getValue(); } /** - * Creates a restore point for a data warehouse. + * Deletes a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. - * @param context The context to associate with this operation. + * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 database restore points. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RestorePointInner> beginCreate(String resourceGroupName, - String serverName, String databaseName, CreateDatabaseRestorePointDefinition parameters, Context context) { - return this.beginCreateAsync(resourceGroupName, serverName, databaseName, parameters, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String restorePointName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (restorePointName == null) { + return Mono + .error(new IllegalArgumentException("Parameter restorePointName 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.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, restorePointName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a restore point for a data warehouse. + * Deletes a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. + * @param restorePointName The name of the restore point. + * @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 database restore points on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync(String resourceGroupName, String serverName, String databaseName, - CreateDatabaseRestorePointDefinition parameters) { - return beginCreateAsync(resourceGroupName, serverName, databaseName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String restorePointName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (restorePointName == null) { + return Mono + .error(new IllegalArgumentException("Parameter restorePointName 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.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, restorePointName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** - * Creates a restore point for a data warehouse. + * Deletes a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. - * @param context The context to associate with this operation. + * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database restore points on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String serverName, String databaseName, - CreateDatabaseRestorePointDefinition parameters, Context context) { - return beginCreateAsync(resourceGroupName, serverName, databaseName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, + String restorePointName) { + return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, restorePointName) + .flatMap(ignored -> Mono.empty()); } /** - * Creates a restore point for a data warehouse. + * Deletes a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. + * @param restorePointName The name of the restore point. + * @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 database restore points. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RestorePointInner create(String resourceGroupName, String serverName, String databaseName, - CreateDatabaseRestorePointDefinition parameters) { - return createAsync(resourceGroupName, serverName, databaseName, parameters).block(); + public Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, + String restorePointName, Context context) { + return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, restorePointName, context).block(); } /** - * Creates a restore point for a data warehouse. + * Deletes a restore point. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param parameters The definition for creating the restore point of this database. - * @param context The context to associate with this operation. + * @param restorePointName The name of the restore point. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return database restore points. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RestorePointInner create(String resourceGroupName, String serverName, String databaseName, - CreateDatabaseRestorePointDefinition parameters, Context context) { - return createAsync(resourceGroupName, serverName, databaseName, parameters, context).block(); + public void delete(String resourceGroupName, String serverName, String databaseName, String restorePointName) { + deleteWithResponse(resourceGroupName, serverName, databaseName, restorePointName, Context.NONE); } /** @@ -818,7 +843,7 @@ public RestorePointInner create(String resourceGroupName, String serverName, 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 list of database restore points along with {@link PagedResponse} on successful completion of + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -846,7 +871,7 @@ private Mono> listByDatabaseNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 database restore points along with {@link PagedResponse} on successful completion of + * @return a list of long term retention backups along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SensitivityLabelsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SensitivityLabelsClientImpl.java index 9a7842f093da..07716e33833d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SensitivityLabelsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SensitivityLabelsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -32,9 +32,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.SensitivityLabelsClient; import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelInner; -import com.azure.resourcemanager.sql.implementation.models.SensitivityLabelListResult; -import com.azure.resourcemanager.sql.models.CurrentSensitivityLabelSource; -import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelSource; +import com.azure.resourcemanager.sql.models.SensitivityLabelListResult; import com.azure.resourcemanager.sql.models.SensitivityLabelSource; import com.azure.resourcemanager.sql.models.SensitivityLabelUpdateList; import reactor.core.publisher.Mono; @@ -68,116 +66,118 @@ public final class SensitivityLabelsClientImpl implements SensitivityLabelsClien * The interface defining all the services for SqlManagementClientSensitivityLabels to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientSensitivityLabels") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface SensitivityLabelsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listCurrentByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listCurrentByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @QueryParam("$skipToken") String skipToken, @QueryParam("$count") Boolean count, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") SensitivityLabelUpdateList parameters, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRecommendedByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listRecommendedByDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @QueryParam("$skipToken") String skipToken, @QueryParam("includeDisabledRecommendations") Boolean includeDisabledRecommendations, - @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sensitivityLabels") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, @PathParam("sensitivityLabelSource") SensitivityLabelSource sensitivityLabelSource, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, - @PathParam("sensitivityLabelSource") CurrentSensitivityLabelSource sensitivityLabelSource, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") SensitivityLabelInner parameters, Context context); + @PathParam("sensitivityLabelSource") String sensitivityLabelSource, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SensitivityLabelInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, - @PathParam("sensitivityLabelSource") CurrentSensitivityLabelSource sensitivityLabelSource, Context context); + @PathParam("sensitivityLabelSource") String sensitivityLabelSource, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> disableRecommendation(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> disableRecommendation(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, - @PathParam("sensitivityLabelSource") RecommendedSensitivityLabelSource sensitivityLabelSource, + @PathParam("sensitivityLabelSource") String sensitivityLabelSource, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> enableRecommendation(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> enableRecommendation(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("schemaName") String schemaName, @PathParam("tableName") String tableName, @PathParam("columnName") String columnName, - @PathParam("sensitivityLabelSource") RecommendedSensitivityLabelSource sensitivityLabelSource, + @PathParam("sensitivityLabelSource") String sensitivityLabelSource, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sensitivityLabels") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @QueryParam("$filter") String filter, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listCurrentByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -185,7 +185,7 @@ Mono> listCurrentByDatabaseNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listRecommendedByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -193,14 +193,15 @@ Mono> listRecommendedByDatabaseNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -219,10 +220,6 @@ private Mono> listCurrentByDatabaseSinglePa 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.")); @@ -233,11 +230,15 @@ private Mono> listCurrentByDatabaseSinglePa if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; return FluxUtil - .withContext(context -> service.listCurrentByDatabase(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, - databaseName, skipToken, count, filter, accept, context)) + .withContext(context -> service.listCurrentByDatabase(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, skipToken, count, filter, this.client.getSubscriptionId(), + 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())); @@ -246,7 +247,8 @@ private Mono> listCurrentByDatabaseSinglePa /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -266,10 +268,6 @@ private Mono> listCurrentByDatabaseSinglePa 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.")); @@ -280,12 +278,15 @@ private Mono> listCurrentByDatabaseSinglePa if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 - .listCurrentByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, skipToken, count, filter, - accept, context) + .listCurrentByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, skipToken, + count, filter, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -293,7 +294,8 @@ private Mono> listCurrentByDatabaseSinglePa /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -314,7 +316,8 @@ public PagedFlux listCurrentByDatabaseAsync(String resour /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -335,7 +338,8 @@ public PagedFlux listCurrentByDatabaseAsync(String resour /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -358,7 +362,8 @@ private PagedFlux listCurrentByDatabaseAsync(String resou /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -379,7 +384,8 @@ public PagedIterable listCurrentByDatabase(String resourc /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -401,7 +407,8 @@ public PagedIterable listCurrentByDatabase(String resourc /** * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -417,10 +424,6 @@ public Mono> updateWithResponseAsync(String resourceGroupName, St 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.")); @@ -431,23 +434,26 @@ public Mono> updateWithResponseAsync(String resourceGroupName, St if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, contentType, parameters, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -464,10 +470,6 @@ private Mono> updateWithResponseAsync(String resourceGroupName, S 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.")); @@ -478,21 +480,25 @@ private Mono> updateWithResponseAsync(String resourceGroupName, S if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 contentType = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, contentType, parameters, context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context); } /** * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -511,7 +517,8 @@ public Mono updateAsync(String resourceGroupName, String serverName, Strin /** * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -530,7 +537,8 @@ public Response updateWithResponse(String resourceGroupName, String server /** * Update sensitivity labels of a given database using an operations batch. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param parameters The parameters parameter. @@ -547,7 +555,8 @@ public void update(String resourceGroupName, String serverName, String databaseN /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -567,10 +576,6 @@ private Mono> listRecommendedByDatabaseSing 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.")); @@ -581,11 +586,15 @@ private Mono> listRecommendedByDatabaseSing if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; return FluxUtil - .withContext(context -> service.listRecommendedByDatabase(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, - databaseName, skipToken, includeDisabledRecommendations, filter, accept, context)) + .withContext(context -> service.listRecommendedByDatabase(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, skipToken, includeDisabledRecommendations, filter, + this.client.getSubscriptionId(), 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())); @@ -594,7 +603,8 @@ private Mono> listRecommendedByDatabaseSing /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -615,10 +625,6 @@ private Mono> listRecommendedByDatabaseSing 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.")); @@ -629,12 +635,16 @@ private Mono> listRecommendedByDatabaseSing if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 - .listRecommendedByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, skipToken, - includeDisabledRecommendations, filter, accept, context) + .listRecommendedByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + skipToken, includeDisabledRecommendations, filter, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -642,7 +652,8 @@ private Mono> listRecommendedByDatabaseSing /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -665,7 +676,8 @@ public PagedFlux listRecommendedByDatabaseAsync(String re /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -688,7 +700,8 @@ public PagedFlux listRecommendedByDatabaseAsync(String re /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -712,7 +725,8 @@ private PagedFlux listRecommendedByDatabaseAsync(String r /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -733,7 +747,8 @@ public PagedIterable listRecommendedByDatabase(String res /** * Gets the sensitivity labels of a given database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param skipToken The skipToken parameter. @@ -752,193 +767,11 @@ public PagedIterable listRecommendedByDatabase(String res skipToken, includeDisabledRecommendations, filter, context)); } - /** - * Gets the sensitivity labels of a given 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 filter An OData filter expression that filters elements in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, String filter) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, filter, 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 sensitivity labels of a given 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 filter An OData filter expression that filters elements in the collection. - * @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 sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, String filter, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the sensitivity labels of a given 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 filter An OData filter expression that filters elements in the collection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, String filter) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Gets the sensitivity labels of a given 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName) { - final String filter = null; - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Gets the sensitivity labels of a given 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 filter An OData filter expression that filters elements in the collection. - * @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 sensitivity labels of a given database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, String filter, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the sensitivity labels of a given 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName) { - final String filter = null; - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, filter)); - } - - /** - * Gets the sensitivity labels of a given 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 filter An OData filter expression that filters elements in the collection. - * @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 sensitivity labels of a given database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, String filter, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, filter, context)); - } - /** * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -959,10 +792,6 @@ public Mono> getWithResponseAsync(String resourc 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.")); @@ -986,18 +815,23 @@ public Mono> getWithResponseAsync(String resourc return Mono.error( new IllegalArgumentException("Parameter sensitivityLabelSource 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + schemaName, tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1019,10 +853,6 @@ private Mono> getWithResponseAsync(String resour 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.")); @@ -1046,17 +876,22 @@ private Mono> getWithResponseAsync(String resour return Mono.error( new IllegalArgumentException("Parameter sensitivityLabelSource 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, schemaName, + tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1078,7 +913,8 @@ public Mono getAsync(String resourceGroupName, String ser /** * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1102,7 +938,8 @@ public Response getWithResponse(String resourceGroupName, /** * Gets the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. @@ -1124,13 +961,13 @@ public SensitivityLabelInner get(String resourceGroupName, String serverName, St /** * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @param parameters The column sensitivity label resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1140,15 +977,11 @@ public SensitivityLabelInner get(String resourceGroupName, String serverName, St @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource, SensitivityLabelInner parameters) { + SensitivityLabelInner 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.")); @@ -1168,34 +1001,34 @@ public Mono> createOrUpdateWithResponseAsync(Str if (columnName == null) { return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } - if (sensitivityLabelSource == null) { - return Mono.error( - new IllegalArgumentException("Parameter sensitivityLabelSource 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 contentType = "application/json"; + final String sensitivityLabelSource = "current"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @param parameters The column sensitivity label resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1206,15 +1039,11 @@ public Mono> createOrUpdateWithResponseAsync(Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource, SensitivityLabelInner parameters, Context context) { + SensitivityLabelInner 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.")); @@ -1234,33 +1063,33 @@ private Mono> createOrUpdateWithResponseAsync(St if (columnName == null) { return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } - if (sensitivityLabelSource == null) { - return Mono.error( - new IllegalArgumentException("Parameter sensitivityLabelSource 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 contentType = "application/json"; + final String sensitivityLabelSource = "current"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + schemaName, tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @param parameters The column sensitivity label resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1269,22 +1098,21 @@ private Mono> createOrUpdateWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource, SensitivityLabelInner parameters) { + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters) { return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + columnName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @param parameters The column sensitivity label resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1294,22 +1122,22 @@ public Mono createOrUpdateAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource, SensitivityLabelInner parameters, Context context) { + String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelInner parameters, + Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, parameters, context).block(); + columnName, parameters, context).block(); } /** * Creates or updates the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @param parameters The column sensitivity label resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1318,22 +1146,21 @@ public Response createOrUpdateWithResponse(String resourc */ @ServiceMethod(returns = ReturnType.SINGLE) public SensitivityLabelInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName, CurrentSensitivityLabelSource sensitivityLabelSource, - SensitivityLabelInner parameters) { + String schemaName, String tableName, String columnName, SensitivityLabelInner parameters) { return createOrUpdateWithResponse(resourceGroupName, serverName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, parameters, Context.NONE).getValue(); + columnName, parameters, Context.NONE).getValue(); } /** * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1341,16 +1168,11 @@ public SensitivityLabelInner createOrUpdate(String resourceGroupName, String ser */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource) { + String databaseName, String schemaName, String tableName, String columnName) { 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.")); @@ -1370,27 +1192,28 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St if (columnName == null) { return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } - if (sensitivityLabelSource == null) { - return Mono.error( - new IllegalArgumentException("Parameter sensitivityLabelSource 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 sensitivityLabelSource = "current"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @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. @@ -1399,16 +1222,11 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName, - CurrentSensitivityLabelSource sensitivityLabelSource, Context context) { + String databaseName, String schemaName, String tableName, String columnName, 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.")); @@ -1428,26 +1246,27 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (columnName == null) { return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } - if (sensitivityLabelSource == null) { - return Mono.error( - new IllegalArgumentException("Parameter sensitivityLabelSource 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 sensitivityLabelSource = "current"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, schemaName, + tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1455,21 +1274,21 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, String schemaName, - String tableName, String columnName, CurrentSensitivityLabelSource sensitivityLabelSource) { - return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, - sensitivityLabelSource).flatMap(ignored -> Mono.empty()); + String tableName, String columnName) { + return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName) + .flatMap(ignored -> Mono.empty()); } /** * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @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. @@ -1478,43 +1297,42 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName, CurrentSensitivityLabelSource sensitivityLabelSource, - Context context) { + String schemaName, String tableName, String columnName, Context context) { return deleteWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, - sensitivityLabelSource, context).block(); + context).block(); } /** * Deletes the sensitivity label of a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 databaseName, String schemaName, - String tableName, String columnName, CurrentSensitivityLabelSource sensitivityLabelSource) { + String tableName, String columnName) { deleteWithResponse(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, - sensitivityLabelSource, Context.NONE); + Context.NONE); } /** * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1522,16 +1340,11 @@ public void delete(String resourceGroupName, String serverName, String databaseN */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> disableRecommendationWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource) { + String databaseName, String schemaName, String tableName, String columnName) { 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.")); @@ -1551,27 +1364,28 @@ public Mono> disableRecommendationWithResponseAsync(String resour if (columnName == null) { return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } - if (sensitivityLabelSource == null) { - return Mono.error( - new IllegalArgumentException("Parameter sensitivityLabelSource 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 sensitivityLabelSource = "recommended"; return FluxUtil - .withContext(context -> service.disableRecommendation(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, - databaseName, schemaName, tableName, columnName, sensitivityLabelSource, context)) + .withContext(context -> service.disableRecommendation(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @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. @@ -1580,16 +1394,11 @@ public Mono> disableRecommendationWithResponseAsync(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> disableRecommendationWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource, Context context) { + String databaseName, String schemaName, String tableName, String columnName, 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.")); @@ -1609,26 +1418,27 @@ private Mono> disableRecommendationWithResponseAsync(String resou if (columnName == null) { return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } - if (sensitivityLabelSource == null) { - return Mono.error( - new IllegalArgumentException("Parameter sensitivityLabelSource 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 sensitivityLabelSource = "recommended"; context = this.client.mergeContext(context); - return service.disableRecommendation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, context); + return service.disableRecommendation(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + schemaName, tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1636,22 +1446,21 @@ private Mono> disableRecommendationWithResponseAsync(String resou */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono disableRecommendationAsync(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource) { + String schemaName, String tableName, String columnName) { return disableRecommendationWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, - tableName, columnName, sensitivityLabelSource).flatMap(ignored -> Mono.empty()); + tableName, columnName).flatMap(ignored -> Mono.empty()); } /** * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @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. @@ -1660,44 +1469,42 @@ public Mono disableRecommendationAsync(String resourceGroupName, String se */ @ServiceMethod(returns = ReturnType.SINGLE) public Response disableRecommendationWithResponse(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource, Context context) { + String databaseName, String schemaName, String tableName, String columnName, Context context) { return disableRecommendationWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, - tableName, columnName, sensitivityLabelSource, context).block(); + tableName, columnName, context).block(); } /** * Disables sensitivity recommendations on a given column. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 disableRecommendation(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource) { + String schemaName, String tableName, String columnName) { disableRecommendationWithResponse(resourceGroupName, serverName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, Context.NONE); + columnName, Context.NONE); } /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1705,16 +1512,11 @@ public void disableRecommendation(String resourceGroupName, String serverName, S */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> enableRecommendationWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource) { + String databaseName, String schemaName, String tableName, String columnName) { 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.")); @@ -1734,27 +1536,28 @@ public Mono> enableRecommendationWithResponseAsync(String resourc if (columnName == null) { return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } - if (sensitivityLabelSource == null) { - return Mono.error( - new IllegalArgumentException("Parameter sensitivityLabelSource 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 sensitivityLabelSource = "recommended"; return FluxUtil - .withContext(context -> service.enableRecommendation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, context)) + .withContext(context -> service.enableRecommendation(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @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. @@ -1763,16 +1566,11 @@ public Mono> enableRecommendationWithResponseAsync(String resourc */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> enableRecommendationWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource, Context context) { + String databaseName, String schemaName, String tableName, String columnName, 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.")); @@ -1792,26 +1590,27 @@ private Mono> enableRecommendationWithResponseAsync(String resour if (columnName == null) { return Mono.error(new IllegalArgumentException("Parameter columnName is required and cannot be null.")); } - if (sensitivityLabelSource == null) { - return Mono.error( - new IllegalArgumentException("Parameter sensitivityLabelSource 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 sensitivityLabelSource = "recommended"; context = this.client.mergeContext(context); - return service.enableRecommendation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, context); + return service.enableRecommendation(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + schemaName, tableName, columnName, sensitivityLabelSource, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1819,22 +1618,21 @@ private Mono> enableRecommendationWithResponseAsync(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono enableRecommendationAsync(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource) { + String schemaName, String tableName, String columnName) { return enableRecommendationWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource).flatMap(ignored -> Mono.empty()); + columnName).flatMap(ignored -> Mono.empty()); } /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @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. @@ -1843,38 +1641,40 @@ public Mono enableRecommendationAsync(String resourceGroupName, String ser */ @ServiceMethod(returns = ReturnType.SINGLE) public Response enableRecommendationWithResponse(String resourceGroupName, String serverName, - String databaseName, String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource, Context context) { + String databaseName, String schemaName, String tableName, String columnName, Context context) { return enableRecommendationWithResponseAsync(resourceGroupName, serverName, databaseName, schemaName, tableName, - columnName, sensitivityLabelSource, context).block(); + columnName, context).block(); } /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param schemaName The name of the schema. * @param tableName The name of the table. * @param columnName The name of the column. - * @param sensitivityLabelSource The source of the sensitivity label. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 enableRecommendation(String resourceGroupName, String serverName, String databaseName, - String schemaName, String tableName, String columnName, - RecommendedSensitivityLabelSource sensitivityLabelSource) { + String schemaName, String tableName, String columnName) { enableRecommendationWithResponse(resourceGroupName, serverName, databaseName, schemaName, tableName, columnName, - sensitivityLabelSource, Context.NONE); + Context.NONE); } /** - * Get the next page of items. + * Gets the sensitivity labels of a given database. * - * @param nextLink The URL to get the next list of items. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param filter An OData filter expression that filters elements in the collection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1882,6 +1682,191 @@ public void enableRecommendation(String resourceGroupName, String serverName, St * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String filter) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; + return FluxUtil + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, filter, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets the sensitivity labels of a given database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param filter An OData filter expression that filters elements in the collection. + * @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 sensitivity labels of a given database along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String filter, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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 + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, filter, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets the sensitivity labels of a given database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param filter An OData filter expression that filters elements in the collection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the sensitivity labels of a given database as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, String filter) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * Gets the sensitivity labels of a given database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 sensitivity labels of a given database as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + final String filter = null; + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * Gets the sensitivity labels of a given database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param filter An OData filter expression that filters elements in the collection. + * @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 sensitivity labels of a given database as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, String filter, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, filter, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the sensitivity labels of a given database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 sensitivity labels of a given database as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { + final String filter = null; + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, filter)); + } + + /** + * Gets the sensitivity labels of a given database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param filter An OData filter expression that filters elements in the collection. + * @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 sensitivity labels of a given database as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, String filter, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, filter, 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 sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listCurrentByDatabaseNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1907,8 +1892,7 @@ private Mono> listCurrentByDatabaseNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listCurrentByDatabaseNextSinglePageAsync(String nextLink, @@ -1934,8 +1918,7 @@ private Mono> listCurrentByDatabaseNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRecommendedByDatabaseNextSinglePageAsync(String nextLink) { @@ -1963,8 +1946,7 @@ private Mono> listRecommendedByDatabaseNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRecommendedByDatabaseNextSinglePageAsync(String nextLink, @@ -1990,8 +1972,7 @@ private Mono> listRecommendedByDatabaseNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -2018,8 +1999,7 @@ private Mono> listByDatabaseNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the sensitivity labels of a given database along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of sensitivity labels along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvancedThreatProtectionSettingsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvancedThreatProtectionSettingsClientImpl.java index 4be65ea1016f..d1fa0b2b7175 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvancedThreatProtectionSettingsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvancedThreatProtectionSettingsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -32,8 +32,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ServerAdvancedThreatProtectionSettingsClient; import com.azure.resourcemanager.sql.fluent.models.ServerAdvancedThreatProtectionInner; -import com.azure.resourcemanager.sql.implementation.models.LogicalServerAdvancedThreatProtectionListResult; import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; +import com.azure.resourcemanager.sql.models.LogicalServerAdvancedThreatProtectionListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -69,37 +69,37 @@ public final class ServerAdvancedThreatProtectionSettingsClientImpl * The interface defining all the services for SqlManagementClientServerAdvancedThreatProtectionSettings to be used * by the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerAdvancedThreatProtectionSettings") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServerAdvancedThreatProtectionSettingsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServer( + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("serverName") String serverName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ServerAdvancedThreatProtectionInner parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerAdvancedThreatProtectionInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -107,14 +107,168 @@ Mono> listByServer( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Get a list of the server's Advanced Threat Protection states. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's Advanced Threat Protection states 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 (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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Get a list of the server's Advanced Threat Protection states. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's Advanced Threat Protection states along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByServerSinglePageAsync(String resourceGroupName, String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get a list of the server's Advanced Threat Protection states. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's Advanced Threat Protection states 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 the server's Advanced Threat Protection states. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's Advanced Threat Protection states as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, + String serverName, Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Get a list of the server's Advanced Threat Protection states. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's Advanced Threat Protection states as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, + String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Get a list of the server's Advanced Threat Protection states. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's Advanced Threat Protection states as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + /** * Get a server's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -130,10 +284,6 @@ public Mono> getWithResponseAsync( 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.")); @@ -145,10 +295,14 @@ public Mono> getWithResponseAsync( return Mono.error( new IllegalArgumentException("Parameter advancedThreatProtectionName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, advancedThreatProtectionName, accept, + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + advancedThreatProtectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -156,7 +310,8 @@ public Mono> getWithResponseAsync( /** * Get a server's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param context The context to associate with this operation. @@ -173,10 +328,6 @@ private Mono> getWithResponseAsync 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.")); @@ -188,16 +339,21 @@ private Mono> getWithResponseAsync return Mono.error( new IllegalArgumentException("Parameter advancedThreatProtectionName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, advancedThreatProtectionName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, advancedThreatProtectionName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Get a server's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -215,7 +371,8 @@ public Mono getAsync(String resourceGroupNa /** * Get a server's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param context The context to associate with this operation. @@ -233,7 +390,8 @@ public Response getWithResponse(String reso /** * Get a server's Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -250,7 +408,8 @@ public ServerAdvancedThreatProtectionInner get(String resourceGroupName, String /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -266,10 +425,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -281,24 +436,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono.error( new IllegalArgumentException("Parameter advancedThreatProtectionName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, advancedThreatProtectionName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + advancedThreatProtectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -316,10 +475,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -331,23 +486,27 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter advancedThreatProtectionName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, advancedThreatProtectionName, contentType, - accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + advancedThreatProtectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -370,7 +529,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -396,7 +556,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -416,7 +577,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -439,7 +601,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -458,7 +621,8 @@ public Mono createOrUpdateAsync(String reso /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -479,7 +643,8 @@ private Mono createOrUpdateAsync(String res /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -497,7 +662,8 @@ public ServerAdvancedThreatProtectionInner createOrUpdate(String resourceGroupNa /** * Creates or updates an Advanced Threat Protection state. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param parameters The server Advanced Threat Protection state. @@ -515,153 +681,6 @@ public ServerAdvancedThreatProtectionInner createOrUpdate(String resourceGroupNa .block(); } - /** - * Get a list of the server's Advanced Threat Protection states. - * - * @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 the server's Advanced Threat Protection states 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 the server's Advanced Threat Protection states. - * - * @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 the server's Advanced Threat Protection states along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByServerSinglePageAsync(String resourceGroupName, String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Get a list of the server's Advanced Threat Protection states. - * - * @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 the server's Advanced Threat Protection states 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 the server's Advanced Threat Protection states. - * - * @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 the server's Advanced Threat Protection states as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, - String serverName, Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Get a list of the server's Advanced Threat Protection states. - * - * @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 the server's Advanced Threat Protection states as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, - String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Get a list of the server's Advanced Threat Protection states. - * - * @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 the server's Advanced Threat Protection states as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); - } - /** * Get the next page of items. * @@ -669,8 +688,8 @@ public PagedIterable listByServer(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 states along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of the server's Advanced Threat Protection configurations along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -697,8 +716,8 @@ private Mono> listByServerNex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 states along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of the server's Advanced Threat Protection configurations along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvisorsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvisorsClientImpl.java index c9ffa5b8aebb..62f4bbfc4e2e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvisorsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvisorsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -57,60 +57,57 @@ public final class ServerAdvisorsClientImpl implements ServerAdvisorsClient { * The interface defining all the services for SqlManagementClientServerAdvisors to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerAdvisors") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServerAdvisorsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors/{advisorName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("advisorName") String advisorName, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$expand") String expand, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors/{advisorName}") + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors/{advisorName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("advisorName") String advisorName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") AdvisorInner parameters, - Context context); + @PathParam("advisorName") String advisorName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advisors/{advisorName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); + @PathParam("advisorName") String advisorName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") AdvisorInner parameters, + @HeaderParam("Accept") String accept, Context context); } /** - * Gets a server advisor. + * Gets a list of server advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param advisorName The name of the Server Advisor. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 advisor along with {@link Response} on successful completion of {@link Mono}. + * @return a list of server advisors along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String advisorName) { + public Mono>> listByServerWithResponseAsync(String resourceGroupName, String serverName, + String expand) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -118,39 +115,37 @@ public Mono> getWithResponseAsync(String resourceGroupNam if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (advisorName == null) { - return Mono.error(new IllegalArgumentException("Parameter advisorName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, advisorName, accept, context)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + expand, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a server advisor. + * Gets a list of server advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param advisorName The name of the Server Advisor. + * @param expand The child resources to include in the response. * @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 advisor along with {@link Response} on successful completion of {@link Mono}. + * @return a list of server advisors along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String advisorName, Context context) { + private Mono>> listByServerWithResponseAsync(String resourceGroupName, + String serverName, String expand, 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.")); @@ -158,90 +153,89 @@ private Mono> getWithResponseAsync(String resourceGroupNa if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (advisorName == null) { - return Mono.error(new IllegalArgumentException("Parameter advisorName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, advisorName, accept, context); + return service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, expand, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Gets a server advisor. + * Gets a list of server advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param advisorName The name of the Server Advisor. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 advisor on successful completion of {@link Mono}. + * @return a list of server advisors on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String advisorName) { - return getWithResponseAsync(resourceGroupName, serverName, advisorName) + public Mono> listByServerAsync(String resourceGroupName, String serverName) { + final String expand = null; + return listByServerWithResponseAsync(resourceGroupName, serverName, expand) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a server advisor. + * Gets a list of server advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param advisorName The name of the Server Advisor. + * @param expand The child resources to include in the response. * @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 advisor along with {@link Response}. + * @return a list of server advisors along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, String advisorName, - Context context) { - return getWithResponseAsync(resourceGroupName, serverName, advisorName, context).block(); + public Response> listByServerWithResponse(String resourceGroupName, String serverName, + String expand, Context context) { + return listByServerWithResponseAsync(resourceGroupName, serverName, expand, context).block(); } /** - * Gets a server advisor. + * Gets a list of server advisors. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param advisorName The name of the Server Advisor. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 advisor. + * @return a list of server advisors. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AdvisorInner get(String resourceGroupName, String serverName, String advisorName) { - return getWithResponse(resourceGroupName, serverName, advisorName, Context.NONE).getValue(); + public List listByServer(String resourceGroupName, String serverName) { + final String expand = null; + return listByServerWithResponse(resourceGroupName, serverName, expand, Context.NONE).getValue(); } /** - * Updates a server advisor. + * Gets a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of - * {@link Mono}. + * @return a server advisor along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync(String resourceGroupName, String serverName, - String advisorName, AdvisorInner parameters) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String advisorName) { 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.")); @@ -252,45 +246,37 @@ public Mono> updateWithResponseAsync(String resourceGroup if (advisorName == null) { return Mono.error(new IllegalArgumentException("Parameter advisorName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, advisorName, contentType, accept, - parameters, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, advisorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a server advisor. + * Gets a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of - * {@link Mono}. + * @return a server advisor along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String serverName, - String advisorName, AdvisorInner parameters, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String advisorName, 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.")); @@ -301,96 +287,91 @@ private Mono> updateWithResponseAsync(String resourceGrou if (advisorName == null) { return Mono.error(new IllegalArgumentException("Parameter advisorName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, advisorName, contentType, accept, parameters, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, advisorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Updates a server advisor. + * Gets a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor on successful completion of {@link Mono}. + * @return a server advisor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, String advisorName, - AdvisorInner parameters) { - return updateWithResponseAsync(resourceGroupName, serverName, advisorName, parameters) + public Mono getAsync(String resourceGroupName, String serverName, String advisorName) { + return getWithResponseAsync(resourceGroupName, serverName, advisorName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Updates a server advisor. + * Gets a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor along with {@link Response}. + * @return a server advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String serverName, String advisorName, - AdvisorInner parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, serverName, advisorName, parameters, context).block(); + public Response getWithResponse(String resourceGroupName, String serverName, String advisorName, + Context context) { + return getWithResponseAsync(resourceGroupName, serverName, advisorName, context).block(); } /** - * Updates a server advisor. + * Gets a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. - * @param parameters The requested advisor resource 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 database, Server or Elastic Pool Advisor. + * @return a server advisor. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AdvisorInner update(String resourceGroupName, String serverName, String advisorName, - AdvisorInner parameters) { - return updateWithResponse(resourceGroupName, serverName, advisorName, parameters, Context.NONE).getValue(); + public AdvisorInner get(String resourceGroupName, String serverName, String advisorName) { + return getWithResponse(resourceGroupName, serverName, advisorName, Context.NONE).getValue(); } /** - * Gets a list of server advisors. + * Updates a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param expand The child resources to include in the response. + * @param advisorName The name of the Server Advisor. + * @param parameters The requested advisor resource 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 list of server advisors along with {@link Response} on successful completion of {@link Mono}. + * @return database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> listByServerWithResponseAsync(String resourceGroupName, String serverName, - String expand) { + public Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String advisorName, AdvisorInner 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.")); @@ -398,36 +379,47 @@ public Mono>> listByServerWithResponseAsync(String r if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (advisorName == null) { + return Mono.error(new IllegalArgumentException("Parameter advisorName 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.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, expand, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + advisorName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of server advisors. + * Updates a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param expand The child resources to include in the response. + * @param advisorName The name of the Server Advisor. + * @param parameters The requested advisor resource 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 list of server advisors along with {@link Response} on successful completion of {@link Mono}. + * @return database, Server or Elastic Pool Advisor along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listByServerWithResponseAsync(String resourceGroupName, - String serverName, String expand, Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String advisorName, AdvisorInner 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.")); @@ -435,60 +427,80 @@ private Mono>> listByServerWithResponseAsync(String if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (advisorName == null) { + return Mono.error(new IllegalArgumentException("Parameter advisorName 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"; context = this.client.mergeContext(context); - return service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, expand, accept, context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, advisorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Gets a list of server advisors. + * Updates a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param advisorName The name of the Server Advisor. + * @param parameters The requested advisor resource 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 list of server advisors on successful completion of {@link Mono}. + * @return database, Server or Elastic Pool Advisor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listByServerAsync(String resourceGroupName, String serverName) { - final String expand = null; - return listByServerWithResponseAsync(resourceGroupName, serverName, expand) + public Mono updateAsync(String resourceGroupName, String serverName, String advisorName, + AdvisorInner parameters) { + return updateWithResponseAsync(resourceGroupName, serverName, advisorName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of server advisors. + * Updates a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param expand The child resources to include in the response. + * @param advisorName The name of the Server Advisor. + * @param parameters The requested advisor resource 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 list of server advisors along with {@link Response}. + * @return database, Server or Elastic Pool Advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listByServerWithResponse(String resourceGroupName, String serverName, - String expand, Context context) { - return listByServerWithResponseAsync(resourceGroupName, serverName, expand, context).block(); + public Response updateWithResponse(String resourceGroupName, String serverName, String advisorName, + AdvisorInner parameters, Context context) { + return updateWithResponseAsync(resourceGroupName, serverName, advisorName, parameters, context).block(); } /** - * Gets a list of server advisors. + * Updates a server advisor. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param advisorName The name of the Server Advisor. + * @param parameters The requested advisor resource 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 list of server advisors. + * @return database, Server or Elastic Pool Advisor. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List listByServer(String resourceGroupName, String serverName) { - final String expand = null; - return listByServerWithResponse(resourceGroupName, serverName, expand, Context.NONE).getValue(); + public AdvisorInner update(String resourceGroupName, String serverName, String advisorName, + AdvisorInner parameters) { + return updateWithResponse(resourceGroupName, serverName, advisorName, parameters, Context.NONE).getValue(); } } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAutomaticTuningsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAutomaticTuningsClientImpl.java index e7d163889bc4..9c26dc91a444 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAutomaticTuningsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAutomaticTuningsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -56,32 +56,34 @@ public final class ServerAutomaticTuningsClientImpl implements ServerAutomaticTu * The interface defining all the services for SqlManagementClientServerAutomaticTunings to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerAutomaticTunings") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServerAutomaticTuningsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ServerAutomaticTuningInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerAutomaticTuningInner parameters, @HeaderParam("Accept") String accept, + Context context); } /** * Retrieves server automatic tuning options. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -95,10 +97,6 @@ public Mono> getWithResponseAsync(String re 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.")); @@ -106,17 +104,22 @@ public Mono> getWithResponseAsync(String re if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Retrieves server automatic tuning options. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,10 +134,6 @@ private Mono> getWithResponseAsync(String r 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.")); @@ -142,16 +141,21 @@ private Mono> getWithResponseAsync(String r if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); } /** * Retrieves server automatic tuning options. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -166,7 +170,8 @@ public Mono getAsync(String resourceGroupName, Strin /** * Retrieves server automatic tuning options. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -183,7 +188,8 @@ public Response getWithResponse(String resourceGroup /** * Retrieves server automatic tuning options. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -198,7 +204,8 @@ public ServerAutomaticTuningInner get(String resourceGroupName, String serverNam /** * Update automatic tuning options on server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -213,10 +220,6 @@ public Mono> updateWithResponseAsync(String 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.")); @@ -224,22 +227,27 @@ public Mono> updateWithResponseAsync(String if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName 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 contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, accept, parameters, context)) + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update automatic tuning options on server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @param context The context to associate with this operation. @@ -255,10 +263,6 @@ private Mono> updateWithResponseAsync(Strin 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.")); @@ -266,22 +270,26 @@ private Mono> updateWithResponseAsync(Strin if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, contentType, accept, parameters, context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** * Update automatic tuning options on server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -299,7 +307,8 @@ public Mono updateAsync(String resourceGroupName, St /** * Update automatic tuning options on server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @param context The context to associate with this operation. @@ -317,7 +326,8 @@ public Response updateWithResponse(String resourceGr /** * Update automatic tuning options on server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested automatic tuning resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADAdministratorsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADAdministratorsClientImpl.java index 5a7cdfe3d564..38d2e4f74502 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADAdministratorsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADAdministratorsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ServerAzureADAdministratorsClient; import com.azure.resourcemanager.sql.fluent.models.ServerAzureADAdministratorInner; -import com.azure.resourcemanager.sql.implementation.models.AdministratorListResult; +import com.azure.resourcemanager.sql.models.AdministratorListResult; import com.azure.resourcemanager.sql.models.AdministratorName; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -68,60 +68,214 @@ public final class ServerAzureADAdministratorsClientImpl implements ServerAzureA * The interface defining all the services for SqlManagementClientServerAzureADAdministrators to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerAzureADAdministrators") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServerAzureADAdministratorsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("administratorName") AdministratorName administratorName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("administratorName") AdministratorName administratorName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("administratorName") AdministratorName administratorName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ServerAzureADAdministratorInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerAzureADAdministratorInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("administratorName") AdministratorName administratorName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") 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); + @PathParam("administratorName") AdministratorName administratorName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of Azure Active Directory administrators in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory administrators in a 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 (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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of Azure Active Directory administrators in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory administrators in a server along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of Azure Active Directory administrators in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory administrators in a 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)); + } + + /** + * Gets a list of Azure Active Directory administrators in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory administrators in a server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of Azure Active Directory administrators in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory administrators in a server as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Gets a list of Azure Active Directory administrators in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory administrators in a server as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + /** * Gets a Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -137,10 +291,6 @@ public Mono> getWithResponseAsync(Stri 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.")); @@ -152,17 +302,22 @@ public Mono> getWithResponseAsync(Stri return Mono .error(new IllegalArgumentException("Parameter administratorName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, administratorName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + administratorName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -179,10 +334,6 @@ private Mono> getWithResponseAsync(Str 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.")); @@ -194,16 +345,21 @@ private Mono> getWithResponseAsync(Str return Mono .error(new IllegalArgumentException("Parameter administratorName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, administratorName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, administratorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -221,7 +377,8 @@ public Mono getAsync(String resourceGroupName, /** * Gets a Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -239,7 +396,8 @@ public Response getWithResponse(String resource /** * Gets a Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -256,7 +414,8 @@ public ServerAzureADAdministratorInner get(String resourceGroupName, String serv /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -273,10 +432,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -288,24 +443,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter administratorName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, administratorName, contentType, accept, - parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + administratorName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -324,10 +483,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -339,23 +494,26 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter administratorName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, administratorName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, administratorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -378,7 +536,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -403,7 +562,8 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -423,7 +583,8 @@ public SyncPoller, ServerAzureADAdmi /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -444,7 +605,8 @@ public SyncPoller, ServerAzureADAdmi /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -463,7 +625,8 @@ public Mono createOrUpdateAsync(String resource /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -483,7 +646,8 @@ private Mono createOrUpdateAsync(String resourc /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -501,7 +665,8 @@ public ServerAzureADAdministratorInner createOrUpdate(String resourceGroupName, /** * Creates or updates an existing Azure Active Directory administrator. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param parameters The requested Azure Active Directory administrator Resource state. @@ -520,7 +685,8 @@ public ServerAzureADAdministratorInner createOrUpdate(String resourceGroupName, /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -535,10 +701,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -550,16 +712,21 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter administratorName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, administratorName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + administratorName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -575,10 +742,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -590,15 +753,20 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter administratorName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, administratorName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, administratorName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -618,7 +786,8 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -640,7 +809,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -657,7 +827,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -675,7 +846,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -692,7 +864,8 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Admin /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -711,7 +884,8 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Admi /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -726,7 +900,8 @@ public void delete(String resourceGroupName, String serverName, AdministratorNam /** * Deletes the Azure Active Directory administrator with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param administratorName The name of server active directory administrator. * @param context The context to associate with this operation. @@ -740,151 +915,6 @@ public void delete(String resourceGroupName, String serverName, AdministratorNam deleteAsync(resourceGroupName, serverName, administratorName, context).block(); } - /** - * Gets a list of Azure Active Directory administrators 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 Azure Active Directory administrators in a 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())); - } - - /** - * Gets a list of Azure Active Directory administrators in 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 Azure Active Directory administrators in a server along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Gets a list of Azure Active Directory administrators 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 Azure Active Directory administrators in a 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)); - } - - /** - * Gets a list of Azure Active Directory administrators in 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 Azure Active Directory administrators in a server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of Azure Active Directory administrators 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 Azure Active Directory administrators in a server as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Gets a list of Azure Active Directory administrators in 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 Azure Active Directory administrators in a server as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); - } - /** * Get the next page of items. * @@ -892,8 +922,8 @@ public PagedIterable listByServer(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 list of Azure Active Directory administrators in a server along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of active directory administrators along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -920,8 +950,8 @@ private Mono> listByServerNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Azure Active Directory administrators in a server along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of active directory administrators along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADOnlyAuthenticationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADOnlyAuthenticationsClientImpl.java index e7417cf01a5b..30e7e7d0507c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADOnlyAuthenticationsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADOnlyAuthenticationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,8 +33,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ServerAzureADOnlyAuthenticationsClient; import com.azure.resourcemanager.sql.fluent.models.ServerAzureADOnlyAuthenticationInner; -import com.azure.resourcemanager.sql.implementation.models.AzureADOnlyAuthListResult; import com.azure.resourcemanager.sql.models.AuthenticationName; +import com.azure.resourcemanager.sql.models.AzureADOnlyAuthListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -68,60 +68,218 @@ public final class ServerAzureADOnlyAuthenticationsClientImpl implements ServerA * The interface defining all the services for SqlManagementClientServerAzureADOnlyAuthentications to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerAzureADOnlyAuthentications") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServerAzureADOnlyAuthenticationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("authenticationName") AuthenticationName authenticationName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("authenticationName") AuthenticationName authenticationName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ServerAzureADOnlyAuthenticationInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerAzureADOnlyAuthenticationInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("authenticationName") AuthenticationName authenticationName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("authenticationName") AuthenticationName authenticationName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory only authentications 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 (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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory only authentications along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByServerSinglePageAsync(String resourceGroupName, String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory only authentications 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)); + } + + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory only authentications as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, + String serverName, Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory only authentications as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, + String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Gets a list of server Azure Active Directory only authentications. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 Azure Active Directory only authentications as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -137,10 +295,6 @@ public Mono> getWithResponseAsync 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.")); @@ -152,17 +306,22 @@ public Mono> getWithResponseAsync return Mono .error(new IllegalArgumentException("Parameter authenticationName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, authenticationName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + authenticationName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -179,10 +338,6 @@ private Mono> getWithResponseAsyn 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.")); @@ -194,16 +349,21 @@ private Mono> getWithResponseAsyn return Mono .error(new IllegalArgumentException("Parameter authenticationName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, authenticationName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, authenticationName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -221,7 +381,8 @@ public Mono getAsync(String resourceGroupN /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -239,7 +400,8 @@ public Response getWithResponse(String res /** * Gets a specific Azure Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -257,7 +419,8 @@ public ServerAzureADOnlyAuthenticationInner get(String resourceGroupName, String * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -275,10 +438,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -290,17 +449,20 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter authenticationName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, authenticationName, contentType, accept, - parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + authenticationName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -308,7 +470,8 @@ public Mono>> createOrUpdateWithResponseAsync(String r * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -328,10 +491,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -343,24 +502,27 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter authenticationName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, authenticationName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, authenticationName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -385,7 +547,8 @@ private Mono>> createOrUpdateWithResponseAsync(String * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -412,7 +575,8 @@ private Mono>> createOrUpdateWithResponseAsync(String * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -434,7 +598,8 @@ private Mono>> createOrUpdateWithResponseAsync(String * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -457,7 +622,8 @@ private Mono>> createOrUpdateWithResponseAsync(String * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -478,7 +644,8 @@ public Mono createOrUpdateAsync(String res * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -500,7 +667,8 @@ private Mono createOrUpdateAsync(String re * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -520,7 +688,8 @@ public ServerAzureADOnlyAuthenticationInner createOrUpdate(String resourceGroupN * Sets Server Active Directory only authentication property or updates an existing server Active Directory only * authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param parameters The required parameters for creating or updating an Active Directory only authentication @@ -540,7 +709,8 @@ public ServerAzureADOnlyAuthenticationInner createOrUpdate(String resourceGroupN /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -555,10 +725,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -570,16 +736,21 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter authenticationName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, authenticationName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + authenticationName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -595,10 +766,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -610,15 +777,20 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter authenticationName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, authenticationName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, authenticationName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -638,7 +810,8 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -660,7 +833,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -677,7 +851,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -695,7 +870,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -712,7 +888,8 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Authe /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -731,7 +908,8 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Auth /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -746,7 +924,8 @@ public void delete(String resourceGroupName, String serverName, AuthenticationNa /** * Deletes an existing server Active Directory only authentication property. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param authenticationName The name of server azure active directory only authentication. * @param context The context to associate with this operation. @@ -760,155 +939,6 @@ public void delete(String resourceGroupName, String serverName, AuthenticationNa deleteAsync(resourceGroupName, serverName, authenticationName, context).block(); } - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @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 Azure Active Directory only authentications 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())); - } - - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @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 Azure Active Directory only authentications along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByServerSinglePageAsync(String resourceGroupName, String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @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 Azure Active Directory only authentications 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)); - } - - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @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 Azure Active Directory only authentications as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, - String serverName, Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @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 Azure Active Directory only authentications as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, - String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Gets a list of server Azure Active Directory only authentications. - * - * @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 Azure Active Directory only authentications as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); - } - /** * Get the next page of items. * @@ -916,8 +946,8 @@ public PagedIterable listByServer(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Azure Active Directory only authentications along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of active directory only authentications along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -944,8 +974,8 @@ private Mono> listByServerNe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Azure Active Directory only authentications along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of active directory only authentications along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerBlobAuditingPoliciesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerBlobAuditingPoliciesClientImpl.java index f0d7c2d0d88d..a10ac1921cfc 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerBlobAuditingPoliciesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerBlobAuditingPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -32,8 +32,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ServerBlobAuditingPoliciesClient; import com.azure.resourcemanager.sql.fluent.models.ServerBlobAuditingPolicyInner; -import com.azure.resourcemanager.sql.implementation.models.ServerBlobAuditingPolicyListResult; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyName; +import com.azure.resourcemanager.sql.models.ServerBlobAuditingPolicyListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,36 +66,37 @@ public final class ServerBlobAuditingPoliciesClientImpl implements ServerBlobAud * The interface defining all the services for SqlManagementClientServerBlobAuditingPolicies to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerBlobAuditingPolicies") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServerBlobAuditingPoliciesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("blobAuditingPolicyName") BlobAuditingPolicyName blobAuditingPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("blobAuditingPolicyName") BlobAuditingPolicyName blobAuditingPolicyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ServerBlobAuditingPolicyInner parameters, Context context); + @PathParam("blobAuditingPolicyName") String blobAuditingPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("blobAuditingPolicyName") String blobAuditingPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerBlobAuditingPolicyInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -104,32 +104,69 @@ Mono> listByServer(@HostParam("endp @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a server's blob auditing policy. + * Lists auditing settings of a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 blob auditing policy along with {@link Response} on successful completion of {@link Mono}. + * @return a list of server auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, BlobAuditingPolicyName blobAuditingPolicyName) { + 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 (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 (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Lists auditing settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -137,39 +174,145 @@ public Mono> getWithResponseAsync(String if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (blobAuditingPolicyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter blobAuditingPolicyName 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"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, blobAuditingPolicyName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + context = this.client.mergeContext(context); + return service + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a server's blob auditing policy. + * Lists auditing settings of a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 auditing settings 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 auditing settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @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 auditing settings as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists auditing settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 auditing settings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Lists auditing settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 auditing settings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + + /** + * Gets a server's blob auditing policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 server's blob auditing policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, BlobAuditingPolicyName blobAuditingPolicyName, Context context) { + public Mono> getWithResponseAsync(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 (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 (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String blobAuditingPolicyName = "default"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a server's blob auditing policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 server's blob auditing policy along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -177,40 +320,39 @@ private Mono> getWithResponseAsync(Strin if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (blobAuditingPolicyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter blobAuditingPolicyName 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 blobAuditingPolicyName = "default"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, blobAuditingPolicyName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, blobAuditingPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 blob auditing policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName) { - return getWithResponseAsync(resourceGroupName, serverName, blobAuditingPolicyName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync(String resourceGroupName, String serverName) { + return getWithResponseAsync(resourceGroupName, serverName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @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. @@ -219,33 +361,32 @@ public Mono getAsync(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, blobAuditingPolicyName, context).block(); + Context context) { + return getWithResponseAsync(resourceGroupName, serverName, context).block(); } /** * Gets a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 blob auditing policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerBlobAuditingPolicyInner get(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName) { - return getWithResponse(resourceGroupName, serverName, blobAuditingPolicyName, Context.NONE).getValue(); + public ServerBlobAuditingPolicyInner get(String resourceGroupName, String serverName) { + return getWithResponse(resourceGroupName, serverName, Context.NONE).getValue(); } /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -254,15 +395,11 @@ public ServerBlobAuditingPolicyInner get(String resourceGroupName, String server */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ServerBlobAuditingPolicyInner parameters) { + ServerBlobAuditingPolicyInner 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.")); @@ -270,30 +407,30 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (blobAuditingPolicyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter blobAuditingPolicyName 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 contentType = "application/json"; + final String blobAuditingPolicyName = "default"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, blobAuditingPolicyName, contentType, - accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + blobAuditingPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -303,16 +440,11 @@ public Mono>> createOrUpdateWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, BlobAuditingPolicyName blobAuditingPolicyName, ServerBlobAuditingPolicyInner parameters, - Context context) { + String serverName, ServerBlobAuditingPolicyInner 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.")); @@ -320,29 +452,28 @@ private Mono>> createOrUpdateWithResponseAsync(String if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (blobAuditingPolicyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter blobAuditingPolicyName 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 contentType = "application/json"; + final String blobAuditingPolicyName = "default"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, blobAuditingPolicyName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, blobAuditingPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -352,9 +483,9 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ServerBlobAuditingPolicyInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ServerBlobAuditingPolicyInner parameters) { + ServerBlobAuditingPolicyInner parameters) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, serverName, blobAuditingPolicyName, parameters); + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ServerBlobAuditingPolicyInner.class, ServerBlobAuditingPolicyInner.class, this.client.getContext()); @@ -363,9 +494,9 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -375,11 +506,11 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerBlobAuditingPolicyInner> - beginCreateOrUpdateAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ServerBlobAuditingPolicyInner parameters, Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters, + Context context) { context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, - blobAuditingPolicyName, parameters, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ServerBlobAuditingPolicyInner.class, ServerBlobAuditingPolicyInner.class, context); @@ -388,9 +519,9 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -398,19 +529,17 @@ private Mono>> createOrUpdateWithResponseAsync(String * @return the {@link SyncPoller} for polling of a server blob auditing policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerBlobAuditingPolicyInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, BlobAuditingPolicyName blobAuditingPolicyName, - ServerBlobAuditingPolicyInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, blobAuditingPolicyName, parameters) - .getSyncPoller(); + public SyncPoller, ServerBlobAuditingPolicyInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); } /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -420,18 +549,16 @@ public SyncPoller, ServerBlobAuditingP */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerBlobAuditingPolicyInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, BlobAuditingPolicyName blobAuditingPolicyName, - ServerBlobAuditingPolicyInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, blobAuditingPolicyName, parameters, context) - .getSyncPoller(); + String resourceGroupName, String serverName, ServerBlobAuditingPolicyInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); } /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -440,17 +567,17 @@ public SyncPoller, ServerBlobAuditingP */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ServerBlobAuditingPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, blobAuditingPolicyName, parameters).last() + ServerBlobAuditingPolicyInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -460,18 +587,17 @@ public Mono createOrUpdateAsync(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ServerBlobAuditingPolicyInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, blobAuditingPolicyName, parameters, context) - .last() + ServerBlobAuditingPolicyInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -480,16 +606,16 @@ private Mono createOrUpdateAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ServerBlobAuditingPolicyInner parameters) { - return createOrUpdateAsync(resourceGroupName, serverName, blobAuditingPolicyName, parameters).block(); + ServerBlobAuditingPolicyInner parameters) { + return createOrUpdateAsync(resourceGroupName, serverName, parameters).block(); } /** * Creates or updates a server's blob auditing policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param blobAuditingPolicyName The name of the blob auditing policy. * @param parameters Properties of blob auditing policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -499,153 +625,8 @@ public ServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String serverName, - BlobAuditingPolicyName blobAuditingPolicyName, ServerBlobAuditingPolicyInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, serverName, blobAuditingPolicyName, parameters, context).block(); - } - - /** - * Lists auditing settings 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 the response of a ServerBlobAuditingPolicy list operation 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 auditing settings 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 the response of a ServerBlobAuditingPolicy list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Lists auditing settings 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 the response of a ServerBlobAuditingPolicy list operation 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 auditing settings 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 the response of a ServerBlobAuditingPolicy list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists auditing settings 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 the response of a ServerBlobAuditingPolicy list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Lists auditing settings 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 the response of a ServerBlobAuditingPolicy list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + ServerBlobAuditingPolicyInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, serverName, parameters, context).block(); } /** @@ -655,8 +636,8 @@ 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 the response of a ServerBlobAuditingPolicy list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of server auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -683,8 +664,8 @@ 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 the response of a ServerBlobAuditingPolicy list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of server auditing settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerConfigurationOptionsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerConfigurationOptionsClientImpl.java deleted file mode 100644 index 481de7f51b8b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerConfigurationOptionsClientImpl.java +++ /dev/null @@ -1,735 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.fluent.ServerConfigurationOptionsClient; -import com.azure.resourcemanager.sql.fluent.models.ServerConfigurationOptionInner; -import com.azure.resourcemanager.sql.implementation.models.ServerConfigurationOptionListResult; -import com.azure.resourcemanager.sql.models.ServerConfigurationOptionName; -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 ServerConfigurationOptionsClient. - */ -public final class ServerConfigurationOptionsClientImpl implements ServerConfigurationOptionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ServerConfigurationOptionsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of ServerConfigurationOptionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ServerConfigurationOptionsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(ServerConfigurationOptionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientServerConfigurationOptions to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerConfigurationOptions") - public interface ServerConfigurationOptionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverConfigurationOptions/{serverConfigurationOptionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("serverConfigurationOptionName") ServerConfigurationOptionName serverConfigurationOptionName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverConfigurationOptions/{serverConfigurationOptionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("serverConfigurationOptionName") ServerConfigurationOptionName serverConfigurationOptionName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ServerConfigurationOptionInner parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverConfigurationOptions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedInstance( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration 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 managed instance server configuration option along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, ServerConfigurationOptionName serverConfigurationOptionName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (serverConfigurationOptionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter serverConfigurationOptionName 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, managedInstanceName, serverConfigurationOptionName, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration 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 managed instance server configuration option along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, ServerConfigurationOptionName serverConfigurationOptionName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (serverConfigurationOptionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter serverConfigurationOptionName 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, managedInstanceName, serverConfigurationOptionName, accept, context); - } - - /** - * Gets managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration 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 managed instance server configuration option on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, serverConfigurationOptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration 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 managed instance server configuration option along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String managedInstanceName, ServerConfigurationOptionName serverConfigurationOptionName, Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, serverConfigurationOptionName, context) - .block(); - } - - /** - * Gets managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration 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 managed instance server configuration option. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServerConfigurationOptionInner get(String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName) { - return getWithResponse(resourceGroupName, managedInstanceName, serverConfigurationOptionName, Context.NONE) - .getValue(); - } - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 configuration option along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, ServerConfigurationOptionName serverConfigurationOptionName, - ServerConfigurationOptionInner 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (serverConfigurationOptionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter serverConfigurationOptionName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, serverConfigurationOptionName, - contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option 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 server configuration option along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String managedInstanceName, ServerConfigurationOptionName serverConfigurationOptionName, - ServerConfigurationOptionInner 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (serverConfigurationOptionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter serverConfigurationOptionName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, serverConfigurationOptionName, - contentType, accept, parameters, context); - } - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server configuration option. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ServerConfigurationOptionInner> - beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName, ServerConfigurationOptionInner parameters) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, - serverConfigurationOptionName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ServerConfigurationOptionInner.class, ServerConfigurationOptionInner.class, - this.client.getContext()); - } - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option 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 server configuration option. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ServerConfigurationOptionInner> - beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName, ServerConfigurationOptionInner parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, - serverConfigurationOptionName, parameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ServerConfigurationOptionInner.class, ServerConfigurationOptionInner.class, - context); - } - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 server configuration option. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerConfigurationOptionInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName, ServerConfigurationOptionInner parameters) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, serverConfigurationOptionName, parameters) - .getSyncPoller(); - } - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option 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 SyncPoller} for polling of a server configuration option. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerConfigurationOptionInner> beginCreateOrUpdate( - String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName, ServerConfigurationOptionInner parameters, - Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, serverConfigurationOptionName, parameters, - context) - .getSyncPoller(); - } - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 configuration option on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, - String managedInstanceName, ServerConfigurationOptionName serverConfigurationOptionName, - ServerConfigurationOptionInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, serverConfigurationOptionName, - parameters).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option 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 server configuration option on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String managedInstanceName, ServerConfigurationOptionName serverConfigurationOptionName, - ServerConfigurationOptionInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, serverConfigurationOptionName, - parameters, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 configuration option. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServerConfigurationOptionInner createOrUpdate(String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName, ServerConfigurationOptionInner parameters) { - return createOrUpdateAsync(resourceGroupName, managedInstanceName, serverConfigurationOptionName, parameters) - .block(); - } - - /** - * Updates managed instance server configuration option. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param serverConfigurationOptionName The name of the server configuration option. - * @param parameters Server configuration option 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 server configuration option. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServerConfigurationOptionInner createOrUpdate(String resourceGroupName, String managedInstanceName, - ServerConfigurationOptionName serverConfigurationOptionName, ServerConfigurationOptionInner parameters, - Context context) { - return createOrUpdateAsync(resourceGroupName, managedInstanceName, serverConfigurationOptionName, parameters, - context).block(); - } - - /** - * Gets a list of managed instance server configuration options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instance server configuration options along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByManagedInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, 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 a list of managed instance server configuration options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed instance server configuration options along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByManagedInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of managed instance server configuration options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instance server configuration options as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByManagedInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of managed instance server configuration options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed instance server configuration options as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>( - () -> listByManagedInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByManagedInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed instance server configuration options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managed instance server configuration options as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName)); - } - - /** - * Gets a list of managed instance server configuration options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 managed instance server configuration options as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByManagedInstanceAsync(resourceGroupName, managedInstanceName, 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 managed instance server configuration options along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedInstanceNextSinglePageAsync(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.listByManagedInstanceNext(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. - * @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 managed instance server configuration options along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByManagedInstanceNextSinglePageAsync(String nextLink, Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listByManagedInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerConnectionPoliciesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerConnectionPoliciesClientImpl.java index 3aab9b4cb82b..4a5a17a54c4f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerConnectionPoliciesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerConnectionPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -32,8 +32,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ServerConnectionPoliciesClient; import com.azure.resourcemanager.sql.fluent.models.ServerConnectionPolicyInner; -import com.azure.resourcemanager.sql.implementation.models.ServerConnectionPolicyListResult; import com.azure.resourcemanager.sql.models.ConnectionPolicyName; +import com.azure.resourcemanager.sql.models.ServerConnectionPolicyListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,51 +67,202 @@ public final class ServerConnectionPoliciesClientImpl implements ServerConnectio * The interface defining all the services for SqlManagementClientServerConnectionPolicies to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerConnectionPolicies") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServerConnectionPoliciesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("connectionPolicyName") ConnectionPolicyName connectionPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("connectionPolicyName") ConnectionPolicyName connectionPolicyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ServerConnectionPolicyInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("connectionPolicyName") ConnectionPolicyName connectionPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerConnectionPolicyInner 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("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Lists connection policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 connection policy objects 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 (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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Lists connection policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 connection policy objects along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists connection policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 connection policy objects 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 connection policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 connection policy objects as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists connection policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 connection policy objects as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Lists connection policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 connection policy objects as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + /** * Gets a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -126,10 +277,6 @@ public Mono> getWithResponseAsync(String r 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.")); @@ -141,17 +288,22 @@ public Mono> getWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter connectionPolicyName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, connectionPolicyName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + connectionPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param context The context to associate with this operation. @@ -167,10 +319,6 @@ private Mono> getWithResponseAsync(String 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.")); @@ -182,16 +330,21 @@ private Mono> getWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter connectionPolicyName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, connectionPolicyName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, connectionPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -209,7 +362,8 @@ public Mono getAsync(String resourceGroupName, Stri /** * Gets a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param context The context to associate with this operation. @@ -227,7 +381,8 @@ public Response getWithResponse(String resourceGrou /** * Gets a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -244,7 +399,8 @@ public ServerConnectionPolicyInner get(String resourceGroupName, String serverNa /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -260,10 +416,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -275,24 +427,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter connectionPolicyName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, connectionPolicyName, contentType, - accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + connectionPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -310,10 +466,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -325,23 +477,26 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter connectionPolicyName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, connectionPolicyName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, connectionPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -364,7 +519,8 @@ public PollerFlux, ServerConnectionPolic /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -389,7 +545,8 @@ private PollerFlux, ServerConnectionPoli /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -409,7 +566,8 @@ public SyncPoller, ServerConnectionPolic /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -430,7 +588,8 @@ public SyncPoller, ServerConnectionPolic /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -449,7 +608,8 @@ public Mono createOrUpdateAsync(String resourceGrou /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -469,7 +629,8 @@ private Mono createOrUpdateAsync(String resourceGro /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -487,7 +648,8 @@ public ServerConnectionPolicyInner createOrUpdate(String resourceGroupName, Stri /** * Updates a server connection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param connectionPolicyName The name of the connection policy. * @param parameters The required parameters for updating a server connection policy. @@ -503,149 +665,6 @@ public ServerConnectionPolicyInner createOrUpdate(String resourceGroupName, Stri return createOrUpdateAsync(resourceGroupName, serverName, connectionPolicyName, parameters, context).block(); } - /** - * Lists connection policy. - * - * @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 response of a ServerConnectionPolicy list operation 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 connection policy. - * - * @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 response of a ServerConnectionPolicy list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Lists connection policy. - * - * @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 response of a ServerConnectionPolicy list operation 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 connection policy. - * - * @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 response of a ServerConnectionPolicy list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists connection policy. - * - * @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 response of a ServerConnectionPolicy list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Lists connection policy. - * - * @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 response of a ServerConnectionPolicy list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); - } - /** * Get the next page of items. * @@ -653,8 +672,8 @@ public PagedIterable listByServer(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ServerConnectionPolicy list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of server connection policy objects along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -681,8 +700,8 @@ private Mono> 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 the response of a ServerConnectionPolicy list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of server connection policy objects along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerDevOpsAuditSettingsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerDevOpsAuditSettingsClientImpl.java index 9f14b342e6ee..9f11ff894dd2 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerDevOpsAuditSettingsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerDevOpsAuditSettingsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -32,8 +32,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ServerDevOpsAuditSettingsClient; import com.azure.resourcemanager.sql.fluent.models.ServerDevOpsAuditingSettingsInner; -import com.azure.resourcemanager.sql.implementation.models.ServerDevOpsAuditSettingsListResult; -import com.azure.resourcemanager.sql.models.DevOpsAuditingSettingsName; +import com.azure.resourcemanager.sql.models.ServerDevOpsAuditSettingsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,36 +66,37 @@ public final class ServerDevOpsAuditSettingsClientImpl implements ServerDevOpsAu * The interface defining all the services for SqlManagementClientServerDevOpsAuditSettings to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerDevOpsAuditSettings") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServerDevOpsAuditSettingsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("devOpsAuditingSettingsName") DevOpsAuditingSettingsName devOpsAuditingSettingsName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("devOpsAuditingSettingsName") DevOpsAuditingSettingsName devOpsAuditingSettingsName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ServerDevOpsAuditingSettingsInner parameters, Context context); + @PathParam("devOpsAuditingSettingsName") String devOpsAuditingSettingsName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("devOpsAuditingSettingsName") String devOpsAuditingSettingsName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerDevOpsAuditingSettingsInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -104,32 +104,178 @@ Mono> listByServer(@HostParam("end @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a server's DevOps audit settings. + * Lists DevOps audit settings of a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName 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 server's DevOps audit settings along with {@link Response} on successful completion of {@link Mono}. + * @return a list of server DevOps audit settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, DevOpsAuditingSettingsName devOpsAuditingSettingsName) { + 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 (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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Lists DevOps audit settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 DevOps audit settings along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists DevOps audit settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 DevOps audit settings 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 DevOps audit settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 DevOps audit settings as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists DevOps audit settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 DevOps audit settings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Lists DevOps audit settings of a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 DevOps audit settings as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + + /** + * Gets a server's DevOps audit settings. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 DevOps audit settings along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String devOpsAuditingSettingsName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -141,20 +287,23 @@ public Mono> getWithResponseAsync(St return Mono.error( new IllegalArgumentException("Parameter devOpsAuditingSettingsName 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"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, devOpsAuditingSettingsName, accept, - context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + devOpsAuditingSettingsName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @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. @@ -163,15 +312,11 @@ public Mono> getWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, DevOpsAuditingSettingsName devOpsAuditingSettingsName, Context context) { + String serverName, String devOpsAuditingSettingsName, 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.")); @@ -183,18 +328,23 @@ private Mono> getWithResponseAsync(S return Mono.error( new IllegalArgumentException("Parameter devOpsAuditingSettingsName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, devOpsAuditingSettingsName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, devOpsAuditingSettingsName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -202,7 +352,7 @@ private Mono> getWithResponseAsync(S */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAsync(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName) { + String devOpsAuditingSettingsName) { return getWithResponseAsync(resourceGroupName, serverName, devOpsAuditingSettingsName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -210,9 +360,10 @@ public Mono getAsync(String resourceGroupName /** * Gets a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @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. @@ -221,16 +372,17 @@ public Mono getAsync(String resourceGroupName */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName, Context context) { + String devOpsAuditingSettingsName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, context).block(); } /** * Gets a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -238,16 +390,17 @@ public Response getWithResponse(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerDevOpsAuditingSettingsInner get(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName) { + String devOpsAuditingSettingsName) { return getWithResponse(resourceGroupName, serverName, devOpsAuditingSettingsName, Context.NONE).getValue(); } /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -256,15 +409,11 @@ public ServerDevOpsAuditingSettingsInner get(String resourceGroupName, String se */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters) { + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner 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.")); @@ -276,26 +425,30 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono.error( new IllegalArgumentException("Parameter devOpsAuditingSettingsName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, devOpsAuditingSettingsName, contentType, - accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + devOpsAuditingSettingsName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -305,16 +458,12 @@ public Mono>> createOrUpdateWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, DevOpsAuditingSettingsName devOpsAuditingSettingsName, - ServerDevOpsAuditingSettingsInner parameters, Context context) { + String serverName, String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner 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.")); @@ -326,25 +475,29 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter devOpsAuditingSettingsName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, devOpsAuditingSettingsName, contentType, - accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + devOpsAuditingSettingsName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -353,8 +506,8 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ServerDevOpsAuditingSettingsInner> - beginCreateOrUpdateAsync(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters) { + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String devOpsAuditingSettingsName, + ServerDevOpsAuditingSettingsInner parameters) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters); return this.client.getLroResult(mono, @@ -365,9 +518,10 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -377,9 +531,8 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerDevOpsAuditingSettingsInner> - beginCreateOrUpdateAsync(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters, - Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String devOpsAuditingSettingsName, + ServerDevOpsAuditingSettingsInner parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters, context); @@ -391,9 +544,10 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -402,8 +556,8 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerDevOpsAuditingSettingsInner> - beginCreateOrUpdate(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters) { + beginCreateOrUpdate(String resourceGroupName, String serverName, String devOpsAuditingSettingsName, + ServerDevOpsAuditingSettingsInner parameters) { return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters) .getSyncPoller(); } @@ -411,9 +565,10 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -423,9 +578,8 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerDevOpsAuditingSettingsInner> - beginCreateOrUpdate(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters, - Context context) { + beginCreateOrUpdate(String resourceGroupName, String serverName, String devOpsAuditingSettingsName, + ServerDevOpsAuditingSettingsInner parameters, Context context) { return this .beginCreateOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters, context) .getSyncPoller(); @@ -434,9 +588,10 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -445,7 +600,7 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters) { + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -453,9 +608,10 @@ public Mono createOrUpdateAsync(String resour /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -465,8 +621,7 @@ public Mono createOrUpdateAsync(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters, - Context context) { + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -475,9 +630,10 @@ private Mono createOrUpdateAsync(String resou /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -486,16 +642,17 @@ private Mono createOrUpdateAsync(String resou */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerDevOpsAuditingSettingsInner createOrUpdate(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters) { + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters).block(); } /** * Creates or updates a server's DevOps audit settings. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The devOpsAuditingSettingsName parameter. + * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be 'default'. * @param parameters Properties of DevOps audit settings. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -505,155 +662,11 @@ public ServerDevOpsAuditingSettingsInner createOrUpdate(String resourceGroupName */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerDevOpsAuditingSettingsInner createOrUpdate(String resourceGroupName, String serverName, - DevOpsAuditingSettingsName devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters, - Context context) { + String devOpsAuditingSettingsName, ServerDevOpsAuditingSettingsInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, devOpsAuditingSettingsName, parameters, context) .block(); } - /** - * Lists DevOps audit settings 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 DevOps audit settings 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 DevOps audit settings 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 a list of server DevOps audit settings along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Lists DevOps audit settings 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 DevOps audit settings 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 DevOps audit settings 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 a list of server DevOps audit settings as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists DevOps audit settings 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 DevOps audit settings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Lists DevOps audit settings 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 a list of server DevOps audit settings as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); - } - /** * Get the next page of items. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerDnsAliasesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerDnsAliasesClientImpl.java index 365ebafdb22e..47f4de94124c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerDnsAliasesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerDnsAliasesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -34,8 +34,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ServerDnsAliasesClient; import com.azure.resourcemanager.sql.fluent.models.ServerDnsAliasInner; -import com.azure.resourcemanager.sql.implementation.models.ServerDnsAliasListResult; import com.azure.resourcemanager.sql.models.ServerDnsAliasAcquisition; +import com.azure.resourcemanager.sql.models.ServerDnsAliasListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -69,53 +69,54 @@ public final class ServerDnsAliasesClientImpl implements ServerDnsAliasesClient * The interface defining all the services for SqlManagementClientServerDnsAliases to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerDnsAliases") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServerDnsAliasesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("dnsAliasName") String dnsAliasName, @HeaderParam("Accept") String accept, Context context); + @PathParam("dnsAliasName") String dnsAliasName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("dnsAliasName") String dnsAliasName, @HeaderParam("Accept") String accept, Context context); + @PathParam("dnsAliasName") String dnsAliasName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("dnsAliasName") String dnsAliasName, Context context); + @PathParam("dnsAliasName") String dnsAliasName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") 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); - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}/acquire") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> acquire(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> acquire(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("dnsAliasName") String dnsAliasName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ServerDnsAliasAcquisition parameters, + @PathParam("dnsAliasName") String dnsAliasName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerDnsAliasAcquisition parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -123,15 +124,165 @@ Mono>> acquire(@HostParam("endpoint") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of server DNS aliases for a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 DNS aliases for a 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 (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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of server DNS aliases for a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @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 DNS aliases for a server along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of server DNS aliases for a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 DNS aliases for a 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)); + } + + /** + * Gets a list of server DNS aliases for a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @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 DNS aliases for a server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of server DNS aliases for a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 DNS aliases for a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Gets a list of server DNS aliases for a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. + * @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 DNS aliases for a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -145,10 +296,6 @@ public Mono> getWithResponseAsync(String resourceG 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.")); @@ -159,18 +306,23 @@ public Mono> getWithResponseAsync(String resourceG if (dnsAliasName == null) { return Mono.error(new IllegalArgumentException("Parameter dnsAliasName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, dnsAliasName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -185,10 +337,6 @@ private Mono> getWithResponseAsync(String resource 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.")); @@ -199,17 +347,22 @@ private Mono> getWithResponseAsync(String resource if (dnsAliasName == null) { return Mono.error(new IllegalArgumentException("Parameter dnsAliasName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, dnsAliasName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -225,8 +378,9 @@ public Mono getAsync(String resourceGroupName, String serve /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -243,8 +397,9 @@ public Response getWithResponse(String resourceGroupName, S /** * Gets a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -259,8 +414,9 @@ public ServerDnsAliasInner get(String resourceGroupName, String serverName, Stri /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -274,10 +430,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -288,18 +440,23 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (dnsAliasName == null) { return Mono.error(new IllegalArgumentException("Parameter dnsAliasName 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"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, dnsAliasName, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + dnsAliasName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -314,10 +471,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -328,17 +481,22 @@ private Mono>> createOrUpdateWithResponseAsync(String if (dnsAliasName == null) { return Mono.error(new IllegalArgumentException("Parameter dnsAliasName 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.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, dnsAliasName, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -357,8 +515,9 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -379,8 +538,9 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -396,8 +556,9 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -414,8 +575,9 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -432,8 +594,9 @@ public Mono createOrUpdateAsync(String resourceGroupName, S /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -451,8 +614,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -467,8 +631,9 @@ public ServerDnsAliasInner createOrUpdate(String resourceGroupName, String serve /** * Creates a server DNS alias. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -485,8 +650,9 @@ public ServerDnsAliasInner createOrUpdate(String resourceGroupName, String serve /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -500,10 +666,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -514,17 +676,22 @@ public Mono>> deleteWithResponseAsync(String resourceG if (dnsAliasName == null) { return Mono.error(new IllegalArgumentException("Parameter dnsAliasName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, dnsAliasName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + dnsAliasName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -539,10 +706,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -553,16 +716,21 @@ private Mono>> deleteWithResponseAsync(String resource if (dnsAliasName == null) { return Mono.error(new IllegalArgumentException("Parameter dnsAliasName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, dnsAliasName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -580,8 +748,9 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -602,8 +771,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -619,8 +789,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -637,8 +808,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -654,8 +826,9 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -672,8 +845,9 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -687,8 +861,9 @@ public void delete(String resourceGroupName, String serverName, String dnsAliasN /** * Deletes the server DNS alias with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -700,154 +875,12 @@ public void delete(String resourceGroupName, String serverName, String dnsAliasN deleteAsync(resourceGroupName, serverName, dnsAliasName, context).block(); } - /** - * Gets a list of server DNS aliases 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 server DNS aliases for a 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())); - } - - /** - * Gets a list of server DNS aliases 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 server DNS aliases for a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Gets a list of server DNS aliases 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 server DNS aliases for a 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)); - } - - /** - * Gets a list of server DNS aliases 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 server DNS aliases for a server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of server DNS aliases 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 server DNS aliases for a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Gets a list of server DNS aliases 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 server DNS aliases for a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); - } - /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -862,10 +895,6 @@ public Mono>> acquireWithResponseAsync(String resource 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.")); @@ -876,25 +905,29 @@ public Mono>> acquireWithResponseAsync(String resource if (dnsAliasName == null) { return Mono.error(new IllegalArgumentException("Parameter dnsAliasName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.acquire(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, dnsAliasName, contentType, accept, - parameters, context)) + .withContext( + context -> service.acquire(this.client.getEndpoint(), resourceGroupName, serverName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @param context The context to associate with this operation. @@ -910,10 +943,6 @@ private Mono>> acquireWithResponseAsync(String resourc 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.")); @@ -924,23 +953,27 @@ private Mono>> acquireWithResponseAsync(String resourc if (dnsAliasName == null) { return Mono.error(new IllegalArgumentException("Parameter dnsAliasName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.acquire(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, dnsAliasName, contentType, accept, parameters, context); + return service.acquire(this.client.getEndpoint(), resourceGroupName, serverName, dnsAliasName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -960,8 +993,9 @@ public PollerFlux, ServerDnsAliasInner> beginAcq /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @param context The context to associate with this operation. @@ -983,8 +1017,9 @@ private PollerFlux, ServerDnsAliasInner> beginAc /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1001,8 +1036,9 @@ public SyncPoller, ServerDnsAliasInner> beginAcq /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @param context The context to associate with this operation. @@ -1020,8 +1056,9 @@ public SyncPoller, ServerDnsAliasInner> beginAcq /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1039,8 +1076,9 @@ public Mono acquireAsync(String resourceGroupName, String s /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @param context The context to associate with this operation. @@ -1059,8 +1097,9 @@ private Mono acquireAsync(String resourceGroupName, String /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1077,8 +1116,9 @@ public ServerDnsAliasInner acquire(String resourceGroupName, String serverName, /** * Acquires server DNS alias from another server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server that the alias is pointing to. * @param dnsAliasName The name of the server dns alias. * @param parameters The parameters parameter. * @param context The context to associate with this operation. @@ -1100,8 +1140,7 @@ public ServerDnsAliasInner acquire(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 server DNS aliases for a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of server DNS aliases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -1128,8 +1167,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 DNS aliases for a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of server DNS aliases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerKeysClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerKeysClientImpl.java index 91255b265256..4f76d349a532 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerKeysClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerKeysClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ServerKeysClient; import com.azure.resourcemanager.sql.fluent.models.ServerKeyInner; -import com.azure.resourcemanager.sql.implementation.models.ServerKeyListResult; +import com.azure.resourcemanager.sql.models.ServerKeyListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,59 +67,205 @@ public final class ServerKeysClientImpl implements ServerKeysClient { * The interface defining all the services for SqlManagementClientServerKeys to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerKeys") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServerKeysService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("keyName") String keyName, @HeaderParam("Accept") String accept, Context context); + @PathParam("keyName") String keyName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("keyName") String keyName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ServerKeyInner parameters, - Context context); + @PathParam("keyName") String keyName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ServerKeyInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("keyName") String keyName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("keyName") String keyName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of server keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 keys 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 (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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of server keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 keys along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of server keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 keys 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)); + } + + /** + * Gets a list of server keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 keys as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of server keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 keys as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Gets a list of server keys. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 keys as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + /** * Gets a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,10 +280,6 @@ public Mono> getWithResponseAsync(String resourceGroupN 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.")); @@ -148,17 +290,22 @@ public Mono> getWithResponseAsync(String resourceGroupN if (keyName == null) { return Mono.error(new IllegalArgumentException("Parameter keyName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, keyName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, keyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @param context The context to associate with this operation. @@ -174,10 +321,6 @@ private Mono> getWithResponseAsync(String resourceGroup 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.")); @@ -188,16 +331,21 @@ private Mono> getWithResponseAsync(String resourceGroup if (keyName == null) { return Mono.error(new IllegalArgumentException("Parameter keyName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, keyName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, keyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -214,7 +362,8 @@ public Mono getAsync(String resourceGroupName, String serverName /** * Gets a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @param context The context to associate with this operation. @@ -232,7 +381,8 @@ public Response getWithResponse(String resourceGroupName, String /** * Gets a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param keyName The name of the server key to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -248,9 +398,13 @@ public ServerKeyInner get(String resourceGroupName, String serverName, String ke /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -264,10 +418,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -278,26 +428,32 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (keyName == null) { return Mono.error(new IllegalArgumentException("Parameter keyName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, keyName, contentType, accept, - parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + keyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -312,10 +468,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -326,25 +478,31 @@ private Mono>> createOrUpdateWithResponseAsync(String if (keyName == null) { return Mono.error(new IllegalArgumentException("Parameter keyName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, keyName, contentType, accept, parameters, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, keyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -363,9 +521,13 @@ public PollerFlux, ServerKeyInner> beginCreateOrUpdat /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -386,9 +548,13 @@ private PollerFlux, ServerKeyInner> beginCreateOrUpda /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -404,9 +570,13 @@ public SyncPoller, ServerKeyInner> beginCreateOrUpdat /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -424,9 +594,13 @@ public SyncPoller, ServerKeyInner> beginCreateOrUpdat /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -443,9 +617,13 @@ public Mono createOrUpdateAsync(String resourceGroupName, String /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -463,9 +641,13 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -481,9 +663,13 @@ public ServerKeyInner createOrUpdate(String resourceGroupName, String serverName /** * Creates or updates a server key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be operated on (updated or created). The key name is required to be + * in the format of 'vault_key_version'. For example, if the keyId is + * https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be + * formatted as: YourVaultName_YourKeyName_YourKeyVersion. * @param parameters The requested server key resource state. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -500,9 +686,10 @@ public ServerKeyInner createOrUpdate(String resourceGroupName, String serverName /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -515,10 +702,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -529,18 +712,23 @@ public Mono>> deleteWithResponseAsync(String resourceG if (keyName == null) { return Mono.error(new IllegalArgumentException("Parameter keyName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, keyName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, keyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @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. @@ -554,10 +742,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -568,17 +752,22 @@ private Mono>> deleteWithResponseAsync(String resource if (keyName == null) { return Mono.error(new IllegalArgumentException("Parameter keyName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, keyName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, keyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -595,9 +784,10 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @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,9 +807,10 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -633,9 +824,10 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @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. @@ -651,9 +843,10 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -668,9 +861,10 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @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. @@ -686,9 +880,10 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -701,9 +896,10 @@ public void delete(String resourceGroupName, String serverName, String keyName) /** * Deletes the server key with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param keyName The name of the server key to be retrieved. + * @param keyName The name of the server key to be deleted. * @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. @@ -714,145 +910,6 @@ public void delete(String resourceGroupName, String serverName, String keyName, deleteAsync(resourceGroupName, serverName, keyName, context).block(); } - /** - * Gets a list of server keys. - * - * @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 keys 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())); - } - - /** - * Gets a list of server keys. - * - * @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 keys along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName, - 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Gets a list of server keys. - * - * @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 keys 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)); - } - - /** - * Gets a list of server keys. - * - * @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 keys as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of server keys. - * - * @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 keys as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Gets a list of server keys. - * - * @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 keys as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); - } - /** * Get the next page of items. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerOperationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerOperationsClientImpl.java index e86e5c68252e..ce5630896f9a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerOperationsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerOperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ServerOperationsClient; import com.azure.resourcemanager.sql.fluent.models.ServerOperationInner; -import com.azure.resourcemanager.sql.implementation.models.ServerOperationListResult; +import com.azure.resourcemanager.sql.models.ServerOperationListResult; import reactor.core.publisher.Mono; /** @@ -59,16 +59,16 @@ public final class ServerOperationsClientImpl implements ServerOperationsClient * The interface defining all the services for SqlManagementClientServerOperations to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerOperations") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServerOperationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -76,14 +76,15 @@ Mono> listByServer(@HostParam("endpoint") St @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of operations performed on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -98,10 +99,6 @@ private Mono> listByServerSinglePageAsync(St 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.")); @@ -109,10 +106,14 @@ private Mono> listByServerSinglePageAsync(St if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName 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"; return FluxUtil - .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); @@ -121,7 +122,8 @@ private Mono> listByServerSinglePageAsync(St /** * Gets a list of operations performed on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -137,10 +139,6 @@ private Mono> listByServerSinglePageAsync(St 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.")); @@ -148,11 +146,15 @@ private Mono> listByServerSinglePageAsync(St if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName 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 - .listByServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, accept, context) + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -160,7 +162,8 @@ private Mono> listByServerSinglePageAsync(St /** * Gets a list of operations performed on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -176,7 +179,8 @@ public PagedFlux listByServerAsync(String resourceGroupNam /** * Gets a list of operations performed on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -194,7 +198,8 @@ private PagedFlux listByServerAsync(String resourceGroupNa /** * Gets a list of operations performed on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -209,7 +214,8 @@ public PagedIterable listByServer(String resourceGroupName /** * Gets a list of operations performed on the server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -230,8 +236,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 operations performed on the server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response to a list server operations request along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -258,8 +264,8 @@ private Mono> listByServerNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 operations performed on the server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response to a list server operations request along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerSecurityAlertPoliciesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerSecurityAlertPoliciesClientImpl.java index 7f09f51af9fc..01ffc14be459 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerSecurityAlertPoliciesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerSecurityAlertPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -32,8 +32,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ServerSecurityAlertPoliciesClient; import com.azure.resourcemanager.sql.fluent.models.ServerSecurityAlertPolicyInner; -import com.azure.resourcemanager.sql.implementation.models.LogicalServerSecurityAlertPolicyListResult; -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; +import com.azure.resourcemanager.sql.models.LogicalServerSecurityAlertPolicyListResult; +import com.azure.resourcemanager.sql.models.SecurityAlertPolicyNameAutoGenerated; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,36 +67,37 @@ public final class ServerSecurityAlertPoliciesClientImpl implements ServerSecuri * The interface defining all the services for SqlManagementClientServerSecurityAlertPolicies to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerSecurityAlertPolicies") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServerSecurityAlertPoliciesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("securityAlertPolicyName") SecurityAlertPolicyName securityAlertPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("securityAlertPolicyName") SecurityAlertPolicyName securityAlertPolicyName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ServerSecurityAlertPolicyInner parameters, Context context); + @PathParam("securityAlertPolicyName") SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("securityAlertPolicyName") SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerSecurityAlertPolicyInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -104,32 +105,178 @@ Mono> listByServer(@HostPar @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Get a server's security alert policy. + * Get the server's threat detection policies. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 security alert policy along with {@link Response} on successful completion of {@link Mono}. + * @return the server's threat detection policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, SecurityAlertPolicyName securityAlertPolicyName) { + 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 (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 (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Get the server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 server's threat detection policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 server's threat detection policies 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 the server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 server's threat detection policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Get the server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 server's threat detection policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Get the server's threat detection policies. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 server's threat detection policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + + /** + * Get a server's security alert policy. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param securityAlertPolicyName The name of the security alert policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 security alert policy along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -141,16 +288,22 @@ public Mono> getWithResponseAsync(Strin return Mono.error( new IllegalArgumentException("Parameter securityAlertPolicyName 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"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, securityAlertPolicyName, accept, context)) + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a server's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. @@ -161,15 +314,11 @@ public Mono> getWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, SecurityAlertPolicyName securityAlertPolicyName, Context context) { + String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, 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.")); @@ -181,16 +330,21 @@ private Mono> getWithResponseAsync(Stri return Mono.error( new IllegalArgumentException("Parameter securityAlertPolicyName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, securityAlertPolicyName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, securityAlertPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Get a server's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -200,7 +354,7 @@ private Mono> getWithResponseAsync(Stri */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAsync(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName) { + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName) { return getWithResponseAsync(resourceGroupName, serverName, securityAlertPolicyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -208,7 +362,8 @@ public Mono getAsync(String resourceGroupName, S /** * Get a server's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @param context The context to associate with this operation. @@ -219,14 +374,15 @@ public Mono getAsync(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName, Context context) { + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, securityAlertPolicyName, context).block(); } /** * Get a server's security alert policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -236,16 +392,17 @@ public Response getWithResponse(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerSecurityAlertPolicyInner get(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName) { + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName) { return getWithResponse(resourceGroupName, serverName, securityAlertPolicyName, Context.NONE).getValue(); } /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -254,15 +411,11 @@ public ServerSecurityAlertPolicyInner get(String resourceGroupName, String serve */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters) { + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner 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.")); @@ -274,26 +427,30 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono.error( new IllegalArgumentException("Parameter securityAlertPolicyName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, securityAlertPolicyName, contentType, - accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + securityAlertPolicyName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -303,16 +460,12 @@ public Mono>> createOrUpdateWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, SecurityAlertPolicyName securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, - Context context) { + String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, + ServerSecurityAlertPolicyInner 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.")); @@ -324,25 +477,28 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter securityAlertPolicyName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, securityAlertPolicyName, contentType, - accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, securityAlertPolicyName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -352,7 +508,7 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ServerSecurityAlertPolicyInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters) { + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters); return this.client.getLroResult(mono, @@ -363,9 +519,10 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -376,7 +533,7 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerSecurityAlertPolicyInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, @@ -389,9 +546,10 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -400,7 +558,7 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, SecurityAlertPolicyName securityAlertPolicyName, + String resourceGroupName, String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters) { return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters) .getSyncPoller(); @@ -409,9 +567,10 @@ public SyncPoller, ServerSecurityAler /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -421,7 +580,7 @@ public SyncPoller, ServerSecurityAler */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( - String resourceGroupName, String serverName, SecurityAlertPolicyName securityAlertPolicyName, + String resourceGroupName, String serverName, SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, Context context) { return this .beginCreateOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters, context) @@ -431,9 +590,10 @@ public SyncPoller, ServerSecurityAler /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -442,7 +602,7 @@ public SyncPoller, ServerSecurityAler */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters) { + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -450,9 +610,10 @@ public Mono createOrUpdateAsync(String resourceG /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -462,7 +623,8 @@ public Mono createOrUpdateAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, Context context) { + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, + Context context) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -471,9 +633,10 @@ private Mono createOrUpdateAsync(String resource /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -482,16 +645,17 @@ private Mono createOrUpdateAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters) { + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters) { return createOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters).block(); } /** * Creates or updates a threat detection policy. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param securityAlertPolicyName The name of the security alert policy. + * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The server security alert policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -501,151 +665,9 @@ public ServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String serverName, - SecurityAlertPolicyName securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters, context).block(); - } - - /** - * Get the server's threat detection policies. - * - * @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 server's threat detection policies 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 the server's threat detection policies. - * - * @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 server's threat detection policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Get the server's threat detection policies. - * - * @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 server's threat detection policies 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 the server's threat detection policies. - * - * @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 server's threat detection policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + SecurityAlertPolicyNameAutoGenerated securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the server's threat detection policies. - * - * @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 server's threat detection policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Get the server's threat detection policies. - * - * @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 server's threat detection policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + return createOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyName, parameters, context).block(); } /** @@ -655,8 +677,8 @@ 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 the server's threat detection policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of the server's security alert policies along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -683,8 +705,8 @@ 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 the server's threat detection policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of the server's security alert policies along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustCertificatesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustCertificatesClientImpl.java index 37e07aa6476c..d8c0e6bf51b7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustCertificatesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustCertificatesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ServerTrustCertificatesClient; import com.azure.resourcemanager.sql.fluent.models.ServerTrustCertificateInner; -import com.azure.resourcemanager.sql.implementation.models.ServerTrustCertificatesListResult; +import com.azure.resourcemanager.sql.models.ServerTrustCertificatesListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,83 +67,237 @@ public final class ServerTrustCertificatesClientImpl implements ServerTrustCerti * The interface defining all the services for SqlManagementClientServerTrustCertificates to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerTrustCertificates") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServerTrustCertificatesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByInstance(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("certificateName") String certificateName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("certificateName") String certificateName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("certificateName") String certificateName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ServerTrustCertificateInner parameters, + @PathParam("certificateName") String certificateName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerTrustCertificateInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("certificateName") String certificateName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("certificateName") String certificateName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 trust certificate that was uploaded from SQL Server to SQL Managed Instance along with - * {@link Response} on successful completion of {@link Mono}. + * @return a list of server trust certificates that were uploaded from box to the given Sql Managed Instance along + * with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, String certificateName) { + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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"; + return FluxUtil + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 trust certificates that were uploaded from box to the given Sql Managed Instance along + * with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByInstanceSinglePageAsync(String resourceGroupName, + String managedInstanceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (managedInstanceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter managedInstanceName 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 + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 trust certificates that were uploaded from box to the given Sql Managed Instance as + * paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), + nextLink -> listByInstanceNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 trust certificates that were uploaded from box to the given Sql Managed Instance as + * paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByInstanceAsync(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), + nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 trust certificates that were uploaded from box to the given Sql Managed Instance as + * paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); + } + + /** + * Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @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 trust certificates that were uploaded from box to the given Sql Managed Instance as + * paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByInstance(String resourceGroupName, + String managedInstanceName, Context context) { + return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); + } + + /** + * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param certificateName Name of of the certificate to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 trust certificate that was uploaded from box to Sql Managed Instance along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String managedInstanceName, String certificateName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -156,24 +310,30 @@ public Mono> getWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter certificateName 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"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, certificateName, accept, context)) + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + certificateName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @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 trust certificate that was uploaded from SQL Server to SQL Managed Instance along with - * {@link Response} on successful completion of {@link Mono}. + * @return a server trust certificate that was uploaded from box to Sql Managed Instance along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, @@ -182,10 +342,6 @@ private Mono> getWithResponseAsync(String 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.")); @@ -198,23 +354,28 @@ private Mono> getWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter certificateName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, certificateName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, certificateName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Gets a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 trust certificate that was uploaded from SQL Server to SQL Managed Instance on successful - * completion of {@link Mono}. + * @return a server trust certificate that was uploaded from box to Sql Managed Instance on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAsync(String resourceGroupName, String managedInstanceName, @@ -224,16 +385,17 @@ public Mono getAsync(String resourceGroupName, Stri } /** - * Gets a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @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 trust certificate that was uploaded from SQL Server to SQL Managed Instance along with + * @return a server trust certificate that was uploaded from box to Sql Managed Instance along with * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -243,15 +405,16 @@ public Response getWithResponse(String resourceGrou } /** - * Gets a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Gets a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param certificateName Name of of the certificate to get. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * @return a server trust certificate that was uploaded from box to Sql Managed Instance. */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerTrustCertificateInner get(String resourceGroupName, String managedInstanceName, @@ -260,11 +423,12 @@ public ServerTrustCertificateInner get(String resourceGroupName, String managedI } /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -279,10 +443,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -295,26 +455,30 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter certificateName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, certificateName, contentType, - accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, certificateName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -330,10 +494,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -346,25 +506,28 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter certificateName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, certificateName, contentType, - accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + certificateName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -384,11 +547,12 @@ public PollerFlux, ServerTrustCertificat } /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -410,11 +574,12 @@ private PollerFlux, ServerTrustCertifica } /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -431,11 +596,12 @@ public SyncPoller, ServerTrustCertificat } /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -454,11 +620,12 @@ public SyncPoller, ServerTrustCertificat } /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -474,11 +641,12 @@ public Mono createOrUpdateAsync(String resourceGrou } /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -496,11 +664,12 @@ private Mono createOrUpdateAsync(String resourceGro } /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -514,11 +683,12 @@ public ServerTrustCertificateInner createOrUpdate(String resourceGroupName, Stri } /** - * Uploads a server trust certificate from SQL Server to SQL Managed Instance. + * Uploads a server trust certificate from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to upload. * @param parameters The server trust certificate info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -534,11 +704,12 @@ public ServerTrustCertificateInner createOrUpdate(String resourceGroupName, Stri } /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -551,10 +722,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -567,18 +734,23 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter certificateName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, certificateName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + certificateName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @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. @@ -592,10 +764,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -608,17 +776,22 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter certificateName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, certificateName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, managedInstanceName, certificateName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 +807,12 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @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. @@ -656,11 +830,12 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -673,11 +848,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @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. @@ -691,11 +867,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -708,11 +885,12 @@ public Mono deleteAsync(String resourceGroupName, String managedInstanceNa } /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @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. @@ -727,11 +905,12 @@ private Mono deleteAsync(String resourceGroupName, String managedInstanceN } /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -742,11 +921,12 @@ public void delete(String resourceGroupName, String managedInstanceName, String } /** - * Deletes a server trust certificate that was uploaded from SQL Server to SQL Managed Instance. + * Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. - * @param certificateName Name of of the certificate to get. + * @param certificateName Name of of the certificate to delete. * @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. @@ -757,163 +937,6 @@ public void delete(String resourceGroupName, String managedInstanceName, String deleteAsync(resourceGroupName, managedInstanceName, certificateName, context).block(); } - /** - * Gets a list of the server trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync(String resourceGroupName, - String managedInstanceName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, 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 a list of the server trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByInstanceSinglePageAsync(String resourceGroupName, - String managedInstanceName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of the server trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of the server trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of the server trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); - } - - /** - * Gets a list of the server trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, context)); - } - /** * Get the next page of items. * @@ -921,8 +944,8 @@ public PagedIterable listByInstance(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 the server trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of server trust certificates in instance along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInstanceNextSinglePageAsync(String nextLink) { @@ -949,8 +972,8 @@ private Mono> listByInstanceNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 trust certificates used to secure communication between SQL Server and the specified - * SQL Managed Instance along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of server trust certificates in instance along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInstanceNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustGroupsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustGroupsClientImpl.java index 66fae591290b..eff3aaebffd7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustGroupsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustGroupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.ServerTrustGroupsClient; import com.azure.resourcemanager.sql.fluent.models.ServerTrustGroupInner; -import com.azure.resourcemanager.sql.implementation.models.ServerTrustGroupListResult; +import com.azure.resourcemanager.sql.models.ServerTrustGroupListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,63 +67,65 @@ public final class ServerTrustGroupsClientImpl implements ServerTrustGroupsClien * The interface defining all the services for SqlManagementClientServerTrustGroups to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerTrustGroups") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServerTrustGroupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocation(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @PathParam("serverTrustGroupName") String serverTrustGroupName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("serverTrustGroupName") String serverTrustGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, @PathParam("serverTrustGroupName") String serverTrustGroupName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ServerTrustGroupInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerTrustGroupInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @PathParam("serverTrustGroupName") String serverTrustGroupName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("locationName") String locationName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("serverTrustGroupName") String serverTrustGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByInstance(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -131,14 +133,162 @@ Mono> listByLocationNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Lists a server trust group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 trust groups along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String resourceGroupName, + String locationName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName 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"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), resourceGroupName, locationName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Lists a server trust group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @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 trust groups along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String resourceGroupName, + String locationName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName 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 + .listByLocation(this.client.getEndpoint(), resourceGroupName, locationName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists a server trust group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 trust groups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByLocationAsync(String resourceGroupName, String locationName) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(resourceGroupName, locationName), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); + } + + /** + * Lists a server trust group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @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 trust groups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String resourceGroupName, String locationName, + Context context) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(resourceGroupName, locationName, context), + nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists a server trust group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 trust groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String resourceGroupName, String locationName) { + return new PagedIterable<>(listByLocationAsync(resourceGroupName, locationName)); + } + + /** + * Lists a server trust group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param locationName The name of the region where the resource is located. + * @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 trust groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String resourceGroupName, String locationName, + Context context) { + return new PagedIterable<>(listByLocationAsync(resourceGroupName, locationName, context)); + } + /** * Gets a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -153,10 +303,6 @@ public Mono> getWithResponseAsync(String resourc 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.")); @@ -168,16 +314,22 @@ public Mono> getWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter serverTrustGroupName 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"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, serverTrustGroupName, accept, context)) + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, locationName, + serverTrustGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -193,10 +345,6 @@ private Mono> getWithResponseAsync(String resour 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.")); @@ -208,16 +356,21 @@ private Mono> getWithResponseAsync(String resour return Mono .error(new IllegalArgumentException("Parameter serverTrustGroupName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, locationName, serverTrustGroupName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, locationName, serverTrustGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -235,7 +388,8 @@ public Mono getAsync(String resourceGroupName, String loc /** * Gets a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -253,7 +407,8 @@ public Response getWithResponse(String resourceGroupName, /** * Gets a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -269,7 +424,8 @@ public ServerTrustGroupInner get(String resourceGroupName, String locationName, /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -285,10 +441,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -300,24 +452,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter serverTrustGroupName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, serverTrustGroupName, contentType, - accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, locationName, + serverTrustGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -334,10 +490,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -349,23 +501,26 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter serverTrustGroupName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, serverTrustGroupName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, locationName, serverTrustGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -387,7 +542,8 @@ public PollerFlux, ServerTrustGroupInner> begi /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -411,7 +567,8 @@ private PollerFlux, ServerTrustGroupInner> beg /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -430,7 +587,8 @@ public SyncPoller, ServerTrustGroupInner> begi /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -451,7 +609,8 @@ public SyncPoller, ServerTrustGroupInner> begi /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -470,7 +629,8 @@ public Mono createOrUpdateAsync(String resourceGroupName, /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -491,7 +651,8 @@ private Mono createOrUpdateAsync(String resourceGroupName /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -509,7 +670,8 @@ public ServerTrustGroupInner createOrUpdate(String resourceGroupName, String loc /** * Creates or updates a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param parameters The server trust group parameters. @@ -528,7 +690,8 @@ public ServerTrustGroupInner createOrUpdate(String resourceGroupName, String loc /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -543,10 +706,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -558,16 +717,21 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter serverTrustGroupName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, serverTrustGroupName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, locationName, + serverTrustGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -583,10 +747,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -598,15 +758,20 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter serverTrustGroupName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, locationName, serverTrustGroupName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, locationName, serverTrustGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -626,7 +791,8 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -648,7 +814,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -665,7 +832,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -683,7 +851,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -700,7 +869,8 @@ public Mono deleteAsync(String resourceGroupName, String locationName, Str /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -719,7 +889,8 @@ private Mono deleteAsync(String resourceGroupName, String locationName, St /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -734,7 +905,8 @@ public void delete(String resourceGroupName, String locationName, String serverT /** * Deletes a server trust group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param locationName The name of the region where the resource is located. * @param serverTrustGroupName The name of the server trust group. * @param context The context to associate with this operation. @@ -747,153 +919,11 @@ public void delete(String resourceGroupName, String locationName, String serverT deleteAsync(resourceGroupName, locationName, serverTrustGroupName, context).block(); } - /** - * Lists a server trust group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 ServerTrustGroup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String resourceGroupName, - String locationName) { - 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, locationName, 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 a server trust group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @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 ServerTrustGroup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String resourceGroupName, - String locationName, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, locationName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists a server trust group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 ServerTrustGroup list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByLocationAsync(String resourceGroupName, String locationName) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(resourceGroupName, locationName), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); - } - - /** - * Lists a server trust group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @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 ServerTrustGroup list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String resourceGroupName, String locationName, - Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(resourceGroupName, locationName, context), - nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists a server trust group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 ServerTrustGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String resourceGroupName, String locationName) { - return new PagedIterable<>(listByLocationAsync(resourceGroupName, locationName)); - } - - /** - * Lists a server trust group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param locationName The name of the region where the resource is located. - * @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 ServerTrustGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String resourceGroupName, String locationName, - Context context) { - return new PagedIterable<>(listByLocationAsync(resourceGroupName, locationName, context)); - } - /** * Gets a server trust groups by instance name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -908,10 +938,6 @@ private Mono> listByInstanceSinglePageAsync 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.")); @@ -920,10 +946,14 @@ private Mono> listByInstanceSinglePageAsync return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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"; return FluxUtil - .withContext(context -> service.listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context)) + .withContext(context -> service.listByInstance(this.client.getEndpoint(), resourceGroupName, + managedInstanceName, this.client.getSubscriptionId(), 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())); @@ -932,7 +962,8 @@ private Mono> listByInstanceSinglePageAsync /** * Gets a server trust groups by instance name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -948,10 +979,6 @@ private Mono> listByInstanceSinglePageAsync 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.")); @@ -960,11 +987,15 @@ private Mono> listByInstanceSinglePageAsync return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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 - .listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context) + .listByInstance(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -972,7 +1003,8 @@ private Mono> listByInstanceSinglePageAsync /** * Gets a server trust groups by instance name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -988,7 +1020,8 @@ public PagedFlux listByInstanceAsync(String resourceGroup /** * Gets a server trust groups by instance name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1006,7 +1039,8 @@ private PagedFlux listByInstanceAsync(String resourceGrou /** * Gets a server trust groups by instance name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1021,7 +1055,8 @@ public PagedIterable listByInstance(String resourceGroupN /** * Gets a server trust groups by instance name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1042,8 +1077,7 @@ public PagedIterable listByInstance(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 the response of a ServerTrustGroup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of server trust groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationNextSinglePageAsync(String nextLink) { @@ -1070,8 +1104,7 @@ private Mono> listByLocationNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ServerTrustGroup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of server trust groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationNextSinglePageAsync(String nextLink, @@ -1097,8 +1130,7 @@ private Mono> listByLocationNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 trust groups by instance name along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of server trust groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInstanceNextSinglePageAsync(String nextLink) { @@ -1125,8 +1157,7 @@ private Mono> listByInstanceNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 trust groups by instance name along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of server trust groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInstanceNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerUsagesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerUsagesClientImpl.java index 431e1c3fe9dd..5d03b525f9c6 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerUsagesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerUsagesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ServerUsagesClient; import com.azure.resourcemanager.sql.fluent.models.ServerUsageInner; -import com.azure.resourcemanager.sql.implementation.models.ServerUsageListResult; +import com.azure.resourcemanager.sql.models.ServerUsageListResult; import reactor.core.publisher.Mono; /** @@ -59,16 +59,16 @@ public final class ServerUsagesClientImpl implements ServerUsagesClient { * The interface defining all the services for SqlManagementClientServerUsages to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerUsages") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServerUsagesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/usages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByServer(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -76,14 +76,15 @@ Mono> listByServer(@HostParam("endpoint") String @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets server usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -97,10 +98,6 @@ private Mono> listByServerSinglePageAsync(String 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.")); @@ -108,10 +105,14 @@ private Mono> listByServerSinglePageAsync(String if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName 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"; return FluxUtil - .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); @@ -120,7 +121,8 @@ private Mono> listByServerSinglePageAsync(String /** * Gets server usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -135,10 +137,6 @@ private Mono> listByServerSinglePageAsync(String 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.")); @@ -146,11 +144,15 @@ private Mono> listByServerSinglePageAsync(String if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName 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 - .listByServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, accept, context) + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -158,7 +160,8 @@ private Mono> listByServerSinglePageAsync(String /** * Gets server usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -174,7 +177,8 @@ public PagedFlux listByServerAsync(String resourceGroupName, S /** * Gets server usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -192,7 +196,8 @@ private PagedFlux listByServerAsync(String resourceGroupName, /** * Gets server usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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. @@ -207,7 +212,8 @@ public PagedIterable listByServer(String resourceGroupName, St /** * Gets server usages. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -227,7 +233,7 @@ public PagedIterable listByServer(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 usages along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of server usage metrics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -254,7 +260,7 @@ private Mono> listByServerNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 usages along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of server usage metrics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerVulnerabilityAssessmentsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerVulnerabilityAssessmentsClientImpl.java index bd6f59ff011c..b37a3498485b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerVulnerabilityAssessmentsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerVulnerabilityAssessmentsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.ServerVulnerabilityAssessmentsClient; import com.azure.resourcemanager.sql.fluent.models.ServerVulnerabilityAssessmentInner; -import com.azure.resourcemanager.sql.implementation.models.ServerVulnerabilityAssessmentListResult; +import com.azure.resourcemanager.sql.models.ServerVulnerabilityAssessmentListResult; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; import reactor.core.publisher.Mono; @@ -63,62 +63,214 @@ public final class ServerVulnerabilityAssessmentsClientImpl implements ServerVul * The interface defining all the services for SqlManagementClientServerVulnerabilityAssessments to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServerVulnerabilityAssessments") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServerVulnerabilityAssessmentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ServerVulnerabilityAssessmentInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerVulnerabilityAssessmentInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") 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("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets the server's vulnerability assessment. + * Lists the vulnerability assessment policies associated with a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's vulnerability assessments 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 (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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Lists the vulnerability assessment policies associated with a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's vulnerability assessments along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByServerSinglePageAsync(String resourceGroupName, String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists the vulnerability assessment policies associated with a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's vulnerability assessments 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 vulnerability assessment policies associated with a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's vulnerability assessments as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists the vulnerability assessment policies associated with a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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 the server's vulnerability assessments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Lists the vulnerability assessment policies associated with a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 the server's vulnerability assessments as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + + /** + * Gets the server's vulnerability assessment. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -133,10 +285,6 @@ public Mono> getWithResponseAsync(S 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.")); @@ -148,19 +296,22 @@ public Mono> getWithResponseAsync(S return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, accept, - context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the server's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -176,10 +327,6 @@ private Mono> getWithResponseAsync( 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.")); @@ -191,17 +338,22 @@ private Mono> getWithResponseAsync( return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, vulnerabilityAssessmentName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, vulnerabilityAssessmentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets the server's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -218,8 +370,9 @@ public Mono getAsync(String resourceGroupNam /** * Gets the server's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -236,8 +389,9 @@ public Response getWithResponse(String resou /** * Gets the server's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -255,8 +409,9 @@ public ServerVulnerabilityAssessmentInner get(String resourceGroupName, String s * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -272,10 +427,6 @@ public Mono> createOrUpdateWithResp 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.")); @@ -287,17 +438,20 @@ public Mono> createOrUpdateWithResp return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -306,8 +460,9 @@ public Mono> createOrUpdateWithResp * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @param context The context to associate with this operation. @@ -324,10 +479,6 @@ private Mono> createOrUpdateWithRes 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.")); @@ -339,17 +490,20 @@ private Mono> createOrUpdateWithRes return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, contentType, - accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** @@ -357,8 +511,9 @@ private Mono> createOrUpdateWithRes * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -378,8 +533,9 @@ public Mono createOrUpdateAsync(String resou * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @param context The context to associate with this operation. @@ -401,8 +557,9 @@ public Response createOrUpdateWithResponse(S * with managed identity - * https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param parameters The requested resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -420,8 +577,9 @@ public ServerVulnerabilityAssessmentInner createOrUpdate(String resourceGroupNam /** * Removes the server's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -435,10 +593,6 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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.")); @@ -450,17 +604,22 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + vulnerabilityAssessmentName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Removes the server's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -475,10 +634,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -490,16 +645,21 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono.error( new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, vulnerabilityAssessmentName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, vulnerabilityAssessmentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Removes the server's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -516,8 +676,9 @@ public Mono deleteAsync(String resourceGroupName, String serverName, /** * Removes the server's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -534,8 +695,9 @@ public Response deleteWithResponse(String resourceGroupName, String server /** * Removes the server's vulnerability assessment. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server for which the vulnerability assessment is defined. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -547,154 +709,6 @@ public void delete(String resourceGroupName, String serverName, deleteWithResponse(resourceGroupName, serverName, vulnerabilityAssessmentName, Context.NONE); } - /** - * Lists the vulnerability assessment policies associated with 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 response of a ServerVulnerabilityAssessment list operation 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 vulnerability assessment policies associated with 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 response of a ServerVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByServerSinglePageAsync(String resourceGroupName, String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Lists the vulnerability assessment policies associated with 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 response of a ServerVulnerabilityAssessment list operation 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 vulnerability assessment policies associated with 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 response of a ServerVulnerabilityAssessment list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the vulnerability assessment policies associated with 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 response of a ServerVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Lists the vulnerability assessment policies associated with 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 response of a ServerVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); - } - /** * Get the next page of items. * @@ -702,8 +716,8 @@ public PagedIterable listByServer(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 response of a ServerVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of the server's vulnerability assessments along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -730,8 +744,8 @@ private Mono> listByServerNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 ServerVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of the server's vulnerability assessments along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServersClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServersClientImpl.java index e4bb7c3c507d..64d3effe8875 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServersClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -39,11 +39,10 @@ import com.azure.resourcemanager.sql.fluent.ServersClient; import com.azure.resourcemanager.sql.fluent.models.CheckNameAvailabilityResponseInner; import com.azure.resourcemanager.sql.fluent.models.ImportExportOperationResultInner; -import com.azure.resourcemanager.sql.fluent.models.RefreshExternalGovernanceStatusOperationResultInner; import com.azure.resourcemanager.sql.fluent.models.ServerInner; -import com.azure.resourcemanager.sql.implementation.models.ServerListResult; import com.azure.resourcemanager.sql.models.CheckNameAvailabilityRequest; import com.azure.resourcemanager.sql.models.ImportNewDatabaseDefinition; +import com.azure.resourcemanager.sql.models.ServerListResult; import com.azure.resourcemanager.sql.models.ServerUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -78,118 +77,112 @@ public final class ServersClientImpl implements InnerSupportsGet, I * The interface defining all the services for SqlManagementClientServers to be used by the proxy service to perform * REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientServers") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface ServersService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkNameAvailability(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CheckNameAvailabilityRequest parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, @QueryParam("$expand") String expand, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$expand") String expand, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$expand") String expand, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ServerInner parameters, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ServerUpdate parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$expand") String expand, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); - - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> importDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ImportNewDatabaseDefinition parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ServerUpdate parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/refreshExternalGovernanceStatus") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> refreshStatus(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> importDatabase(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); - - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") CheckNameAvailabilityRequest parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ImportNewDatabaseDefinition parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * Gets a server. + * Determines whether a resource can be created with the specified name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param expand The child resources to include in the response. + * @param parameters The name availability request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 along with {@link Response} on successful completion of {@link Mono}. + * @return the result of a name availability check along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String serverName, - String expand) { + public Mono> + checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequest parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -198,35 +191,32 @@ public Mono> getByResourceGroupWithResponseAsync(String re 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.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, expand, accept, context)) + .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a server. + * Determines whether a resource can be created with the specified name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param expand The child resources to include in the response. + * @param parameters The name availability request 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 server along with {@link Response} on successful completion of {@link Mono}. + * @return the result of a name availability check along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String serverName, - String expand, Context context) { + private Mono> + checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequest parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -235,84 +225,74 @@ private Mono> getByResourceGroupWithResponseAsync(String r 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"; context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, expand, accept, context); + return service.checkNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** - * Gets a server. + * Determines whether a resource can be created with the specified name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param parameters The name availability request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 on successful completion of {@link Mono}. + * @return the result of a name availability check on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String serverName) { - final String expand = null; - return getByResourceGroupWithResponseAsync(resourceGroupName, serverName, expand) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono + checkNameAvailabilityAsync(CheckNameAvailabilityRequest parameters) { + return checkNameAvailabilityWithResponseAsync(parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a server. + * Determines whether a resource can be created with the specified name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param expand The child resources to include in the response. + * @param parameters The name availability request 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 server along with {@link Response}. + * @return the result of a name availability check along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, - String expand, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, serverName, expand, context).block(); + public Response + checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest parameters, Context context) { + return checkNameAvailabilityWithResponseAsync(parameters, context).block(); } /** - * Gets a server. + * Determines whether a resource can be created with the specified name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param parameters The name availability request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the result of a name availability check. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerInner getByResourceGroup(String resourceGroupName, String serverName) { - final String expand = null; - return getByResourceGroupWithResponse(resourceGroupName, serverName, expand, Context.NONE).getValue(); + public CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest parameters) { + return checkNameAvailabilityWithResponse(parameters, Context.NONE).getValue(); } /** - * Creates or updates a server. + * Gets a list of all servers in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters The requested server resource state. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all servers in the subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - ServerInner parameters) { + private Mono> listSinglePageAsync(String expand) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -321,42 +301,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, accept, parameters, - context)) + .withContext(context -> service.list(this.client.getEndpoint(), expand, this.client.getSubscriptionId(), + 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())); } /** - * Creates or updates a server. + * Gets a list of all servers in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters The requested server resource state. + * @param expand The child resources to include in the response. * @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 an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all servers in the subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, ServerInner parameters, Context context) { + private Mono> listSinglePageAsync(String expand, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -365,601 +331,91 @@ private Mono>> createOrUpdateWithResponseAsync(String 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, accept, parameters, context); - } - - /** - * Creates or updates 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 requested server resource 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 the {@link PollerFlux} for polling of an Azure SQL Database server. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ServerInner> beginCreateOrUpdateAsync(String resourceGroupName, - String serverName, ServerInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ServerInner.class, ServerInner.class, this.client.getContext()); - } - - /** - * Creates or updates 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 requested server resource 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 the {@link PollerFlux} for polling of an Azure SQL Database server. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ServerInner> beginCreateOrUpdateAsync(String resourceGroupName, - String serverName, ServerInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ServerInner.class, ServerInner.class, context); + return service + .list(this.client.getEndpoint(), expand, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Creates or updates a server. + * Gets a list of all servers in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters The requested server resource state. + * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an Azure SQL Database server. + * @return a list of all servers in the subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, - String serverName, ServerInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String expand) { + return new PagedFlux<>(() -> listSinglePageAsync(expand), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Creates or updates a server. + * Gets a list of all servers in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters The requested server resource 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 the {@link SyncPoller} for polling of an Azure SQL Database server. + * @return a list of all servers in the subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, - String serverName, ServerInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + final String expand = null; + return new PagedFlux<>(() -> listSinglePageAsync(expand), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Creates or updates 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 requested server resource 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 an Azure SQL Database server on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String serverName, ServerInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates 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 requested server resource 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 an Azure SQL Database server on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String serverName, ServerInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates 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 requested server resource 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 an Azure SQL Database server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters) { - return createOrUpdateAsync(resourceGroupName, serverName, parameters).block(); - } - - /** - * Creates or updates 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 requested server resource 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 an Azure SQL Database server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters, - Context context) { - return createOrUpdateAsync(resourceGroupName, serverName, parameters, context).block(); - } - - /** - * Updates 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 requested server resource 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 an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - ServerUpdate 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates 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 requested server resource 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 an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - ServerUpdate 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 (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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, contentType, accept, parameters, context); - } - - /** - * Updates 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 requested server resource 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 the {@link PollerFlux} for polling of an Azure SQL Database server. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ServerInner> beginUpdateAsync(String resourceGroupName, - String serverName, ServerUpdate parameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, serverName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ServerInner.class, ServerInner.class, this.client.getContext()); - } - - /** - * Updates 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 requested server resource 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 the {@link PollerFlux} for polling of an Azure SQL Database server. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ServerInner> beginUpdateAsync(String resourceGroupName, - String serverName, ServerUpdate parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, serverName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ServerInner.class, ServerInner.class, context); - } - - /** - * Updates 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 requested server resource 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 the {@link SyncPoller} for polling of an Azure SQL Database server. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, - ServerUpdate parameters) { - return this.beginUpdateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); - } - - /** - * Updates 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 requested server resource 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 the {@link SyncPoller} for polling of an Azure SQL Database server. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, - ServerUpdate parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); - } - - /** - * Updates 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 requested server resource 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 an Azure SQL Database server on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, ServerUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates 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 requested server resource 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 an Azure SQL Database server on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String serverName, ServerUpdate parameters, - Context context) { - return beginUpdateAsync(resourceGroupName, serverName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates 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 requested server resource 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 an Azure SQL Database server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServerInner update(String resourceGroupName, String serverName, ServerUpdate parameters) { - return updateAsync(resourceGroupName, serverName, parameters).block(); - } - - /** - * Updates 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 requested server resource 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 an Azure SQL Database server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServerInner update(String resourceGroupName, String serverName, ServerUpdate parameters, Context context) { - return updateAsync(resourceGroupName, serverName, parameters, context).block(); - } - - /** - * Deletes 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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(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.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes 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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, - 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, context); - } - - /** - * Deletes 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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes 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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes 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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName) { - return this.beginDeleteAsync(resourceGroupName, serverName).getSyncPoller(); - } - - /** - * Deletes 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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, serverName, context).getSyncPoller(); - } - - /** - * Deletes 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String serverName) { - return beginDeleteAsync(resourceGroupName, serverName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a server. + * Gets a list of all servers in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param expand The child resources to include in the response. * @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 a list of all servers in the subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String serverName, Context context) { - return beginDeleteAsync(resourceGroupName, serverName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String expand, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(expand, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Deletes a server. + * Gets a list of all servers in the subscription. * - * @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 all servers in the subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String serverName) { - deleteAsync(resourceGroupName, serverName).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final String expand = null; + return new PagedIterable<>(listAsync(expand)); } /** - * Deletes a server. + * Gets a list of all servers in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param expand The child resources to include in the response. * @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 all servers in the subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String serverName, Context context) { - deleteAsync(resourceGroupName, serverName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String expand, Context context) { + return new PagedIterable<>(listAsync(expand, context)); } /** * Gets a list of servers in a resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -974,18 +430,18 @@ private Mono> listByResourceGroupSinglePageAsync(Stri 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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, expand, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, expand, + this.client.getSubscriptionId(), 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())); @@ -994,7 +450,8 @@ private Mono> listByResourceGroupSinglePageAsync(Stri /** * Gets a list of servers in a resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1010,19 +467,19 @@ private Mono> listByResourceGroupSinglePageAsync(Stri 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 (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 - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, expand, accept, context) + .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, expand, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -1030,7 +487,8 @@ private Mono> listByResourceGroupSinglePageAsync(Stri /** * Gets a list of servers in a resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1046,7 +504,8 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupName, /** * Gets a list of servers in a resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1062,7 +521,8 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupName) /** * Gets a list of servers in a resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1079,7 +539,8 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName /** * Gets a list of servers in a resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1094,7 +555,8 @@ public PagedIterable listByResourceGroup(String resourceGroupName) /** * Gets a list of servers in a resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param expand The child resources to include in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1108,158 +570,389 @@ public PagedIterable listByResourceGroup(String resourceGroupName, } /** - * Gets a list of all servers in the subscription. + * Gets a server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. * @param expand The child resources to include in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 all servers in the subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String expand) { + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String serverName, + String expand) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), expand, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, serverName, + expand, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of all servers in the subscription. + * Gets a server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. * @param expand The child resources to include in the response. * @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 all servers in the subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String expand, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String serverName, + String expand, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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(), expand, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, serverName, expand, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + } + + /** + * Gets a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, String serverName) { + final String expand = null; + return getByResourceGroupWithResponseAsync(resourceGroupName, serverName, expand) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param expand The child resources to include in the response. + * @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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, + String expand, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, serverName, expand, context).block(); + } + + /** + * Gets a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ServerInner getByResourceGroup(String resourceGroupName, String serverName) { + final String expand = null; + return getByResourceGroupWithResponse(resourceGroupName, serverName, expand, Context.NONE).getValue(); + } + + /** + * Creates or updates a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + ServerInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, ServerInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); + } + + /** + * Creates or updates a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 the {@link PollerFlux} for polling of an Azure SQL Database server. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ServerInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, ServerInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServerInner.class, ServerInner.class, this.client.getContext()); + } + + /** + * Creates or updates a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 the {@link PollerFlux} for polling of an Azure SQL Database server. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ServerInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, ServerInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServerInner.class, ServerInner.class, context); + } + + /** + * Creates or updates a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 the {@link SyncPoller} for polling of an Azure SQL Database server. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, ServerInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); } /** - * Gets a list of all servers in the subscription. + * Creates or updates a server. * - * @param expand The child resources to include in the response. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 list of all servers in the subscription as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of an Azure SQL Database server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String expand) { - return new PagedFlux<>(() -> listSinglePageAsync(expand), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, ServerInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); } /** - * Gets a list of all servers in the subscription. + * Creates or updates a server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 list of all servers in the subscription as paginated response with {@link PagedFlux}. + * @return an Azure SQL Database server on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - final String expand = null; - return new PagedFlux<>(() -> listSinglePageAsync(expand), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, ServerInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a list of all servers in the subscription. + * Creates or updates a server. * - * @param expand The child resources to include in the response. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 list of all servers in the subscription as paginated response with {@link PagedFlux}. + * @return an Azure SQL Database server on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String expand, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(expand, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, ServerInner parameters, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a list of all servers in the subscription. + * Creates or updates a server. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 list of all servers in the subscription as paginated response with {@link PagedIterable}. + * @return an Azure SQL Database server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String expand = null; - return new PagedIterable<>(listAsync(expand)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters) { + return createOrUpdateAsync(resourceGroupName, serverName, parameters).block(); } /** - * Gets a list of all servers in the subscription. + * Creates or updates a server. * - * @param expand The child resources to include in the response. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The requested server resource 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 list of all servers in the subscription as paginated response with {@link PagedIterable}. + * @return an Azure SQL Database server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String expand, Context context) { - return new PagedIterable<>(listAsync(expand, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters, + Context context) { + return createOrUpdateAsync(resourceGroupName, serverName, parameters, context).block(); } /** - * Imports a bacpac into a new database. + * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ImportExport operation result resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> importDatabaseWithResponseAsync(String resourceGroupName, String serverName, - ImportNewDatabaseDefinition parameters) { + public Mono>> deleteWithResponseAsync(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.")); @@ -1267,44 +960,35 @@ public Mono>> importDatabaseWithResponseAsync(String r 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.importDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, accept, parameters, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Imports a bacpac into a new database. + * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The database import request 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 an ImportExport operation result resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> importDatabaseWithResponseAsync(String resourceGroupName, - String serverName, ImportNewDatabaseDefinition parameters, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + 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.")); @@ -1312,193 +996,172 @@ private Mono>> importDatabaseWithResponseAsync(String 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; - final String accept = "application/json"; context = this.client.mergeContext(context); - return service.importDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, accept, parameters, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context); } /** - * Imports a bacpac into a new database. + * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an ImportExport operation result resource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ImportExportOperationResultInner> - beginImportDatabaseAsync(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters) { - Mono>> mono - = importDatabaseWithResponseAsync(resourceGroupName, serverName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ImportExportOperationResultInner.class, - ImportExportOperationResultInner.class, this.client.getContext()); + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Imports a bacpac into a new database. + * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The database import request 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 an ImportExport operation result resource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ImportExportOperationResultInner> - beginImportDatabaseAsync(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters, - Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + Context context) { context = this.client.mergeContext(context); - Mono>> mono - = importDatabaseWithResponseAsync(resourceGroupName, serverName, parameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ImportExportOperationResultInner.class, - ImportExportOperationResultInner.class, context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Imports a bacpac into a new database. + * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an ImportExport operation result resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ImportExportOperationResultInner> - beginImportDatabase(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters) { - return this.beginImportDatabaseAsync(resourceGroupName, serverName, parameters).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName) { + return this.beginDeleteAsync(resourceGroupName, serverName).getSyncPoller(); } /** - * Imports a bacpac into a new database. + * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The database import request 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 SyncPoller} for polling of an ImportExport operation result resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ImportExportOperationResultInner> - beginImportDatabase(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters, - Context context) { - return this.beginImportDatabaseAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, serverName, context).getSyncPoller(); } /** - * Imports a bacpac into a new database. + * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ImportExport operation result resource on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono importDatabaseAsync(String resourceGroupName, String serverName, - ImportNewDatabaseDefinition parameters) { - return beginImportDatabaseAsync(resourceGroupName, serverName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono deleteAsync(String resourceGroupName, String serverName) { + return beginDeleteAsync(resourceGroupName, serverName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Imports a bacpac into a new database. + * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The database import request 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 an ImportExport operation result resource on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono importDatabaseAsync(String resourceGroupName, String serverName, - ImportNewDatabaseDefinition parameters, Context context) { - return beginImportDatabaseAsync(resourceGroupName, serverName, parameters, context).last() + private Mono deleteAsync(String resourceGroupName, String serverName, Context context) { + return beginDeleteAsync(resourceGroupName, serverName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Imports a bacpac into a new database. + * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ImportExportOperationResultInner importDatabase(String resourceGroupName, String serverName, - ImportNewDatabaseDefinition parameters) { - return importDatabaseAsync(resourceGroupName, serverName, parameters).block(); + public void delete(String resourceGroupName, String serverName) { + deleteAsync(resourceGroupName, serverName).block(); } /** - * Imports a bacpac into a new database. + * Deletes a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param parameters The database import request 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 an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ImportExportOperationResultInner importDatabase(String resourceGroupName, String serverName, - ImportNewDatabaseDefinition parameters, Context context) { - return importDatabaseAsync(resourceGroupName, serverName, parameters, context).block(); + public void delete(String resourceGroupName, String serverName, Context context) { + deleteAsync(resourceGroupName, serverName, context).block(); } /** - * Refresh external governance enablement status. + * Updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param parameters The requested server resource 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 an RefreshExternalGovernanceStatus operation result resource along with {@link Response} on successful - * completion of {@link Mono}. + * @return an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> refreshStatusWithResponseAsync(String resourceGroupName, - String serverName) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + ServerUpdate 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.")); @@ -1506,35 +1169,41 @@ public Mono>> refreshStatusWithResponseAsync(String re if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName 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.refreshStatus(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Refresh external governance enablement status. + * Updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param parameters The requested server resource 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 an RefreshExternalGovernanceStatus operation result resource along with {@link Response} on successful - * completion of {@link Mono}. + * @return an Azure SQL Database server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> refreshStatusWithResponseAsync(String resourceGroupName, String serverName, - 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.")); + private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + ServerUpdate parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1543,176 +1212,201 @@ private Mono>> refreshStatusWithResponseAsync(String r if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName 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"; context = this.client.mergeContext(context); - return service.refreshStatus(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context); } /** - * Refresh external governance enablement status. + * Updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param parameters The requested server resource 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 the {@link PollerFlux} for polling of an RefreshExternalGovernanceStatus operation result resource. + * @return the {@link PollerFlux} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - PollerFlux, RefreshExternalGovernanceStatusOperationResultInner> - beginRefreshStatusAsync(String resourceGroupName, String serverName) { - Mono>> mono = refreshStatusWithResponseAsync(resourceGroupName, serverName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), RefreshExternalGovernanceStatusOperationResultInner.class, - RefreshExternalGovernanceStatusOperationResultInner.class, this.client.getContext()); + public PollerFlux, ServerInner> beginUpdateAsync(String resourceGroupName, + String serverName, ServerUpdate parameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, serverName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServerInner.class, ServerInner.class, this.client.getContext()); } /** - * Refresh external governance enablement status. + * Updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param parameters The requested server resource 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 the {@link PollerFlux} for polling of an RefreshExternalGovernanceStatus operation result resource. + * @return the {@link PollerFlux} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, RefreshExternalGovernanceStatusOperationResultInner> - beginRefreshStatusAsync(String resourceGroupName, String serverName, Context context) { + private PollerFlux, ServerInner> beginUpdateAsync(String resourceGroupName, + String serverName, ServerUpdate parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = refreshStatusWithResponseAsync(resourceGroupName, serverName, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), RefreshExternalGovernanceStatusOperationResultInner.class, - RefreshExternalGovernanceStatusOperationResultInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServerInner.class, ServerInner.class, context); } /** - * Refresh external governance enablement status. + * Updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param parameters The requested server resource 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 the {@link SyncPoller} for polling of an RefreshExternalGovernanceStatus operation result resource. + * @return the {@link SyncPoller} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, RefreshExternalGovernanceStatusOperationResultInner> - beginRefreshStatus(String resourceGroupName, String serverName) { - return this.beginRefreshStatusAsync(resourceGroupName, serverName).getSyncPoller(); + public SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, + ServerUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); } /** - * Refresh external governance enablement status. + * Updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param parameters The requested server resource 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 the {@link SyncPoller} for polling of an RefreshExternalGovernanceStatus operation result resource. + * @return the {@link SyncPoller} for polling of an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, RefreshExternalGovernanceStatusOperationResultInner> - beginRefreshStatus(String resourceGroupName, String serverName, Context context) { - return this.beginRefreshStatusAsync(resourceGroupName, serverName, context).getSyncPoller(); + public SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, + ServerUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); } /** - * Refresh external governance enablement status. + * Updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param parameters The requested server resource 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 an RefreshExternalGovernanceStatus operation result resource on successful completion of {@link Mono}. + * @return an Azure SQL Database server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono refreshStatusAsync(String resourceGroupName, - String serverName) { - return beginRefreshStatusAsync(resourceGroupName, serverName).last() + public Mono updateAsync(String resourceGroupName, String serverName, ServerUpdate parameters) { + return beginUpdateAsync(resourceGroupName, serverName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Refresh external governance enablement status. + * Updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param parameters The requested server resource 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 an RefreshExternalGovernanceStatus operation result resource on successful completion of {@link Mono}. + * @return an Azure SQL Database server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono refreshStatusAsync(String resourceGroupName, - String serverName, Context context) { - return beginRefreshStatusAsync(resourceGroupName, serverName, context).last() + private Mono updateAsync(String resourceGroupName, String serverName, ServerUpdate parameters, + Context context) { + return beginUpdateAsync(resourceGroupName, serverName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Refresh external governance enablement status. + * Updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param parameters The requested server resource 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 an RefreshExternalGovernanceStatus operation result resource. + * @return an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RefreshExternalGovernanceStatusOperationResultInner refreshStatus(String resourceGroupName, - String serverName) { - return refreshStatusAsync(resourceGroupName, serverName).block(); + public ServerInner update(String resourceGroupName, String serverName, ServerUpdate parameters) { + return updateAsync(resourceGroupName, serverName, parameters).block(); } /** - * Refresh external governance enablement status. + * Updates a server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param parameters The requested server resource 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 an RefreshExternalGovernanceStatus operation result resource. + * @return an Azure SQL Database server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RefreshExternalGovernanceStatusOperationResultInner refreshStatus(String resourceGroupName, - String serverName, Context context) { - return refreshStatusAsync(resourceGroupName, serverName, context).block(); + public ServerInner update(String resourceGroupName, String serverName, ServerUpdate parameters, Context context) { + return updateAsync(resourceGroupName, serverName, parameters, context).block(); } /** - * Determines whether a resource can be created with the specified name. + * Imports a bacpac into a new database. * - * @param parameters The request body. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a name availability check along with {@link Response} on successful completion of + * @return an ImportExport operation result resource along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequest parameters) { + public Mono>> importDatabaseWithResponseAsync(String resourceGroupName, String serverName, + ImportNewDatabaseDefinition parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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.")); @@ -1722,32 +1416,41 @@ public RefreshExternalGovernanceStatusOperationResultInner refreshStatus(String } else { parameters.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), contentType, accept, parameters, context)) + .withContext(context -> service.importDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Determines whether a resource can be created with the specified name. + * Imports a bacpac into a new database. * - * @param parameters The request body. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The database import request 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 result of a name availability check along with {@link Response} on successful completion of + * @return an ImportExport operation result resource along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - checkNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequest parameters, Context context) { + private Mono>> importDatabaseWithResponseAsync(String resourceGroupName, + String serverName, ImportNewDatabaseDefinition parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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.")); @@ -1757,56 +1460,171 @@ public RefreshExternalGovernanceStatusOperationResultInner refreshStatus(String } else { parameters.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), contentType, accept, parameters, context); + return service.importDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Determines whether a resource can be created with the specified name. + * Imports a bacpac into a new database. * - * @param parameters The request body. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a name availability check on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of an ImportExport operation result resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ImportExportOperationResultInner> + beginImportDatabaseAsync(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters) { + Mono>> mono + = importDatabaseWithResponseAsync(resourceGroupName, serverName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ImportExportOperationResultInner.class, + ImportExportOperationResultInner.class, this.client.getContext()); + } + + /** + * Imports a bacpac into a new database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The database import request 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 an ImportExport operation result resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ImportExportOperationResultInner> + beginImportDatabaseAsync(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = importDatabaseWithResponseAsync(resourceGroupName, serverName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ImportExportOperationResultInner.class, + ImportExportOperationResultInner.class, context); + } + + /** + * Imports a bacpac into a new database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The database import request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 an ImportExport operation result resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ImportExportOperationResultInner> + beginImportDatabase(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters) { + return this.beginImportDatabaseAsync(resourceGroupName, serverName, parameters).getSyncPoller(); + } + + /** + * Imports a bacpac into a new database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The database import request 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 SyncPoller} for polling of an ImportExport operation result resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ImportExportOperationResultInner> + beginImportDatabase(String resourceGroupName, String serverName, ImportNewDatabaseDefinition parameters, + Context context) { + return this.beginImportDatabaseAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); + } + + /** + * Imports a bacpac into a new database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The database import request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ImportExport operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono - checkNameAvailabilityAsync(CheckNameAvailabilityRequest parameters) { - return checkNameAvailabilityWithResponseAsync(parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono importDatabaseAsync(String resourceGroupName, String serverName, + ImportNewDatabaseDefinition parameters) { + return beginImportDatabaseAsync(resourceGroupName, serverName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Determines whether a resource can be created with the specified name. + * Imports a bacpac into a new database. * - * @param parameters The request body. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The database import request 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 result of a name availability check along with {@link Response}. + * @return an ImportExport operation result resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response - checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest parameters, Context context) { - return checkNameAvailabilityWithResponseAsync(parameters, context).block(); + private Mono importDatabaseAsync(String resourceGroupName, String serverName, + ImportNewDatabaseDefinition parameters, Context context) { + return beginImportDatabaseAsync(resourceGroupName, serverName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Determines whether a resource can be created with the specified name. + * Imports a bacpac into a new database. * - * @param parameters The request body. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The database import request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a name availability check. + * @return an ImportExport operation result resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest parameters) { - return checkNameAvailabilityWithResponse(parameters, Context.NONE).getValue(); + public ImportExportOperationResultInner importDatabase(String resourceGroupName, String serverName, + ImportNewDatabaseDefinition parameters) { + return importDatabaseAsync(resourceGroupName, serverName, parameters).block(); + } + + /** + * Imports a bacpac into a new database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters The database import request 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 an ImportExport operation result resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ImportExportOperationResultInner importDatabase(String resourceGroupName, String serverName, + ImportNewDatabaseDefinition parameters, Context context) { + return importDatabaseAsync(resourceGroupName, serverName, parameters, context).block(); } /** @@ -1816,11 +1634,10 @@ public CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailab * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 servers in a resource groups along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of servers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1829,9 +1646,7 @@ private Mono> listByResourceGroupNextSinglePageAsync( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -1845,11 +1660,10 @@ private Mono> listByResourceGroupNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 servers in a resource groups along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of servers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1859,7 +1673,7 @@ private Mono> listByResourceGroupNextSinglePageAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, 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)); } @@ -1871,11 +1685,10 @@ private Mono> listByResourceGroupNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 all servers in the subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @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> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1884,7 +1697,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.listByResourceGroupNext(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())); @@ -1898,11 +1713,10 @@ private Mono> listNextSinglePageAsync(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 all servers in the subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of servers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1912,7 +1726,7 @@ private Mono> listNextSinglePageAsync(String nextLink } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, 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)); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlAgentsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlAgentsClientImpl.java index 83cd58159c05..9d6357e41728 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlAgentsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlAgentsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -56,34 +56,36 @@ public final class SqlAgentsClientImpl implements SqlAgentsClient { * The interface defining all the services for SqlManagementClientSqlAgents to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientSqlAgents") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface SqlAgentsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/sqlAgent/current") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("managedInstanceName") String managedInstanceName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/sqlAgent/current") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("managedInstanceName") String managedInstanceName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") SqlAgentConfigurationInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SqlAgentConfigurationInner parameters, @HeaderParam("Accept") String accept, + Context context); } /** * Gets current instance sql agent configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -98,10 +100,6 @@ public Mono> getWithResponseAsync(String re 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.")); @@ -110,17 +108,22 @@ public Mono> getWithResponseAsync(String re return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets current instance sql agent configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -136,10 +139,6 @@ private Mono> getWithResponseAsync(String r 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.")); @@ -148,16 +147,21 @@ private Mono> getWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets current instance sql agent configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -173,7 +177,8 @@ public Mono getAsync(String resourceGroupName, Strin /** * Gets current instance sql agent configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -190,7 +195,8 @@ public Response getWithResponse(String resourceGroup /** * Gets current instance sql agent configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -205,7 +211,8 @@ public SqlAgentConfigurationInner get(String resourceGroupName, String managedIn /** * Puts new sql agent configuration to instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -221,10 +228,6 @@ public Mono> createOrUpdateWithResponseAsyn 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.")); @@ -233,24 +236,28 @@ public Mono> createOrUpdateWithResponseAsyn return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, contentType, accept, - parameters, context)) + .withContext( + context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Puts new sql agent configuration to instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The parameters parameter. * @param context The context to associate with this operation. @@ -267,10 +274,6 @@ private Mono> createOrUpdateWithResponseAsy 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.")); @@ -279,23 +282,26 @@ private Mono> createOrUpdateWithResponseAsy return Mono .error(new IllegalArgumentException("Parameter managedInstanceName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, contentType, accept, parameters, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, managedInstanceName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Puts new sql agent configuration to instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -313,7 +319,8 @@ public Mono createOrUpdateAsync(String resourceGroup /** * Puts new sql agent configuration to instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The parameters parameter. * @param context The context to associate with this operation. @@ -331,7 +338,8 @@ public Response createOrUpdateWithResponse(String re /** * Puts new sql agent configuration to instance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param parameters The parameters parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientBuilder.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientBuilder.java index 9ff4e09a87f5..be24054ce158 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientBuilder.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -20,34 +20,34 @@ @ServiceClientBuilder(serviceClients = { SqlManagementClientImpl.class }) public final class SqlManagementClientBuilder { /* - * Service host + * The subscription ID that identifies an Azure subscription. */ - private String endpoint; + private String subscriptionId; /** - * Sets Service host. + * Sets The subscription ID that identifies an Azure subscription. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the SqlManagementClientBuilder. */ - public SqlManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public SqlManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } /* - * The ID of the target subscription. The value must be an UUID. + * server parameter */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets server parameter. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the SqlManagementClientBuilder. */ - public SqlManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public SqlManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } @@ -132,7 +132,7 @@ public SqlManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); SqlManagementClientImpl client = new SqlManagementClientImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); + localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientImpl.java index b55cc73382b0..080ebdaadb8c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -11,32 +11,25 @@ import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import com.azure.resourcemanager.sql.fluent.BackupShortTermRetentionPoliciesClient; import com.azure.resourcemanager.sql.fluent.CapabilitiesClient; -import com.azure.resourcemanager.sql.fluent.DataMaskingPoliciesClient; -import com.azure.resourcemanager.sql.fluent.DataMaskingRulesClient; -import com.azure.resourcemanager.sql.fluent.DataWarehouseUserActivitiesOperationsClient; import com.azure.resourcemanager.sql.fluent.DatabaseAdvancedThreatProtectionSettingsClient; import com.azure.resourcemanager.sql.fluent.DatabaseAdvisorsClient; import com.azure.resourcemanager.sql.fluent.DatabaseAutomaticTuningsClient; import com.azure.resourcemanager.sql.fluent.DatabaseBlobAuditingPoliciesClient; import com.azure.resourcemanager.sql.fluent.DatabaseColumnsClient; -import com.azure.resourcemanager.sql.fluent.DatabaseEncryptionProtectorsClient; import com.azure.resourcemanager.sql.fluent.DatabaseExtensionsOperationsClient; import com.azure.resourcemanager.sql.fluent.DatabaseOperationsClient; import com.azure.resourcemanager.sql.fluent.DatabaseRecommendedActionsClient; import com.azure.resourcemanager.sql.fluent.DatabaseSchemasClient; +import com.azure.resourcemanager.sql.fluent.DatabasesClient; import com.azure.resourcemanager.sql.fluent.DatabaseSecurityAlertPoliciesClient; -import com.azure.resourcemanager.sql.fluent.DatabaseSqlVulnerabilityAssessmentBaselinesClient; -import com.azure.resourcemanager.sql.fluent.DatabaseSqlVulnerabilityAssessmentExecuteScansClient; -import com.azure.resourcemanager.sql.fluent.DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient; -import com.azure.resourcemanager.sql.fluent.DatabaseSqlVulnerabilityAssessmentScanResultsClient; -import com.azure.resourcemanager.sql.fluent.DatabaseSqlVulnerabilityAssessmentScansClient; -import com.azure.resourcemanager.sql.fluent.DatabaseSqlVulnerabilityAssessmentsSettingsClient; import com.azure.resourcemanager.sql.fluent.DatabaseTablesClient; import com.azure.resourcemanager.sql.fluent.DatabaseUsagesClient; import com.azure.resourcemanager.sql.fluent.DatabaseVulnerabilityAssessmentRuleBaselinesClient; import com.azure.resourcemanager.sql.fluent.DatabaseVulnerabilityAssessmentScansClient; import com.azure.resourcemanager.sql.fluent.DatabaseVulnerabilityAssessmentsClient; -import com.azure.resourcemanager.sql.fluent.DatabasesClient; +import com.azure.resourcemanager.sql.fluent.DataMaskingPoliciesClient; +import com.azure.resourcemanager.sql.fluent.DataMaskingRulesClient; +import com.azure.resourcemanager.sql.fluent.DataWarehouseUserActivitiesOperationsClient; import com.azure.resourcemanager.sql.fluent.DeletedServersClient; import com.azure.resourcemanager.sql.fluent.DistributedAvailabilityGroupsClient; import com.azure.resourcemanager.sql.fluent.ElasticPoolOperationsClient; @@ -48,20 +41,18 @@ import com.azure.resourcemanager.sql.fluent.FailoverGroupsClient; import com.azure.resourcemanager.sql.fluent.FirewallRulesClient; import com.azure.resourcemanager.sql.fluent.GeoBackupPoliciesClient; -import com.azure.resourcemanager.sql.fluent.IPv6FirewallRulesClient; import com.azure.resourcemanager.sql.fluent.InstanceFailoverGroupsClient; -import com.azure.resourcemanager.sql.fluent.InstancePoolOperationsClient; import com.azure.resourcemanager.sql.fluent.InstancePoolsClient; +import com.azure.resourcemanager.sql.fluent.IPv6FirewallRulesClient; import com.azure.resourcemanager.sql.fluent.JobAgentsClient; import com.azure.resourcemanager.sql.fluent.JobCredentialsClient; import com.azure.resourcemanager.sql.fluent.JobExecutionsClient; -import com.azure.resourcemanager.sql.fluent.JobPrivateEndpointsClient; +import com.azure.resourcemanager.sql.fluent.JobsClient; import com.azure.resourcemanager.sql.fluent.JobStepExecutionsClient; import com.azure.resourcemanager.sql.fluent.JobStepsClient; import com.azure.resourcemanager.sql.fluent.JobTargetExecutionsClient; import com.azure.resourcemanager.sql.fluent.JobTargetGroupsClient; import com.azure.resourcemanager.sql.fluent.JobVersionsClient; -import com.azure.resourcemanager.sql.fluent.JobsClient; import com.azure.resourcemanager.sql.fluent.LedgerDigestUploadsOperationsClient; import com.azure.resourcemanager.sql.fluent.LongTermRetentionBackupsClient; import com.azure.resourcemanager.sql.fluent.LongTermRetentionManagedInstanceBackupsClient; @@ -69,13 +60,12 @@ import com.azure.resourcemanager.sql.fluent.MaintenanceWindowOptionsOperationsClient; import com.azure.resourcemanager.sql.fluent.MaintenanceWindowsOperationsClient; import com.azure.resourcemanager.sql.fluent.ManagedBackupShortTermRetentionPoliciesClient; -import com.azure.resourcemanager.sql.fluent.ManagedDatabaseAdvancedThreatProtectionSettingsClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseColumnsClient; -import com.azure.resourcemanager.sql.fluent.ManagedDatabaseMoveOperationsClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseQueriesClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseRecommendedSensitivityLabelsClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseRestoreDetailsClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseSchemasClient; +import com.azure.resourcemanager.sql.fluent.ManagedDatabasesClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseSecurityAlertPoliciesClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseSecurityEventsClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseSensitivityLabelsClient; @@ -84,25 +74,20 @@ import com.azure.resourcemanager.sql.fluent.ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseVulnerabilityAssessmentScansClient; import com.azure.resourcemanager.sql.fluent.ManagedDatabaseVulnerabilityAssessmentsClient; -import com.azure.resourcemanager.sql.fluent.ManagedDatabasesClient; import com.azure.resourcemanager.sql.fluent.ManagedInstanceAdministratorsClient; -import com.azure.resourcemanager.sql.fluent.ManagedInstanceAdvancedThreatProtectionSettingsClient; import com.azure.resourcemanager.sql.fluent.ManagedInstanceAzureADOnlyAuthenticationsClient; -import com.azure.resourcemanager.sql.fluent.ManagedInstanceDtcsClient; import com.azure.resourcemanager.sql.fluent.ManagedInstanceEncryptionProtectorsClient; import com.azure.resourcemanager.sql.fluent.ManagedInstanceKeysClient; import com.azure.resourcemanager.sql.fluent.ManagedInstanceLongTermRetentionPoliciesClient; import com.azure.resourcemanager.sql.fluent.ManagedInstanceOperationsClient; import com.azure.resourcemanager.sql.fluent.ManagedInstancePrivateEndpointConnectionsClient; import com.azure.resourcemanager.sql.fluent.ManagedInstancePrivateLinkResourcesClient; +import com.azure.resourcemanager.sql.fluent.ManagedInstancesClient; import com.azure.resourcemanager.sql.fluent.ManagedInstanceTdeCertificatesClient; import com.azure.resourcemanager.sql.fluent.ManagedInstanceVulnerabilityAssessmentsClient; -import com.azure.resourcemanager.sql.fluent.ManagedInstancesClient; -import com.azure.resourcemanager.sql.fluent.ManagedLedgerDigestUploadsOperationsClient; import com.azure.resourcemanager.sql.fluent.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient; import com.azure.resourcemanager.sql.fluent.ManagedServerDnsAliasesClient; import com.azure.resourcemanager.sql.fluent.ManagedServerSecurityAlertPoliciesClient; -import com.azure.resourcemanager.sql.fluent.NetworkSecurityPerimeterConfigurationsClient; import com.azure.resourcemanager.sql.fluent.OperationsClient; import com.azure.resourcemanager.sql.fluent.OutboundFirewallRulesClient; import com.azure.resourcemanager.sql.fluent.PrivateEndpointConnectionsClient; @@ -121,32 +106,20 @@ import com.azure.resourcemanager.sql.fluent.ServerAzureADAdministratorsClient; import com.azure.resourcemanager.sql.fluent.ServerAzureADOnlyAuthenticationsClient; import com.azure.resourcemanager.sql.fluent.ServerBlobAuditingPoliciesClient; -import com.azure.resourcemanager.sql.fluent.ServerConfigurationOptionsClient; import com.azure.resourcemanager.sql.fluent.ServerConnectionPoliciesClient; import com.azure.resourcemanager.sql.fluent.ServerDevOpsAuditSettingsClient; import com.azure.resourcemanager.sql.fluent.ServerDnsAliasesClient; import com.azure.resourcemanager.sql.fluent.ServerKeysClient; import com.azure.resourcemanager.sql.fluent.ServerOperationsClient; +import com.azure.resourcemanager.sql.fluent.ServersClient; import com.azure.resourcemanager.sql.fluent.ServerSecurityAlertPoliciesClient; import com.azure.resourcemanager.sql.fluent.ServerTrustCertificatesClient; import com.azure.resourcemanager.sql.fluent.ServerTrustGroupsClient; import com.azure.resourcemanager.sql.fluent.ServerUsagesClient; import com.azure.resourcemanager.sql.fluent.ServerVulnerabilityAssessmentsClient; -import com.azure.resourcemanager.sql.fluent.ServersClient; import com.azure.resourcemanager.sql.fluent.SqlAgentsClient; import com.azure.resourcemanager.sql.fluent.SqlManagementClient; -import com.azure.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentBaselinesClient; -import com.azure.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentBaselinesOperationsClient; -import com.azure.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentExecuteScansClient; -import com.azure.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentRuleBaselinesClient; -import com.azure.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentRuleBaselinesOperationsClient; -import com.azure.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentScanResultOperationsClient; -import com.azure.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentScansClient; -import com.azure.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentsClient; -import com.azure.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentsSettingsClient; -import com.azure.resourcemanager.sql.fluent.StartStopManagedInstanceSchedulesClient; import com.azure.resourcemanager.sql.fluent.SubscriptionUsagesClient; -import com.azure.resourcemanager.sql.fluent.SynapseLinkWorkspacesClient; import com.azure.resourcemanager.sql.fluent.SyncAgentsClient; import com.azure.resourcemanager.sql.fluent.SyncGroupsClient; import com.azure.resourcemanager.sql.fluent.SyncMembersClient; @@ -166,45 +139,45 @@ @ServiceClient(builder = SqlManagementClientBuilder.class) public final class SqlManagementClientImpl extends AzureServiceClient implements SqlManagementClient { /** - * Service host. + * The subscription ID that identifies an Azure subscription. */ - private final String endpoint; + private final String subscriptionId; /** - * Gets Service host. + * Gets The subscription ID that identifies an Azure subscription. * - * @return the endpoint value. + * @return the subscriptionId value. */ - public String getEndpoint() { - return this.endpoint; + public String getSubscriptionId() { + return this.subscriptionId; } /** - * Version parameter. + * server parameter. */ - private final String apiVersion; + private final String endpoint; /** - * Gets Version parameter. + * Gets server parameter. * - * @return the apiVersion value. + * @return the endpoint value. */ - public String getApiVersion() { - return this.apiVersion; + public String getEndpoint() { + return this.endpoint; } /** - * The ID of the target subscription. The value must be an UUID. + * Api Version. */ - private final String subscriptionId; + private final String apiVersion; /** - * Gets The ID of the target subscription. The value must be an UUID. + * Gets Api Version. * - * @return the subscriptionId value. + * @return the apiVersion value. */ - public String getSubscriptionId() { - return this.subscriptionId; + public String getApiVersion() { + return this.apiVersion; } /** @@ -250,213 +223,213 @@ public Duration getDefaultPollInterval() { } /** - * The OperationsClient object to access its operations. + * The BackupShortTermRetentionPoliciesClient object to access its operations. */ - private final OperationsClient operations; + private final BackupShortTermRetentionPoliciesClient backupShortTermRetentionPolicies; /** - * Gets the OperationsClient object to access its operations. + * Gets the BackupShortTermRetentionPoliciesClient object to access its operations. * - * @return the OperationsClient object. + * @return the BackupShortTermRetentionPoliciesClient object. */ - public OperationsClient getOperations() { - return this.operations; + public BackupShortTermRetentionPoliciesClient getBackupShortTermRetentionPolicies() { + return this.backupShortTermRetentionPolicies; } /** - * The BackupShortTermRetentionPoliciesClient object to access its operations. + * The ServerBlobAuditingPoliciesClient object to access its operations. */ - private final BackupShortTermRetentionPoliciesClient backupShortTermRetentionPolicies; + private final ServerBlobAuditingPoliciesClient serverBlobAuditingPolicies; /** - * Gets the BackupShortTermRetentionPoliciesClient object to access its operations. + * Gets the ServerBlobAuditingPoliciesClient object to access its operations. * - * @return the BackupShortTermRetentionPoliciesClient object. + * @return the ServerBlobAuditingPoliciesClient object. */ - public BackupShortTermRetentionPoliciesClient getBackupShortTermRetentionPolicies() { - return this.backupShortTermRetentionPolicies; + public ServerBlobAuditingPoliciesClient getServerBlobAuditingPolicies() { + return this.serverBlobAuditingPolicies; } /** - * The DatabaseColumnsClient object to access its operations. + * The DatabaseBlobAuditingPoliciesClient object to access its operations. */ - private final DatabaseColumnsClient databaseColumns; + private final DatabaseBlobAuditingPoliciesClient databaseBlobAuditingPolicies; /** - * Gets the DatabaseColumnsClient object to access its operations. + * Gets the DatabaseBlobAuditingPoliciesClient object to access its operations. * - * @return the DatabaseColumnsClient object. + * @return the DatabaseBlobAuditingPoliciesClient object. */ - public DatabaseColumnsClient getDatabaseColumns() { - return this.databaseColumns; + public DatabaseBlobAuditingPoliciesClient getDatabaseBlobAuditingPolicies() { + return this.databaseBlobAuditingPolicies; } /** - * The RestorePointsClient object to access its operations. + * The ExtendedDatabaseBlobAuditingPoliciesClient object to access its operations. */ - private final RestorePointsClient restorePoints; + private final ExtendedDatabaseBlobAuditingPoliciesClient extendedDatabaseBlobAuditingPolicies; /** - * Gets the RestorePointsClient object to access its operations. + * Gets the ExtendedDatabaseBlobAuditingPoliciesClient object to access its operations. * - * @return the RestorePointsClient object. + * @return the ExtendedDatabaseBlobAuditingPoliciesClient object. */ - public RestorePointsClient getRestorePoints() { - return this.restorePoints; + public ExtendedDatabaseBlobAuditingPoliciesClient getExtendedDatabaseBlobAuditingPolicies() { + return this.extendedDatabaseBlobAuditingPolicies; } /** - * The SensitivityLabelsClient object to access its operations. + * The ExtendedServerBlobAuditingPoliciesClient object to access its operations. */ - private final SensitivityLabelsClient sensitivityLabels; + private final ExtendedServerBlobAuditingPoliciesClient extendedServerBlobAuditingPolicies; /** - * Gets the SensitivityLabelsClient object to access its operations. + * Gets the ExtendedServerBlobAuditingPoliciesClient object to access its operations. * - * @return the SensitivityLabelsClient object. + * @return the ExtendedServerBlobAuditingPoliciesClient object. */ - public SensitivityLabelsClient getSensitivityLabels() { - return this.sensitivityLabels; + public ExtendedServerBlobAuditingPoliciesClient getExtendedServerBlobAuditingPolicies() { + return this.extendedServerBlobAuditingPolicies; } /** - * The DatabasesClient object to access its operations. + * The DatabaseAdvancedThreatProtectionSettingsClient object to access its operations. */ - private final DatabasesClient databases; + private final DatabaseAdvancedThreatProtectionSettingsClient databaseAdvancedThreatProtectionSettings; /** - * Gets the DatabasesClient object to access its operations. + * Gets the DatabaseAdvancedThreatProtectionSettingsClient object to access its operations. * - * @return the DatabasesClient object. + * @return the DatabaseAdvancedThreatProtectionSettingsClient object. */ - public DatabasesClient getDatabases() { - return this.databases; + public DatabaseAdvancedThreatProtectionSettingsClient getDatabaseAdvancedThreatProtectionSettings() { + return this.databaseAdvancedThreatProtectionSettings; } /** - * The FirewallRulesClient object to access its operations. + * The DatabaseAdvisorsClient object to access its operations. */ - private final FirewallRulesClient firewallRules; + private final DatabaseAdvisorsClient databaseAdvisors; /** - * Gets the FirewallRulesClient object to access its operations. + * Gets the DatabaseAdvisorsClient object to access its operations. * - * @return the FirewallRulesClient object. + * @return the DatabaseAdvisorsClient object. */ - public FirewallRulesClient getFirewallRules() { - return this.firewallRules; + public DatabaseAdvisorsClient getDatabaseAdvisors() { + return this.databaseAdvisors; } /** - * The ReplicationLinksClient object to access its operations. + * The DatabaseAutomaticTuningsClient object to access its operations. */ - private final ReplicationLinksClient replicationLinks; + private final DatabaseAutomaticTuningsClient databaseAutomaticTunings; /** - * Gets the ReplicationLinksClient object to access its operations. + * Gets the DatabaseAutomaticTuningsClient object to access its operations. * - * @return the ReplicationLinksClient object. + * @return the DatabaseAutomaticTuningsClient object. */ - public ReplicationLinksClient getReplicationLinks() { - return this.replicationLinks; + public DatabaseAutomaticTuningsClient getDatabaseAutomaticTunings() { + return this.databaseAutomaticTunings; } /** - * The ServersClient object to access its operations. + * The DatabaseColumnsClient object to access its operations. */ - private final ServersClient servers; + private final DatabaseColumnsClient databaseColumns; /** - * Gets the ServersClient object to access its operations. + * Gets the DatabaseColumnsClient object to access its operations. * - * @return the ServersClient object. + * @return the DatabaseColumnsClient object. */ - public ServersClient getServers() { - return this.servers; + public DatabaseColumnsClient getDatabaseColumns() { + return this.databaseColumns; } /** - * The ServerBlobAuditingPoliciesClient object to access its operations. + * The DatabaseExtensionsOperationsClient object to access its operations. */ - private final ServerBlobAuditingPoliciesClient serverBlobAuditingPolicies; + private final DatabaseExtensionsOperationsClient databaseExtensionsOperations; /** - * Gets the ServerBlobAuditingPoliciesClient object to access its operations. + * Gets the DatabaseExtensionsOperationsClient object to access its operations. * - * @return the ServerBlobAuditingPoliciesClient object. + * @return the DatabaseExtensionsOperationsClient object. */ - public ServerBlobAuditingPoliciesClient getServerBlobAuditingPolicies() { - return this.serverBlobAuditingPolicies; + public DatabaseExtensionsOperationsClient getDatabaseExtensionsOperations() { + return this.databaseExtensionsOperations; } /** - * The DatabaseBlobAuditingPoliciesClient object to access its operations. + * The DatabaseOperationsClient object to access its operations. */ - private final DatabaseBlobAuditingPoliciesClient databaseBlobAuditingPolicies; + private final DatabaseOperationsClient databaseOperations; /** - * Gets the DatabaseBlobAuditingPoliciesClient object to access its operations. + * Gets the DatabaseOperationsClient object to access its operations. * - * @return the DatabaseBlobAuditingPoliciesClient object. + * @return the DatabaseOperationsClient object. */ - public DatabaseBlobAuditingPoliciesClient getDatabaseBlobAuditingPolicies() { - return this.databaseBlobAuditingPolicies; + public DatabaseOperationsClient getDatabaseOperations() { + return this.databaseOperations; } /** - * The ExtendedDatabaseBlobAuditingPoliciesClient object to access its operations. + * The DatabaseRecommendedActionsClient object to access its operations. */ - private final ExtendedDatabaseBlobAuditingPoliciesClient extendedDatabaseBlobAuditingPolicies; + private final DatabaseRecommendedActionsClient databaseRecommendedActions; /** - * Gets the ExtendedDatabaseBlobAuditingPoliciesClient object to access its operations. + * Gets the DatabaseRecommendedActionsClient object to access its operations. * - * @return the ExtendedDatabaseBlobAuditingPoliciesClient object. + * @return the DatabaseRecommendedActionsClient object. */ - public ExtendedDatabaseBlobAuditingPoliciesClient getExtendedDatabaseBlobAuditingPolicies() { - return this.extendedDatabaseBlobAuditingPolicies; + public DatabaseRecommendedActionsClient getDatabaseRecommendedActions() { + return this.databaseRecommendedActions; } /** - * The ExtendedServerBlobAuditingPoliciesClient object to access its operations. + * The DatabasesClient object to access its operations. */ - private final ExtendedServerBlobAuditingPoliciesClient extendedServerBlobAuditingPolicies; + private final DatabasesClient databases; /** - * Gets the ExtendedServerBlobAuditingPoliciesClient object to access its operations. + * Gets the DatabasesClient object to access its operations. * - * @return the ExtendedServerBlobAuditingPoliciesClient object. + * @return the DatabasesClient object. */ - public ExtendedServerBlobAuditingPoliciesClient getExtendedServerBlobAuditingPolicies() { - return this.extendedServerBlobAuditingPolicies; + public DatabasesClient getDatabases() { + return this.databases; } /** - * The ServerAdvisorsClient object to access its operations. + * The DatabaseSchemasClient object to access its operations. */ - private final ServerAdvisorsClient serverAdvisors; + private final DatabaseSchemasClient databaseSchemas; /** - * Gets the ServerAdvisorsClient object to access its operations. + * Gets the DatabaseSchemasClient object to access its operations. * - * @return the ServerAdvisorsClient object. + * @return the DatabaseSchemasClient object. */ - public ServerAdvisorsClient getServerAdvisors() { - return this.serverAdvisors; + public DatabaseSchemasClient getDatabaseSchemas() { + return this.databaseSchemas; } /** - * The ManagedDatabaseColumnsClient object to access its operations. + * The DatabaseSecurityAlertPoliciesClient object to access its operations. */ - private final ManagedDatabaseColumnsClient managedDatabaseColumns; + private final DatabaseSecurityAlertPoliciesClient databaseSecurityAlertPolicies; /** - * Gets the ManagedDatabaseColumnsClient object to access its operations. + * Gets the DatabaseSecurityAlertPoliciesClient object to access its operations. * - * @return the ManagedDatabaseColumnsClient object. + * @return the DatabaseSecurityAlertPoliciesClient object. */ - public ManagedDatabaseColumnsClient getManagedDatabaseColumns() { - return this.managedDatabaseColumns; + public DatabaseSecurityAlertPoliciesClient getDatabaseSecurityAlertPolicies() { + return this.databaseSecurityAlertPolicies; } /** @@ -474,256 +447,101 @@ public DatabaseTablesClient getDatabaseTables() { } /** - * The ManagedDatabaseTablesClient object to access its operations. + * The DatabaseUsagesClient object to access its operations. */ - private final ManagedDatabaseTablesClient managedDatabaseTables; + private final DatabaseUsagesClient databaseUsages; /** - * Gets the ManagedDatabaseTablesClient object to access its operations. + * Gets the DatabaseUsagesClient object to access its operations. * - * @return the ManagedDatabaseTablesClient object. + * @return the DatabaseUsagesClient object. */ - public ManagedDatabaseTablesClient getManagedDatabaseTables() { - return this.managedDatabaseTables; + public DatabaseUsagesClient getDatabaseUsages() { + return this.databaseUsages; } /** - * The DatabaseSchemasClient object to access its operations. + * The DatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. */ - private final DatabaseSchemasClient databaseSchemas; + private final DatabaseVulnerabilityAssessmentRuleBaselinesClient databaseVulnerabilityAssessmentRuleBaselines; /** - * Gets the DatabaseSchemasClient object to access its operations. + * Gets the DatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. * - * @return the DatabaseSchemasClient object. + * @return the DatabaseVulnerabilityAssessmentRuleBaselinesClient object. */ - public DatabaseSchemasClient getDatabaseSchemas() { - return this.databaseSchemas; + public DatabaseVulnerabilityAssessmentRuleBaselinesClient getDatabaseVulnerabilityAssessmentRuleBaselines() { + return this.databaseVulnerabilityAssessmentRuleBaselines; } /** - * The ManagedDatabaseSchemasClient object to access its operations. + * The DatabaseVulnerabilityAssessmentsClient object to access its operations. */ - private final ManagedDatabaseSchemasClient managedDatabaseSchemas; + private final DatabaseVulnerabilityAssessmentsClient databaseVulnerabilityAssessments; /** - * Gets the ManagedDatabaseSchemasClient object to access its operations. + * Gets the DatabaseVulnerabilityAssessmentsClient object to access its operations. * - * @return the ManagedDatabaseSchemasClient object. + * @return the DatabaseVulnerabilityAssessmentsClient object. */ - public ManagedDatabaseSchemasClient getManagedDatabaseSchemas() { - return this.managedDatabaseSchemas; - } - - /** - * The DatabaseSecurityAlertPoliciesClient object to access its operations. - */ - private final DatabaseSecurityAlertPoliciesClient databaseSecurityAlertPolicies; - - /** - * Gets the DatabaseSecurityAlertPoliciesClient object to access its operations. - * - * @return the DatabaseSecurityAlertPoliciesClient object. - */ - public DatabaseSecurityAlertPoliciesClient getDatabaseSecurityAlertPolicies() { - return this.databaseSecurityAlertPolicies; - } - - /** - * The SqlVulnerabilityAssessmentBaselinesClient object to access its operations. - */ - private final SqlVulnerabilityAssessmentBaselinesClient sqlVulnerabilityAssessmentBaselines; - - /** - * Gets the SqlVulnerabilityAssessmentBaselinesClient object to access its operations. - * - * @return the SqlVulnerabilityAssessmentBaselinesClient object. - */ - public SqlVulnerabilityAssessmentBaselinesClient getSqlVulnerabilityAssessmentBaselines() { - return this.sqlVulnerabilityAssessmentBaselines; - } - - /** - * The SqlVulnerabilityAssessmentsClient object to access its operations. - */ - private final SqlVulnerabilityAssessmentsClient sqlVulnerabilityAssessments; - - /** - * Gets the SqlVulnerabilityAssessmentsClient object to access its operations. - * - * @return the SqlVulnerabilityAssessmentsClient object. - */ - public SqlVulnerabilityAssessmentsClient getSqlVulnerabilityAssessments() { - return this.sqlVulnerabilityAssessments; - } - - /** - * The SqlVulnerabilityAssessmentsSettingsClient object to access its operations. - */ - private final SqlVulnerabilityAssessmentsSettingsClient sqlVulnerabilityAssessmentsSettings; - - /** - * Gets the SqlVulnerabilityAssessmentsSettingsClient object to access its operations. - * - * @return the SqlVulnerabilityAssessmentsSettingsClient object. - */ - public SqlVulnerabilityAssessmentsSettingsClient getSqlVulnerabilityAssessmentsSettings() { - return this.sqlVulnerabilityAssessmentsSettings; - } - - /** - * The DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient object to access its operations. - */ - private final DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient databaseSqlVulnerabilityAssessmentRuleBaselines; - - /** - * Gets the DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient object to access its operations. - * - * @return the DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient object. - */ - public DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient getDatabaseSqlVulnerabilityAssessmentRuleBaselines() { - return this.databaseSqlVulnerabilityAssessmentRuleBaselines; - } - - /** - * The SqlVulnerabilityAssessmentRuleBaselinesClient object to access its operations. - */ - private final SqlVulnerabilityAssessmentRuleBaselinesClient sqlVulnerabilityAssessmentRuleBaselines; - - /** - * Gets the SqlVulnerabilityAssessmentRuleBaselinesClient object to access its operations. - * - * @return the SqlVulnerabilityAssessmentRuleBaselinesClient object. - */ - public SqlVulnerabilityAssessmentRuleBaselinesClient getSqlVulnerabilityAssessmentRuleBaselines() { - return this.sqlVulnerabilityAssessmentRuleBaselines; - } - - /** - * The DatabaseSqlVulnerabilityAssessmentScanResultsClient object to access its operations. - */ - private final DatabaseSqlVulnerabilityAssessmentScanResultsClient databaseSqlVulnerabilityAssessmentScanResults; - - /** - * Gets the DatabaseSqlVulnerabilityAssessmentScanResultsClient object to access its operations. - * - * @return the DatabaseSqlVulnerabilityAssessmentScanResultsClient object. - */ - public DatabaseSqlVulnerabilityAssessmentScanResultsClient getDatabaseSqlVulnerabilityAssessmentScanResults() { - return this.databaseSqlVulnerabilityAssessmentScanResults; - } - - /** - * The SqlVulnerabilityAssessmentScanResultOperationsClient object to access its operations. - */ - private final SqlVulnerabilityAssessmentScanResultOperationsClient sqlVulnerabilityAssessmentScanResultOperations; - - /** - * Gets the SqlVulnerabilityAssessmentScanResultOperationsClient object to access its operations. - * - * @return the SqlVulnerabilityAssessmentScanResultOperationsClient object. - */ - public SqlVulnerabilityAssessmentScanResultOperationsClient getSqlVulnerabilityAssessmentScanResultOperations() { - return this.sqlVulnerabilityAssessmentScanResultOperations; - } - - /** - * The SqlVulnerabilityAssessmentScansClient object to access its operations. - */ - private final SqlVulnerabilityAssessmentScansClient sqlVulnerabilityAssessmentScans; - - /** - * Gets the SqlVulnerabilityAssessmentScansClient object to access its operations. - * - * @return the SqlVulnerabilityAssessmentScansClient object. - */ - public SqlVulnerabilityAssessmentScansClient getSqlVulnerabilityAssessmentScans() { - return this.sqlVulnerabilityAssessmentScans; - } - - /** - * The DatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. - */ - private final DatabaseVulnerabilityAssessmentRuleBaselinesClient databaseVulnerabilityAssessmentRuleBaselines; - - /** - * Gets the DatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. - * - * @return the DatabaseVulnerabilityAssessmentRuleBaselinesClient object. - */ - public DatabaseVulnerabilityAssessmentRuleBaselinesClient getDatabaseVulnerabilityAssessmentRuleBaselines() { - return this.databaseVulnerabilityAssessmentRuleBaselines; - } - - /** - * The ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. - */ - private final ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient managedDatabaseVulnerabilityAssessmentRuleBaselines; - - /** - * Gets the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. - * - * @return the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient object. - */ - public ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient - getManagedDatabaseVulnerabilityAssessmentRuleBaselines() { - return this.managedDatabaseVulnerabilityAssessmentRuleBaselines; + public DatabaseVulnerabilityAssessmentsClient getDatabaseVulnerabilityAssessments() { + return this.databaseVulnerabilityAssessments; } /** - * The DatabaseVulnerabilityAssessmentsClient object to access its operations. + * The DatabaseVulnerabilityAssessmentScansClient object to access its operations. */ - private final DatabaseVulnerabilityAssessmentsClient databaseVulnerabilityAssessments; + private final DatabaseVulnerabilityAssessmentScansClient databaseVulnerabilityAssessmentScans; /** - * Gets the DatabaseVulnerabilityAssessmentsClient object to access its operations. + * Gets the DatabaseVulnerabilityAssessmentScansClient object to access its operations. * - * @return the DatabaseVulnerabilityAssessmentsClient object. + * @return the DatabaseVulnerabilityAssessmentScansClient object. */ - public DatabaseVulnerabilityAssessmentsClient getDatabaseVulnerabilityAssessments() { - return this.databaseVulnerabilityAssessments; + public DatabaseVulnerabilityAssessmentScansClient getDatabaseVulnerabilityAssessmentScans() { + return this.databaseVulnerabilityAssessmentScans; } /** - * The ManagedDatabaseVulnerabilityAssessmentsClient object to access its operations. + * The DataMaskingPoliciesClient object to access its operations. */ - private final ManagedDatabaseVulnerabilityAssessmentsClient managedDatabaseVulnerabilityAssessments; + private final DataMaskingPoliciesClient dataMaskingPolicies; /** - * Gets the ManagedDatabaseVulnerabilityAssessmentsClient object to access its operations. + * Gets the DataMaskingPoliciesClient object to access its operations. * - * @return the ManagedDatabaseVulnerabilityAssessmentsClient object. + * @return the DataMaskingPoliciesClient object. */ - public ManagedDatabaseVulnerabilityAssessmentsClient getManagedDatabaseVulnerabilityAssessments() { - return this.managedDatabaseVulnerabilityAssessments; + public DataMaskingPoliciesClient getDataMaskingPolicies() { + return this.dataMaskingPolicies; } /** - * The ManagedDatabaseVulnerabilityAssessmentScansClient object to access its operations. + * The DataMaskingRulesClient object to access its operations. */ - private final ManagedDatabaseVulnerabilityAssessmentScansClient managedDatabaseVulnerabilityAssessmentScans; + private final DataMaskingRulesClient dataMaskingRules; /** - * Gets the ManagedDatabaseVulnerabilityAssessmentScansClient object to access its operations. + * Gets the DataMaskingRulesClient object to access its operations. * - * @return the ManagedDatabaseVulnerabilityAssessmentScansClient object. + * @return the DataMaskingRulesClient object. */ - public ManagedDatabaseVulnerabilityAssessmentScansClient getManagedDatabaseVulnerabilityAssessmentScans() { - return this.managedDatabaseVulnerabilityAssessmentScans; + public DataMaskingRulesClient getDataMaskingRules() { + return this.dataMaskingRules; } /** - * The DataMaskingPoliciesClient object to access its operations. + * The DataWarehouseUserActivitiesOperationsClient object to access its operations. */ - private final DataMaskingPoliciesClient dataMaskingPolicies; + private final DataWarehouseUserActivitiesOperationsClient dataWarehouseUserActivitiesOperations; /** - * Gets the DataMaskingPoliciesClient object to access its operations. + * Gets the DataWarehouseUserActivitiesOperationsClient object to access its operations. * - * @return the DataMaskingPoliciesClient object. + * @return the DataWarehouseUserActivitiesOperationsClient object. */ - public DataMaskingPoliciesClient getDataMaskingPolicies() { - return this.dataMaskingPolicies; + public DataWarehouseUserActivitiesOperationsClient getDataWarehouseUserActivitiesOperations() { + return this.dataWarehouseUserActivitiesOperations; } /** @@ -755,45 +573,17 @@ public DistributedAvailabilityGroupsClient getDistributedAvailabilityGroups() { } /** - * The ManagedDatabasesClient object to access its operations. - */ - private final ManagedDatabasesClient managedDatabases; - - /** - * Gets the ManagedDatabasesClient object to access its operations. - * - * @return the ManagedDatabasesClient object. - */ - public ManagedDatabasesClient getManagedDatabases() { - return this.managedDatabases; - } - - /** - * The ServerTrustGroupsClient object to access its operations. - */ - private final ServerTrustGroupsClient serverTrustGroups; - - /** - * Gets the ServerTrustGroupsClient object to access its operations. - * - * @return the ServerTrustGroupsClient object. - */ - public ServerTrustGroupsClient getServerTrustGroups() { - return this.serverTrustGroups; - } - - /** - * The ManagedInstancesClient object to access its operations. + * The ElasticPoolOperationsClient object to access its operations. */ - private final ManagedInstancesClient managedInstances; + private final ElasticPoolOperationsClient elasticPoolOperations; /** - * Gets the ManagedInstancesClient object to access its operations. + * Gets the ElasticPoolOperationsClient object to access its operations. * - * @return the ManagedInstancesClient object. + * @return the ElasticPoolOperationsClient object. */ - public ManagedInstancesClient getManagedInstances() { - return this.managedInstances; + public ElasticPoolOperationsClient getElasticPoolOperations() { + return this.elasticPoolOperations; } /** @@ -852,6 +642,20 @@ public FailoverGroupsClient getFailoverGroups() { return this.failoverGroups; } + /** + * The FirewallRulesClient object to access its operations. + */ + private final FirewallRulesClient firewallRules; + + /** + * Gets the FirewallRulesClient object to access its operations. + * + * @return the FirewallRulesClient object. + */ + public FirewallRulesClient getFirewallRules() { + return this.firewallRules; + } + /** * The GeoBackupPoliciesClient object to access its operations. */ @@ -880,20 +684,6 @@ public InstanceFailoverGroupsClient getInstanceFailoverGroups() { return this.instanceFailoverGroups; } - /** - * The InstancePoolOperationsClient object to access its operations. - */ - private final InstancePoolOperationsClient instancePoolOperations; - - /** - * Gets the InstancePoolOperationsClient object to access its operations. - * - * @return the InstancePoolOperationsClient object. - */ - public InstancePoolOperationsClient getInstancePoolOperations() { - return this.instancePoolOperations; - } - /** * The InstancePoolsClient object to access its operations. */ @@ -922,20 +712,6 @@ public IPv6FirewallRulesClient getIPv6FirewallRules() { return this.iPv6FirewallRules; } - /** - * The JobExecutionsClient object to access its operations. - */ - private final JobExecutionsClient jobExecutions; - - /** - * Gets the JobExecutionsClient object to access its operations. - * - * @return the JobExecutionsClient object. - */ - public JobExecutionsClient getJobExecutions() { - return this.jobExecutions; - } - /** * The JobAgentsClient object to access its operations. */ @@ -965,59 +741,45 @@ public JobCredentialsClient getJobCredentials() { } /** - * The JobStepExecutionsClient object to access its operations. + * The JobExecutionsClient object to access its operations. */ - private final JobStepExecutionsClient jobStepExecutions; + private final JobExecutionsClient jobExecutions; /** - * Gets the JobStepExecutionsClient object to access its operations. + * Gets the JobExecutionsClient object to access its operations. * - * @return the JobStepExecutionsClient object. + * @return the JobExecutionsClient object. */ - public JobStepExecutionsClient getJobStepExecutions() { - return this.jobStepExecutions; + public JobExecutionsClient getJobExecutions() { + return this.jobExecutions; } /** - * The JobTargetExecutionsClient object to access its operations. + * The JobsClient object to access its operations. */ - private final JobTargetExecutionsClient jobTargetExecutions; + private final JobsClient jobs; /** - * Gets the JobTargetExecutionsClient object to access its operations. + * Gets the JobsClient object to access its operations. * - * @return the JobTargetExecutionsClient object. - */ - public JobTargetExecutionsClient getJobTargetExecutions() { - return this.jobTargetExecutions; - } - - /** - * The JobsClient object to access its operations. - */ - private final JobsClient jobs; - - /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. + * @return the JobsClient object. */ public JobsClient getJobs() { return this.jobs; } /** - * The JobPrivateEndpointsClient object to access its operations. + * The JobStepExecutionsClient object to access its operations. */ - private final JobPrivateEndpointsClient jobPrivateEndpoints; + private final JobStepExecutionsClient jobStepExecutions; /** - * Gets the JobPrivateEndpointsClient object to access its operations. + * Gets the JobStepExecutionsClient object to access its operations. * - * @return the JobPrivateEndpointsClient object. + * @return the JobStepExecutionsClient object. */ - public JobPrivateEndpointsClient getJobPrivateEndpoints() { - return this.jobPrivateEndpoints; + public JobStepExecutionsClient getJobStepExecutions() { + return this.jobStepExecutions; } /** @@ -1034,6 +796,20 @@ public JobStepsClient getJobSteps() { return this.jobSteps; } + /** + * The JobTargetExecutionsClient object to access its operations. + */ + private final JobTargetExecutionsClient jobTargetExecutions; + + /** + * Gets the JobTargetExecutionsClient object to access its operations. + * + * @return the JobTargetExecutionsClient object. + */ + public JobTargetExecutionsClient getJobTargetExecutions() { + return this.jobTargetExecutions; + } + /** * The JobTargetGroupsClient object to access its operations. */ @@ -1062,6 +838,34 @@ public JobVersionsClient getJobVersions() { return this.jobVersions; } + /** + * The LedgerDigestUploadsOperationsClient object to access its operations. + */ + private final LedgerDigestUploadsOperationsClient ledgerDigestUploadsOperations; + + /** + * Gets the LedgerDigestUploadsOperationsClient object to access its operations. + * + * @return the LedgerDigestUploadsOperationsClient object. + */ + public LedgerDigestUploadsOperationsClient getLedgerDigestUploadsOperations() { + return this.ledgerDigestUploadsOperations; + } + + /** + * The CapabilitiesClient object to access its operations. + */ + private final CapabilitiesClient capabilities; + + /** + * Gets the CapabilitiesClient object to access its operations. + * + * @return the CapabilitiesClient object. + */ + public CapabilitiesClient getCapabilities() { + return this.capabilities; + } + /** * The LongTermRetentionBackupsClient object to access its operations. */ @@ -1105,1223 +909,1013 @@ public LongTermRetentionPoliciesClient getLongTermRetentionPolicies() { } /** - * The ManagedBackupShortTermRetentionPoliciesClient object to access its operations. + * The MaintenanceWindowOptionsOperationsClient object to access its operations. */ - private final ManagedBackupShortTermRetentionPoliciesClient managedBackupShortTermRetentionPolicies; + private final MaintenanceWindowOptionsOperationsClient maintenanceWindowOptionsOperations; /** - * Gets the ManagedBackupShortTermRetentionPoliciesClient object to access its operations. + * Gets the MaintenanceWindowOptionsOperationsClient object to access its operations. * - * @return the ManagedBackupShortTermRetentionPoliciesClient object. + * @return the MaintenanceWindowOptionsOperationsClient object. */ - public ManagedBackupShortTermRetentionPoliciesClient getManagedBackupShortTermRetentionPolicies() { - return this.managedBackupShortTermRetentionPolicies; + public MaintenanceWindowOptionsOperationsClient getMaintenanceWindowOptionsOperations() { + return this.maintenanceWindowOptionsOperations; } /** - * The ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient object to access its operations. + * The MaintenanceWindowsOperationsClient object to access its operations. */ - private final ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies; + private final MaintenanceWindowsOperationsClient maintenanceWindowsOperations; /** - * Gets the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient object to access its operations. + * Gets the MaintenanceWindowsOperationsClient object to access its operations. * - * @return the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient object. + * @return the MaintenanceWindowsOperationsClient object. */ - public ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient - getManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies() { - return this.managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies; + public MaintenanceWindowsOperationsClient getMaintenanceWindowsOperations() { + return this.maintenanceWindowsOperations; } /** - * The ManagedDatabaseSecurityAlertPoliciesClient object to access its operations. + * The ManagedBackupShortTermRetentionPoliciesClient object to access its operations. */ - private final ManagedDatabaseSecurityAlertPoliciesClient managedDatabaseSecurityAlertPolicies; + private final ManagedBackupShortTermRetentionPoliciesClient managedBackupShortTermRetentionPolicies; /** - * Gets the ManagedDatabaseSecurityAlertPoliciesClient object to access its operations. + * Gets the ManagedBackupShortTermRetentionPoliciesClient object to access its operations. * - * @return the ManagedDatabaseSecurityAlertPoliciesClient object. + * @return the ManagedBackupShortTermRetentionPoliciesClient object. */ - public ManagedDatabaseSecurityAlertPoliciesClient getManagedDatabaseSecurityAlertPolicies() { - return this.managedDatabaseSecurityAlertPolicies; + public ManagedBackupShortTermRetentionPoliciesClient getManagedBackupShortTermRetentionPolicies() { + return this.managedBackupShortTermRetentionPolicies; } /** - * The ManagedInstanceAdministratorsClient object to access its operations. + * The ManagedDatabaseColumnsClient object to access its operations. */ - private final ManagedInstanceAdministratorsClient managedInstanceAdministrators; + private final ManagedDatabaseColumnsClient managedDatabaseColumns; /** - * Gets the ManagedInstanceAdministratorsClient object to access its operations. + * Gets the ManagedDatabaseColumnsClient object to access its operations. * - * @return the ManagedInstanceAdministratorsClient object. + * @return the ManagedDatabaseColumnsClient object. */ - public ManagedInstanceAdministratorsClient getManagedInstanceAdministrators() { - return this.managedInstanceAdministrators; + public ManagedDatabaseColumnsClient getManagedDatabaseColumns() { + return this.managedDatabaseColumns; } /** - * The ManagedInstanceAzureADOnlyAuthenticationsClient object to access its operations. + * The ManagedDatabaseQueriesClient object to access its operations. */ - private final ManagedInstanceAzureADOnlyAuthenticationsClient managedInstanceAzureADOnlyAuthentications; + private final ManagedDatabaseQueriesClient managedDatabaseQueries; /** - * Gets the ManagedInstanceAzureADOnlyAuthenticationsClient object to access its operations. + * Gets the ManagedDatabaseQueriesClient object to access its operations. * - * @return the ManagedInstanceAzureADOnlyAuthenticationsClient object. + * @return the ManagedDatabaseQueriesClient object. */ - public ManagedInstanceAzureADOnlyAuthenticationsClient getManagedInstanceAzureADOnlyAuthentications() { - return this.managedInstanceAzureADOnlyAuthentications; + public ManagedDatabaseQueriesClient getManagedDatabaseQueries() { + return this.managedDatabaseQueries; } /** - * The ManagedInstanceDtcsClient object to access its operations. + * The ManagedDatabaseRestoreDetailsClient object to access its operations. */ - private final ManagedInstanceDtcsClient managedInstanceDtcs; + private final ManagedDatabaseRestoreDetailsClient managedDatabaseRestoreDetails; /** - * Gets the ManagedInstanceDtcsClient object to access its operations. + * Gets the ManagedDatabaseRestoreDetailsClient object to access its operations. * - * @return the ManagedInstanceDtcsClient object. + * @return the ManagedDatabaseRestoreDetailsClient object. */ - public ManagedInstanceDtcsClient getManagedInstanceDtcs() { - return this.managedInstanceDtcs; + public ManagedDatabaseRestoreDetailsClient getManagedDatabaseRestoreDetails() { + return this.managedDatabaseRestoreDetails; } /** - * The ManagedInstanceEncryptionProtectorsClient object to access its operations. + * The ManagedDatabasesClient object to access its operations. */ - private final ManagedInstanceEncryptionProtectorsClient managedInstanceEncryptionProtectors; + private final ManagedDatabasesClient managedDatabases; /** - * Gets the ManagedInstanceEncryptionProtectorsClient object to access its operations. + * Gets the ManagedDatabasesClient object to access its operations. * - * @return the ManagedInstanceEncryptionProtectorsClient object. + * @return the ManagedDatabasesClient object. */ - public ManagedInstanceEncryptionProtectorsClient getManagedInstanceEncryptionProtectors() { - return this.managedInstanceEncryptionProtectors; + public ManagedDatabasesClient getManagedDatabases() { + return this.managedDatabases; } /** - * The ManagedInstanceKeysClient object to access its operations. + * The ManagedDatabaseSchemasClient object to access its operations. */ - private final ManagedInstanceKeysClient managedInstanceKeys; + private final ManagedDatabaseSchemasClient managedDatabaseSchemas; /** - * Gets the ManagedInstanceKeysClient object to access its operations. + * Gets the ManagedDatabaseSchemasClient object to access its operations. * - * @return the ManagedInstanceKeysClient object. + * @return the ManagedDatabaseSchemasClient object. */ - public ManagedInstanceKeysClient getManagedInstanceKeys() { - return this.managedInstanceKeys; + public ManagedDatabaseSchemasClient getManagedDatabaseSchemas() { + return this.managedDatabaseSchemas; } /** - * The ManagedInstanceLongTermRetentionPoliciesClient object to access its operations. + * The ManagedDatabaseSecurityAlertPoliciesClient object to access its operations. */ - private final ManagedInstanceLongTermRetentionPoliciesClient managedInstanceLongTermRetentionPolicies; + private final ManagedDatabaseSecurityAlertPoliciesClient managedDatabaseSecurityAlertPolicies; /** - * Gets the ManagedInstanceLongTermRetentionPoliciesClient object to access its operations. + * Gets the ManagedDatabaseSecurityAlertPoliciesClient object to access its operations. * - * @return the ManagedInstanceLongTermRetentionPoliciesClient object. + * @return the ManagedDatabaseSecurityAlertPoliciesClient object. */ - public ManagedInstanceLongTermRetentionPoliciesClient getManagedInstanceLongTermRetentionPolicies() { - return this.managedInstanceLongTermRetentionPolicies; + public ManagedDatabaseSecurityAlertPoliciesClient getManagedDatabaseSecurityAlertPolicies() { + return this.managedDatabaseSecurityAlertPolicies; } /** - * The ManagedInstanceOperationsClient object to access its operations. + * The ManagedDatabaseSecurityEventsClient object to access its operations. */ - private final ManagedInstanceOperationsClient managedInstanceOperations; + private final ManagedDatabaseSecurityEventsClient managedDatabaseSecurityEvents; /** - * Gets the ManagedInstanceOperationsClient object to access its operations. + * Gets the ManagedDatabaseSecurityEventsClient object to access its operations. * - * @return the ManagedInstanceOperationsClient object. + * @return the ManagedDatabaseSecurityEventsClient object. */ - public ManagedInstanceOperationsClient getManagedInstanceOperations() { - return this.managedInstanceOperations; + public ManagedDatabaseSecurityEventsClient getManagedDatabaseSecurityEvents() { + return this.managedDatabaseSecurityEvents; } /** - * The ManagedInstancePrivateEndpointConnectionsClient object to access its operations. + * The ManagedDatabaseSensitivityLabelsClient object to access its operations. */ - private final ManagedInstancePrivateEndpointConnectionsClient managedInstancePrivateEndpointConnections; + private final ManagedDatabaseSensitivityLabelsClient managedDatabaseSensitivityLabels; /** - * Gets the ManagedInstancePrivateEndpointConnectionsClient object to access its operations. + * Gets the ManagedDatabaseSensitivityLabelsClient object to access its operations. * - * @return the ManagedInstancePrivateEndpointConnectionsClient object. + * @return the ManagedDatabaseSensitivityLabelsClient object. */ - public ManagedInstancePrivateEndpointConnectionsClient getManagedInstancePrivateEndpointConnections() { - return this.managedInstancePrivateEndpointConnections; + public ManagedDatabaseSensitivityLabelsClient getManagedDatabaseSensitivityLabels() { + return this.managedDatabaseSensitivityLabels; } /** - * The ManagedInstanceVulnerabilityAssessmentsClient object to access its operations. + * The ManagedDatabaseRecommendedSensitivityLabelsClient object to access its operations. */ - private final ManagedInstanceVulnerabilityAssessmentsClient managedInstanceVulnerabilityAssessments; + private final ManagedDatabaseRecommendedSensitivityLabelsClient managedDatabaseRecommendedSensitivityLabels; /** - * Gets the ManagedInstanceVulnerabilityAssessmentsClient object to access its operations. + * Gets the ManagedDatabaseRecommendedSensitivityLabelsClient object to access its operations. * - * @return the ManagedInstanceVulnerabilityAssessmentsClient object. + * @return the ManagedDatabaseRecommendedSensitivityLabelsClient object. */ - public ManagedInstanceVulnerabilityAssessmentsClient getManagedInstanceVulnerabilityAssessments() { - return this.managedInstanceVulnerabilityAssessments; + public ManagedDatabaseRecommendedSensitivityLabelsClient getManagedDatabaseRecommendedSensitivityLabels() { + return this.managedDatabaseRecommendedSensitivityLabels; } /** - * The ManagedServerDnsAliasesClient object to access its operations. + * The ManagedDatabaseTablesClient object to access its operations. */ - private final ManagedServerDnsAliasesClient managedServerDnsAliases; + private final ManagedDatabaseTablesClient managedDatabaseTables; /** - * Gets the ManagedServerDnsAliasesClient object to access its operations. + * Gets the ManagedDatabaseTablesClient object to access its operations. * - * @return the ManagedServerDnsAliasesClient object. + * @return the ManagedDatabaseTablesClient object. */ - public ManagedServerDnsAliasesClient getManagedServerDnsAliases() { - return this.managedServerDnsAliases; + public ManagedDatabaseTablesClient getManagedDatabaseTables() { + return this.managedDatabaseTables; } /** - * The ManagedServerSecurityAlertPoliciesClient object to access its operations. + * The ManagedDatabaseTransparentDataEncryptionsClient object to access its operations. */ - private final ManagedServerSecurityAlertPoliciesClient managedServerSecurityAlertPolicies; + private final ManagedDatabaseTransparentDataEncryptionsClient managedDatabaseTransparentDataEncryptions; /** - * Gets the ManagedServerSecurityAlertPoliciesClient object to access its operations. + * Gets the ManagedDatabaseTransparentDataEncryptionsClient object to access its operations. * - * @return the ManagedServerSecurityAlertPoliciesClient object. + * @return the ManagedDatabaseTransparentDataEncryptionsClient object. */ - public ManagedServerSecurityAlertPoliciesClient getManagedServerSecurityAlertPolicies() { - return this.managedServerSecurityAlertPolicies; + public ManagedDatabaseTransparentDataEncryptionsClient getManagedDatabaseTransparentDataEncryptions() { + return this.managedDatabaseTransparentDataEncryptions; } /** - * The NetworkSecurityPerimeterConfigurationsClient object to access its operations. + * The ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. */ - private final NetworkSecurityPerimeterConfigurationsClient networkSecurityPerimeterConfigurations; + private final ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient managedDatabaseVulnerabilityAssessmentRuleBaselines; /** - * Gets the NetworkSecurityPerimeterConfigurationsClient object to access its operations. + * Gets the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient object to access its operations. * - * @return the NetworkSecurityPerimeterConfigurationsClient object. + * @return the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient object. */ - public NetworkSecurityPerimeterConfigurationsClient getNetworkSecurityPerimeterConfigurations() { - return this.networkSecurityPerimeterConfigurations; + public ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient + getManagedDatabaseVulnerabilityAssessmentRuleBaselines() { + return this.managedDatabaseVulnerabilityAssessmentRuleBaselines; } /** - * The OutboundFirewallRulesClient object to access its operations. + * The ManagedDatabaseVulnerabilityAssessmentsClient object to access its operations. */ - private final OutboundFirewallRulesClient outboundFirewallRules; + private final ManagedDatabaseVulnerabilityAssessmentsClient managedDatabaseVulnerabilityAssessments; /** - * Gets the OutboundFirewallRulesClient object to access its operations. + * Gets the ManagedDatabaseVulnerabilityAssessmentsClient object to access its operations. * - * @return the OutboundFirewallRulesClient object. + * @return the ManagedDatabaseVulnerabilityAssessmentsClient object. */ - public OutboundFirewallRulesClient getOutboundFirewallRules() { - return this.outboundFirewallRules; + public ManagedDatabaseVulnerabilityAssessmentsClient getManagedDatabaseVulnerabilityAssessments() { + return this.managedDatabaseVulnerabilityAssessments; } /** - * The PrivateEndpointConnectionsClient object to access its operations. + * The ManagedDatabaseVulnerabilityAssessmentScansClient object to access its operations. */ - private final PrivateEndpointConnectionsClient privateEndpointConnections; + private final ManagedDatabaseVulnerabilityAssessmentScansClient managedDatabaseVulnerabilityAssessmentScans; /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. + * Gets the ManagedDatabaseVulnerabilityAssessmentScansClient object to access its operations. * - * @return the PrivateEndpointConnectionsClient object. + * @return the ManagedDatabaseVulnerabilityAssessmentScansClient object. */ - public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { - return this.privateEndpointConnections; + public ManagedDatabaseVulnerabilityAssessmentScansClient getManagedDatabaseVulnerabilityAssessmentScans() { + return this.managedDatabaseVulnerabilityAssessmentScans; } /** - * The PrivateLinkResourcesClient object to access its operations. + * The ManagedInstanceAdministratorsClient object to access its operations. */ - private final PrivateLinkResourcesClient privateLinkResources; - - /** - * Gets the PrivateLinkResourcesClient object to access its operations. - * - * @return the PrivateLinkResourcesClient object. - */ - public PrivateLinkResourcesClient getPrivateLinkResources() { - return this.privateLinkResources; - } - - /** - * The RecoverableDatabasesClient object to access its operations. - */ - private final RecoverableDatabasesClient recoverableDatabases; - - /** - * Gets the RecoverableDatabasesClient object to access its operations. - * - * @return the RecoverableDatabasesClient object. - */ - public RecoverableDatabasesClient getRecoverableDatabases() { - return this.recoverableDatabases; - } - - /** - * The RecoverableManagedDatabasesClient object to access its operations. - */ - private final RecoverableManagedDatabasesClient recoverableManagedDatabases; - - /** - * Gets the RecoverableManagedDatabasesClient object to access its operations. - * - * @return the RecoverableManagedDatabasesClient object. - */ - public RecoverableManagedDatabasesClient getRecoverableManagedDatabases() { - return this.recoverableManagedDatabases; - } - - /** - * The RestorableDroppedDatabasesClient object to access its operations. - */ - private final RestorableDroppedDatabasesClient restorableDroppedDatabases; - - /** - * Gets the RestorableDroppedDatabasesClient object to access its operations. - * - * @return the RestorableDroppedDatabasesClient object. - */ - public RestorableDroppedDatabasesClient getRestorableDroppedDatabases() { - return this.restorableDroppedDatabases; - } - - /** - * The RestorableDroppedManagedDatabasesClient object to access its operations. - */ - private final RestorableDroppedManagedDatabasesClient restorableDroppedManagedDatabases; - - /** - * Gets the RestorableDroppedManagedDatabasesClient object to access its operations. - * - * @return the RestorableDroppedManagedDatabasesClient object. - */ - public RestorableDroppedManagedDatabasesClient getRestorableDroppedManagedDatabases() { - return this.restorableDroppedManagedDatabases; - } - - /** - * The ServerAzureADAdministratorsClient object to access its operations. - */ - private final ServerAzureADAdministratorsClient serverAzureADAdministrators; - - /** - * Gets the ServerAzureADAdministratorsClient object to access its operations. - * - * @return the ServerAzureADAdministratorsClient object. - */ - public ServerAzureADAdministratorsClient getServerAzureADAdministrators() { - return this.serverAzureADAdministrators; - } - - /** - * The ServerAzureADOnlyAuthenticationsClient object to access its operations. - */ - private final ServerAzureADOnlyAuthenticationsClient serverAzureADOnlyAuthentications; - - /** - * Gets the ServerAzureADOnlyAuthenticationsClient object to access its operations. - * - * @return the ServerAzureADOnlyAuthenticationsClient object. - */ - public ServerAzureADOnlyAuthenticationsClient getServerAzureADOnlyAuthentications() { - return this.serverAzureADOnlyAuthentications; - } - - /** - * The ServerConfigurationOptionsClient object to access its operations. - */ - private final ServerConfigurationOptionsClient serverConfigurationOptions; - - /** - * Gets the ServerConfigurationOptionsClient object to access its operations. - * - * @return the ServerConfigurationOptionsClient object. - */ - public ServerConfigurationOptionsClient getServerConfigurationOptions() { - return this.serverConfigurationOptions; - } - - /** - * The ServerConnectionPoliciesClient object to access its operations. - */ - private final ServerConnectionPoliciesClient serverConnectionPolicies; - - /** - * Gets the ServerConnectionPoliciesClient object to access its operations. - * - * @return the ServerConnectionPoliciesClient object. - */ - public ServerConnectionPoliciesClient getServerConnectionPolicies() { - return this.serverConnectionPolicies; - } - - /** - * The ServerDevOpsAuditSettingsClient object to access its operations. - */ - private final ServerDevOpsAuditSettingsClient serverDevOpsAuditSettings; - - /** - * Gets the ServerDevOpsAuditSettingsClient object to access its operations. - * - * @return the ServerDevOpsAuditSettingsClient object. - */ - public ServerDevOpsAuditSettingsClient getServerDevOpsAuditSettings() { - return this.serverDevOpsAuditSettings; - } - - /** - * The ServerDnsAliasesClient object to access its operations. - */ - private final ServerDnsAliasesClient serverDnsAliases; - - /** - * Gets the ServerDnsAliasesClient object to access its operations. - * - * @return the ServerDnsAliasesClient object. - */ - public ServerDnsAliasesClient getServerDnsAliases() { - return this.serverDnsAliases; - } - - /** - * The ServerKeysClient object to access its operations. - */ - private final ServerKeysClient serverKeys; - - /** - * Gets the ServerKeysClient object to access its operations. - * - * @return the ServerKeysClient object. - */ - public ServerKeysClient getServerKeys() { - return this.serverKeys; - } - - /** - * The ServerSecurityAlertPoliciesClient object to access its operations. - */ - private final ServerSecurityAlertPoliciesClient serverSecurityAlertPolicies; - - /** - * Gets the ServerSecurityAlertPoliciesClient object to access its operations. - * - * @return the ServerSecurityAlertPoliciesClient object. - */ - public ServerSecurityAlertPoliciesClient getServerSecurityAlertPolicies() { - return this.serverSecurityAlertPolicies; - } - - /** - * The ServerTrustCertificatesClient object to access its operations. - */ - private final ServerTrustCertificatesClient serverTrustCertificates; - - /** - * Gets the ServerTrustCertificatesClient object to access its operations. - * - * @return the ServerTrustCertificatesClient object. - */ - public ServerTrustCertificatesClient getServerTrustCertificates() { - return this.serverTrustCertificates; - } - - /** - * The ServerVulnerabilityAssessmentsClient object to access its operations. - */ - private final ServerVulnerabilityAssessmentsClient serverVulnerabilityAssessments; - - /** - * Gets the ServerVulnerabilityAssessmentsClient object to access its operations. - * - * @return the ServerVulnerabilityAssessmentsClient object. - */ - public ServerVulnerabilityAssessmentsClient getServerVulnerabilityAssessments() { - return this.serverVulnerabilityAssessments; - } - - /** - * The StartStopManagedInstanceSchedulesClient object to access its operations. - */ - private final StartStopManagedInstanceSchedulesClient startStopManagedInstanceSchedules; + private final ManagedInstanceAdministratorsClient managedInstanceAdministrators; /** - * Gets the StartStopManagedInstanceSchedulesClient object to access its operations. + * Gets the ManagedInstanceAdministratorsClient object to access its operations. * - * @return the StartStopManagedInstanceSchedulesClient object. + * @return the ManagedInstanceAdministratorsClient object. */ - public StartStopManagedInstanceSchedulesClient getStartStopManagedInstanceSchedules() { - return this.startStopManagedInstanceSchedules; + public ManagedInstanceAdministratorsClient getManagedInstanceAdministrators() { + return this.managedInstanceAdministrators; } /** - * The SubscriptionUsagesClient object to access its operations. + * The ManagedInstanceAzureADOnlyAuthenticationsClient object to access its operations. */ - private final SubscriptionUsagesClient subscriptionUsages; + private final ManagedInstanceAzureADOnlyAuthenticationsClient managedInstanceAzureADOnlyAuthentications; /** - * Gets the SubscriptionUsagesClient object to access its operations. + * Gets the ManagedInstanceAzureADOnlyAuthenticationsClient object to access its operations. * - * @return the SubscriptionUsagesClient object. + * @return the ManagedInstanceAzureADOnlyAuthenticationsClient object. */ - public SubscriptionUsagesClient getSubscriptionUsages() { - return this.subscriptionUsages; + public ManagedInstanceAzureADOnlyAuthenticationsClient getManagedInstanceAzureADOnlyAuthentications() { + return this.managedInstanceAzureADOnlyAuthentications; } /** - * The SyncAgentsClient object to access its operations. + * The ManagedInstanceEncryptionProtectorsClient object to access its operations. */ - private final SyncAgentsClient syncAgents; + private final ManagedInstanceEncryptionProtectorsClient managedInstanceEncryptionProtectors; /** - * Gets the SyncAgentsClient object to access its operations. + * Gets the ManagedInstanceEncryptionProtectorsClient object to access its operations. * - * @return the SyncAgentsClient object. + * @return the ManagedInstanceEncryptionProtectorsClient object. */ - public SyncAgentsClient getSyncAgents() { - return this.syncAgents; + public ManagedInstanceEncryptionProtectorsClient getManagedInstanceEncryptionProtectors() { + return this.managedInstanceEncryptionProtectors; } /** - * The SyncGroupsClient object to access its operations. + * The ManagedInstanceKeysClient object to access its operations. */ - private final SyncGroupsClient syncGroups; + private final ManagedInstanceKeysClient managedInstanceKeys; /** - * Gets the SyncGroupsClient object to access its operations. + * Gets the ManagedInstanceKeysClient object to access its operations. * - * @return the SyncGroupsClient object. + * @return the ManagedInstanceKeysClient object. */ - public SyncGroupsClient getSyncGroups() { - return this.syncGroups; + public ManagedInstanceKeysClient getManagedInstanceKeys() { + return this.managedInstanceKeys; } /** - * The SyncMembersClient object to access its operations. + * The ManagedInstanceLongTermRetentionPoliciesClient object to access its operations. */ - private final SyncMembersClient syncMembers; + private final ManagedInstanceLongTermRetentionPoliciesClient managedInstanceLongTermRetentionPolicies; /** - * Gets the SyncMembersClient object to access its operations. + * Gets the ManagedInstanceLongTermRetentionPoliciesClient object to access its operations. * - * @return the SyncMembersClient object. + * @return the ManagedInstanceLongTermRetentionPoliciesClient object. */ - public SyncMembersClient getSyncMembers() { - return this.syncMembers; + public ManagedInstanceLongTermRetentionPoliciesClient getManagedInstanceLongTermRetentionPolicies() { + return this.managedInstanceLongTermRetentionPolicies; } /** - * The TimeZonesClient object to access its operations. + * The ManagedInstanceOperationsClient object to access its operations. */ - private final TimeZonesClient timeZones; + private final ManagedInstanceOperationsClient managedInstanceOperations; /** - * Gets the TimeZonesClient object to access its operations. + * Gets the ManagedInstanceOperationsClient object to access its operations. * - * @return the TimeZonesClient object. + * @return the ManagedInstanceOperationsClient object. */ - public TimeZonesClient getTimeZones() { - return this.timeZones; + public ManagedInstanceOperationsClient getManagedInstanceOperations() { + return this.managedInstanceOperations; } /** - * The VirtualClustersClient object to access its operations. + * The ManagedInstancePrivateEndpointConnectionsClient object to access its operations. */ - private final VirtualClustersClient virtualClusters; + private final ManagedInstancePrivateEndpointConnectionsClient managedInstancePrivateEndpointConnections; /** - * Gets the VirtualClustersClient object to access its operations. + * Gets the ManagedInstancePrivateEndpointConnectionsClient object to access its operations. * - * @return the VirtualClustersClient object. + * @return the ManagedInstancePrivateEndpointConnectionsClient object. */ - public VirtualClustersClient getVirtualClusters() { - return this.virtualClusters; + public ManagedInstancePrivateEndpointConnectionsClient getManagedInstancePrivateEndpointConnections() { + return this.managedInstancePrivateEndpointConnections; } /** - * The VirtualNetworkRulesClient object to access its operations. + * The ManagedInstancePrivateLinkResourcesClient object to access its operations. */ - private final VirtualNetworkRulesClient virtualNetworkRules; + private final ManagedInstancePrivateLinkResourcesClient managedInstancePrivateLinkResources; /** - * Gets the VirtualNetworkRulesClient object to access its operations. + * Gets the ManagedInstancePrivateLinkResourcesClient object to access its operations. * - * @return the VirtualNetworkRulesClient object. + * @return the ManagedInstancePrivateLinkResourcesClient object. */ - public VirtualNetworkRulesClient getVirtualNetworkRules() { - return this.virtualNetworkRules; + public ManagedInstancePrivateLinkResourcesClient getManagedInstancePrivateLinkResources() { + return this.managedInstancePrivateLinkResources; } /** - * The WorkloadClassifiersClient object to access its operations. + * The ManagedInstancesClient object to access its operations. */ - private final WorkloadClassifiersClient workloadClassifiers; + private final ManagedInstancesClient managedInstances; /** - * Gets the WorkloadClassifiersClient object to access its operations. + * Gets the ManagedInstancesClient object to access its operations. * - * @return the WorkloadClassifiersClient object. + * @return the ManagedInstancesClient object. */ - public WorkloadClassifiersClient getWorkloadClassifiers() { - return this.workloadClassifiers; + public ManagedInstancesClient getManagedInstances() { + return this.managedInstances; } /** - * The WorkloadGroupsClient object to access its operations. + * The ManagedInstanceTdeCertificatesClient object to access its operations. */ - private final WorkloadGroupsClient workloadGroups; + private final ManagedInstanceTdeCertificatesClient managedInstanceTdeCertificates; /** - * Gets the WorkloadGroupsClient object to access its operations. + * Gets the ManagedInstanceTdeCertificatesClient object to access its operations. * - * @return the WorkloadGroupsClient object. + * @return the ManagedInstanceTdeCertificatesClient object. */ - public WorkloadGroupsClient getWorkloadGroups() { - return this.workloadGroups; + public ManagedInstanceTdeCertificatesClient getManagedInstanceTdeCertificates() { + return this.managedInstanceTdeCertificates; } /** - * The ManagedDatabaseSensitivityLabelsClient object to access its operations. + * The ManagedInstanceVulnerabilityAssessmentsClient object to access its operations. */ - private final ManagedDatabaseSensitivityLabelsClient managedDatabaseSensitivityLabels; + private final ManagedInstanceVulnerabilityAssessmentsClient managedInstanceVulnerabilityAssessments; /** - * Gets the ManagedDatabaseSensitivityLabelsClient object to access its operations. + * Gets the ManagedInstanceVulnerabilityAssessmentsClient object to access its operations. * - * @return the ManagedDatabaseSensitivityLabelsClient object. + * @return the ManagedInstanceVulnerabilityAssessmentsClient object. */ - public ManagedDatabaseSensitivityLabelsClient getManagedDatabaseSensitivityLabels() { - return this.managedDatabaseSensitivityLabels; + public ManagedInstanceVulnerabilityAssessmentsClient getManagedInstanceVulnerabilityAssessments() { + return this.managedInstanceVulnerabilityAssessments; } /** - * The DatabaseEncryptionProtectorsClient object to access its operations. + * The ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient object to access its operations. */ - private final DatabaseEncryptionProtectorsClient databaseEncryptionProtectors; + private final ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies; /** - * Gets the DatabaseEncryptionProtectorsClient object to access its operations. + * Gets the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient object to access its operations. * - * @return the DatabaseEncryptionProtectorsClient object. + * @return the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient object. */ - public DatabaseEncryptionProtectorsClient getDatabaseEncryptionProtectors() { - return this.databaseEncryptionProtectors; + public ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient + getManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies() { + return this.managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies; } /** - * The DatabaseOperationsClient object to access its operations. + * The ManagedServerDnsAliasesClient object to access its operations. */ - private final DatabaseOperationsClient databaseOperations; + private final ManagedServerDnsAliasesClient managedServerDnsAliases; /** - * Gets the DatabaseOperationsClient object to access its operations. + * Gets the ManagedServerDnsAliasesClient object to access its operations. * - * @return the DatabaseOperationsClient object. + * @return the ManagedServerDnsAliasesClient object. */ - public DatabaseOperationsClient getDatabaseOperations() { - return this.databaseOperations; + public ManagedServerDnsAliasesClient getManagedServerDnsAliases() { + return this.managedServerDnsAliases; } /** - * The DatabaseUsagesClient object to access its operations. + * The ManagedServerSecurityAlertPoliciesClient object to access its operations. */ - private final DatabaseUsagesClient databaseUsages; + private final ManagedServerSecurityAlertPoliciesClient managedServerSecurityAlertPolicies; /** - * Gets the DatabaseUsagesClient object to access its operations. + * Gets the ManagedServerSecurityAlertPoliciesClient object to access its operations. * - * @return the DatabaseUsagesClient object. + * @return the ManagedServerSecurityAlertPoliciesClient object. */ - public DatabaseUsagesClient getDatabaseUsages() { - return this.databaseUsages; + public ManagedServerSecurityAlertPoliciesClient getManagedServerSecurityAlertPolicies() { + return this.managedServerSecurityAlertPolicies; } /** - * The RecommendedSensitivityLabelsClient object to access its operations. + * The OperationsClient object to access its operations. */ - private final RecommendedSensitivityLabelsClient recommendedSensitivityLabels; + private final OperationsClient operations; /** - * Gets the RecommendedSensitivityLabelsClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the RecommendedSensitivityLabelsClient object. + * @return the OperationsClient object. */ - public RecommendedSensitivityLabelsClient getRecommendedSensitivityLabels() { - return this.recommendedSensitivityLabels; + public OperationsClient getOperations() { + return this.operations; } /** - * The SynapseLinkWorkspacesClient object to access its operations. + * The OutboundFirewallRulesClient object to access its operations. */ - private final SynapseLinkWorkspacesClient synapseLinkWorkspaces; + private final OutboundFirewallRulesClient outboundFirewallRules; /** - * Gets the SynapseLinkWorkspacesClient object to access its operations. + * Gets the OutboundFirewallRulesClient object to access its operations. * - * @return the SynapseLinkWorkspacesClient object. + * @return the OutboundFirewallRulesClient object. */ - public SynapseLinkWorkspacesClient getSynapseLinkWorkspaces() { - return this.synapseLinkWorkspaces; + public OutboundFirewallRulesClient getOutboundFirewallRules() { + return this.outboundFirewallRules; } /** - * The ServerOperationsClient object to access its operations. + * The PrivateEndpointConnectionsClient object to access its operations. */ - private final ServerOperationsClient serverOperations; + private final PrivateEndpointConnectionsClient privateEndpointConnections; /** - * Gets the ServerOperationsClient object to access its operations. + * Gets the PrivateEndpointConnectionsClient object to access its operations. * - * @return the ServerOperationsClient object. + * @return the PrivateEndpointConnectionsClient object. */ - public ServerOperationsClient getServerOperations() { - return this.serverOperations; + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; } /** - * The ServerUsagesClient object to access its operations. + * The PrivateLinkResourcesClient object to access its operations. */ - private final ServerUsagesClient serverUsages; + private final PrivateLinkResourcesClient privateLinkResources; /** - * Gets the ServerUsagesClient object to access its operations. + * Gets the PrivateLinkResourcesClient object to access its operations. * - * @return the ServerUsagesClient object. + * @return the PrivateLinkResourcesClient object. */ - public ServerUsagesClient getServerUsages() { - return this.serverUsages; + public PrivateLinkResourcesClient getPrivateLinkResources() { + return this.privateLinkResources; } /** - * The TdeCertificatesClient object to access its operations. + * The RecoverableDatabasesClient object to access its operations. */ - private final TdeCertificatesClient tdeCertificates; + private final RecoverableDatabasesClient recoverableDatabases; /** - * Gets the TdeCertificatesClient object to access its operations. + * Gets the RecoverableDatabasesClient object to access its operations. * - * @return the TdeCertificatesClient object. + * @return the RecoverableDatabasesClient object. */ - public TdeCertificatesClient getTdeCertificates() { - return this.tdeCertificates; + public RecoverableDatabasesClient getRecoverableDatabases() { + return this.recoverableDatabases; } /** - * The DatabaseAdvancedThreatProtectionSettingsClient object to access its operations. + * The RecoverableManagedDatabasesClient object to access its operations. */ - private final DatabaseAdvancedThreatProtectionSettingsClient databaseAdvancedThreatProtectionSettings; + private final RecoverableManagedDatabasesClient recoverableManagedDatabases; /** - * Gets the DatabaseAdvancedThreatProtectionSettingsClient object to access its operations. + * Gets the RecoverableManagedDatabasesClient object to access its operations. * - * @return the DatabaseAdvancedThreatProtectionSettingsClient object. + * @return the RecoverableManagedDatabasesClient object. */ - public DatabaseAdvancedThreatProtectionSettingsClient getDatabaseAdvancedThreatProtectionSettings() { - return this.databaseAdvancedThreatProtectionSettings; + public RecoverableManagedDatabasesClient getRecoverableManagedDatabases() { + return this.recoverableManagedDatabases; } /** - * The DatabaseAdvisorsClient object to access its operations. + * The ReplicationLinksClient object to access its operations. */ - private final DatabaseAdvisorsClient databaseAdvisors; + private final ReplicationLinksClient replicationLinks; /** - * Gets the DatabaseAdvisorsClient object to access its operations. + * Gets the ReplicationLinksClient object to access its operations. * - * @return the DatabaseAdvisorsClient object. + * @return the ReplicationLinksClient object. */ - public DatabaseAdvisorsClient getDatabaseAdvisors() { - return this.databaseAdvisors; + public ReplicationLinksClient getReplicationLinks() { + return this.replicationLinks; } /** - * The DatabaseAutomaticTuningsClient object to access its operations. + * The RestorableDroppedDatabasesClient object to access its operations. */ - private final DatabaseAutomaticTuningsClient databaseAutomaticTunings; + private final RestorableDroppedDatabasesClient restorableDroppedDatabases; /** - * Gets the DatabaseAutomaticTuningsClient object to access its operations. + * Gets the RestorableDroppedDatabasesClient object to access its operations. * - * @return the DatabaseAutomaticTuningsClient object. + * @return the RestorableDroppedDatabasesClient object. */ - public DatabaseAutomaticTuningsClient getDatabaseAutomaticTunings() { - return this.databaseAutomaticTunings; + public RestorableDroppedDatabasesClient getRestorableDroppedDatabases() { + return this.restorableDroppedDatabases; } /** - * The DatabaseExtensionsOperationsClient object to access its operations. + * The RestorableDroppedManagedDatabasesClient object to access its operations. */ - private final DatabaseExtensionsOperationsClient databaseExtensionsOperations; + private final RestorableDroppedManagedDatabasesClient restorableDroppedManagedDatabases; /** - * Gets the DatabaseExtensionsOperationsClient object to access its operations. + * Gets the RestorableDroppedManagedDatabasesClient object to access its operations. * - * @return the DatabaseExtensionsOperationsClient object. + * @return the RestorableDroppedManagedDatabasesClient object. */ - public DatabaseExtensionsOperationsClient getDatabaseExtensionsOperations() { - return this.databaseExtensionsOperations; + public RestorableDroppedManagedDatabasesClient getRestorableDroppedManagedDatabases() { + return this.restorableDroppedManagedDatabases; } /** - * The DatabaseRecommendedActionsClient object to access its operations. + * The RestorePointsClient object to access its operations. */ - private final DatabaseRecommendedActionsClient databaseRecommendedActions; + private final RestorePointsClient restorePoints; /** - * Gets the DatabaseRecommendedActionsClient object to access its operations. + * Gets the RestorePointsClient object to access its operations. * - * @return the DatabaseRecommendedActionsClient object. + * @return the RestorePointsClient object. */ - public DatabaseRecommendedActionsClient getDatabaseRecommendedActions() { - return this.databaseRecommendedActions; + public RestorePointsClient getRestorePoints() { + return this.restorePoints; } /** - * The DatabaseSqlVulnerabilityAssessmentBaselinesClient object to access its operations. + * The SensitivityLabelsClient object to access its operations. */ - private final DatabaseSqlVulnerabilityAssessmentBaselinesClient databaseSqlVulnerabilityAssessmentBaselines; + private final SensitivityLabelsClient sensitivityLabels; /** - * Gets the DatabaseSqlVulnerabilityAssessmentBaselinesClient object to access its operations. + * Gets the SensitivityLabelsClient object to access its operations. * - * @return the DatabaseSqlVulnerabilityAssessmentBaselinesClient object. + * @return the SensitivityLabelsClient object. */ - public DatabaseSqlVulnerabilityAssessmentBaselinesClient getDatabaseSqlVulnerabilityAssessmentBaselines() { - return this.databaseSqlVulnerabilityAssessmentBaselines; + public SensitivityLabelsClient getSensitivityLabels() { + return this.sensitivityLabels; } /** - * The SqlVulnerabilityAssessmentBaselinesOperationsClient object to access its operations. + * The RecommendedSensitivityLabelsClient object to access its operations. */ - private final SqlVulnerabilityAssessmentBaselinesOperationsClient sqlVulnerabilityAssessmentBaselinesOperations; + private final RecommendedSensitivityLabelsClient recommendedSensitivityLabels; /** - * Gets the SqlVulnerabilityAssessmentBaselinesOperationsClient object to access its operations. + * Gets the RecommendedSensitivityLabelsClient object to access its operations. * - * @return the SqlVulnerabilityAssessmentBaselinesOperationsClient object. + * @return the RecommendedSensitivityLabelsClient object. */ - public SqlVulnerabilityAssessmentBaselinesOperationsClient getSqlVulnerabilityAssessmentBaselinesOperations() { - return this.sqlVulnerabilityAssessmentBaselinesOperations; + public RecommendedSensitivityLabelsClient getRecommendedSensitivityLabels() { + return this.recommendedSensitivityLabels; } /** - * The DatabaseSqlVulnerabilityAssessmentsSettingsClient object to access its operations. + * The ServerAdvancedThreatProtectionSettingsClient object to access its operations. */ - private final DatabaseSqlVulnerabilityAssessmentsSettingsClient databaseSqlVulnerabilityAssessmentsSettings; + private final ServerAdvancedThreatProtectionSettingsClient serverAdvancedThreatProtectionSettings; /** - * Gets the DatabaseSqlVulnerabilityAssessmentsSettingsClient object to access its operations. + * Gets the ServerAdvancedThreatProtectionSettingsClient object to access its operations. * - * @return the DatabaseSqlVulnerabilityAssessmentsSettingsClient object. + * @return the ServerAdvancedThreatProtectionSettingsClient object. */ - public DatabaseSqlVulnerabilityAssessmentsSettingsClient getDatabaseSqlVulnerabilityAssessmentsSettings() { - return this.databaseSqlVulnerabilityAssessmentsSettings; + public ServerAdvancedThreatProtectionSettingsClient getServerAdvancedThreatProtectionSettings() { + return this.serverAdvancedThreatProtectionSettings; } /** - * The DatabaseSqlVulnerabilityAssessmentExecuteScansClient object to access its operations. + * The ServerAdvisorsClient object to access its operations. */ - private final DatabaseSqlVulnerabilityAssessmentExecuteScansClient databaseSqlVulnerabilityAssessmentExecuteScans; + private final ServerAdvisorsClient serverAdvisors; /** - * Gets the DatabaseSqlVulnerabilityAssessmentExecuteScansClient object to access its operations. + * Gets the ServerAdvisorsClient object to access its operations. * - * @return the DatabaseSqlVulnerabilityAssessmentExecuteScansClient object. + * @return the ServerAdvisorsClient object. */ - public DatabaseSqlVulnerabilityAssessmentExecuteScansClient getDatabaseSqlVulnerabilityAssessmentExecuteScans() { - return this.databaseSqlVulnerabilityAssessmentExecuteScans; + public ServerAdvisorsClient getServerAdvisors() { + return this.serverAdvisors; } /** - * The SqlVulnerabilityAssessmentExecuteScansClient object to access its operations. + * The ServerAutomaticTuningsClient object to access its operations. */ - private final SqlVulnerabilityAssessmentExecuteScansClient sqlVulnerabilityAssessmentExecuteScans; + private final ServerAutomaticTuningsClient serverAutomaticTunings; /** - * Gets the SqlVulnerabilityAssessmentExecuteScansClient object to access its operations. + * Gets the ServerAutomaticTuningsClient object to access its operations. * - * @return the SqlVulnerabilityAssessmentExecuteScansClient object. + * @return the ServerAutomaticTuningsClient object. */ - public SqlVulnerabilityAssessmentExecuteScansClient getSqlVulnerabilityAssessmentExecuteScans() { - return this.sqlVulnerabilityAssessmentExecuteScans; + public ServerAutomaticTuningsClient getServerAutomaticTunings() { + return this.serverAutomaticTunings; } /** - * The SqlVulnerabilityAssessmentRuleBaselinesOperationsClient object to access its operations. + * The ServerAzureADAdministratorsClient object to access its operations. */ - private final SqlVulnerabilityAssessmentRuleBaselinesOperationsClient sqlVulnerabilityAssessmentRuleBaselinesOperations; + private final ServerAzureADAdministratorsClient serverAzureADAdministrators; /** - * Gets the SqlVulnerabilityAssessmentRuleBaselinesOperationsClient object to access its operations. + * Gets the ServerAzureADAdministratorsClient object to access its operations. * - * @return the SqlVulnerabilityAssessmentRuleBaselinesOperationsClient object. + * @return the ServerAzureADAdministratorsClient object. */ - public SqlVulnerabilityAssessmentRuleBaselinesOperationsClient - getSqlVulnerabilityAssessmentRuleBaselinesOperations() { - return this.sqlVulnerabilityAssessmentRuleBaselinesOperations; + public ServerAzureADAdministratorsClient getServerAzureADAdministrators() { + return this.serverAzureADAdministrators; } /** - * The DatabaseSqlVulnerabilityAssessmentScansClient object to access its operations. + * The ServerAzureADOnlyAuthenticationsClient object to access its operations. */ - private final DatabaseSqlVulnerabilityAssessmentScansClient databaseSqlVulnerabilityAssessmentScans; + private final ServerAzureADOnlyAuthenticationsClient serverAzureADOnlyAuthentications; /** - * Gets the DatabaseSqlVulnerabilityAssessmentScansClient object to access its operations. + * Gets the ServerAzureADOnlyAuthenticationsClient object to access its operations. * - * @return the DatabaseSqlVulnerabilityAssessmentScansClient object. + * @return the ServerAzureADOnlyAuthenticationsClient object. */ - public DatabaseSqlVulnerabilityAssessmentScansClient getDatabaseSqlVulnerabilityAssessmentScans() { - return this.databaseSqlVulnerabilityAssessmentScans; + public ServerAzureADOnlyAuthenticationsClient getServerAzureADOnlyAuthentications() { + return this.serverAzureADOnlyAuthentications; } /** - * The DatabaseVulnerabilityAssessmentScansClient object to access its operations. + * The ServerConnectionPoliciesClient object to access its operations. */ - private final DatabaseVulnerabilityAssessmentScansClient databaseVulnerabilityAssessmentScans; + private final ServerConnectionPoliciesClient serverConnectionPolicies; /** - * Gets the DatabaseVulnerabilityAssessmentScansClient object to access its operations. + * Gets the ServerConnectionPoliciesClient object to access its operations. * - * @return the DatabaseVulnerabilityAssessmentScansClient object. + * @return the ServerConnectionPoliciesClient object. */ - public DatabaseVulnerabilityAssessmentScansClient getDatabaseVulnerabilityAssessmentScans() { - return this.databaseVulnerabilityAssessmentScans; + public ServerConnectionPoliciesClient getServerConnectionPolicies() { + return this.serverConnectionPolicies; } /** - * The DataMaskingRulesClient object to access its operations. + * The ServerDevOpsAuditSettingsClient object to access its operations. */ - private final DataMaskingRulesClient dataMaskingRules; + private final ServerDevOpsAuditSettingsClient serverDevOpsAuditSettings; /** - * Gets the DataMaskingRulesClient object to access its operations. + * Gets the ServerDevOpsAuditSettingsClient object to access its operations. * - * @return the DataMaskingRulesClient object. + * @return the ServerDevOpsAuditSettingsClient object. */ - public DataMaskingRulesClient getDataMaskingRules() { - return this.dataMaskingRules; + public ServerDevOpsAuditSettingsClient getServerDevOpsAuditSettings() { + return this.serverDevOpsAuditSettings; } /** - * The DataWarehouseUserActivitiesOperationsClient object to access its operations. + * The ServerDnsAliasesClient object to access its operations. */ - private final DataWarehouseUserActivitiesOperationsClient dataWarehouseUserActivitiesOperations; + private final ServerDnsAliasesClient serverDnsAliases; /** - * Gets the DataWarehouseUserActivitiesOperationsClient object to access its operations. + * Gets the ServerDnsAliasesClient object to access its operations. * - * @return the DataWarehouseUserActivitiesOperationsClient object. + * @return the ServerDnsAliasesClient object. */ - public DataWarehouseUserActivitiesOperationsClient getDataWarehouseUserActivitiesOperations() { - return this.dataWarehouseUserActivitiesOperations; + public ServerDnsAliasesClient getServerDnsAliases() { + return this.serverDnsAliases; } /** - * The ManagedDatabaseSecurityEventsClient object to access its operations. + * The ServerKeysClient object to access its operations. */ - private final ManagedDatabaseSecurityEventsClient managedDatabaseSecurityEvents; + private final ServerKeysClient serverKeys; /** - * Gets the ManagedDatabaseSecurityEventsClient object to access its operations. + * Gets the ServerKeysClient object to access its operations. * - * @return the ManagedDatabaseSecurityEventsClient object. + * @return the ServerKeysClient object. */ - public ManagedDatabaseSecurityEventsClient getManagedDatabaseSecurityEvents() { - return this.managedDatabaseSecurityEvents; + public ServerKeysClient getServerKeys() { + return this.serverKeys; } /** - * The ManagedDatabaseRecommendedSensitivityLabelsClient object to access its operations. + * The ServerOperationsClient object to access its operations. */ - private final ManagedDatabaseRecommendedSensitivityLabelsClient managedDatabaseRecommendedSensitivityLabels; + private final ServerOperationsClient serverOperations; /** - * Gets the ManagedDatabaseRecommendedSensitivityLabelsClient object to access its operations. + * Gets the ServerOperationsClient object to access its operations. * - * @return the ManagedDatabaseRecommendedSensitivityLabelsClient object. + * @return the ServerOperationsClient object. */ - public ManagedDatabaseRecommendedSensitivityLabelsClient getManagedDatabaseRecommendedSensitivityLabels() { - return this.managedDatabaseRecommendedSensitivityLabels; + public ServerOperationsClient getServerOperations() { + return this.serverOperations; } /** - * The ManagedInstanceTdeCertificatesClient object to access its operations. + * The ServersClient object to access its operations. */ - private final ManagedInstanceTdeCertificatesClient managedInstanceTdeCertificates; + private final ServersClient servers; /** - * Gets the ManagedInstanceTdeCertificatesClient object to access its operations. + * Gets the ServersClient object to access its operations. * - * @return the ManagedInstanceTdeCertificatesClient object. + * @return the ServersClient object. */ - public ManagedInstanceTdeCertificatesClient getManagedInstanceTdeCertificates() { - return this.managedInstanceTdeCertificates; + public ServersClient getServers() { + return this.servers; } /** - * The ElasticPoolOperationsClient object to access its operations. + * The ServerSecurityAlertPoliciesClient object to access its operations. */ - private final ElasticPoolOperationsClient elasticPoolOperations; + private final ServerSecurityAlertPoliciesClient serverSecurityAlertPolicies; /** - * Gets the ElasticPoolOperationsClient object to access its operations. + * Gets the ServerSecurityAlertPoliciesClient object to access its operations. * - * @return the ElasticPoolOperationsClient object. + * @return the ServerSecurityAlertPoliciesClient object. */ - public ElasticPoolOperationsClient getElasticPoolOperations() { - return this.elasticPoolOperations; + public ServerSecurityAlertPoliciesClient getServerSecurityAlertPolicies() { + return this.serverSecurityAlertPolicies; } /** - * The UsagesClient object to access its operations. + * The ServerTrustCertificatesClient object to access its operations. */ - private final UsagesClient usages; + private final ServerTrustCertificatesClient serverTrustCertificates; /** - * Gets the UsagesClient object to access its operations. + * Gets the ServerTrustCertificatesClient object to access its operations. * - * @return the UsagesClient object. + * @return the ServerTrustCertificatesClient object. */ - public UsagesClient getUsages() { - return this.usages; + public ServerTrustCertificatesClient getServerTrustCertificates() { + return this.serverTrustCertificates; } /** - * The LedgerDigestUploadsOperationsClient object to access its operations. + * The ServerTrustGroupsClient object to access its operations. */ - private final LedgerDigestUploadsOperationsClient ledgerDigestUploadsOperations; + private final ServerTrustGroupsClient serverTrustGroups; /** - * Gets the LedgerDigestUploadsOperationsClient object to access its operations. + * Gets the ServerTrustGroupsClient object to access its operations. * - * @return the LedgerDigestUploadsOperationsClient object. + * @return the ServerTrustGroupsClient object. */ - public LedgerDigestUploadsOperationsClient getLedgerDigestUploadsOperations() { - return this.ledgerDigestUploadsOperations; + public ServerTrustGroupsClient getServerTrustGroups() { + return this.serverTrustGroups; } /** - * The MaintenanceWindowOptionsOperationsClient object to access its operations. + * The ServerUsagesClient object to access its operations. */ - private final MaintenanceWindowOptionsOperationsClient maintenanceWindowOptionsOperations; + private final ServerUsagesClient serverUsages; /** - * Gets the MaintenanceWindowOptionsOperationsClient object to access its operations. + * Gets the ServerUsagesClient object to access its operations. * - * @return the MaintenanceWindowOptionsOperationsClient object. + * @return the ServerUsagesClient object. */ - public MaintenanceWindowOptionsOperationsClient getMaintenanceWindowOptionsOperations() { - return this.maintenanceWindowOptionsOperations; + public ServerUsagesClient getServerUsages() { + return this.serverUsages; } /** - * The MaintenanceWindowsOperationsClient object to access its operations. + * The ServerVulnerabilityAssessmentsClient object to access its operations. */ - private final MaintenanceWindowsOperationsClient maintenanceWindowsOperations; + private final ServerVulnerabilityAssessmentsClient serverVulnerabilityAssessments; /** - * Gets the MaintenanceWindowsOperationsClient object to access its operations. + * Gets the ServerVulnerabilityAssessmentsClient object to access its operations. * - * @return the MaintenanceWindowsOperationsClient object. + * @return the ServerVulnerabilityAssessmentsClient object. */ - public MaintenanceWindowsOperationsClient getMaintenanceWindowsOperations() { - return this.maintenanceWindowsOperations; + public ServerVulnerabilityAssessmentsClient getServerVulnerabilityAssessments() { + return this.serverVulnerabilityAssessments; } /** - * The ManagedDatabaseAdvancedThreatProtectionSettingsClient object to access its operations. + * The SqlAgentsClient object to access its operations. */ - private final ManagedDatabaseAdvancedThreatProtectionSettingsClient managedDatabaseAdvancedThreatProtectionSettings; + private final SqlAgentsClient sqlAgents; /** - * Gets the ManagedDatabaseAdvancedThreatProtectionSettingsClient object to access its operations. + * Gets the SqlAgentsClient object to access its operations. * - * @return the ManagedDatabaseAdvancedThreatProtectionSettingsClient object. + * @return the SqlAgentsClient object. */ - public ManagedDatabaseAdvancedThreatProtectionSettingsClient getManagedDatabaseAdvancedThreatProtectionSettings() { - return this.managedDatabaseAdvancedThreatProtectionSettings; + public SqlAgentsClient getSqlAgents() { + return this.sqlAgents; } /** - * The ManagedDatabaseMoveOperationsClient object to access its operations. + * The SubscriptionUsagesClient object to access its operations. */ - private final ManagedDatabaseMoveOperationsClient managedDatabaseMoveOperations; + private final SubscriptionUsagesClient subscriptionUsages; /** - * Gets the ManagedDatabaseMoveOperationsClient object to access its operations. + * Gets the SubscriptionUsagesClient object to access its operations. * - * @return the ManagedDatabaseMoveOperationsClient object. + * @return the SubscriptionUsagesClient object. */ - public ManagedDatabaseMoveOperationsClient getManagedDatabaseMoveOperations() { - return this.managedDatabaseMoveOperations; + public SubscriptionUsagesClient getSubscriptionUsages() { + return this.subscriptionUsages; } /** - * The ManagedDatabaseQueriesClient object to access its operations. + * The SyncAgentsClient object to access its operations. */ - private final ManagedDatabaseQueriesClient managedDatabaseQueries; + private final SyncAgentsClient syncAgents; /** - * Gets the ManagedDatabaseQueriesClient object to access its operations. + * Gets the SyncAgentsClient object to access its operations. * - * @return the ManagedDatabaseQueriesClient object. + * @return the SyncAgentsClient object. */ - public ManagedDatabaseQueriesClient getManagedDatabaseQueries() { - return this.managedDatabaseQueries; + public SyncAgentsClient getSyncAgents() { + return this.syncAgents; } /** - * The ManagedDatabaseRestoreDetailsClient object to access its operations. + * The SyncGroupsClient object to access its operations. */ - private final ManagedDatabaseRestoreDetailsClient managedDatabaseRestoreDetails; + private final SyncGroupsClient syncGroups; /** - * Gets the ManagedDatabaseRestoreDetailsClient object to access its operations. + * Gets the SyncGroupsClient object to access its operations. * - * @return the ManagedDatabaseRestoreDetailsClient object. + * @return the SyncGroupsClient object. */ - public ManagedDatabaseRestoreDetailsClient getManagedDatabaseRestoreDetails() { - return this.managedDatabaseRestoreDetails; + public SyncGroupsClient getSyncGroups() { + return this.syncGroups; } /** - * The ManagedDatabaseTransparentDataEncryptionsClient object to access its operations. + * The SyncMembersClient object to access its operations. */ - private final ManagedDatabaseTransparentDataEncryptionsClient managedDatabaseTransparentDataEncryptions; + private final SyncMembersClient syncMembers; /** - * Gets the ManagedDatabaseTransparentDataEncryptionsClient object to access its operations. + * Gets the SyncMembersClient object to access its operations. * - * @return the ManagedDatabaseTransparentDataEncryptionsClient object. + * @return the SyncMembersClient object. */ - public ManagedDatabaseTransparentDataEncryptionsClient getManagedDatabaseTransparentDataEncryptions() { - return this.managedDatabaseTransparentDataEncryptions; + public SyncMembersClient getSyncMembers() { + return this.syncMembers; } /** - * The ManagedInstanceAdvancedThreatProtectionSettingsClient object to access its operations. + * The TdeCertificatesClient object to access its operations. */ - private final ManagedInstanceAdvancedThreatProtectionSettingsClient managedInstanceAdvancedThreatProtectionSettings; + private final TdeCertificatesClient tdeCertificates; /** - * Gets the ManagedInstanceAdvancedThreatProtectionSettingsClient object to access its operations. + * Gets the TdeCertificatesClient object to access its operations. * - * @return the ManagedInstanceAdvancedThreatProtectionSettingsClient object. + * @return the TdeCertificatesClient object. */ - public ManagedInstanceAdvancedThreatProtectionSettingsClient getManagedInstanceAdvancedThreatProtectionSettings() { - return this.managedInstanceAdvancedThreatProtectionSettings; + public TdeCertificatesClient getTdeCertificates() { + return this.tdeCertificates; } /** - * The ManagedInstancePrivateLinkResourcesClient object to access its operations. + * The TimeZonesClient object to access its operations. */ - private final ManagedInstancePrivateLinkResourcesClient managedInstancePrivateLinkResources; + private final TimeZonesClient timeZones; /** - * Gets the ManagedInstancePrivateLinkResourcesClient object to access its operations. + * Gets the TimeZonesClient object to access its operations. * - * @return the ManagedInstancePrivateLinkResourcesClient object. + * @return the TimeZonesClient object. */ - public ManagedInstancePrivateLinkResourcesClient getManagedInstancePrivateLinkResources() { - return this.managedInstancePrivateLinkResources; + public TimeZonesClient getTimeZones() { + return this.timeZones; } /** - * The ManagedLedgerDigestUploadsOperationsClient object to access its operations. + * The TransparentDataEncryptionsClient object to access its operations. */ - private final ManagedLedgerDigestUploadsOperationsClient managedLedgerDigestUploadsOperations; + private final TransparentDataEncryptionsClient transparentDataEncryptions; /** - * Gets the ManagedLedgerDigestUploadsOperationsClient object to access its operations. + * Gets the TransparentDataEncryptionsClient object to access its operations. * - * @return the ManagedLedgerDigestUploadsOperationsClient object. + * @return the TransparentDataEncryptionsClient object. */ - public ManagedLedgerDigestUploadsOperationsClient getManagedLedgerDigestUploadsOperations() { - return this.managedLedgerDigestUploadsOperations; + public TransparentDataEncryptionsClient getTransparentDataEncryptions() { + return this.transparentDataEncryptions; } /** - * The ServerAdvancedThreatProtectionSettingsClient object to access its operations. + * The UsagesClient object to access its operations. */ - private final ServerAdvancedThreatProtectionSettingsClient serverAdvancedThreatProtectionSettings; + private final UsagesClient usages; /** - * Gets the ServerAdvancedThreatProtectionSettingsClient object to access its operations. + * Gets the UsagesClient object to access its operations. * - * @return the ServerAdvancedThreatProtectionSettingsClient object. + * @return the UsagesClient object. */ - public ServerAdvancedThreatProtectionSettingsClient getServerAdvancedThreatProtectionSettings() { - return this.serverAdvancedThreatProtectionSettings; + public UsagesClient getUsages() { + return this.usages; } /** - * The ServerAutomaticTuningsClient object to access its operations. + * The VirtualClustersClient object to access its operations. */ - private final ServerAutomaticTuningsClient serverAutomaticTunings; + private final VirtualClustersClient virtualClusters; /** - * Gets the ServerAutomaticTuningsClient object to access its operations. + * Gets the VirtualClustersClient object to access its operations. * - * @return the ServerAutomaticTuningsClient object. + * @return the VirtualClustersClient object. */ - public ServerAutomaticTuningsClient getServerAutomaticTunings() { - return this.serverAutomaticTunings; + public VirtualClustersClient getVirtualClusters() { + return this.virtualClusters; } /** - * The SqlAgentsClient object to access its operations. + * The VirtualNetworkRulesClient object to access its operations. */ - private final SqlAgentsClient sqlAgents; + private final VirtualNetworkRulesClient virtualNetworkRules; /** - * Gets the SqlAgentsClient object to access its operations. + * Gets the VirtualNetworkRulesClient object to access its operations. * - * @return the SqlAgentsClient object. + * @return the VirtualNetworkRulesClient object. */ - public SqlAgentsClient getSqlAgents() { - return this.sqlAgents; + public VirtualNetworkRulesClient getVirtualNetworkRules() { + return this.virtualNetworkRules; } /** - * The TransparentDataEncryptionsClient object to access its operations. + * The WorkloadClassifiersClient object to access its operations. */ - private final TransparentDataEncryptionsClient transparentDataEncryptions; + private final WorkloadClassifiersClient workloadClassifiers; /** - * Gets the TransparentDataEncryptionsClient object to access its operations. + * Gets the WorkloadClassifiersClient object to access its operations. * - * @return the TransparentDataEncryptionsClient object. + * @return the WorkloadClassifiersClient object. */ - public TransparentDataEncryptionsClient getTransparentDataEncryptions() { - return this.transparentDataEncryptions; + public WorkloadClassifiersClient getWorkloadClassifiers() { + return this.workloadClassifiers; } /** - * The CapabilitiesClient object to access its operations. + * The WorkloadGroupsClient object to access its operations. */ - private final CapabilitiesClient capabilities; + private final WorkloadGroupsClient workloadGroups; /** - * Gets the CapabilitiesClient object to access its operations. + * Gets the WorkloadGroupsClient object to access its operations. * - * @return the CapabilitiesClient object. + * @return the WorkloadGroupsClient object. */ - public CapabilitiesClient getCapabilities() { - return this.capabilities; + public WorkloadGroupsClient getWorkloadGroups() { + return this.workloadGroups; } /** @@ -2331,180 +1925,143 @@ public CapabilitiesClient getCapabilities() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param endpoint Service host. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. + * @param subscriptionId The subscription ID that identifies an Azure subscription. + * @param endpoint server parameter. */ SqlManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { super(httpPipeline, serializerAdapter, environment); this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2025-02-01-preview"; - this.operations = new OperationsClientImpl(this); + this.endpoint = endpoint; + this.apiVersion = "2021-11-01"; this.backupShortTermRetentionPolicies = new BackupShortTermRetentionPoliciesClientImpl(this); - this.databaseColumns = new DatabaseColumnsClientImpl(this); - this.restorePoints = new RestorePointsClientImpl(this); - this.sensitivityLabels = new SensitivityLabelsClientImpl(this); - this.databases = new DatabasesClientImpl(this); - this.firewallRules = new FirewallRulesClientImpl(this); - this.replicationLinks = new ReplicationLinksClientImpl(this); - this.servers = new ServersClientImpl(this); this.serverBlobAuditingPolicies = new ServerBlobAuditingPoliciesClientImpl(this); this.databaseBlobAuditingPolicies = new DatabaseBlobAuditingPoliciesClientImpl(this); this.extendedDatabaseBlobAuditingPolicies = new ExtendedDatabaseBlobAuditingPoliciesClientImpl(this); this.extendedServerBlobAuditingPolicies = new ExtendedServerBlobAuditingPoliciesClientImpl(this); - this.serverAdvisors = new ServerAdvisorsClientImpl(this); - this.managedDatabaseColumns = new ManagedDatabaseColumnsClientImpl(this); - this.databaseTables = new DatabaseTablesClientImpl(this); - this.managedDatabaseTables = new ManagedDatabaseTablesClientImpl(this); + this.databaseAdvancedThreatProtectionSettings = new DatabaseAdvancedThreatProtectionSettingsClientImpl(this); + this.databaseAdvisors = new DatabaseAdvisorsClientImpl(this); + this.databaseAutomaticTunings = new DatabaseAutomaticTuningsClientImpl(this); + this.databaseColumns = new DatabaseColumnsClientImpl(this); + this.databaseExtensionsOperations = new DatabaseExtensionsOperationsClientImpl(this); + this.databaseOperations = new DatabaseOperationsClientImpl(this); + this.databaseRecommendedActions = new DatabaseRecommendedActionsClientImpl(this); + this.databases = new DatabasesClientImpl(this); this.databaseSchemas = new DatabaseSchemasClientImpl(this); - this.managedDatabaseSchemas = new ManagedDatabaseSchemasClientImpl(this); this.databaseSecurityAlertPolicies = new DatabaseSecurityAlertPoliciesClientImpl(this); - this.sqlVulnerabilityAssessmentBaselines = new SqlVulnerabilityAssessmentBaselinesClientImpl(this); - this.sqlVulnerabilityAssessments = new SqlVulnerabilityAssessmentsClientImpl(this); - this.sqlVulnerabilityAssessmentsSettings = new SqlVulnerabilityAssessmentsSettingsClientImpl(this); - this.databaseSqlVulnerabilityAssessmentRuleBaselines - = new DatabaseSqlVulnerabilityAssessmentRuleBaselinesClientImpl(this); - this.sqlVulnerabilityAssessmentRuleBaselines = new SqlVulnerabilityAssessmentRuleBaselinesClientImpl(this); - this.databaseSqlVulnerabilityAssessmentScanResults - = new DatabaseSqlVulnerabilityAssessmentScanResultsClientImpl(this); - this.sqlVulnerabilityAssessmentScanResultOperations - = new SqlVulnerabilityAssessmentScanResultOperationsClientImpl(this); - this.sqlVulnerabilityAssessmentScans = new SqlVulnerabilityAssessmentScansClientImpl(this); + this.databaseTables = new DatabaseTablesClientImpl(this); + this.databaseUsages = new DatabaseUsagesClientImpl(this); this.databaseVulnerabilityAssessmentRuleBaselines = new DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl(this); - this.managedDatabaseVulnerabilityAssessmentRuleBaselines - = new ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl(this); this.databaseVulnerabilityAssessments = new DatabaseVulnerabilityAssessmentsClientImpl(this); - this.managedDatabaseVulnerabilityAssessments = new ManagedDatabaseVulnerabilityAssessmentsClientImpl(this); - this.managedDatabaseVulnerabilityAssessmentScans - = new ManagedDatabaseVulnerabilityAssessmentScansClientImpl(this); + this.databaseVulnerabilityAssessmentScans = new DatabaseVulnerabilityAssessmentScansClientImpl(this); this.dataMaskingPolicies = new DataMaskingPoliciesClientImpl(this); + this.dataMaskingRules = new DataMaskingRulesClientImpl(this); + this.dataWarehouseUserActivitiesOperations = new DataWarehouseUserActivitiesOperationsClientImpl(this); this.deletedServers = new DeletedServersClientImpl(this); this.distributedAvailabilityGroups = new DistributedAvailabilityGroupsClientImpl(this); - this.managedDatabases = new ManagedDatabasesClientImpl(this); - this.serverTrustGroups = new ServerTrustGroupsClientImpl(this); - this.managedInstances = new ManagedInstancesClientImpl(this); + this.elasticPoolOperations = new ElasticPoolOperationsClientImpl(this); this.elasticPools = new ElasticPoolsClientImpl(this); this.encryptionProtectors = new EncryptionProtectorsClientImpl(this); this.endpointCertificates = new EndpointCertificatesClientImpl(this); this.failoverGroups = new FailoverGroupsClientImpl(this); + this.firewallRules = new FirewallRulesClientImpl(this); this.geoBackupPolicies = new GeoBackupPoliciesClientImpl(this); this.instanceFailoverGroups = new InstanceFailoverGroupsClientImpl(this); - this.instancePoolOperations = new InstancePoolOperationsClientImpl(this); this.instancePools = new InstancePoolsClientImpl(this); this.iPv6FirewallRules = new IPv6FirewallRulesClientImpl(this); - this.jobExecutions = new JobExecutionsClientImpl(this); this.jobAgents = new JobAgentsClientImpl(this); this.jobCredentials = new JobCredentialsClientImpl(this); - this.jobStepExecutions = new JobStepExecutionsClientImpl(this); - this.jobTargetExecutions = new JobTargetExecutionsClientImpl(this); + this.jobExecutions = new JobExecutionsClientImpl(this); this.jobs = new JobsClientImpl(this); - this.jobPrivateEndpoints = new JobPrivateEndpointsClientImpl(this); + this.jobStepExecutions = new JobStepExecutionsClientImpl(this); this.jobSteps = new JobStepsClientImpl(this); + this.jobTargetExecutions = new JobTargetExecutionsClientImpl(this); this.jobTargetGroups = new JobTargetGroupsClientImpl(this); this.jobVersions = new JobVersionsClientImpl(this); + this.ledgerDigestUploadsOperations = new LedgerDigestUploadsOperationsClientImpl(this); + this.capabilities = new CapabilitiesClientImpl(this); this.longTermRetentionBackups = new LongTermRetentionBackupsClientImpl(this); this.longTermRetentionManagedInstanceBackups = new LongTermRetentionManagedInstanceBackupsClientImpl(this); this.longTermRetentionPolicies = new LongTermRetentionPoliciesClientImpl(this); + this.maintenanceWindowOptionsOperations = new MaintenanceWindowOptionsOperationsClientImpl(this); + this.maintenanceWindowsOperations = new MaintenanceWindowsOperationsClientImpl(this); this.managedBackupShortTermRetentionPolicies = new ManagedBackupShortTermRetentionPoliciesClientImpl(this); - this.managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies - = new ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl(this); + this.managedDatabaseColumns = new ManagedDatabaseColumnsClientImpl(this); + this.managedDatabaseQueries = new ManagedDatabaseQueriesClientImpl(this); + this.managedDatabaseRestoreDetails = new ManagedDatabaseRestoreDetailsClientImpl(this); + this.managedDatabases = new ManagedDatabasesClientImpl(this); + this.managedDatabaseSchemas = new ManagedDatabaseSchemasClientImpl(this); this.managedDatabaseSecurityAlertPolicies = new ManagedDatabaseSecurityAlertPoliciesClientImpl(this); + this.managedDatabaseSecurityEvents = new ManagedDatabaseSecurityEventsClientImpl(this); + this.managedDatabaseSensitivityLabels = new ManagedDatabaseSensitivityLabelsClientImpl(this); + this.managedDatabaseRecommendedSensitivityLabels + = new ManagedDatabaseRecommendedSensitivityLabelsClientImpl(this); + this.managedDatabaseTables = new ManagedDatabaseTablesClientImpl(this); + this.managedDatabaseTransparentDataEncryptions = new ManagedDatabaseTransparentDataEncryptionsClientImpl(this); + this.managedDatabaseVulnerabilityAssessmentRuleBaselines + = new ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl(this); + this.managedDatabaseVulnerabilityAssessments = new ManagedDatabaseVulnerabilityAssessmentsClientImpl(this); + this.managedDatabaseVulnerabilityAssessmentScans + = new ManagedDatabaseVulnerabilityAssessmentScansClientImpl(this); this.managedInstanceAdministrators = new ManagedInstanceAdministratorsClientImpl(this); this.managedInstanceAzureADOnlyAuthentications = new ManagedInstanceAzureADOnlyAuthenticationsClientImpl(this); - this.managedInstanceDtcs = new ManagedInstanceDtcsClientImpl(this); this.managedInstanceEncryptionProtectors = new ManagedInstanceEncryptionProtectorsClientImpl(this); this.managedInstanceKeys = new ManagedInstanceKeysClientImpl(this); this.managedInstanceLongTermRetentionPolicies = new ManagedInstanceLongTermRetentionPoliciesClientImpl(this); this.managedInstanceOperations = new ManagedInstanceOperationsClientImpl(this); this.managedInstancePrivateEndpointConnections = new ManagedInstancePrivateEndpointConnectionsClientImpl(this); + this.managedInstancePrivateLinkResources = new ManagedInstancePrivateLinkResourcesClientImpl(this); + this.managedInstances = new ManagedInstancesClientImpl(this); + this.managedInstanceTdeCertificates = new ManagedInstanceTdeCertificatesClientImpl(this); this.managedInstanceVulnerabilityAssessments = new ManagedInstanceVulnerabilityAssessmentsClientImpl(this); + this.managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies + = new ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl(this); this.managedServerDnsAliases = new ManagedServerDnsAliasesClientImpl(this); this.managedServerSecurityAlertPolicies = new ManagedServerSecurityAlertPoliciesClientImpl(this); - this.networkSecurityPerimeterConfigurations = new NetworkSecurityPerimeterConfigurationsClientImpl(this); + this.operations = new OperationsClientImpl(this); this.outboundFirewallRules = new OutboundFirewallRulesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.recoverableDatabases = new RecoverableDatabasesClientImpl(this); this.recoverableManagedDatabases = new RecoverableManagedDatabasesClientImpl(this); + this.replicationLinks = new ReplicationLinksClientImpl(this); this.restorableDroppedDatabases = new RestorableDroppedDatabasesClientImpl(this); this.restorableDroppedManagedDatabases = new RestorableDroppedManagedDatabasesClientImpl(this); + this.restorePoints = new RestorePointsClientImpl(this); + this.sensitivityLabels = new SensitivityLabelsClientImpl(this); + this.recommendedSensitivityLabels = new RecommendedSensitivityLabelsClientImpl(this); + this.serverAdvancedThreatProtectionSettings = new ServerAdvancedThreatProtectionSettingsClientImpl(this); + this.serverAdvisors = new ServerAdvisorsClientImpl(this); + this.serverAutomaticTunings = new ServerAutomaticTuningsClientImpl(this); this.serverAzureADAdministrators = new ServerAzureADAdministratorsClientImpl(this); this.serverAzureADOnlyAuthentications = new ServerAzureADOnlyAuthenticationsClientImpl(this); - this.serverConfigurationOptions = new ServerConfigurationOptionsClientImpl(this); this.serverConnectionPolicies = new ServerConnectionPoliciesClientImpl(this); this.serverDevOpsAuditSettings = new ServerDevOpsAuditSettingsClientImpl(this); this.serverDnsAliases = new ServerDnsAliasesClientImpl(this); this.serverKeys = new ServerKeysClientImpl(this); + this.serverOperations = new ServerOperationsClientImpl(this); + this.servers = new ServersClientImpl(this); this.serverSecurityAlertPolicies = new ServerSecurityAlertPoliciesClientImpl(this); this.serverTrustCertificates = new ServerTrustCertificatesClientImpl(this); + this.serverTrustGroups = new ServerTrustGroupsClientImpl(this); + this.serverUsages = new ServerUsagesClientImpl(this); this.serverVulnerabilityAssessments = new ServerVulnerabilityAssessmentsClientImpl(this); - this.startStopManagedInstanceSchedules = new StartStopManagedInstanceSchedulesClientImpl(this); + this.sqlAgents = new SqlAgentsClientImpl(this); this.subscriptionUsages = new SubscriptionUsagesClientImpl(this); this.syncAgents = new SyncAgentsClientImpl(this); this.syncGroups = new SyncGroupsClientImpl(this); this.syncMembers = new SyncMembersClientImpl(this); + this.tdeCertificates = new TdeCertificatesClientImpl(this); this.timeZones = new TimeZonesClientImpl(this); + this.transparentDataEncryptions = new TransparentDataEncryptionsClientImpl(this); + this.usages = new UsagesClientImpl(this); this.virtualClusters = new VirtualClustersClientImpl(this); this.virtualNetworkRules = new VirtualNetworkRulesClientImpl(this); this.workloadClassifiers = new WorkloadClassifiersClientImpl(this); this.workloadGroups = new WorkloadGroupsClientImpl(this); - this.managedDatabaseSensitivityLabels = new ManagedDatabaseSensitivityLabelsClientImpl(this); - this.databaseEncryptionProtectors = new DatabaseEncryptionProtectorsClientImpl(this); - this.databaseOperations = new DatabaseOperationsClientImpl(this); - this.databaseUsages = new DatabaseUsagesClientImpl(this); - this.recommendedSensitivityLabels = new RecommendedSensitivityLabelsClientImpl(this); - this.synapseLinkWorkspaces = new SynapseLinkWorkspacesClientImpl(this); - this.serverOperations = new ServerOperationsClientImpl(this); - this.serverUsages = new ServerUsagesClientImpl(this); - this.tdeCertificates = new TdeCertificatesClientImpl(this); - this.databaseAdvancedThreatProtectionSettings = new DatabaseAdvancedThreatProtectionSettingsClientImpl(this); - this.databaseAdvisors = new DatabaseAdvisorsClientImpl(this); - this.databaseAutomaticTunings = new DatabaseAutomaticTuningsClientImpl(this); - this.databaseExtensionsOperations = new DatabaseExtensionsOperationsClientImpl(this); - this.databaseRecommendedActions = new DatabaseRecommendedActionsClientImpl(this); - this.databaseSqlVulnerabilityAssessmentBaselines - = new DatabaseSqlVulnerabilityAssessmentBaselinesClientImpl(this); - this.sqlVulnerabilityAssessmentBaselinesOperations - = new SqlVulnerabilityAssessmentBaselinesOperationsClientImpl(this); - this.databaseSqlVulnerabilityAssessmentsSettings - = new DatabaseSqlVulnerabilityAssessmentsSettingsClientImpl(this); - this.databaseSqlVulnerabilityAssessmentExecuteScans - = new DatabaseSqlVulnerabilityAssessmentExecuteScansClientImpl(this); - this.sqlVulnerabilityAssessmentExecuteScans = new SqlVulnerabilityAssessmentExecuteScansClientImpl(this); - this.sqlVulnerabilityAssessmentRuleBaselinesOperations - = new SqlVulnerabilityAssessmentRuleBaselinesOperationsClientImpl(this); - this.databaseSqlVulnerabilityAssessmentScans = new DatabaseSqlVulnerabilityAssessmentScansClientImpl(this); - this.databaseVulnerabilityAssessmentScans = new DatabaseVulnerabilityAssessmentScansClientImpl(this); - this.dataMaskingRules = new DataMaskingRulesClientImpl(this); - this.dataWarehouseUserActivitiesOperations = new DataWarehouseUserActivitiesOperationsClientImpl(this); - this.managedDatabaseSecurityEvents = new ManagedDatabaseSecurityEventsClientImpl(this); - this.managedDatabaseRecommendedSensitivityLabels - = new ManagedDatabaseRecommendedSensitivityLabelsClientImpl(this); - this.managedInstanceTdeCertificates = new ManagedInstanceTdeCertificatesClientImpl(this); - this.elasticPoolOperations = new ElasticPoolOperationsClientImpl(this); - this.usages = new UsagesClientImpl(this); - this.ledgerDigestUploadsOperations = new LedgerDigestUploadsOperationsClientImpl(this); - this.maintenanceWindowOptionsOperations = new MaintenanceWindowOptionsOperationsClientImpl(this); - this.maintenanceWindowsOperations = new MaintenanceWindowsOperationsClientImpl(this); - this.managedDatabaseAdvancedThreatProtectionSettings - = new ManagedDatabaseAdvancedThreatProtectionSettingsClientImpl(this); - this.managedDatabaseMoveOperations = new ManagedDatabaseMoveOperationsClientImpl(this); - this.managedDatabaseQueries = new ManagedDatabaseQueriesClientImpl(this); - this.managedDatabaseRestoreDetails = new ManagedDatabaseRestoreDetailsClientImpl(this); - this.managedDatabaseTransparentDataEncryptions = new ManagedDatabaseTransparentDataEncryptionsClientImpl(this); - this.managedInstanceAdvancedThreatProtectionSettings - = new ManagedInstanceAdvancedThreatProtectionSettingsClientImpl(this); - this.managedInstancePrivateLinkResources = new ManagedInstancePrivateLinkResourcesClientImpl(this); - this.managedLedgerDigestUploadsOperations = new ManagedLedgerDigestUploadsOperationsClientImpl(this); - this.serverAdvancedThreatProtectionSettings = new ServerAdvancedThreatProtectionSettingsClientImpl(this); - this.serverAutomaticTunings = new ServerAutomaticTuningsClientImpl(this); - this.sqlAgents = new SqlAgentsClientImpl(this); - this.transparentDataEncryptions = new TransparentDataEncryptionsClientImpl(this); - this.capabilities = new CapabilitiesClientImpl(this); } } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlServerSecurityAlertPolicyImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlServerSecurityAlertPolicyImpl.java index 02bc4b8347d6..84c34b0caf09 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlServerSecurityAlertPolicyImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlServerSecurityAlertPolicyImpl.java @@ -6,7 +6,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.ExternalChildResourceImpl; import com.azure.resourcemanager.sql.SqlServerManager; -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; +import com.azure.resourcemanager.sql.models.SecurityAlertPolicyNameAutoGenerated; import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; import com.azure.resourcemanager.sql.models.SqlServer; import com.azure.resourcemanager.sql.models.SqlServerSecurityAlertPolicy; @@ -182,8 +182,8 @@ public Mono createResourceAsync() { final SqlServerSecurityAlertPolicyImpl self = this; return this.sqlServerManager.serviceClient() .getServerSecurityAlertPolicies() - .createOrUpdateAsync(self.resourceGroupName, self.sqlServerName, SecurityAlertPolicyName.DEFAULT, - self.innerModel()) + .createOrUpdateAsync(self.resourceGroupName, self.sqlServerName, + SecurityAlertPolicyNameAutoGenerated.DEFAULT, self.innerModel()) .map(serverSecurityAlertPolicyInner -> { self.setInner(serverSecurityAlertPolicyInner); return self; @@ -205,7 +205,7 @@ public Mono deleteResourceAsync() { protected Mono getInnerAsync() { return this.sqlServerManager.serviceClient() .getServerSecurityAlertPolicies() - .getAsync(this.resourceGroupName, this.sqlServerName, SecurityAlertPolicyName.DEFAULT); + .getAsync(this.resourceGroupName, this.sqlServerName, SecurityAlertPolicyNameAutoGenerated.DEFAULT); } @Override diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlServerSecurityAlertPolicyOperationsImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlServerSecurityAlertPolicyOperationsImpl.java index 177036074ca2..d311de6952ca 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlServerSecurityAlertPolicyOperationsImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlServerSecurityAlertPolicyOperationsImpl.java @@ -5,7 +5,7 @@ import com.azure.resourcemanager.resources.fluentcore.arm.ResourceUtils; import com.azure.resourcemanager.resources.fluentcore.arm.models.implementation.ExternalChildResourceImpl; import com.azure.resourcemanager.sql.SqlServerManager; -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; +import com.azure.resourcemanager.sql.models.SecurityAlertPolicyNameAutoGenerated; import com.azure.resourcemanager.sql.models.SqlServer; import com.azure.resourcemanager.sql.models.SqlServerSecurityAlertPolicy; import com.azure.resourcemanager.sql.models.SqlServerSecurityAlertPolicyOperations; @@ -60,7 +60,7 @@ public Mono getAsync() { public SqlServerSecurityAlertPolicy getBySqlServer(String resourceGroupName, String sqlServerName) { ServerSecurityAlertPolicyInner serverSecurityAlertPolicyInner = this.sqlServerManager.serviceClient() .getServerSecurityAlertPolicies() - .get(resourceGroupName, sqlServerName, SecurityAlertPolicyName.DEFAULT); + .get(resourceGroupName, sqlServerName, SecurityAlertPolicyNameAutoGenerated.DEFAULT); return serverSecurityAlertPolicyInner != null ? new SqlServerSecurityAlertPolicyImpl(resourceGroupName, sqlServerName, serverSecurityAlertPolicyInner, this.sqlServerManager) @@ -73,7 +73,7 @@ public Mono getBySqlServerAsync(final String resou final SqlServerSecurityAlertPolicyOperationsImpl self = this; return this.sqlServerManager.serviceClient() .getServerSecurityAlertPolicies() - .getAsync(resourceGroupName, sqlServerName, SecurityAlertPolicyName.DEFAULT) + .getAsync(resourceGroupName, sqlServerName, SecurityAlertPolicyNameAutoGenerated.DEFAULT) .map(serverSecurityAlertPolicyInner -> new SqlServerSecurityAlertPolicyImpl(resourceGroupName, sqlServerName, serverSecurityAlertPolicyInner, self.sqlServerManager)); } @@ -84,7 +84,7 @@ public SqlServerSecurityAlertPolicy getBySqlServer(SqlServer sqlServer) { ServerSecurityAlertPolicyInner serverSecurityAlertPolicyInner = sqlServer.manager() .serviceClient() .getServerSecurityAlertPolicies() - .get(sqlServer.resourceGroupName(), sqlServer.name(), SecurityAlertPolicyName.DEFAULT); + .get(sqlServer.resourceGroupName(), sqlServer.name(), SecurityAlertPolicyNameAutoGenerated.DEFAULT); return serverSecurityAlertPolicyInner != null ? new SqlServerSecurityAlertPolicyImpl((SqlServerImpl) sqlServer, serverSecurityAlertPolicyInner, sqlServer.manager()) @@ -97,7 +97,7 @@ public Mono getBySqlServerAsync(final SqlServer sq return sqlServer.manager() .serviceClient() .getServerSecurityAlertPolicies() - .getAsync(sqlServer.resourceGroupName(), sqlServer.name(), SecurityAlertPolicyName.DEFAULT) + .getAsync(sqlServer.resourceGroupName(), sqlServer.name(), SecurityAlertPolicyNameAutoGenerated.DEFAULT) .map(serverSecurityAlertPolicyInner -> new SqlServerSecurityAlertPolicyImpl((SqlServerImpl) sqlServer, serverSecurityAlertPolicyInner, sqlServer.manager())); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentBaselinesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentBaselinesClientImpl.java deleted file mode 100644 index 3b1be62f7df3..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentBaselinesClientImpl.java +++ /dev/null @@ -1,521 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentBaselinesClient; -import com.azure.resourcemanager.sql.fluent.models.DatabaseSqlVulnerabilityAssessmentBaselineSetInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseSqlVulnerabilityAssessmentBaselineSetListResult; -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in SqlVulnerabilityAssessmentBaselinesClient. - */ -public final class SqlVulnerabilityAssessmentBaselinesClientImpl implements SqlVulnerabilityAssessmentBaselinesClient { - /** - * The proxy service used to perform REST calls. - */ - private final SqlVulnerabilityAssessmentBaselinesService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of SqlVulnerabilityAssessmentBaselinesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SqlVulnerabilityAssessmentBaselinesClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(SqlVulnerabilityAssessmentBaselinesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientSqlVulnerabilityAssessmentBaselines to be used by - * the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientSqlVulnerabilityAssessmentBaselines") - public interface SqlVulnerabilityAssessmentBaselinesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("baselineName") BaselineName baselineName, - @QueryParam("systemDatabaseName") VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySqlVulnerabilityAssessment( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @QueryParam("systemDatabaseName") VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySqlVulnerabilityAssessmentNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 database's sql vulnerability assessment rule baselines along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - 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 (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName 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, vulnerabilityAssessmentName, - baselineName, systemDatabaseName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 database's sql vulnerability assessment rule baselines along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName 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, serverName, vulnerabilityAssessmentName, baselineName, systemDatabaseName, accept, - context); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 database's sql vulnerability assessment rule baselines on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return getWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, - systemDatabaseName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 database's sql vulnerability assessment rule baselines along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, - systemDatabaseName, context).block(); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 database's sql vulnerability assessment rule baselines. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseSqlVulnerabilityAssessmentBaselineSetInner get(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return getWithResponse(resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, - systemDatabaseName, Context.NONE).getValue(); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 database's sql vulnerability assessment rule baselines along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySqlVulnerabilityAssessmentSinglePageAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - 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 (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listBySqlVulnerabilityAssessment(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, - vulnerabilityAssessmentName, systemDatabaseName, 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 a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 database's sql vulnerability assessment rule baselines along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySqlVulnerabilityAssessmentSinglePageAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listBySqlVulnerabilityAssessment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, - systemDatabaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBySqlVulnerabilityAssessmentAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return new PagedFlux<>( - () -> listBySqlVulnerabilityAssessmentSinglePageAsync(resourceGroupName, serverName, - vulnerabilityAssessmentName, systemDatabaseName), - nextLink -> listBySqlVulnerabilityAssessmentNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySqlVulnerabilityAssessmentAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - return new PagedFlux<>( - () -> listBySqlVulnerabilityAssessmentSinglePageAsync(resourceGroupName, serverName, - vulnerabilityAssessmentName, systemDatabaseName, context), - nextLink -> listBySqlVulnerabilityAssessmentNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySqlVulnerabilityAssessment( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return new PagedIterable<>(listBySqlVulnerabilityAssessmentAsync(resourceGroupName, serverName, - vulnerabilityAssessmentName, systemDatabaseName)); - } - - /** - * Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 database's sql vulnerability assessment rule baselines as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySqlVulnerabilityAssessment( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - return new PagedIterable<>(listBySqlVulnerabilityAssessmentAsync(resourceGroupName, serverName, - vulnerabilityAssessmentName, systemDatabaseName, 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 database's sql vulnerability assessment rule baselines along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySqlVulnerabilityAssessmentNextSinglePageAsync(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.listBySqlVulnerabilityAssessmentNext(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. - * @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 database's sql vulnerability assessment rule baselines along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySqlVulnerabilityAssessmentNextSinglePageAsync(String nextLink, Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listBySqlVulnerabilityAssessmentNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentBaselinesOperationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentBaselinesOperationsClientImpl.java deleted file mode 100644 index 1d0372f27368..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentBaselinesOperationsClientImpl.java +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentBaselinesOperationsClient; -import com.azure.resourcemanager.sql.fluent.models.DatabaseSqlVulnerabilityAssessmentBaselineSetInner; -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * SqlVulnerabilityAssessmentBaselinesOperationsClient. - */ -public final class SqlVulnerabilityAssessmentBaselinesOperationsClientImpl - implements SqlVulnerabilityAssessmentBaselinesOperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final SqlVulnerabilityAssessmentBaselinesOperationsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of SqlVulnerabilityAssessmentBaselinesOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SqlVulnerabilityAssessmentBaselinesOperationsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(SqlVulnerabilityAssessmentBaselinesOperationsService.class, - client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientSqlVulnerabilityAssessmentBaselinesOperations to - * be used by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientSqlVulnerabilityAssessmentBaselinesOperations") - public interface SqlVulnerabilityAssessmentBaselinesOperationsService { - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("baselineName") BaselineName baselineName, - @QueryParam("systemDatabaseName") VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput parameters, - Context context); - } - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment baseline set along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput 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 (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, - baselineName, systemDatabaseName, contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment baseline set along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, - systemDatabaseName, contentType, accept, parameters, context); - } - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment baseline set on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, - systemDatabaseName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment baseline set along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, - systemDatabaseName, parameters, context).block(); - } - - /** - * Add a database's vulnerability assessment rule baseline list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment baseline set. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseSqlVulnerabilityAssessmentBaselineSetInner createOrUpdate(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput parameters) { - return createOrUpdateWithResponse(resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, - systemDatabaseName, parameters, Context.NONE).getValue(); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentExecuteScansClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentExecuteScansClientImpl.java deleted file mode 100644 index 00d2d334d31d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentExecuteScansClientImpl.java +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation; - -import com.azure.core.annotation.ExpectedResponses; -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.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentExecuteScansClient; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; -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 - * SqlVulnerabilityAssessmentExecuteScansClient. - */ -public final class SqlVulnerabilityAssessmentExecuteScansClientImpl - implements SqlVulnerabilityAssessmentExecuteScansClient { - /** - * The proxy service used to perform REST calls. - */ - private final SqlVulnerabilityAssessmentExecuteScansService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of SqlVulnerabilityAssessmentExecuteScansClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SqlVulnerabilityAssessmentExecuteScansClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(SqlVulnerabilityAssessmentExecuteScansService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientSqlVulnerabilityAssessmentExecuteScans to be used - * by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientSqlVulnerabilityAssessmentExecuteScans") - public interface SqlVulnerabilityAssessmentExecuteScansService { - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/initiateScan") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> execute(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @QueryParam("systemDatabaseName") VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - Context context); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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>> executeWithResponseAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - 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 (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.execute(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, - systemDatabaseName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> executeWithResponseAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.execute(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, vulnerabilityAssessmentName, systemDatabaseName, context); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginExecuteAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - Mono>> mono - = executeWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, systemDatabaseName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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> beginExecuteAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = executeWithResponseAsync(resourceGroupName, serverName, - vulnerabilityAssessmentName, systemDatabaseName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginExecute(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return this.beginExecuteAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, systemDatabaseName) - .getSyncPoller(); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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> beginExecute(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - return this - .beginExecuteAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, systemDatabaseName, context) - .getSyncPoller(); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 executeAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return beginExecuteAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, systemDatabaseName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 executeAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - return beginExecuteAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, systemDatabaseName, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 execute(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - executeAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, systemDatabaseName).block(); - } - - /** - * Executes a Vulnerability Assessment database scan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 execute(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - executeAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, systemDatabaseName, context).block(); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentRuleBaselinesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentRuleBaselinesClientImpl.java deleted file mode 100644 index 36f86b64bac7..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentRuleBaselinesClientImpl.java +++ /dev/null @@ -1,761 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentRuleBaselinesClient; -import com.azure.resourcemanager.sql.fluent.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInner; -import com.azure.resourcemanager.sql.implementation.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult; -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInput; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * SqlVulnerabilityAssessmentRuleBaselinesClient. - */ -public final class SqlVulnerabilityAssessmentRuleBaselinesClientImpl - implements SqlVulnerabilityAssessmentRuleBaselinesClient { - /** - * The proxy service used to perform REST calls. - */ - private final SqlVulnerabilityAssessmentRuleBaselinesService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of SqlVulnerabilityAssessmentRuleBaselinesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SqlVulnerabilityAssessmentRuleBaselinesClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(SqlVulnerabilityAssessmentRuleBaselinesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientSqlVulnerabilityAssessmentRuleBaselines to be used - * by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientSqlVulnerabilityAssessmentRuleBaselines") - public interface SqlVulnerabilityAssessmentRuleBaselinesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("baselineName") BaselineName baselineName, @PathParam("ruleId") String ruleId, - @QueryParam("systemDatabaseName") VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("baselineName") BaselineName baselineName, @PathParam("ruleId") String ruleId, - @QueryParam("systemDatabaseName") VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") DatabaseSqlVulnerabilityAssessmentRuleBaselineInput parameters, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByBaseline( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("baselineName") BaselineName baselineName, - @QueryParam("systemDatabaseName") VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByBaselineNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database's sql vulnerability assessment rule baseline along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, String ruleId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - 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 (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName 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, vulnerabilityAssessmentName, - baselineName, ruleId, systemDatabaseName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 system database's sql vulnerability assessment rule baseline along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, String ruleId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName 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, serverName, vulnerabilityAssessmentName, baselineName, ruleId, systemDatabaseName, - accept, context); - } - - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database's sql vulnerability assessment rule baseline on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - String ruleId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return getWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, ruleId, - systemDatabaseName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 system database's sql vulnerability assessment rule baseline along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - String ruleId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, ruleId, - systemDatabaseName, context).block(); - } - - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database's sql vulnerability assessment rule baseline. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseSqlVulnerabilityAssessmentRuleBaselineInner get(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return getWithResponse(resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, ruleId, - systemDatabaseName, Context.NONE).getValue(); - } - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment rule baseline along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, String ruleId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineInput 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 (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, - baselineName, ruleId, systemDatabaseName, contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment rule baseline along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, String ruleId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineInput 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, - ruleId, systemDatabaseName, contentType, accept, parameters, context); - } - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment rule baseline on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - String ruleId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineInput parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, - ruleId, systemDatabaseName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment rule baseline along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, String ruleId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineInput parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, - ruleId, systemDatabaseName, parameters, context).block(); - } - - /** - * Creates or updates a database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @param parameters The requested rule baseline 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 database sql vulnerability assessment rule baseline. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseSqlVulnerabilityAssessmentRuleBaselineInner createOrUpdate(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - String ruleId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - DatabaseSqlVulnerabilityAssessmentRuleBaselineInput parameters) { - return createOrUpdateWithResponse(resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, - ruleId, systemDatabaseName, parameters, Context.NONE).getValue(); - } - - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database's sql vulnerability assessment rule baseline along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByBaselineSinglePageAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - 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 (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByBaseline(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, - baselineName, systemDatabaseName, 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 a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 system database's sql vulnerability assessment rule baseline along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByBaselineSinglePageAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - BaselineName baselineName, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByBaseline(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, systemDatabaseName, accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database's sql vulnerability assessment rule baseline as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByBaselineAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return new PagedFlux<>(() -> listByBaselineSinglePageAsync(resourceGroupName, serverName, - vulnerabilityAssessmentName, baselineName, systemDatabaseName), - nextLink -> listByBaselineNextSinglePageAsync(nextLink)); - } - - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 system database's sql vulnerability assessment rule baseline as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByBaselineAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - return new PagedFlux<>( - () -> listByBaselineSinglePageAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, - baselineName, systemDatabaseName, context), - nextLink -> listByBaselineNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database's sql vulnerability assessment rule baseline as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByBaseline(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return new PagedIterable<>(listByBaselineAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, - baselineName, systemDatabaseName)); - } - - /** - * Gets a system database's sql vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 system database's sql vulnerability assessment rule baseline as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByBaseline(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - return new PagedIterable<>(listByBaselineAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, - baselineName, systemDatabaseName, 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 system database's sql vulnerability assessment rule baseline along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByBaselineNextSinglePageAsync(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.listByBaselineNext(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. - * @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 system database's sql vulnerability assessment rule baseline along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByBaselineNextSinglePageAsync(String nextLink, Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listByBaselineNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentRuleBaselinesOperationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentRuleBaselinesOperationsClientImpl.java deleted file mode 100644 index eaee36c19a56..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentRuleBaselinesOperationsClientImpl.java +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation; - -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -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.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.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentRuleBaselinesOperationsClient; -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * SqlVulnerabilityAssessmentRuleBaselinesOperationsClient. - */ -public final class SqlVulnerabilityAssessmentRuleBaselinesOperationsClientImpl - implements SqlVulnerabilityAssessmentRuleBaselinesOperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final SqlVulnerabilityAssessmentRuleBaselinesOperationsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of SqlVulnerabilityAssessmentRuleBaselinesOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SqlVulnerabilityAssessmentRuleBaselinesOperationsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(SqlVulnerabilityAssessmentRuleBaselinesOperationsService.class, - client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientSqlVulnerabilityAssessmentRuleBaselinesOperations - * to be used by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientSqlVulnerabilityAssessmentRuleBaselinesOperations") - public interface SqlVulnerabilityAssessmentRuleBaselinesOperationsService { - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("baselineName") BaselineName baselineName, @PathParam("ruleId") String ruleId, - @QueryParam("systemDatabaseName") VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - Context context); - } - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - 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 (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, - baselineName, ruleId, systemDatabaseName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (baselineName == null) { - return Mono.error(new IllegalArgumentException("Parameter baselineName is required and cannot be null.")); - } - if (ruleId == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, ruleId, systemDatabaseName, - context); - } - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return deleteWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, ruleId, - systemDatabaseName).flatMap(ignored -> Mono.empty()); - } - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - return deleteWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, ruleId, - systemDatabaseName, context).block(); - } - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param baselineName The baselineName parameter. - * @param ruleId The vulnerability assessment rule ID. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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, - VulnerabilityAssessmentName vulnerabilityAssessmentName, BaselineName baselineName, String ruleId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - deleteWithResponse(resourceGroupName, serverName, vulnerabilityAssessmentName, baselineName, ruleId, - systemDatabaseName, Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentScanResultOperationsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentScanResultOperationsClientImpl.java deleted file mode 100644 index 5bf6b36690d0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentScanResultOperationsClientImpl.java +++ /dev/null @@ -1,534 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentScanResultOperationsClient; -import com.azure.resourcemanager.sql.fluent.models.SqlVulnerabilityAssessmentScanResultsInner; -import com.azure.resourcemanager.sql.implementation.models.SQLVulnerabilityAssessmentScanListResult; -import com.azure.resourcemanager.sql.models.SqlVulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * SqlVulnerabilityAssessmentScanResultOperationsClient. - */ -public final class SqlVulnerabilityAssessmentScanResultOperationsClientImpl - implements SqlVulnerabilityAssessmentScanResultOperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final SqlVulnerabilityAssessmentScanResultOperationsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of SqlVulnerabilityAssessmentScanResultOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SqlVulnerabilityAssessmentScanResultOperationsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(SqlVulnerabilityAssessmentScanResultOperationsService.class, - client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientSqlVulnerabilityAssessmentScanResultOperations to - * be used by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientSqlVulnerabilityAssessmentScanResultOperations") - public interface SqlVulnerabilityAssessmentScanResultOperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults/{scanResultId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("vulnerabilityAssessmentName") SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, @PathParam("scanResultId") String scanResultId, - @QueryParam("systemDatabaseName") VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByScan(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("vulnerabilityAssessmentName") SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, - @QueryParam("systemDatabaseName") VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByScanNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - String scanResultId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - 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 (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (scanId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); - } - if (scanResultId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanResultId is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName 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, vulnerabilityAssessmentName, scanId, - scanResultId, systemDatabaseName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @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 vulnerability assessment scan record of a database along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - String scanResultId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (scanId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); - } - if (scanResultId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanResultId is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName 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, serverName, vulnerabilityAssessmentName, scanId, scanResultId, systemDatabaseName, - accept, context); - } - - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, String scanResultId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return getWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, scanId, scanResultId, - systemDatabaseName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @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 vulnerability assessment scan record of a database along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String serverName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - String scanResultId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, scanId, scanResultId, - systemDatabaseName, context).block(); - } - - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param scanResultId The scan result id of the specific result to retrieve. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SqlVulnerabilityAssessmentScanResultsInner get(String resourceGroupName, String serverName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, String scanResultId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return getWithResponse(resourceGroupName, serverName, vulnerabilityAssessmentName, scanId, scanResultId, - systemDatabaseName, Context.NONE).getValue(); - } - - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByScanSinglePageAsync( - String resourceGroupName, String serverName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - 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 (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (scanId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByScan(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, scanId, - systemDatabaseName, 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 a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @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 vulnerability assessment scan record of a database along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByScanSinglePageAsync( - String resourceGroupName, String serverName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - String scanId, VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (scanId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByScan(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, vulnerabilityAssessmentName, scanId, systemDatabaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByScanAsync(String resourceGroupName, - String serverName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return new PagedFlux<>(() -> listByScanSinglePageAsync(resourceGroupName, serverName, - vulnerabilityAssessmentName, scanId, systemDatabaseName), - nextLink -> listByScanNextSinglePageAsync(nextLink)); - } - - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @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 vulnerability assessment scan record of a database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByScanAsync(String resourceGroupName, - String serverName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - return new PagedFlux<>(() -> listByScanSinglePageAsync(resourceGroupName, serverName, - vulnerabilityAssessmentName, scanId, systemDatabaseName, context), - nextLink -> listByScanNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vulnerability assessment scan record of a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByScan(String resourceGroupName, - String serverName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return new PagedIterable<>( - listByScanAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, scanId, systemDatabaseName)); - } - - /** - * Gets a vulnerability assessment scan record of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. - * @param systemDatabaseName The SQL vulnerability assessment system database name. - * @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 vulnerability assessment scan record of a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByScan(String resourceGroupName, - String serverName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - return new PagedIterable<>(listByScanAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, scanId, - systemDatabaseName, 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 vulnerability assessment scan record of a database along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByScanNextSinglePageAsync(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.listByScanNext(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. - * @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 vulnerability assessment scan record of a database along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByScanNextSinglePageAsync(String nextLink, Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listByScanNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentScansClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentScansClientImpl.java deleted file mode 100644 index 352c9e0fa227..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentScansClientImpl.java +++ /dev/null @@ -1,518 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentScansClient; -import com.azure.resourcemanager.sql.fluent.models.SqlVulnerabilityAssessmentScanRecordInner; -import com.azure.resourcemanager.sql.implementation.models.SqlVulnerabilityAssessmentScanRecordListResult; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in SqlVulnerabilityAssessmentScansClient. - */ -public final class SqlVulnerabilityAssessmentScansClientImpl implements SqlVulnerabilityAssessmentScansClient { - /** - * The proxy service used to perform REST calls. - */ - private final SqlVulnerabilityAssessmentScansService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of SqlVulnerabilityAssessmentScansClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SqlVulnerabilityAssessmentScansClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(SqlVulnerabilityAssessmentScansService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientSqlVulnerabilityAssessmentScans to be used by the - * proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientSqlVulnerabilityAssessmentScans") - public interface SqlVulnerabilityAssessmentScansService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @PathParam("scanId") String scanId, - @QueryParam("systemDatabaseName") VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySqlVulnerabilityAssessments( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @QueryParam("systemDatabaseName") VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySqlVulnerabilityAssessmentsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a system database vulnerability assessment scan record. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The scanId parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database vulnerability assessment scan record along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - 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 (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (scanId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName 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, vulnerabilityAssessmentName, scanId, - systemDatabaseName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a system database vulnerability assessment scan record. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The scanId parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 system database vulnerability assessment scan record along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (scanId == null) { - return Mono.error(new IllegalArgumentException("Parameter scanId is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName 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, serverName, vulnerabilityAssessmentName, scanId, systemDatabaseName, accept, context); - } - - /** - * Get a system database vulnerability assessment scan record. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The scanId parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database vulnerability assessment scan record on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return getWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, scanId, - systemDatabaseName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a system database vulnerability assessment scan record. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The scanId parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 system database vulnerability assessment scan record along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, scanId, - systemDatabaseName, context).block(); - } - - /** - * Get a system database vulnerability assessment scan record. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The scanId parameter. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a system database vulnerability assessment scan record. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SqlVulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return getWithResponse(resourceGroupName, serverName, vulnerabilityAssessmentName, scanId, systemDatabaseName, - Context.NONE).getValue(); - } - - /** - * Lists the vulnerability assessment scans of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 SqlVulnerabilityAssessmentScanRecord list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySqlVulnerabilityAssessmentsSinglePageAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - 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 (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listBySqlVulnerabilityAssessments(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, - vulnerabilityAssessmentName, systemDatabaseName, 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 vulnerability assessment scans of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 SqlVulnerabilityAssessmentScanRecord list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySqlVulnerabilityAssessmentsSinglePageAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - if (systemDatabaseName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemDatabaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listBySqlVulnerabilityAssessments(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, - systemDatabaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the vulnerability assessment scans of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 SqlVulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBySqlVulnerabilityAssessmentsAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return new PagedFlux<>( - () -> listBySqlVulnerabilityAssessmentsSinglePageAsync(resourceGroupName, serverName, - vulnerabilityAssessmentName, systemDatabaseName), - nextLink -> listBySqlVulnerabilityAssessmentsNextSinglePageAsync(nextLink)); - } - - /** - * Lists the vulnerability assessment scans of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 SqlVulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySqlVulnerabilityAssessmentsAsync( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - return new PagedFlux<>( - () -> listBySqlVulnerabilityAssessmentsSinglePageAsync(resourceGroupName, serverName, - vulnerabilityAssessmentName, systemDatabaseName, context), - nextLink -> listBySqlVulnerabilityAssessmentsNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the vulnerability assessment scans of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 SqlVulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySqlVulnerabilityAssessments( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName) { - return new PagedIterable<>(listBySqlVulnerabilityAssessmentsAsync(resourceGroupName, serverName, - vulnerabilityAssessmentName, systemDatabaseName)); - } - - /** - * Lists the vulnerability assessment scans of a database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param systemDatabaseName The vulnerability assessment system database name. - * @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 SqlVulnerabilityAssessmentScanRecord list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySqlVulnerabilityAssessments( - String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, Context context) { - return new PagedIterable<>(listBySqlVulnerabilityAssessmentsAsync(resourceGroupName, serverName, - vulnerabilityAssessmentName, systemDatabaseName, 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 the response of a SqlVulnerabilityAssessmentScanRecord list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySqlVulnerabilityAssessmentsNextSinglePageAsync(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.listBySqlVulnerabilityAssessmentsNext(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. - * @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 SqlVulnerabilityAssessmentScanRecord list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listBySqlVulnerabilityAssessmentsNextSinglePageAsync(String nextLink, Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listBySqlVulnerabilityAssessmentsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentsClientImpl.java deleted file mode 100644 index 56abdcfa6b1f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentsClientImpl.java +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation; - -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -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.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.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentsClient; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in SqlVulnerabilityAssessmentsClient. - */ -public final class SqlVulnerabilityAssessmentsClientImpl implements SqlVulnerabilityAssessmentsClient { - /** - * The proxy service used to perform REST calls. - */ - private final SqlVulnerabilityAssessmentsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of SqlVulnerabilityAssessmentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SqlVulnerabilityAssessmentsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(SqlVulnerabilityAssessmentsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientSqlVulnerabilityAssessments to be used by the - * proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientSqlVulnerabilityAssessments") - public interface SqlVulnerabilityAssessmentsService { - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - Context context); - } - - /** - * Removes SQL Vulnerability Assessment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { - 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 (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Removes SQL Vulnerability Assessment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, vulnerabilityAssessmentName, context); - } - - /** - * Removes SQL Vulnerability Assessment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { - return deleteWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Removes SQL Vulnerability Assessment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { - return deleteWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, context).block(); - } - - /** - * Removes SQL Vulnerability Assessment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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, - VulnerabilityAssessmentName vulnerabilityAssessmentName) { - deleteWithResponse(resourceGroupName, serverName, vulnerabilityAssessmentName, Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentsSettingsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentsSettingsClientImpl.java deleted file mode 100644 index f5080358eaa8..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentsSettingsClientImpl.java +++ /dev/null @@ -1,597 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.sql.fluent.SqlVulnerabilityAssessmentsSettingsClient; -import com.azure.resourcemanager.sql.fluent.models.SqlVulnerabilityAssessmentInner; -import com.azure.resourcemanager.sql.implementation.models.SqlVulnerabilityAssessmentListResult; -import com.azure.resourcemanager.sql.models.SqlVulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in SqlVulnerabilityAssessmentsSettingsClient. - */ -public final class SqlVulnerabilityAssessmentsSettingsClientImpl implements SqlVulnerabilityAssessmentsSettingsClient { - /** - * The proxy service used to perform REST calls. - */ - private final SqlVulnerabilityAssessmentsSettingsService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of SqlVulnerabilityAssessmentsSettingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SqlVulnerabilityAssessmentsSettingsClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(SqlVulnerabilityAssessmentsSettingsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientSqlVulnerabilityAssessmentsSettings to be used by - * the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientSqlVulnerabilityAssessmentsSettings") - public interface SqlVulnerabilityAssessmentsSettingsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("vulnerabilityAssessmentName") SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("vulnerabilityAssessmentName") VulnerabilityAssessmentName vulnerabilityAssessmentName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") SqlVulnerabilityAssessmentInner parameters, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") 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("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sQL Vulnerability Assessment policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName) { - 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 (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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, vulnerabilityAssessmentName, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @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 sQL Vulnerability Assessment policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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, serverName, vulnerabilityAssessmentName, accept, context); - } - - /** - * Gets SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sQL Vulnerability Assessment policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName) { - return getWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @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 sQL Vulnerability Assessment policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, context).block(); - } - - /** - * Gets SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sQL Vulnerability Assessment policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SqlVulnerabilityAssessmentInner get(String resourceGroupName, String serverName, - SqlVulnerabilityAssessmentName vulnerabilityAssessmentName) { - return getWithResponse(resourceGroupName, serverName, vulnerabilityAssessmentName, Context.NONE).getValue(); - } - - /** - * Creates or updates SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param parameters The requested 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 SQL Vulnerability Assessment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - SqlVulnerabilityAssessmentInner 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 (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, - contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param parameters The requested 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 SQL Vulnerability Assessment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - SqlVulnerabilityAssessmentInner 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (vulnerabilityAssessmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter vulnerabilityAssessmentName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, vulnerabilityAssessmentName, contentType, - accept, parameters, context); - } - - /** - * Creates or updates SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param parameters The requested 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 SQL Vulnerability Assessment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, SqlVulnerabilityAssessmentInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param parameters The requested 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 SQL Vulnerability Assessment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName, - SqlVulnerabilityAssessmentInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, serverName, vulnerabilityAssessmentName, parameters, - context).block(); - } - - /** - * Creates or updates SQL Vulnerability Assessment policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. - * @param parameters The requested 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 SQL Vulnerability Assessment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SqlVulnerabilityAssessmentInner createOrUpdate(String resourceGroupName, String serverName, - VulnerabilityAssessmentName vulnerabilityAssessmentName, SqlVulnerabilityAssessmentInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, serverName, vulnerabilityAssessmentName, parameters, - Context.NONE).getValue(); - } - - /** - * Lists SQL Vulnerability Assessment policies associated with 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 response of a SqlVulnerabilityAssessment list operation 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 SQL Vulnerability Assessment policies associated with 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 response of a SqlVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Lists SQL Vulnerability Assessment policies associated with 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 response of a SqlVulnerabilityAssessment list operation 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 SQL Vulnerability Assessment policies associated with 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 response of a SqlVulnerabilityAssessment list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists SQL Vulnerability Assessment policies associated with 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 response of a SqlVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Lists SQL Vulnerability Assessment policies associated with 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 response of a SqlVulnerabilityAssessment list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, 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 the response of a SqlVulnerabilityAssessment list operation 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. - * @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 SqlVulnerabilityAssessment list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync(String nextLink, - Context context) { - 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"; - context = this.client.mergeContext(context); - return 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)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/StartStopManagedInstanceSchedulesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/StartStopManagedInstanceSchedulesClientImpl.java deleted file mode 100644 index 66fe960b3538..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/StartStopManagedInstanceSchedulesClientImpl.java +++ /dev/null @@ -1,758 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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; -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.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.resourcemanager.sql.fluent.StartStopManagedInstanceSchedulesClient; -import com.azure.resourcemanager.sql.fluent.models.StartStopManagedInstanceScheduleInner; -import com.azure.resourcemanager.sql.implementation.models.StartStopManagedInstanceScheduleListResult; -import com.azure.resourcemanager.sql.models.StartStopScheduleName; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in StartStopManagedInstanceSchedulesClient. - */ -public final class StartStopManagedInstanceSchedulesClientImpl implements StartStopManagedInstanceSchedulesClient { - /** - * The proxy service used to perform REST calls. - */ - private final StartStopManagedInstanceSchedulesService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of StartStopManagedInstanceSchedulesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - StartStopManagedInstanceSchedulesClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(StartStopManagedInstanceSchedulesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientStartStopManagedInstanceSchedules to be used by - * the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientStartStopManagedInstanceSchedules") - public interface StartStopManagedInstanceSchedulesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/startStopSchedules/{startStopScheduleName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("startStopScheduleName") StartStopScheduleName startStopScheduleName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/startStopSchedules/{startStopScheduleName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("startStopScheduleName") StartStopScheduleName startStopScheduleName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") StartStopManagedInstanceScheduleInner parameters, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/startStopSchedules/{startStopScheduleName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, - @PathParam("startStopScheduleName") StartStopScheduleName startStopScheduleName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/startStopSchedules") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstance( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("managedInstanceName") String managedInstanceName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstanceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 instance's Start/Stop schedule along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, StartStopScheduleName startStopScheduleName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (startStopScheduleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter startStopScheduleName 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, managedInstanceName, startStopScheduleName, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @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 instance's Start/Stop schedule along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String managedInstanceName, StartStopScheduleName startStopScheduleName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (startStopScheduleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter startStopScheduleName 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, managedInstanceName, startStopScheduleName, accept, context); - } - - /** - * Gets the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 instance's Start/Stop schedule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String managedInstanceName, - StartStopScheduleName startStopScheduleName) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, startStopScheduleName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @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 instance's Start/Stop schedule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String managedInstanceName, StartStopScheduleName startStopScheduleName, Context context) { - return getWithResponseAsync(resourceGroupName, managedInstanceName, startStopScheduleName, context).block(); - } - - /** - * Gets the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 instance's Start/Stop schedule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public StartStopManagedInstanceScheduleInner get(String resourceGroupName, String managedInstanceName, - StartStopScheduleName startStopScheduleName) { - return getWithResponse(resourceGroupName, managedInstanceName, startStopScheduleName, Context.NONE).getValue(); - } - - /** - * Creates or updates the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @param parameters The requested managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed instance's Start/Stop schedule along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, StartStopScheduleName startStopScheduleName, - StartStopManagedInstanceScheduleInner 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (startStopScheduleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter startStopScheduleName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, startStopScheduleName, - contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @param parameters The requested managed instance Start/Stop schedule. - * @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 managed instance's Start/Stop schedule along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String managedInstanceName, StartStopScheduleName startStopScheduleName, - StartStopManagedInstanceScheduleInner 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (startStopScheduleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter startStopScheduleName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, startStopScheduleName, contentType, - accept, parameters, context); - } - - /** - * Creates or updates the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @param parameters The requested managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed instance's Start/Stop schedule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, - String managedInstanceName, StartStopScheduleName startStopScheduleName, - StartStopManagedInstanceScheduleInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, startStopScheduleName, - parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @param parameters The requested managed instance Start/Stop schedule. - * @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 managed instance's Start/Stop schedule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String managedInstanceName, StartStopScheduleName startStopScheduleName, - StartStopManagedInstanceScheduleInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, startStopScheduleName, - parameters, context).block(); - } - - /** - * Creates or updates the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @param parameters The requested managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed instance's Start/Stop schedule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public StartStopManagedInstanceScheduleInner createOrUpdate(String resourceGroupName, String managedInstanceName, - StartStopScheduleName startStopScheduleName, StartStopManagedInstanceScheduleInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, managedInstanceName, startStopScheduleName, parameters, - Context.NONE).getValue(); - } - - /** - * Deletes the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managedInstanceName, - StartStopScheduleName startStopScheduleName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (startStopScheduleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter startStopScheduleName is required and cannot be null.")); - } - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, startStopScheduleName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String managedInstanceName, - StartStopScheduleName startStopScheduleName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - if (startStopScheduleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter startStopScheduleName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, startStopScheduleName, context); - } - - /** - * Deletes the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 managedInstanceName, - StartStopScheduleName startStopScheduleName) { - return deleteWithResponseAsync(resourceGroupName, managedInstanceName, startStopScheduleName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String managedInstanceName, - StartStopScheduleName startStopScheduleName, Context context) { - return deleteWithResponseAsync(resourceGroupName, managedInstanceName, startStopScheduleName, context).block(); - } - - /** - * Deletes the managed instance's Start/Stop schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @param startStopScheduleName Name of the managed instance Start/Stop schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 managedInstanceName, - StartStopScheduleName startStopScheduleName) { - deleteWithResponse(resourceGroupName, managedInstanceName, startStopScheduleName, Context.NONE); - } - - /** - * Lists the managed instance's Start/Stop schedules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 StartStopManagedInstanceSchedule list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName) { - 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, managedInstanceName, 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 managed instance's Start/Stop schedules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 StartStopManagedInstanceSchedule list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceSinglePageAsync(String resourceGroupName, String managedInstanceName, 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 (managedInstanceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByInstance(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, managedInstanceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the managed instance's Start/Stop schedules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 StartStopManagedInstanceSchedule list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName), - nextLink -> listByInstanceNextSinglePageAsync(nextLink)); - } - - /** - * Lists the managed instance's Start/Stop schedules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 StartStopManagedInstanceSchedule list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByInstanceAsync(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedFlux<>(() -> listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName, context), - nextLink -> listByInstanceNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the managed instance's Start/Stop schedules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 StartStopManagedInstanceSchedule list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName)); - } - - /** - * Lists the managed instance's Start/Stop schedules. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param managedInstanceName The name of the managed instance. - * @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 StartStopManagedInstanceSchedule list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByInstance(String resourceGroupName, - String managedInstanceName, Context context) { - return new PagedIterable<>(listByInstanceAsync(resourceGroupName, managedInstanceName, 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 the response of a StartStopManagedInstanceSchedule list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceNextSinglePageAsync(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.listByInstanceNext(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. - * @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 StartStopManagedInstanceSchedule list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByInstanceNextSinglePageAsync(String nextLink, Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listByInstanceNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SubscriptionUsagesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SubscriptionUsagesClientImpl.java index d16d86e71643..b25c28e42511 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SubscriptionUsagesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SubscriptionUsagesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.SubscriptionUsagesClient; import com.azure.resourcemanager.sql.fluent.models.SubscriptionUsageInner; -import com.azure.resourcemanager.sql.implementation.models.SubscriptionUsageListResult; +import com.azure.resourcemanager.sql.models.SubscriptionUsageListResult; import reactor.core.publisher.Mono; /** @@ -59,272 +59,272 @@ public final class SubscriptionUsagesClientImpl implements SubscriptionUsagesCli * The interface defining all the services for SqlManagementClientSubscriptionUsages to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientSubscriptionUsages") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface SubscriptionUsagesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages/{usageName}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, @PathParam("usageName") String usageName, - @HeaderParam("Accept") String accept, Context context); + Mono> listByLocation(@HostParam("$host") String endpoint, + @PathParam("locationName") String locationName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages/{usageName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("locationName") String locationName, @PathParam("usageName") String usageName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a subscription usage metric. + * Gets all subscription usage metrics in a given location. * * @param locationName The name of the region where the resource is located. - * @param usageName Name of usage metric to return. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a subscription usage metric along with {@link Response} on successful completion of {@link Mono}. + * @return all subscription usage metrics in a given location along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String locationName, String usageName) { + private Mono> listByLocationSinglePageAsync(String locationName) { 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 (usageName == null) { - return Mono.error(new IllegalArgumentException("Parameter usageName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, usageName, accept, context)) + .withContext(context -> service.listByLocation(this.client.getEndpoint(), locationName, + this.client.getSubscriptionId(), 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())); } /** - * Gets a subscription usage metric. + * Gets all subscription usage metrics in a given location. * * @param locationName The name of the region where the resource is located. - * @param usageName Name of usage metric to return. * @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 subscription usage metric along with {@link Response} on successful completion of {@link Mono}. + * @return all subscription usage metrics in a given location along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String locationName, String usageName, + private Mono> listByLocationSinglePageAsync(String locationName, 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } - if (usageName == null) { - return Mono.error(new IllegalArgumentException("Parameter usageName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - locationName, usageName, accept, context); + return service + .listByLocation(this.client.getEndpoint(), locationName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a subscription usage metric. + * Gets all subscription usage metrics in a given location. * * @param locationName The name of the region where the resource is located. - * @param usageName Name of usage metric to return. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a subscription usage metric on successful completion of {@link Mono}. + * @return all subscription usage metrics in a given location as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String locationName, String usageName) { - return getWithResponseAsync(locationName, usageName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByLocationAsync(String locationName) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** - * Gets a subscription usage metric. + * Gets all subscription usage metrics in a given location. * * @param locationName The name of the region where the resource is located. - * @param usageName Name of usage metric to return. * @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 subscription usage metric along with {@link Response}. + * @return all subscription usage metrics in a given location as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String locationName, String usageName, Context context) { - return getWithResponseAsync(locationName, usageName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String locationName, Context context) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, context), + nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); } /** - * Gets a subscription usage metric. + * Gets all subscription usage metrics in a given location. * * @param locationName The name of the region where the resource is located. - * @param usageName Name of usage metric to return. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a subscription usage metric. + * @return all subscription usage metrics in a given location as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SubscriptionUsageInner get(String locationName, String usageName) { - return getWithResponse(locationName, usageName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String locationName) { + return new PagedIterable<>(listByLocationAsync(locationName)); } /** * Gets all subscription usage metrics in a given location. * * @param locationName The name of the region where the resource is located. + * @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 all subscription usage metrics in a given location along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return all subscription usage metrics in a given location as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String locationName, Context context) { + return new PagedIterable<>(listByLocationAsync(locationName, context)); + } + + /** + * Gets a subscription usage metric. + * + * @param locationName The name of the region where the resource is located. + * @param usageName Name of usage metric to return. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a subscription usage metric along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String locationName) { + public Mono> getWithResponseAsync(String locationName, String usageName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (usageName == null) { + return Mono.error(new IllegalArgumentException("Parameter usageName 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.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByLocation(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)) + .withContext(context -> service.get(this.client.getEndpoint(), locationName, usageName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets all subscription usage metrics in a given location. + * Gets a subscription usage metric. * * @param locationName The name of the region where the resource is located. + * @param usageName Name of usage metric to return. * @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 all subscription usage metrics in a given location along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a subscription usage metric along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String locationName, + private Mono> getWithResponseAsync(String locationName, String usageName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (usageName == null) { + return Mono.error(new IllegalArgumentException("Parameter usageName 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.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByLocation(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)); + return service.get(this.client.getEndpoint(), locationName, usageName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); } /** - * Gets all subscription usage metrics in a given location. + * Gets a subscription usage metric. * * @param locationName The name of the region where the resource is located. + * @param usageName Name of usage metric to return. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 subscription usage metrics in a given location as paginated response with {@link PagedFlux}. + * @return a subscription usage metric on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByLocationAsync(String locationName) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String locationName, String usageName) { + return getWithResponseAsync(locationName, usageName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets all subscription usage metrics in a given location. + * Gets a subscription usage metric. * * @param locationName The name of the region where the resource is located. + * @param usageName Name of usage metric to return. * @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 all subscription usage metrics in a given location as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String locationName, Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, context), - nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all subscription usage metrics in a given location. - * - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 subscription usage metrics in a given location as paginated response with {@link PagedIterable}. + * @return a subscription usage metric along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String locationName) { - return new PagedIterable<>(listByLocationAsync(locationName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String locationName, String usageName, Context context) { + return getWithResponseAsync(locationName, usageName, context).block(); } /** - * Gets all subscription usage metrics in a given location. + * Gets a subscription usage metric. * * @param locationName The name of the region where the resource is located. - * @param context The context to associate with this operation. + * @param usageName Name of usage metric to return. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 subscription usage metrics in a given location as paginated response with {@link PagedIterable}. + * @return a subscription usage metric. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String locationName, Context context) { - return new PagedIterable<>(listByLocationAsync(locationName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public SubscriptionUsageInner get(String locationName, String usageName) { + return getWithResponse(locationName, usageName, Context.NONE).getValue(); } /** @@ -334,7 +334,7 @@ public PagedIterable listByLocation(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 all subscription usage metrics in a given location along with {@link PagedResponse} on successful + * @return a list of subscription usage metrics in a location along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -362,7 +362,7 @@ private Mono> listByLocationNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 subscription usage metrics in a given location along with {@link PagedResponse} on successful + * @return a list of subscription usage metrics in a location along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SynapseLinkWorkspacesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SynapseLinkWorkspacesClientImpl.java deleted file mode 100644 index bb75a93d8bf2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SynapseLinkWorkspacesClientImpl.java +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.resourcemanager.sql.fluent.SynapseLinkWorkspacesClient; -import com.azure.resourcemanager.sql.fluent.models.SynapseLinkWorkspaceInner; -import com.azure.resourcemanager.sql.implementation.models.SynapseLinkWorkspaceListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in SynapseLinkWorkspacesClient. - */ -public final class SynapseLinkWorkspacesClientImpl implements SynapseLinkWorkspacesClient { - /** - * The proxy service used to perform REST calls. - */ - private final SynapseLinkWorkspacesService service; - - /** - * The service client containing this operation class. - */ - private final SqlManagementClientImpl client; - - /** - * Initializes an instance of SynapseLinkWorkspacesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SynapseLinkWorkspacesClientImpl(SqlManagementClientImpl client) { - this.service = RestProxy.create(SynapseLinkWorkspacesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SqlManagementClientSynapseLinkWorkspaces to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientSynapseLinkWorkspaces") - public interface SynapseLinkWorkspacesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/linkWorkspaces") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets all synapselink workspaces for a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 synapselink workspaces for a database along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, 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 all synapselink workspaces for a 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 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 all synapselink workspaces for a database along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets all synapselink workspaces for a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 synapselink workspaces for a database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Gets all synapselink workspaces for a 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 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 all synapselink workspaces for a database as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all synapselink workspaces for a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 synapselink workspaces for a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); - } - - /** - * Gets all synapselink workspaces for a 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 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 all synapselink workspaces for a database as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, 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 all synapselink workspaces for a database along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync(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.listByDatabaseNext(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. - * @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 all synapselink workspaces for a database along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseNextSinglePageAsync(String nextLink, - Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listByDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncAgentsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncAgentsClientImpl.java index 99142f8cc0cb..cbfc05fee988 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncAgentsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncAgentsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -36,8 +36,8 @@ import com.azure.resourcemanager.sql.fluent.models.SyncAgentInner; import com.azure.resourcemanager.sql.fluent.models.SyncAgentKeyPropertiesInner; import com.azure.resourcemanager.sql.fluent.models.SyncAgentLinkedDatabaseInner; -import com.azure.resourcemanager.sql.implementation.models.SyncAgentLinkedDatabaseListResult; -import com.azure.resourcemanager.sql.implementation.models.SyncAgentListResult; +import com.azure.resourcemanager.sql.models.SyncAgentLinkedDatabaseListResult; +import com.azure.resourcemanager.sql.models.SyncAgentListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -71,70 +71,70 @@ public final class SyncAgentsClientImpl implements SyncAgentsClient { * The interface defining all the services for SqlManagementClientSyncAgents to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientSyncAgents") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface SyncAgentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("syncAgentName") String syncAgentName, @HeaderParam("Accept") String accept, Context context); + @PathParam("syncAgentName") String syncAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("syncAgentName") String syncAgentName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") SyncAgentInner parameters, - Context context); + @PathParam("syncAgentName") String syncAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") SyncAgentInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("syncAgentName") String syncAgentName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("syncAgentName") String syncAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/generateKey") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateKey(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> generateKey(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("syncAgentName") String syncAgentName, @HeaderParam("Accept") String accept, Context context); + @PathParam("syncAgentName") String syncAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/linkedDatabases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listLinkedDatabases(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listLinkedDatabases(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("syncAgentName") String syncAgentName, @HeaderParam("Accept") String accept, Context context); + @PathParam("syncAgentName") String syncAgentName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @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("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -142,15 +142,161 @@ Mono> listByServerNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listLinkedDatabasesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Lists sync agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 sync agents 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 (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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Lists sync agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @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 sync agents along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists sync agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 sync agents 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 sync agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @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 sync agents as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists sync agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 sync agents as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Lists sync agents in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. + * @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 sync agents as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + /** * Gets a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -164,10 +310,6 @@ public Mono> getWithResponseAsync(String resourceGroupN 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.")); @@ -178,18 +320,23 @@ public Mono> getWithResponseAsync(String resourceGroupN if (syncAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter syncAgentName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, syncAgentName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, syncAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -204,10 +351,6 @@ private Mono> getWithResponseAsync(String resourceGroup 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.")); @@ -218,17 +361,22 @@ private Mono> getWithResponseAsync(String resourceGroup if (syncAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter syncAgentName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, syncAgentName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, syncAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -244,8 +392,9 @@ public Mono getAsync(String resourceGroupName, String serverName /** * Gets a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -262,8 +411,9 @@ public Response getWithResponse(String resourceGroupName, String /** * Gets a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -278,8 +428,9 @@ public SyncAgentInner get(String resourceGroupName, String serverName, String sy /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -294,10 +445,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -308,25 +455,29 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (syncAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter syncAgentName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, syncAgentName, contentType, accept, - parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + syncAgentName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @param context The context to associate with this operation. @@ -342,10 +493,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -356,24 +503,27 @@ private Mono>> createOrUpdateWithResponseAsync(String if (syncAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter syncAgentName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, syncAgentName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, syncAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -393,8 +543,9 @@ public PollerFlux, SyncAgentInner> beginCreateOrUpdat /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @param context The context to associate with this operation. @@ -416,8 +567,9 @@ private PollerFlux, SyncAgentInner> beginCreateOrUpda /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -434,8 +586,9 @@ public SyncPoller, SyncAgentInner> beginCreateOrUpdat /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @param context The context to associate with this operation. @@ -454,8 +607,9 @@ public SyncPoller, SyncAgentInner> beginCreateOrUpdat /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -473,8 +627,9 @@ public Mono createOrUpdateAsync(String resourceGroupName, String /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @param context The context to associate with this operation. @@ -493,8 +648,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -511,8 +667,9 @@ public SyncAgentInner createOrUpdate(String resourceGroupName, String serverName /** * Creates or updates a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param parameters The requested sync agent resource state. * @param context The context to associate with this operation. @@ -530,8 +687,9 @@ public SyncAgentInner createOrUpdate(String resourceGroupName, String serverName /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -545,10 +703,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -559,17 +713,22 @@ public Mono>> deleteWithResponseAsync(String resourceG if (syncAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter syncAgentName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, syncAgentName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + syncAgentName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -584,10 +743,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -598,16 +753,21 @@ private Mono>> deleteWithResponseAsync(String resource if (syncAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter syncAgentName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, syncAgentName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, syncAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -625,8 +785,9 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -647,8 +808,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -664,8 +826,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -682,8 +845,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -699,8 +863,9 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -717,8 +882,9 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -732,8 +898,9 @@ public void delete(String resourceGroupName, String serverName, String syncAgent /** * Deletes a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -745,152 +912,12 @@ public void delete(String resourceGroupName, String serverName, String syncAgent deleteAsync(resourceGroupName, serverName, syncAgentName, context).block(); } - /** - * Lists sync agents 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 the response of a SyncAgent list operation 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 sync agents in 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 response of a SyncAgent list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName, - 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Lists sync agents 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 the response of a SyncAgent list operation 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 sync agents in 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 response of a SyncAgent list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists sync agents 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 the response of a SyncAgent list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Lists sync agents in 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 response of a SyncAgent list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); - } - /** * Generates a sync agent key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -905,10 +932,6 @@ public Mono> generateKeyWithResponseAsync( 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.")); @@ -919,18 +942,23 @@ public Mono> generateKeyWithResponseAsync( if (syncAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter syncAgentName 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"; return FluxUtil - .withContext(context -> service.generateKey(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, syncAgentName, accept, context)) + .withContext(context -> service.generateKey(this.client.getEndpoint(), resourceGroupName, serverName, + syncAgentName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Generates a sync agent key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -946,10 +974,6 @@ private Mono> generateKeyWithResponseAsync 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.")); @@ -960,17 +984,22 @@ private Mono> generateKeyWithResponseAsync if (syncAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter syncAgentName 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.generateKey(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, syncAgentName, accept, context); + return service.generateKey(this.client.getEndpoint(), resourceGroupName, serverName, syncAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Generates a sync agent key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -987,8 +1016,9 @@ public Mono generateKeyAsync(String resourceGroupNa /** * Generates a sync agent key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1005,8 +1035,9 @@ public Response generateKeyWithResponse(String reso /** * Generates a sync agent key. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1021,14 +1052,15 @@ public SyncAgentKeyPropertiesInner generateKey(String resourceGroupName, String /** * Lists databases linked to a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 SyncAgentLinkedDatabase list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of sync agent linked databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -1037,10 +1069,6 @@ public SyncAgentKeyPropertiesInner generateKey(String resourceGroupName, String 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.")); @@ -1051,10 +1079,15 @@ public SyncAgentKeyPropertiesInner generateKey(String resourceGroupName, String if (syncAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter syncAgentName 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"; return FluxUtil - .withContext(context -> service.listLinkedDatabases(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, syncAgentName, accept, context)) + .withContext( + context -> service.listLinkedDatabases(this.client.getEndpoint(), resourceGroupName, serverName, + syncAgentName, this.client.getSubscriptionId(), 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())); @@ -1063,15 +1096,16 @@ public SyncAgentKeyPropertiesInner generateKey(String resourceGroupName, String /** * Lists databases linked to a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @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 SyncAgentLinkedDatabase list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of sync agent linked databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listLinkedDatabasesSinglePageAsync( @@ -1080,10 +1114,6 @@ private Mono> listLinkedDatabasesSin 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.")); @@ -1094,11 +1124,15 @@ private Mono> listLinkedDatabasesSin if (syncAgentName == null) { return Mono.error(new IllegalArgumentException("Parameter syncAgentName 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 - .listLinkedDatabases(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, syncAgentName, accept, context) + .listLinkedDatabases(this.client.getEndpoint(), resourceGroupName, serverName, syncAgentName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -1106,13 +1140,14 @@ private Mono> listLinkedDatabasesSin /** * Lists databases linked to a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 SyncAgentLinkedDatabase list operation as paginated response with {@link PagedFlux}. + * @return a list of sync agent linked databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listLinkedDatabasesAsync(String resourceGroupName, String serverName, @@ -1124,14 +1159,15 @@ public PagedFlux listLinkedDatabasesAsync(String r /** * Lists databases linked to a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @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 SyncAgentLinkedDatabase list operation as paginated response with {@link PagedFlux}. + * @return a list of sync agent linked databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listLinkedDatabasesAsync(String resourceGroupName, @@ -1144,14 +1180,14 @@ private PagedFlux listLinkedDatabasesAsync(String /** * Lists databases linked to a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 SyncAgentLinkedDatabase list operation as paginated response with - * {@link PagedIterable}. + * @return a list of sync agent linked databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listLinkedDatabases(String resourceGroupName, String serverName, @@ -1162,15 +1198,15 @@ public PagedIterable listLinkedDatabases(String re /** * Lists databases linked to a sync agent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server on which the sync agent is hosted. * @param syncAgentName The name of the sync agent. * @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 SyncAgentLinkedDatabase list operation as paginated response with - * {@link PagedIterable}. + * @return a list of sync agent linked databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listLinkedDatabases(String resourceGroupName, String serverName, @@ -1185,8 +1221,7 @@ public PagedIterable listLinkedDatabases(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 SyncAgent list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of sync agents along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -1213,8 +1248,7 @@ private Mono> listByServerNextSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 SyncAgent list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of sync agents along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, Context context) { @@ -1239,8 +1273,8 @@ private Mono> listByServerNextSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 SyncAgentLinkedDatabase list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of sync agent linked databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listLinkedDatabasesNextSinglePageAsync(String nextLink) { @@ -1268,8 +1302,8 @@ private Mono> listLinkedDatabasesNex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 SyncAgentLinkedDatabase list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of sync agent linked databases along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listLinkedDatabasesNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncGroupsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncGroupsClientImpl.java index b36816143106..1a068a82c78e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncGroupsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncGroupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -38,10 +38,10 @@ import com.azure.resourcemanager.sql.fluent.models.SyncFullSchemaPropertiesInner; import com.azure.resourcemanager.sql.fluent.models.SyncGroupInner; import com.azure.resourcemanager.sql.fluent.models.SyncGroupLogPropertiesInner; -import com.azure.resourcemanager.sql.implementation.models.SyncDatabaseIdListResult; -import com.azure.resourcemanager.sql.implementation.models.SyncFullSchemaPropertiesListResult; -import com.azure.resourcemanager.sql.implementation.models.SyncGroupListResult; -import com.azure.resourcemanager.sql.implementation.models.SyncGroupLogListResult; +import com.azure.resourcemanager.sql.models.SyncDatabaseIdListResult; +import com.azure.resourcemanager.sql.models.SyncFullSchemaPropertiesListResult; +import com.azure.resourcemanager.sql.models.SyncGroupListResult; +import com.azure.resourcemanager.sql.models.SyncGroupLogListResult; import com.azure.resourcemanager.sql.models.SyncGroupsType; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -76,124 +76,134 @@ public final class SyncGroupsClientImpl implements SyncGroupsClient { * The interface defining all the services for SqlManagementClientSyncGroups to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientSyncGroups") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface SyncGroupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSyncDatabaseIds(@HostParam("$host") String endpoint, + @PathParam("locationName") String locationName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") SyncGroupInner parameters, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") SyncGroupInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SyncGroupInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups") - @ExpectedResponses({ 200 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SyncGroupInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/cancelSync") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> cancelSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> cancelSync(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listHubSchemas(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listHubSchemas(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listLogs(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listLogs(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, @QueryParam("startTime") String startTime, @QueryParam("endTime") String endTime, @QueryParam("type") SyncGroupsType type, @QueryParam("continuationToken") String continuationToken, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> refreshHubSchema(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> refreshHubSchema(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> triggerSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> triggerSync(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds") + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSyncDatabaseIds(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); + Mono> listSyncDatabaseIdsNext( + @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> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -201,7 +211,7 @@ Mono> listByDatabaseNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listHubSchemasNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -209,184 +219,155 @@ Mono> listHubSchemasNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listLogsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSyncDatabaseIdsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a sync group. + * Gets a collection of sync database ids. * - * @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 syncGroupName The name of the sync group. + * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a sync group along with {@link Response} on successful completion of {@link Mono}. + * @return a collection of sync database ids along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName) { + private Mono> listSyncDatabaseIdsSinglePageAsync(String locationName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (syncGroupName == null) { - return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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, databaseName, syncGroupName, accept, - context)) + .withContext(context -> service.listSyncDatabaseIds(this.client.getEndpoint(), locationName, + this.client.getSubscriptionId(), 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())); } /** - * Gets a sync group. + * Gets a collection of sync database ids. * - * @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 syncGroupName The name of the sync group. + * @param locationName The name of the region where the resource is located. * @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 sync group along with {@link Response} on successful completion of {@link Mono}. + * @return a collection of sync database ids along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, Context context) { + private Mono> listSyncDatabaseIdsSinglePageAsync(String locationName, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (syncGroupName == null) { - return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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, serverName, databaseName, syncGroupName, accept, context); + return service + .listSyncDatabaseIds(this.client.getEndpoint(), locationName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a sync group. + * Gets a collection of sync database ids. * - * @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 syncGroupName The name of the sync group. + * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a sync group on successful completion of {@link Mono}. + * @return a collection of sync database ids as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String databaseName, - String syncGroupName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listSyncDatabaseIdsAsync(String locationName) { + return new PagedFlux<>(() -> listSyncDatabaseIdsSinglePageAsync(locationName), + nextLink -> listSyncDatabaseIdsNextSinglePageAsync(nextLink)); } /** - * Gets a sync group. + * Gets a collection of sync database ids. * - * @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 syncGroupName The name of the sync group. + * @param locationName The name of the region where the resource is located. * @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 sync group along with {@link Response}. + * @return a collection of sync database ids as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSyncDatabaseIdsAsync(String locationName, Context context) { + return new PagedFlux<>(() -> listSyncDatabaseIdsSinglePageAsync(locationName, context), + nextLink -> listSyncDatabaseIdsNextSinglePageAsync(nextLink, context)); } /** - * Gets a sync group. + * Gets a collection of sync database ids. * - * @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 syncGroupName The name of the sync group. + * @param locationName The name of the region where the resource is located. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a sync group. + * @return a collection of sync database ids as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncGroupInner get(String resourceGroupName, String serverName, String databaseName, String syncGroupName) { - return getWithResponse(resourceGroupName, serverName, databaseName, syncGroupName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSyncDatabaseIds(String locationName) { + return new PagedIterable<>(listSyncDatabaseIdsAsync(locationName)); } /** - * Creates or updates a sync group. + * Gets a collection of sync database ids. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param locationName The name of the region where the resource is located. + * @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 collection of sync database ids as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSyncDatabaseIds(String locationName, Context context) { + return new PagedIterable<>(listSyncDatabaseIdsAsync(locationName, context)); + } + + /** + * Lists sync groups under a hub database. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource state. + * @param databaseName The name of the database on which the sync group is hosted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL Database sync group along with {@link Response} on successful completion of {@link Mono}. + * @return a list of sync groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, SyncGroupInner parameters) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName) { 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.")); @@ -397,48 +378,39 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (syncGroupName == null) { - return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, - contentType, accept, parameters, context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), 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())); } /** - * Creates or updates a sync group. + * Lists sync groups under a hub database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource state. + * @param databaseName The name of the database on which the sync group is hosted. * @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 an Azure SQL Database sync group along with {@link Response} on successful completion of {@link Mono}. + * @return a list of sync groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters, Context context) { + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, 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.")); @@ -449,198 +421,249 @@ private Mono>> createOrUpdateWithResponseAsync(String if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } - if (syncGroupName == null) { - return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, contentType, - accept, parameters, context); + return service + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Creates or updates a sync group. + * Lists sync groups under a hub database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource state. + * @param databaseName The name of the database on which the sync group is hosted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an Azure SQL Database sync group. + * @return a list of sync groups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, SyncGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, - String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SyncGroupInner.class, SyncGroupInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); } /** - * Creates or updates a sync group. + * Lists sync groups under a hub database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource state. + * @param databaseName The name of the database on which the sync group is hosted. * @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 an Azure SQL Database sync group. + * @return a list of sync groups as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SyncGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, - String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, - databaseName, syncGroupName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SyncGroupInner.class, SyncGroupInner.class, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); } /** - * Creates or updates a sync group. + * Lists sync groups under a hub database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource state. + * @param databaseName The name of the database on which the sync group is hosted. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an Azure SQL Database sync group. + * @return a list of sync groups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncGroupInner> beginCreateOrUpdate(String resourceGroupName, - String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); } /** - * Creates or updates a sync group. + * Lists sync groups under a hub database. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource state. + * @param databaseName The name of the database on which the sync group is hosted. * @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 an Azure SQL Database sync group. + * @return a list of sync groups as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncGroupInner> beginCreateOrUpdate(String resourceGroupName, - String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); } /** - * Creates or updates a sync group. + * Gets a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource 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 an Azure SQL Database sync group on successful completion of {@link Mono}. + * @return a sync group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, SyncGroupInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (syncGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates a sync group. + * Gets a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource 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 an Azure SQL Database sync group on successful completion of {@link Mono}. + * @return a sync group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, SyncGroupInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (syncGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Creates or updates a sync group. + * Gets a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource 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 an Azure SQL Database sync group. + * @return a sync group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncGroupInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, SyncGroupInner parameters) { - return createOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).block(); + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates or updates a sync group. + * Gets a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. - * @param parameters The requested sync group resource 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 an Azure SQL Database sync group. + * @return a sync group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncGroupInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, SyncGroupInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context) - .block(); + public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, context).block(); } /** - * Updates a sync group. + * Gets a sync group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a sync group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncGroupInner get(String resourceGroupName, String serverName, String databaseName, String syncGroupName) { + return getWithResponse(resourceGroupName, serverName, databaseName, syncGroupName, Context.NONE).getValue(); + } + + /** + * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -649,16 +672,12 @@ public SyncGroupInner createOrUpdate(String resourceGroupName, String serverName * @return an Azure SQL Database sync group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, SyncGroupInner 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.")); @@ -672,26 +691,30 @@ public Mono>> updateWithResponseAsync(String resourceG if (syncGroupName == null) { return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates a sync group. + * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @param context The context to associate with this operation. @@ -701,15 +724,11 @@ public Mono>> updateWithResponseAsync(String resourceG * @return an Azure SQL Database sync group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, SyncGroupInner parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -724,24 +743,28 @@ private Mono>> updateWithResponseAsync(String resource if (syncGroupName == null) { return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, syncGroupName, contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Updates a sync group. + * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -750,20 +773,21 @@ private Mono>> updateWithResponseAsync(String resource * @return the {@link PollerFlux} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, SyncGroupInner> beginUpdateAsync(String resourceGroupName, + public PollerFlux, SyncGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters); + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), SyncGroupInner.class, SyncGroupInner.class, this.client.getContext()); } /** - * Updates a sync group. + * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @param context The context to associate with this operation. @@ -773,21 +797,22 @@ public PollerFlux, SyncGroupInner> beginUpdateAsync(S * @return the {@link PollerFlux} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SyncGroupInner> beginUpdateAsync(String resourceGroupName, + private PollerFlux, SyncGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, syncGroupName, parameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), SyncGroupInner.class, SyncGroupInner.class, context); } /** - * Updates a sync group. + * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -796,18 +821,19 @@ private PollerFlux, SyncGroupInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncGroupInner> beginUpdate(String resourceGroupName, + public SyncPoller, SyncGroupInner> beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { - return this.beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters) .getSyncPoller(); } /** - * Updates a sync group. + * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @param context The context to associate with this operation. @@ -817,18 +843,20 @@ public SyncPoller, SyncGroupInner> beginUpdate(String * @return the {@link SyncPoller} for polling of an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncGroupInner> beginUpdate(String resourceGroupName, + public SyncPoller, SyncGroupInner> beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context) .getSyncPoller(); } /** - * Updates a sync group. + * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -837,18 +865,19 @@ public SyncPoller, SyncGroupInner> beginUpdate(String * @return an Azure SQL Database sync group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).last() + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a sync group. + * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @param context The context to associate with this operation. @@ -858,18 +887,20 @@ public Mono updateAsync(String resourceGroupName, String serverN * @return an Azure SQL Database sync group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters, Context context) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context).last() + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context) + .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a sync group. + * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -878,17 +909,18 @@ private Mono updateAsync(String resourceGroupName, String server * @return an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncGroupInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, - SyncGroupInner parameters) { - return updateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).block(); + public SyncGroupInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, SyncGroupInner parameters) { + return createOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).block(); } /** - * Updates a sync group. + * Creates or updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param parameters The requested sync group resource state. * @param context The context to associate with this operation. @@ -898,17 +930,19 @@ public SyncGroupInner update(String resourceGroupName, String serverName, String * @return an Azure SQL Database sync group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncGroupInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, - SyncGroupInner parameters, Context context) { - return updateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context).block(); + public SyncGroupInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, SyncGroupInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context) + .block(); } /** * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -922,10 +956,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -939,18 +969,23 @@ public Mono>> deleteWithResponseAsync(String resourceG if (syncGroupName == null) { return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -965,10 +1000,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -982,17 +1013,22 @@ private Mono>> deleteWithResponseAsync(String resource if (syncGroupName == null) { return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, syncGroupName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1011,9 +1047,10 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1034,9 +1071,10 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1052,9 +1090,10 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1072,9 +1111,10 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1091,9 +1131,10 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1111,9 +1152,10 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri /** * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1127,9 +1169,10 @@ public void delete(String resourceGroupName, String serverName, String databaseN /** * Deletes a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1143,28 +1186,26 @@ public void delete(String resourceGroupName, String serverName, String databaseN } /** - * Lists sync groups under a hub database. + * Updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 the response of a SyncGroup list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return an Azure SQL Database sync group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, SyncGroupInner 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.")); @@ -1175,39 +1216,48 @@ private Mono> listByDatabaseSinglePageAsync(String if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (syncGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists sync groups under a hub database. + * Updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 the response of a SyncGroup list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return an Azure SQL Database sync group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, SyncGroupInner 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.")); @@ -1218,94 +1268,206 @@ private Mono> listByDatabaseSinglePageAsync(String if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); } + if (syncGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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"; context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Lists sync groups under a hub database. + * Updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 the response of a SyncGroup list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of an Azure SQL Database sync group. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, SyncGroupInner> beginUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SyncGroupInner.class, SyncGroupInner.class, this.client.getContext()); } /** - * Lists sync groups under a hub database. + * Updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 the response of a SyncGroup list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of an Azure SQL Database sync group. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SyncGroupInner> beginUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SyncGroupInner.class, SyncGroupInner.class, context); } /** - * Lists sync groups under a hub database. + * Updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 the response of a SyncGroup list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of an Azure SQL Database sync group. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SyncGroupInner> beginUpdate(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { + return this.beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters) + .getSyncPoller(); + } + + /** + * Updates a sync group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 the {@link SyncPoller} for polling of an Azure SQL Database sync group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SyncGroupInner> beginUpdate(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context) + .getSyncPoller(); + } + + /** + * Updates a sync group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 an Azure SQL Database sync group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, SyncGroupInner parameters) { + return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a sync group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 an Azure SQL Database sync group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, SyncGroupInner parameters, Context context) { + return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a sync group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 an Azure SQL Database sync group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncGroupInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + SyncGroupInner parameters) { + return updateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).block(); } /** - * Lists sync groups under a hub database. + * Updates a sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group. + * @param parameters The requested sync group resource 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 the response of a SyncGroup list operation as paginated response with {@link PagedIterable}. + * @return an Azure SQL Database sync group. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncGroupInner update(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + SyncGroupInner parameters, Context context) { + return updateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, context).block(); } /** * Cancels a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1319,10 +1481,6 @@ public Mono> cancelSyncWithResponseAsync(String resourceGroupName 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.")); @@ -1336,18 +1494,23 @@ public Mono> cancelSyncWithResponseAsync(String resourceGroupName if (syncGroupName == null) { return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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.")); + } return FluxUtil - .withContext(context -> service.cancelSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, context)) + .withContext(context -> service.cancelSync(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Cancels a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1362,10 +1525,6 @@ private Mono> cancelSyncWithResponseAsync(String resourceGroupNam 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.")); @@ -1379,17 +1538,22 @@ private Mono> cancelSyncWithResponseAsync(String resourceGroupNam if (syncGroupName == null) { return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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.")); + } context = this.client.mergeContext(context); - return service.cancelSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, context); + return service.cancelSync(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Cancels a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1406,9 +1570,10 @@ public Mono cancelSyncAsync(String resourceGroupName, String serverName, S /** * Cancels a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1425,9 +1590,10 @@ public Response cancelSyncWithResponse(String resourceGroupName, String se /** * Cancels a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1441,9 +1607,10 @@ public void cancelSync(String resourceGroupName, String serverName, String datab /** * Gets a collection of hub database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1458,10 +1625,6 @@ private Mono> listHubSchemasSingleP 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.")); @@ -1475,10 +1638,14 @@ private Mono> listHubSchemasSingleP if (syncGroupName == null) { return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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"; return FluxUtil - .withContext(context -> service.listHubSchemas(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, accept, + .withContext(context -> service.listHubSchemas(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -1488,9 +1655,10 @@ private Mono> listHubSchemasSingleP /** * Gets a collection of hub database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1506,10 +1674,6 @@ private Mono> listHubSchemasSingleP 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.")); @@ -1523,11 +1687,15 @@ private Mono> listHubSchemasSingleP if (syncGroupName == null) { return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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 - .listHubSchemas(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, syncGroupName, accept, context) + .listHubSchemas(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -1535,9 +1703,10 @@ private Mono> listHubSchemasSingleP /** * Gets a collection of hub database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1555,9 +1724,10 @@ public PagedFlux listHubSchemasAsync(String resou /** * Gets a collection of hub database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1576,9 +1746,10 @@ private PagedFlux listHubSchemasAsync(String reso /** * Gets a collection of hub database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1594,9 +1765,10 @@ public PagedIterable listHubSchemas(String resour /** * Gets a collection of hub database schemas. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1614,9 +1786,10 @@ public PagedIterable listHubSchemas(String resour /** * Gets a collection of sync group logs. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param startTime Get logs generated after this time. * @param endTime Get logs generated before this time. @@ -1636,10 +1809,6 @@ private Mono> listLogsSinglePageAsync 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.")); @@ -1662,11 +1831,15 @@ private Mono> listLogsSinglePageAsync if (type == null) { return Mono.error(new IllegalArgumentException("Parameter type 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"; return FluxUtil - .withContext(context -> service.listLogs(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, startTime, - endTime, type, continuationToken, accept, context)) + .withContext(context -> service.listLogs(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, startTime, endTime, type, continuationToken, + this.client.getSubscriptionId(), 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())); @@ -1675,9 +1848,10 @@ private Mono> listLogsSinglePageAsync /** * Gets a collection of sync group logs. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param startTime Get logs generated after this time. * @param endTime Get logs generated before this time. @@ -1698,10 +1872,6 @@ private Mono> listLogsSinglePageAsync 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.")); @@ -1724,12 +1894,16 @@ private Mono> listLogsSinglePageAsync if (type == null) { return Mono.error(new IllegalArgumentException("Parameter type 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 - .listLogs(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, type, continuationToken, - accept, context) + .listLogs(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, startTime, + endTime, type, continuationToken, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -1737,9 +1911,10 @@ private Mono> listLogsSinglePageAsync /** * Gets a collection of sync group logs. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param startTime Get logs generated after this time. * @param endTime Get logs generated before this time. @@ -1761,9 +1936,10 @@ public PagedFlux listLogsAsync(String resourceGroup /** * Gets a collection of sync group logs. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param startTime Get logs generated after this time. * @param endTime Get logs generated before this time. @@ -1784,9 +1960,10 @@ public PagedFlux listLogsAsync(String resourceGroup /** * Gets a collection of sync group logs. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param startTime Get logs generated after this time. * @param endTime Get logs generated before this time. @@ -1810,9 +1987,10 @@ private PagedFlux listLogsAsync(String resourceGrou /** * Gets a collection of sync group logs. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param startTime Get logs generated after this time. * @param endTime Get logs generated before this time. @@ -1833,9 +2011,10 @@ public PagedIterable listLogs(String resourceGroupN /** * Gets a collection of sync group logs. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param startTime Get logs generated after this time. * @param endTime Get logs generated before this time. @@ -1858,9 +2037,10 @@ public PagedIterable listLogs(String resourceGroupN /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1874,10 +2054,6 @@ public Mono>> refreshHubSchemaWithResponseAsync(String 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.")); @@ -1891,18 +2067,23 @@ public Mono>> refreshHubSchemaWithResponseAsync(String if (syncGroupName == null) { return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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.")); + } return FluxUtil - .withContext(context -> service.refreshHubSchema(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, context)) + .withContext(context -> service.refreshHubSchema(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1917,10 +2098,6 @@ private Mono>> refreshHubSchemaWithResponseAsync(Strin 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.")); @@ -1934,17 +2111,22 @@ private Mono>> refreshHubSchemaWithResponseAsync(Strin if (syncGroupName == null) { return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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.")); + } context = this.client.mergeContext(context); - return service.refreshHubSchema(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, context); + return service.refreshHubSchema(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1963,9 +2145,10 @@ public PollerFlux, Void> beginRefreshHubSchemaAsync(String reso /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1986,9 +2169,10 @@ private PollerFlux, Void> beginRefreshHubSchemaAsync(String res /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2005,9 +2189,10 @@ public SyncPoller, Void> beginRefreshHubSchema(String resourceG /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2025,9 +2210,10 @@ public SyncPoller, Void> beginRefreshHubSchema(String resourceG /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2044,9 +2230,10 @@ public Mono refreshHubSchemaAsync(String resourceGroupName, String serverN /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2064,9 +2251,10 @@ private Mono refreshHubSchemaAsync(String resourceGroupName, String server /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2081,9 +2269,10 @@ public void refreshHubSchema(String resourceGroupName, String serverName, String /** * Refreshes a hub database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2099,9 +2288,10 @@ public void refreshHubSchema(String resourceGroupName, String serverName, String /** * Triggers a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2115,10 +2305,6 @@ public Mono> triggerSyncWithResponseAsync(String resourceGroupNam 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.")); @@ -2132,18 +2318,23 @@ public Mono> triggerSyncWithResponseAsync(String resourceGroupNam if (syncGroupName == null) { return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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.")); + } return FluxUtil - .withContext(context -> service.triggerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, context)) + .withContext(context -> service.triggerSync(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Triggers a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2158,10 +2349,6 @@ private Mono> triggerSyncWithResponseAsync(String resourceGroupNa 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.")); @@ -2175,17 +2362,22 @@ private Mono> triggerSyncWithResponseAsync(String resourceGroupNa if (syncGroupName == null) { return Mono.error(new IllegalArgumentException("Parameter syncGroupName 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.")); + } context = this.client.mergeContext(context); - return service.triggerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, context); + return service.triggerSync(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + syncGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Triggers a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2202,9 +2394,10 @@ public Mono triggerSyncAsync(String resourceGroupName, String serverName, /** * Triggers a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2222,9 +2415,10 @@ public Response triggerSyncWithResponse(String resourceGroupName, String s /** * Triggers a sync group synchronization. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2236,131 +2430,61 @@ public void triggerSync(String resourceGroupName, String serverName, String data } /** - * Gets a collection of sync database ids. + * Get the next page of items. * - * @param locationName The name of the region where the resource is located. + * @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 collection of sync database ids along with {@link PagedResponse} on successful completion of + * @return a list of sync database ID properties along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSyncDatabaseIdsSinglePageAsync(String locationName) { + private Mono> listSyncDatabaseIdsNextSinglePageAsync(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.")); } - 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.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listSyncDatabaseIds(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, accept, context)) + .withContext( + context -> service.listSyncDatabaseIdsNext(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())); } /** - * Gets a collection of sync database ids. + * Get the next page of items. * - * @param locationName The name of the region where the resource is located. + * @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 collection of sync database ids along with {@link PagedResponse} on successful completion of + * @return a list of sync database ID properties along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSyncDatabaseIdsSinglePageAsync(String locationName, + private Mono> listSyncDatabaseIdsNextSinglePageAsync(String nextLink, Context context) { + 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.")); } - 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.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listSyncDatabaseIds(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, accept, context) + return service.listSyncDatabaseIdsNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } - /** - * Gets a collection of sync database ids. - * - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of sync database ids as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listSyncDatabaseIdsAsync(String locationName) { - return new PagedFlux<>(() -> listSyncDatabaseIdsSinglePageAsync(locationName), - nextLink -> listSyncDatabaseIdsNextSinglePageAsync(nextLink)); - } - - /** - * Gets a collection of sync database ids. - * - * @param locationName The name of the region where the resource is located. - * @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 collection of sync database ids as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSyncDatabaseIdsAsync(String locationName, Context context) { - return new PagedFlux<>(() -> listSyncDatabaseIdsSinglePageAsync(locationName, context), - nextLink -> listSyncDatabaseIdsNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a collection of sync database ids. - * - * @param locationName The name of the region where the resource is located. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of sync database ids as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSyncDatabaseIds(String locationName) { - return new PagedIterable<>(listSyncDatabaseIdsAsync(locationName)); - } - - /** - * Gets a collection of sync database ids. - * - * @param locationName The name of the region where the resource is located. - * @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 collection of sync database ids as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSyncDatabaseIds(String locationName, Context context) { - return new PagedIterable<>(listSyncDatabaseIdsAsync(locationName, context)); - } - /** * Get the next page of items. * @@ -2368,8 +2492,7 @@ public PagedIterable listSyncDatabaseIds(String l * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 SyncGroup list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of sync groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -2396,8 +2519,7 @@ private Mono> listByDatabaseNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 SyncGroup list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of sync groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink, Context context) { @@ -2422,7 +2544,7 @@ private Mono> listByDatabaseNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of hub database schemas along with {@link PagedResponse} on successful completion of + * @return a list of sync schema properties along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -2450,7 +2572,7 @@ private Mono> listHubSchemasNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of hub database schemas along with {@link PagedResponse} on successful completion of + * @return a list of sync schema properties along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -2477,7 +2599,7 @@ private Mono> listHubSchemasNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of sync group logs along with {@link PagedResponse} on successful completion of + * @return a list of sync group log properties along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -2505,7 +2627,7 @@ private Mono> listLogsNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of sync group logs along with {@link PagedResponse} on successful completion of + * @return a list of sync group log properties along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -2524,60 +2646,4 @@ private Mono> listLogsNextSinglePageA .map(res -> 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 collection of sync database ids along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSyncDatabaseIdsNextSinglePageAsync(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.listSyncDatabaseIdsNext(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. - * @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 collection of sync database ids along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSyncDatabaseIdsNextSinglePageAsync(String nextLink, - Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listSyncDatabaseIdsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncMembersClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncMembersClientImpl.java index a3b122948a40..22991f977b11 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncMembersClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/SyncMembersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -36,8 +36,8 @@ import com.azure.resourcemanager.sql.fluent.SyncMembersClient; import com.azure.resourcemanager.sql.fluent.models.SyncFullSchemaPropertiesInner; import com.azure.resourcemanager.sql.fluent.models.SyncMemberInner; -import com.azure.resourcemanager.sql.implementation.models.SyncFullSchemaPropertiesListResult; -import com.azure.resourcemanager.sql.implementation.models.SyncMemberListResult; +import com.azure.resourcemanager.sql.models.SyncFullSchemaPropertiesListResult; +import com.azure.resourcemanager.sql.models.SyncMemberListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -71,87 +71,87 @@ public final class SyncMembersClientImpl implements SyncMembersClient { * The interface defining all the services for SqlManagementClientSyncMembers to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientSyncMembers") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientS") public interface SyncMembersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listBySyncGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, - @PathParam("syncMemberName") String syncMemberName, @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}") - @ExpectedResponses({ 200, 201, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, - @PathParam("syncMemberName") String syncMemberName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") SyncMemberInner parameters, - Context context); + @PathParam("syncMemberName") String syncMemberName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, - @PathParam("syncMemberName") String syncMemberName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") SyncMemberInner parameters, - Context context); + @PathParam("syncMemberName") String syncMemberName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") SyncMemberInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, - @PathParam("syncMemberName") String syncMemberName, Context context); + @PathParam("syncMemberName") String syncMemberName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers") - @ExpectedResponses({ 200 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySyncGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, + @PathParam("syncMemberName") String syncMemberName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") SyncMemberInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/refreshSchema") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> refreshMemberSchema(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> refreshMemberSchema(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, - @PathParam("syncMemberName") String syncMemberName, Context context); + @PathParam("syncMemberName") String syncMemberName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/schemas") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listMemberSchemas(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listMemberSchemas(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("syncGroupName") String syncGroupName, - @PathParam("syncMemberName") String syncMemberName, @HeaderParam("Accept") String accept, Context context); + @PathParam("syncMemberName") String syncMemberName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySyncGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -159,34 +159,31 @@ Mono> listBySyncGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listMemberSchemasNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a sync member. + * Lists sync members in the given sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. - * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a sync member along with {@link Response} on successful completion of {@link Mono}. + * @return a list of Azure SQL Database sync members along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, String syncMemberName) { + private Mono> listBySyncGroupSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName) { 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.")); @@ -200,42 +197,42 @@ public Mono> getWithResponseAsync(String resourceGroup if (syncGroupName == null) { return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } - if (syncMemberName == null) { - return Mono.error(new IllegalArgumentException("Parameter syncMemberName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, - syncMemberName, accept, context)) + .withContext(context -> service.listBySyncGroup(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, this.client.getSubscriptionId(), 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())); } /** - * Gets a sync member. + * Lists sync members in the given sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. - * @param syncMemberName The name of the sync member. * @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 sync member along with {@link Response} on successful completion of {@link Mono}. + * @return a list of Azure SQL Database sync members along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, String syncMemberName, Context context) { + private Mono> listBySyncGroupSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, 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.")); @@ -249,101 +246,123 @@ private Mono> getWithResponseAsync(String resourceGrou if (syncGroupName == null) { return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } - if (syncMemberName == null) { - return Mono.error(new IllegalArgumentException("Parameter syncMemberName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, accept, context); + return service + .listBySyncGroup(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a sync member. + * Lists sync members in the given sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. - * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a sync member on successful completion of {@link Mono}. + * @return a list of Azure SQL Database sync members as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, String syncMemberName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listBySyncGroupAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName) { + return new PagedFlux<>( + () -> listBySyncGroupSinglePageAsync(resourceGroupName, serverName, databaseName, syncGroupName), + nextLink -> listBySyncGroupNextSinglePageAsync(nextLink)); } /** - * Gets a sync member. + * Lists sync members in the given sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. - * @param syncMemberName The name of the sync member. * @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 sync member along with {@link Response}. + * @return a list of Azure SQL Database sync members as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, String syncMemberName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySyncGroupAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context) { + return new PagedFlux<>( + () -> listBySyncGroupSinglePageAsync(resourceGroupName, serverName, databaseName, syncGroupName, context), + nextLink -> listBySyncGroupNextSinglePageAsync(nextLink, context)); } /** - * Gets a sync member. + * Lists sync members in the given sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. - * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a sync member. + * @return a list of Azure SQL Database sync members as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncMemberInner get(String resourceGroupName, String serverName, String databaseName, String syncGroupName, - String syncMemberName) { - return getWithResponse(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySyncGroup(String resourceGroupName, String serverName, + String databaseName, String syncGroupName) { + return new PagedIterable<>(listBySyncGroupAsync(resourceGroupName, serverName, databaseName, syncGroupName)); } /** - * Creates or updates a sync member. + * Lists sync members in the given sync group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the database on which the sync group is hosted. * @param syncGroupName The name of the sync group. + * @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 Azure SQL Database sync members as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySyncGroup(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, Context context) { + return new PagedIterable<>( + listBySyncGroupAsync(resourceGroupName, serverName, databaseName, syncGroupName, context)); + } + + /** + * Gets a sync member. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 an Azure SQL Database sync member along with {@link Response} on successful completion of {@link Mono}. + * @return a sync member along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName) { 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.")); @@ -360,47 +379,40 @@ public Mono>> createOrUpdateWithResponseAsync(String r if (syncMemberName == null) { return Mono.error(new IllegalArgumentException("Parameter syncMemberName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, - syncMemberName, contentType, accept, parameters, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + syncGroupName, syncMemberName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates a sync member. + * Gets a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 an Azure SQL Database sync member along with {@link Response} on successful completion of {@link Mono}. + * @return a sync member along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, 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.")); @@ -417,211 +429,88 @@ private Mono>> createOrUpdateWithResponseAsync(String if (syncMemberName == null) { return Mono.error(new IllegalArgumentException("Parameter syncMemberName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, - contentType, accept, parameters, context); - } - - /** - * Creates or updates a sync member. - * - * @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 syncGroupName The name of the sync group. - * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 the {@link PollerFlux} for polling of an Azure SQL Database sync member. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, SyncMemberInner> beginCreateOrUpdateAsync(String resourceGroupName, - String serverName, String databaseName, String syncGroupName, String syncMemberName, - SyncMemberInner parameters) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, - databaseName, syncGroupName, syncMemberName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SyncMemberInner.class, SyncMemberInner.class, this.client.getContext()); - } - - /** - * Creates or updates a sync member. - * - * @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 syncGroupName The name of the sync group. - * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 the {@link PollerFlux} for polling of an Azure SQL Database sync member. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SyncMemberInner> beginCreateOrUpdateAsync(String resourceGroupName, - String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, - databaseName, syncGroupName, syncMemberName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SyncMemberInner.class, SyncMemberInner.class, context); - } - - /** - * Creates or updates a sync member. - * - * @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 syncGroupName The name of the sync group. - * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 the {@link SyncPoller} for polling of an Azure SQL Database sync member. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncMemberInner> beginCreateOrUpdate(String resourceGroupName, - String serverName, String databaseName, String syncGroupName, String syncMemberName, - SyncMemberInner parameters) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, - parameters) - .getSyncPoller(); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + syncMemberName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Creates or updates a sync member. - * - * @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 syncGroupName The name of the sync group. - * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 the {@link SyncPoller} for polling of an Azure SQL Database sync member. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncMemberInner> beginCreateOrUpdate(String resourceGroupName, - String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, - Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, - parameters, context) - .getSyncPoller(); - } - - /** - * Creates or updates a sync member. + * Gets a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 an Azure SQL Database sync member on successful completion of {@link Mono}. + * @return a sync member on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, String syncMemberName, SyncMemberInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, - parameters).last().flatMap(this.client::getLroFinalResultOrError); + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates or updates a sync member. + * Gets a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 an Azure SQL Database sync member on successful completion of {@link Mono}. + * @return a sync member along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, - parameters, context).last().flatMap(this.client::getLroFinalResultOrError); + public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, context) + .block(); } /** - * Creates or updates a sync member. + * Gets a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 an Azure SQL Database sync member. + * @return a sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncMemberInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, String syncMemberName, SyncMemberInner parameters) { - return createOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, - parameters).block(); + public SyncMemberInner get(String resourceGroupName, String serverName, String databaseName, String syncGroupName, + String syncMemberName) { + return getWithResponse(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, Context.NONE) + .getValue(); } /** * Creates or updates a sync member. * - * @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 syncGroupName The name of the sync group. - * @param syncMemberName The name of the sync member. - * @param parameters The requested sync member resource 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 an Azure SQL Database sync member. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncMemberInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, - String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, - parameters, context).block(); - } - - /** - * Updates an existing sync member. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -630,16 +519,12 @@ public SyncMemberInner createOrUpdate(String resourceGroupName, String serverNam * @return an Azure SQL Database sync member along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner 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.")); @@ -656,27 +541,31 @@ public Mono>> updateWithResponseAsync(String resourceG if (syncMemberName == null) { return Mono.error(new IllegalArgumentException("Parameter syncMemberName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, - syncMemberName, contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, syncMemberName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates an existing sync member. + * Creates or updates a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @param context The context to associate with this operation. @@ -686,16 +575,13 @@ public Mono>> updateWithResponseAsync(String resourceG * @return an Azure SQL Database sync member along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner 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.")); @@ -712,26 +598,30 @@ private Mono>> updateWithResponseAsync(String resource if (syncMemberName == null) { return Mono.error(new IllegalArgumentException("Parameter syncMemberName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, contentType, accept, parameters, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + syncGroupName, syncMemberName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context); } /** - * Updates an existing sync member. + * Creates or updates a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -740,22 +630,23 @@ private Mono>> updateWithResponseAsync(String resource * @return the {@link PollerFlux} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, SyncMemberInner> beginUpdateAsync(String resourceGroupName, + public PollerFlux, SyncMemberInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, serverName, databaseName, - syncGroupName, syncMemberName, parameters); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, syncGroupName, syncMemberName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), SyncMemberInner.class, SyncMemberInner.class, this.client.getContext()); } /** - * Updates an existing sync member. + * Creates or updates a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @param context The context to associate with this operation. @@ -765,23 +656,24 @@ public PollerFlux, SyncMemberInner> beginUpdateAsync * @return the {@link PollerFlux} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SyncMemberInner> beginUpdateAsync(String resourceGroupName, + private PollerFlux, SyncMemberInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, serverName, databaseName, - syncGroupName, syncMemberName, parameters, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, syncGroupName, syncMemberName, parameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), SyncMemberInner.class, SyncMemberInner.class, context); } /** - * Updates an existing sync member. + * Creates or updates a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -790,21 +682,23 @@ private PollerFlux, SyncMemberInner> beginUpdateAsyn * @return the {@link SyncPoller} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncMemberInner> beginUpdate(String resourceGroupName, + public SyncPoller, SyncMemberInner> beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) { return this - .beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters) + .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, + parameters) .getSyncPoller(); } /** - * Updates an existing sync member. + * Creates or updates a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @param context The context to associate with this operation. @@ -814,22 +708,23 @@ public SyncPoller, SyncMemberInner> beginUpdate(Stri * @return the {@link SyncPoller} for polling of an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SyncMemberInner> beginUpdate(String resourceGroupName, + public SyncPoller, SyncMemberInner> beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { return this - .beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, - context) + .beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, + parameters, context) .getSyncPoller(); } /** - * Updates an existing sync member. + * Creates or updates a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -838,20 +733,20 @@ public SyncPoller, SyncMemberInner> beginUpdate(Stri * @return an Azure SQL Database sync member on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, + parameters).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing sync member. + * Creates or updates a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @param context The context to associate with this operation. @@ -861,19 +756,20 @@ public Mono updateAsync(String resourceGroupName, String server * @return an Azure SQL Database sync member on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + private Mono createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { - return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, - context).last().flatMap(this.client::getLroFinalResultOrError); + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, + parameters, context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing sync member. + * Creates or updates a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -882,19 +778,20 @@ private Mono updateAsync(String resourceGroupName, String serve * @return an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncMemberInner update(String resourceGroupName, String serverName, String databaseName, + public SyncMemberInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) { - return updateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters) - .block(); + return createOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, + parameters).block(); } /** - * Updates an existing sync member. + * Creates or updates a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param parameters The requested sync member resource state. * @param context The context to associate with this operation. @@ -904,19 +801,20 @@ public SyncMemberInner update(String resourceGroupName, String serverName, Strin * @return an Azure SQL Database sync member. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncMemberInner update(String resourceGroupName, String serverName, String databaseName, + public SyncMemberInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { - return updateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, - context).block(); + return createOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, + parameters, context).block(); } /** * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -930,10 +828,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -950,20 +844,25 @@ public Mono>> deleteWithResponseAsync(String resourceG if (syncMemberName == null) { return Mono.error(new IllegalArgumentException("Parameter syncMemberName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, - syncMemberName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, syncMemberName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -978,10 +877,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -998,18 +893,23 @@ private Mono>> deleteWithResponseAsync(String resource if (syncMemberName == null) { return Mono.error(new IllegalArgumentException("Parameter syncMemberName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + syncMemberName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1028,10 +928,11 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1052,10 +953,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1072,10 +974,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1094,10 +997,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1114,10 +1018,11 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1136,10 +1041,11 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri /** * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1154,10 +1060,11 @@ public void delete(String resourceGroupName, String serverName, String databaseN /** * Deletes a sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1171,29 +1078,27 @@ public void delete(String resourceGroupName, String serverName, String databaseN } /** - * Lists sync members in the given sync group. + * Updates an existing sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 the response of a SyncMember list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return an Azure SQL Database sync member along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySyncGroupSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, String syncGroupName) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner 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.")); @@ -1207,41 +1112,49 @@ private Mono> listBySyncGroupSinglePageAsync(Stri if (syncGroupName == null) { return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } + if (syncMemberName == null) { + return Mono.error(new IllegalArgumentException("Parameter syncMemberName 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.listBySyncGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, accept, - context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, syncMemberName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists sync members in the given sync group. + * Updates an existing sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 the response of a SyncMember list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return an Azure SQL Database sync member along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySyncGroupSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, String syncGroupName, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner 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.")); @@ -1255,101 +1168,225 @@ private Mono> listBySyncGroupSinglePageAsync(Stri if (syncGroupName == null) { return Mono.error(new IllegalArgumentException("Parameter syncGroupName is required and cannot be null.")); } + if (syncMemberName == null) { + return Mono.error(new IllegalArgumentException("Parameter syncMemberName 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"; context = this.client.mergeContext(context); - return service - .listBySyncGroup(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, syncGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.update(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + syncMemberName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Lists sync members in the given sync group. + * Updates an existing sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 the response of a SyncMember list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of an Azure SQL Database sync member. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listBySyncGroupAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName) { - return new PagedFlux<>( - () -> listBySyncGroupSinglePageAsync(resourceGroupName, serverName, databaseName, syncGroupName), - nextLink -> listBySyncGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, SyncMemberInner> beginUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, + SyncMemberInner parameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, serverName, databaseName, + syncGroupName, syncMemberName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SyncMemberInner.class, SyncMemberInner.class, this.client.getContext()); } /** - * Lists sync members in the given sync group. + * Updates an existing sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 the response of a SyncMember list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of an Azure SQL Database sync member. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySyncGroupAsync(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, Context context) { - return new PagedFlux<>( - () -> listBySyncGroupSinglePageAsync(resourceGroupName, serverName, databaseName, syncGroupName, context), - nextLink -> listBySyncGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SyncMemberInner> beginUpdateAsync(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, serverName, databaseName, + syncGroupName, syncMemberName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SyncMemberInner.class, SyncMemberInner.class, context); } /** - * Lists sync members in the given sync group. + * Updates an existing sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 the response of a SyncMember list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of an Azure SQL Database sync member. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySyncGroup(String resourceGroupName, String serverName, - String databaseName, String syncGroupName) { - return new PagedIterable<>(listBySyncGroupAsync(resourceGroupName, serverName, databaseName, syncGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SyncMemberInner> beginUpdate(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, + SyncMemberInner parameters) { + return this + .beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters) + .getSyncPoller(); } /** - * Lists sync members in the given sync group. + * Updates an existing sync member. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 the response of a SyncMember list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of an Azure SQL Database sync member. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySyncGroup(String resourceGroupName, String serverName, - String databaseName, String syncGroupName, Context context) { - return new PagedIterable<>( - listBySyncGroupAsync(resourceGroupName, serverName, databaseName, syncGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SyncMemberInner> beginUpdate(String resourceGroupName, + String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters, + Context context) { + return this + .beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, + context) + .getSyncPoller(); + } + + /** + * Updates an existing sync member. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 an Azure SQL Database sync member on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters) { + return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing sync member. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 an Azure SQL Database sync member on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { + return beginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing sync member. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 an Azure SQL Database sync member. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncMemberInner update(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters) { + return updateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters) + .block(); + } + + /** + * Updates an existing sync member. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. + * @param syncMemberName The name of the sync member. + * @param parameters The requested sync member resource 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 an Azure SQL Database sync member. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncMemberInner update(String resourceGroupName, String serverName, String databaseName, + String syncGroupName, String syncMemberName, SyncMemberInner parameters, Context context) { + return updateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, + context).block(); } /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1363,10 +1400,6 @@ public Mono>> refreshMemberSchemaWithResponseAsync(Str 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.")); @@ -1383,20 +1416,25 @@ public Mono>> refreshMemberSchemaWithResponseAsync(Str if (syncMemberName == null) { return Mono.error(new IllegalArgumentException("Parameter syncMemberName 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.")); + } return FluxUtil - .withContext(context -> service.refreshMemberSchema(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, - syncMemberName, context)) + .withContext(context -> service.refreshMemberSchema(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, syncGroupName, syncMemberName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1411,10 +1449,6 @@ private Mono>> refreshMemberSchemaWithResponseAsync(St 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.")); @@ -1431,19 +1465,23 @@ private Mono>> refreshMemberSchemaWithResponseAsync(St if (syncMemberName == null) { return Mono.error(new IllegalArgumentException("Parameter syncMemberName 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.")); + } context = this.client.mergeContext(context); - return service.refreshMemberSchema(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, - context); + return service.refreshMemberSchema(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + syncGroupName, syncMemberName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1462,10 +1500,11 @@ public PollerFlux, Void> beginRefreshMemberSchemaAsync(String r /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1486,10 +1525,11 @@ private PollerFlux, Void> beginRefreshMemberSchemaAsync(String /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1507,10 +1547,11 @@ public SyncPoller, Void> beginRefreshMemberSchema(String resour /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1530,10 +1571,11 @@ public SyncPoller, Void> beginRefreshMemberSchema(String resour /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1551,10 +1593,11 @@ public Mono refreshMemberSchemaAsync(String resourceGroupName, String serv /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1572,10 +1615,11 @@ private Mono refreshMemberSchemaAsync(String resourceGroupName, String ser /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1590,10 +1634,11 @@ public void refreshMemberSchema(String resourceGroupName, String serverName, Str /** * Refreshes a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1610,10 +1655,11 @@ public void refreshMemberSchema(String resourceGroupName, String serverName, Str /** * Gets a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1627,10 +1673,6 @@ private Mono> listMemberSchemasSing 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.")); @@ -1647,11 +1689,15 @@ private Mono> listMemberSchemasSing if (syncMemberName == null) { return Mono.error(new IllegalArgumentException("Parameter syncMemberName 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"; return FluxUtil - .withContext(context -> service.listMemberSchemas(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, syncGroupName, - syncMemberName, accept, context)) + .withContext(context -> service.listMemberSchemas(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, syncGroupName, syncMemberName, this.client.getSubscriptionId(), + 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())); @@ -1660,10 +1706,11 @@ private Mono> listMemberSchemasSing /** * Gets a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1679,10 +1726,6 @@ private Mono> listMemberSchemasSing 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.")); @@ -1699,11 +1742,15 @@ private Mono> listMemberSchemasSing if (syncMemberName == null) { return Mono.error(new IllegalArgumentException("Parameter syncMemberName 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 - .listMemberSchemas(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, accept, context) + .listMemberSchemas(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, syncGroupName, + syncMemberName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -1711,10 +1758,11 @@ private Mono> listMemberSchemasSing /** * Gets a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1731,10 +1779,11 @@ public PagedFlux listMemberSchemasAsync(String re /** * Gets a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1753,10 +1802,11 @@ private PagedFlux listMemberSchemasAsync(String r /** * Gets a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1773,10 +1823,11 @@ public PagedIterable listMemberSchemas(String res /** * Gets a sync member database schema. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param syncGroupName The name of the sync group. + * @param databaseName The name of the database on which the sync group is hosted. + * @param syncGroupName The name of the sync group on which the sync member is hosted. * @param syncMemberName The name of the sync member. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1798,7 +1849,7 @@ public PagedIterable listMemberSchemas(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 response of a SyncMember list operation along with {@link PagedResponse} on successful completion of + * @return a list of Azure SQL Database sync members along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1826,7 +1877,7 @@ private Mono> listBySyncGroupNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 SyncMember list operation along with {@link PagedResponse} on successful completion of + * @return a list of Azure SQL Database sync members along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1852,7 +1903,8 @@ private Mono> listBySyncGroupNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a sync member database schema along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of sync schema properties along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listMemberSchemasNextSinglePageAsync(String nextLink) { @@ -1879,7 +1931,8 @@ private Mono> listMemberSchemasNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a sync member database schema along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of sync schema properties along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listMemberSchemasNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TdeCertificatesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TdeCertificatesClientImpl.java index 1f8be46ec753..e9996c573e3d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TdeCertificatesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TdeCertificatesClientImpl.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -60,24 +59,24 @@ public final class TdeCertificatesClientImpl implements TdeCertificatesClient { * The interface defining all the services for SqlManagementClientTdeCertificates to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientTdeCertificates") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientT") public interface TdeCertificatesService { - @Headers({ "Accept: application/json;q=0.9" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/tdeCertificates") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> create(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") TdeCertificate parameters, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") TdeCertificate parameters, Context context); } /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -92,10 +91,6 @@ public Mono>> createWithResponseAsync(String resourceG 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.")); @@ -103,22 +98,26 @@ public Mono>> createWithResponseAsync(String resourceG if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName 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 contentType = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, parameters, context)) + .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -134,10 +133,6 @@ private Mono>> createWithResponseAsync(String resource 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.")); @@ -145,21 +140,25 @@ private Mono>> createWithResponseAsync(String resource if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName 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 contentType = "application/json"; context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, contentType, parameters, context); + return service.create(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, context); } /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -178,7 +177,8 @@ public PollerFlux, Void> beginCreateAsync(String resourceGroupN /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -200,7 +200,8 @@ private PollerFlux, Void> beginCreateAsync(String resourceGroup /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -217,7 +218,8 @@ public SyncPoller, Void> beginCreate(String resourceGroupName, /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -235,7 +237,8 @@ public SyncPoller, Void> beginCreate(String resourceGroupName, /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -252,7 +255,8 @@ public Mono createAsync(String resourceGroupName, String serverName, TdeCe /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. @@ -271,7 +275,8 @@ private Mono createAsync(String resourceGroupName, String serverName, TdeC /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -286,7 +291,8 @@ public void create(String resourceGroupName, String serverName, TdeCertificate p /** * Creates a TDE certificate for a given server. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters The requested TDE certificate to be created or updated. * @param context The context to associate with this operation. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TimeZonesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TimeZonesClientImpl.java index 18fd7ea0ee84..af1cac97394f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TimeZonesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TimeZonesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.TimeZonesClient; import com.azure.resourcemanager.sql.fluent.models.TimeZoneInner; -import com.azure.resourcemanager.sql.implementation.models.TimeZoneListResult; +import com.azure.resourcemanager.sql.models.TimeZoneListResult; import reactor.core.publisher.Mono; /** @@ -59,271 +59,271 @@ public final class TimeZonesClientImpl implements TimeZonesClient { * The interface defining all the services for SqlManagementClientTimeZones to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientTimeZones") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientT") public interface TimeZonesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/timeZones/{timeZoneId}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/timeZones") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, @PathParam("timeZoneId") String timeZoneId, - @HeaderParam("Accept") String accept, Context context); + Mono> listByLocation(@HostParam("$host") String endpoint, + @PathParam("locationName") String locationName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/timeZones") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/timeZones/{timeZoneId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("locationName") String locationName, @PathParam("timeZoneId") String timeZoneId, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a managed instance time zone. + * Gets a list of managed instance time zones by location. * - * @param locationName The location of the database. - * @param timeZoneId The time zone ID. + * @param locationName The locationName 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 managed instance time zone along with {@link Response} on successful completion of {@link Mono}. + * @return a list of managed instance time zones by location along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String locationName, String timeZoneId) { + private Mono> listByLocationSinglePageAsync(String locationName) { 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 (timeZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter timeZoneId 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, timeZoneId, accept, context)) + .withContext(context -> service.listByLocation(this.client.getEndpoint(), locationName, + this.client.getSubscriptionId(), 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())); } /** - * Gets a managed instance time zone. + * Gets a list of managed instance time zones by location. * - * @param locationName The location of the database. - * @param timeZoneId The time zone ID. + * @param locationName The locationName 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 managed instance time zone along with {@link Response} on successful completion of {@link Mono}. + * @return a list of managed instance time zones by location along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String locationName, String timeZoneId, - Context context) { + private Mono> listByLocationSinglePageAsync(String locationName, 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 (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } - if (timeZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter timeZoneId 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - locationName, timeZoneId, accept, context); + return service + .listByLocation(this.client.getEndpoint(), locationName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a managed instance time zone. + * Gets a list of managed instance time zones by location. * - * @param locationName The location of the database. - * @param timeZoneId The time zone ID. + * @param locationName The locationName 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 managed instance time zone on successful completion of {@link Mono}. + * @return a list of managed instance time zones by location as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String locationName, String timeZoneId) { - return getWithResponseAsync(locationName, timeZoneId).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByLocationAsync(String locationName) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** - * Gets a managed instance time zone. + * Gets a list of managed instance time zones by location. * - * @param locationName The location of the database. - * @param timeZoneId The time zone ID. + * @param locationName The locationName 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 managed instance time zone along with {@link Response}. + * @return a list of managed instance time zones by location as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String locationName, String timeZoneId, Context context) { - return getWithResponseAsync(locationName, timeZoneId, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String locationName, Context context) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, context), + nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); } /** - * Gets a managed instance time zone. + * Gets a list of managed instance time zones by location. * - * @param locationName The location of the database. - * @param timeZoneId The time zone ID. + * @param locationName The locationName 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 managed instance time zone. + * @return a list of managed instance time zones by location as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TimeZoneInner get(String locationName, String timeZoneId) { - return getWithResponse(locationName, timeZoneId, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String locationName) { + return new PagedIterable<>(listByLocationAsync(locationName)); } /** * Gets a list of managed instance time zones by location. * - * @param locationName The location of the database. + * @param locationName The locationName 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 list of managed instance time zones by location along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of managed instance time zones by location as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String locationName, Context context) { + return new PagedIterable<>(listByLocationAsync(locationName, context)); + } + + /** + * Gets a managed instance time zone. + * + * @param locationName The locationName parameter. + * @param timeZoneId The timeZoneId 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 managed instance time zone along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String locationName) { + public Mono> getWithResponseAsync(String locationName, String timeZoneId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (timeZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter timeZoneId 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.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByLocation(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)) + .withContext(context -> service.get(this.client.getEndpoint(), locationName, timeZoneId, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of managed instance time zones by location. + * Gets a managed instance time zone. * - * @param locationName The location of the database. + * @param locationName The locationName parameter. + * @param timeZoneId The timeZoneId 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 list of managed instance time zones by location along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a managed instance time zone along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String locationName, Context context) { + private Mono> getWithResponseAsync(String locationName, String timeZoneId, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (timeZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter timeZoneId 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.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByLocation(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)); + return service.get(this.client.getEndpoint(), locationName, timeZoneId, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); } /** - * Gets a list of managed instance time zones by location. + * Gets a managed instance time zone. * - * @param locationName The location of the database. + * @param locationName The locationName parameter. + * @param timeZoneId The timeZoneId 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 list of managed instance time zones by location as paginated response with {@link PagedFlux}. + * @return a managed instance time zone on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByLocationAsync(String locationName) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String locationName, String timeZoneId) { + return getWithResponseAsync(locationName, timeZoneId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of managed instance time zones by location. + * Gets a managed instance time zone. * - * @param locationName The location of the database. + * @param locationName The locationName parameter. + * @param timeZoneId The timeZoneId 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 list of managed instance time zones by location as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String locationName, Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(locationName, context), - nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of managed instance time zones by location. - * - * @param locationName The location of the 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 a list of managed instance time zones by location as paginated response with {@link PagedIterable}. + * @return a managed instance time zone along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String locationName) { - return new PagedIterable<>(listByLocationAsync(locationName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String locationName, String timeZoneId, Context context) { + return getWithResponseAsync(locationName, timeZoneId, context).block(); } /** - * Gets a list of managed instance time zones by location. + * Gets a managed instance time zone. * - * @param locationName The location of the database. - * @param context The context to associate with this operation. + * @param locationName The locationName parameter. + * @param timeZoneId The timeZoneId 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 list of managed instance time zones by location as paginated response with {@link PagedIterable}. + * @return a managed instance time zone. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String locationName, Context context) { - return new PagedIterable<>(listByLocationAsync(locationName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public TimeZoneInner get(String locationName, String timeZoneId) { + return getWithResponse(locationName, timeZoneId, Context.NONE).getValue(); } /** @@ -333,8 +333,7 @@ public PagedIterable listByLocation(String locationName, 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 managed instance time zones by location along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of time zones along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationNextSinglePageAsync(String nextLink) { @@ -361,8 +360,7 @@ private Mono> listByLocationNextSinglePageAsync(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 list of managed instance time zones by location along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of time zones along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TransparentDataEncryptionsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TransparentDataEncryptionsClientImpl.java index b53d9e4a1505..6d25aabd99a8 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TransparentDataEncryptionsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TransparentDataEncryptionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -12,7 +12,6 @@ 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.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -33,7 +32,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.TransparentDataEncryptionsClient; import com.azure.resourcemanager.sql.fluent.models.LogicalDatabaseTransparentDataEncryptionInner; -import com.azure.resourcemanager.sql.implementation.models.LogicalDatabaseTransparentDataEncryptionListResult; +import com.azure.resourcemanager.sql.models.LogicalDatabaseTransparentDataEncryptionListResult; import com.azure.resourcemanager.sql.models.TransparentDataEncryptionName; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -68,510 +67,56 @@ public final class TransparentDataEncryptionsClientImpl implements TransparentDa * The interface defining all the services for SqlManagementClientTransparentDataEncryptions to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientTransparentDataEncryptions") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientT") public interface TransparentDataEncryptionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @PathParam("tdeName") TransparentDataEncryptionName tdeName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}") - @ExpectedResponses({ 200, 201, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @PathParam("tdeName") TransparentDataEncryptionName tdeName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") LogicalDatabaseTransparentDataEncryptionInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabase( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}/resume") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resume(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("tdeName") TransparentDataEncryptionName tdeName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}/suspend") - @ExpectedResponses({ 200, 202 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> suspend(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("tdeName") TransparentDataEncryptionName tdeName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a logical database's transparent data encryption. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database's transparent data encryption along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, TransparentDataEncryptionName tdeName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (tdeName == null) { - return Mono.error(new IllegalArgumentException("Parameter tdeName 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, databaseName, tdeName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a logical database's transparent data encryption. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @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 logical database's transparent data encryption along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, TransparentDataEncryptionName tdeName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (tdeName == null) { - return Mono.error(new IllegalArgumentException("Parameter tdeName 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, serverName, databaseName, tdeName, accept, context); - } - - /** - * Gets a logical database's transparent data encryption. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database's transparent data encryption on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, tdeName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a logical database's transparent data encryption. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @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 logical database's transparent data encryption along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String serverName, String databaseName, TransparentDataEncryptionName tdeName, Context context) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName, tdeName, context).block(); - } - - /** - * Gets a logical database's transparent data encryption. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database's transparent data encryption. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LogicalDatabaseTransparentDataEncryptionInner get(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName) { - return getWithResponse(resourceGroupName, serverName, databaseName, tdeName, Context.NONE).getValue(); - } - - /** - * Updates a logical database's transparent data encryption configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @param parameters The database transparent data encryption. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (tdeName == null) { - return Mono.error(new IllegalArgumentException("Parameter tdeName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, tdeName, contentType, - accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a logical database's transparent data encryption configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @param parameters The database transparent data encryption. - * @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 logical database transparent data encryption scan state along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String serverName, String databaseName, TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (tdeName == null) { - return Mono.error(new IllegalArgumentException("Parameter tdeName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, tdeName, contentType, accept, - parameters, context); - } - - /** - * Updates a logical database's transparent data encryption configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @param parameters The database transparent data encryption. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - PollerFlux, LogicalDatabaseTransparentDataEncryptionInner> - beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, tdeName, parameters); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), LogicalDatabaseTransparentDataEncryptionInner.class, - LogicalDatabaseTransparentDataEncryptionInner.class, this.client.getContext()); - } - - /** - * Updates a logical database's transparent data encryption configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @param parameters The database transparent data encryption. - * @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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, LogicalDatabaseTransparentDataEncryptionInner> - beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, - databaseName, tdeName, parameters, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), LogicalDatabaseTransparentDataEncryptionInner.class, - LogicalDatabaseTransparentDataEncryptionInner.class, context); - } - - /** - * Updates a logical database's transparent data encryption configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @param parameters The database transparent data encryption. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, LogicalDatabaseTransparentDataEncryptionInner> - beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters) - .getSyncPoller(); - } - - /** - * Updates a logical database's transparent data encryption configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @param parameters The database transparent data encryption. - * @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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, LogicalDatabaseTransparentDataEncryptionInner> - beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters, context) - .getSyncPoller(); - } - - /** - * Updates a logical database's transparent data encryption configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @param parameters The database transparent data encryption. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, - String serverName, String databaseName, TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a logical database's transparent data encryption configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @param parameters The database transparent data encryption. - * @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 logical database transparent data encryption scan state on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String serverName, String databaseName, TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a logical database's transparent data encryption configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @param parameters The database transparent data encryption. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LogicalDatabaseTransparentDataEncryptionInner createOrUpdate(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner parameters) { - return createOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters).block(); - } + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") LogicalDatabaseTransparentDataEncryptionInner parameters, + @HeaderParam("Accept") String accept, Context context); - /** - * Updates a logical database's transparent data encryption configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @param parameters The database transparent data encryption. - * @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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LogicalDatabaseTransparentDataEncryptionInner createOrUpdate(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName, - LogicalDatabaseTransparentDataEncryptionInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters, context).block(); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDatabaseNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of the logical database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -585,10 +130,6 @@ public LogicalDatabaseTransparentDataEncryptionInner createOrUpdate(String resou 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.")); @@ -599,10 +140,14 @@ public LogicalDatabaseTransparentDataEncryptionInner createOrUpdate(String resou if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, accept, context)) + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .>map( res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -612,9 +157,10 @@ public LogicalDatabaseTransparentDataEncryptionInner createOrUpdate(String resou /** * Gets a list of the logical database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @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. @@ -629,10 +175,6 @@ private Mono> listB 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.")); @@ -643,11 +185,15 @@ private Mono> listB if (databaseName == null) { return Mono.error(new IllegalArgumentException("Parameter databaseName 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 - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -655,9 +201,10 @@ private Mono> listB /** * Gets a list of the logical database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -674,9 +221,10 @@ public PagedFlux listByDatabaseAs /** * Gets a list of the logical database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @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. @@ -695,9 +243,10 @@ private PagedFlux listByDatabaseA /** * Gets a list of the logical database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -713,9 +262,10 @@ public PagedIterable listByDataba /** * Gets a list of the logical database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @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. @@ -730,29 +280,26 @@ public PagedIterable listByDataba } /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. + * Gets a logical database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state along with {@link Response} on successful - * completion of {@link Mono}. + * @return a logical database's transparent data encryption along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> resumeWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, TransparentDataEncryptionName tdeName) { 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.")); @@ -766,38 +313,39 @@ public Mono>> resumeWithResponseAsync(String resourceG if (tdeName == null) { return Mono.error(new IllegalArgumentException("Parameter tdeName 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"; return FluxUtil - .withContext(context -> service.resume(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, tdeName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + tdeName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. + * Gets a logical database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. * @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 logical database transparent data encryption scan state along with {@link Response} on successful - * completion of {@link Mono}. + * @return a logical database's transparent data encryption along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resumeWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, TransparentDataEncryptionName tdeName, 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.")); @@ -811,205 +359,98 @@ private Mono>> resumeWithResponseAsync(String resource if (tdeName == null) { return Mono.error(new IllegalArgumentException("Parameter tdeName 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.resume(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, tdeName, accept, context); - } - - /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - PollerFlux, LogicalDatabaseTransparentDataEncryptionInner> - beginResumeAsync(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName) { - Mono>> mono - = resumeWithResponseAsync(resourceGroupName, serverName, databaseName, tdeName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), LogicalDatabaseTransparentDataEncryptionInner.class, - LogicalDatabaseTransparentDataEncryptionInner.class, this.client.getContext()); - } - - /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, LogicalDatabaseTransparentDataEncryptionInner> - beginResumeAsync(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = resumeWithResponseAsync(resourceGroupName, serverName, databaseName, tdeName, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), LogicalDatabaseTransparentDataEncryptionInner.class, - LogicalDatabaseTransparentDataEncryptionInner.class, context); - } - - /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, LogicalDatabaseTransparentDataEncryptionInner> - beginResume(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName) { - return this.beginResumeAsync(resourceGroupName, serverName, databaseName, tdeName).getSyncPoller(); - } - - /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, LogicalDatabaseTransparentDataEncryptionInner> - beginResume(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName, Context context) { - return this.beginResumeAsync(resourceGroupName, serverName, databaseName, tdeName, context).getSyncPoller(); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, tdeName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. + * Gets a logical database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state on successful completion of {@link Mono}. + * @return a logical database's transparent data encryption on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono resumeAsync(String resourceGroupName, String serverName, + public Mono getAsync(String resourceGroupName, String serverName, String databaseName, TransparentDataEncryptionName tdeName) { - return beginResumeAsync(resourceGroupName, serverName, databaseName, tdeName).last() - .flatMap(this.client::getLroFinalResultOrError); + return getWithResponseAsync(resourceGroupName, serverName, databaseName, tdeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. + * Gets a logical database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. * @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 logical database transparent data encryption scan state on successful completion of {@link Mono}. + * @return a logical database's transparent data encryption along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resumeAsync(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName, Context context) { - return beginResumeAsync(resourceGroupName, serverName, databaseName, tdeName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public Response getWithResponse(String resourceGroupName, + String serverName, String databaseName, TransparentDataEncryptionName tdeName, Context context) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName, tdeName, context).block(); } /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. + * Gets a logical database's transparent data encryption. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the transparent data encryption is defined. * @param tdeName The name of the transparent data encryption configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state. + * @return a logical database's transparent data encryption. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogicalDatabaseTransparentDataEncryptionInner resume(String resourceGroupName, String serverName, + public LogicalDatabaseTransparentDataEncryptionInner get(String resourceGroupName, String serverName, String databaseName, TransparentDataEncryptionName tdeName) { - return resumeAsync(resourceGroupName, serverName, databaseName, tdeName).block(); - } - - /** - * Resume ongoing logical database's Transparent Data Encryption scan configuration. - * - * @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 tdeName The name of the transparent data encryption configuration. - * @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 logical database transparent data encryption scan state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LogicalDatabaseTransparentDataEncryptionInner resume(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName, Context context) { - return resumeAsync(resourceGroupName, serverName, databaseName, tdeName, context).block(); + return getWithResponse(resourceGroupName, serverName, databaseName, tdeName, Context.NONE).getValue(); } /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. + * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state along with {@link Response} on successful - * completion of {@link Mono}. + * @return a logical database transparent data encryption state along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> suspendWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String databaseName, TransparentDataEncryptionName tdeName, + LogicalDatabaseTransparentDataEncryptionInner 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.")); @@ -1023,38 +464,47 @@ public Mono>> suspendWithResponseAsync(String resource if (tdeName == null) { return Mono.error(new IllegalArgumentException("Parameter tdeName 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.suspend(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, tdeName, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, tdeName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. + * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. * @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 logical database transparent data encryption scan state along with {@link Response} on successful - * completion of {@link Mono}. + * @return a logical database transparent data encryption state along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> suspendWithResponseAsync(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String serverName, String databaseName, TransparentDataEncryptionName tdeName, + LogicalDatabaseTransparentDataEncryptionInner 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.")); @@ -1068,31 +518,42 @@ private Mono>> suspendWithResponseAsync(String resourc if (tdeName == null) { return Mono.error(new IllegalArgumentException("Parameter tdeName 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"; context = this.client.mergeContext(context); - return service.suspend(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, tdeName, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, tdeName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. + * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 logical database transparent data encryption scan state. + * @return the {@link PollerFlux} for polling of a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, LogicalDatabaseTransparentDataEncryptionInner> - beginSuspendAsync(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName) { + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters) { Mono>> mono - = suspendWithResponseAsync(resourceGroupName, serverName, databaseName, tdeName); + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, tdeName, parameters); return this.client .getLroResult( mono, this.client.getHttpPipeline(), LogicalDatabaseTransparentDataEncryptionInner.class, @@ -1100,26 +561,29 @@ private Mono>> suspendWithResponseAsync(String resourc } /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. + * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. * @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 logical database transparent data encryption scan state. + * @return the {@link PollerFlux} for polling of a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LogicalDatabaseTransparentDataEncryptionInner> - beginSuspendAsync(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName, Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, + TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters, + Context context) { context = this.client.mergeContext(context); - Mono>> mono - = suspendWithResponseAsync(resourceGroupName, serverName, databaseName, tdeName, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, + databaseName, tdeName, parameters, context); return this.client .getLroResult( mono, this.client.getHttpPipeline(), LogicalDatabaseTransparentDataEncryptionInner.class, @@ -1127,120 +591,140 @@ private Mono>> suspendWithResponseAsync(String resourc } /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. + * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 logical database transparent data encryption scan state. + * @return the {@link SyncPoller} for polling of a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LogicalDatabaseTransparentDataEncryptionInner> - beginSuspend(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName) { - return this.beginSuspendAsync(resourceGroupName, serverName, databaseName, tdeName).getSyncPoller(); + beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, + TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters) + .getSyncPoller(); } /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. + * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. * @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 logical database transparent data encryption scan state. + * @return the {@link SyncPoller} for polling of a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LogicalDatabaseTransparentDataEncryptionInner> - beginSuspend(String resourceGroupName, String serverName, String databaseName, - TransparentDataEncryptionName tdeName, Context context) { - return this.beginSuspendAsync(resourceGroupName, serverName, databaseName, tdeName, context).getSyncPoller(); + beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, + TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionInner parameters, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters, context) + .getSyncPoller(); } /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. + * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state on successful completion of {@link Mono}. + * @return a logical database transparent data encryption state on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono suspendAsync(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName) { - return beginSuspendAsync(resourceGroupName, serverName, databaseName, tdeName).last() + public Mono createOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, TransparentDataEncryptionName tdeName, + LogicalDatabaseTransparentDataEncryptionInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. + * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. * @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 logical database transparent data encryption scan state on successful completion of {@link Mono}. + * @return a logical database transparent data encryption state on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono suspendAsync(String resourceGroupName, - String serverName, String databaseName, TransparentDataEncryptionName tdeName, Context context) { - return beginSuspendAsync(resourceGroupName, serverName, databaseName, tdeName, context).last() + private Mono createOrUpdateAsync(String resourceGroupName, + String serverName, String databaseName, TransparentDataEncryptionName tdeName, + LogicalDatabaseTransparentDataEncryptionInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters, context) + .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. + * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logical database transparent data encryption scan state. + * @return a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogicalDatabaseTransparentDataEncryptionInner suspend(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName) { - return suspendAsync(resourceGroupName, serverName, databaseName, tdeName).block(); + public LogicalDatabaseTransparentDataEncryptionInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, TransparentDataEncryptionName tdeName, + LogicalDatabaseTransparentDataEncryptionInner parameters) { + return createOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters).block(); } /** - * Suspend ongoing logical database's Transparent Data Encryption scan configuration. + * Updates a logical database's transparent data encryption configuration. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName The name of the logical database for which the security alert policy is defined. * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. * @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 logical database transparent data encryption scan state. + * @return a logical database transparent data encryption state. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogicalDatabaseTransparentDataEncryptionInner suspend(String resourceGroupName, String serverName, - String databaseName, TransparentDataEncryptionName tdeName, Context context) { - return suspendAsync(resourceGroupName, serverName, databaseName, tdeName, context).block(); + public LogicalDatabaseTransparentDataEncryptionInner createOrUpdate(String resourceGroupName, String serverName, + String databaseName, TransparentDataEncryptionName tdeName, + LogicalDatabaseTransparentDataEncryptionInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, serverName, databaseName, tdeName, parameters, context).block(); } /** @@ -1250,8 +734,8 @@ public LogicalDatabaseTransparentDataEncryptionInner suspend(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 logical database's transparent data encryption along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of transparent data encryptions along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -1280,8 +764,8 @@ public LogicalDatabaseTransparentDataEncryptionInner suspend(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 logical database's transparent data encryption along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of transparent data encryptions along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/UsagesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/UsagesClientImpl.java index 7f3558551088..77dedb62bd66 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/UsagesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/UsagesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.UsagesClient; import com.azure.resourcemanager.sql.fluent.models.UsageInner; -import com.azure.resourcemanager.sql.implementation.models.UsageListResult; +import com.azure.resourcemanager.sql.models.UsageListResult; import reactor.core.publisher.Mono; /** @@ -58,33 +58,33 @@ public final class UsagesClientImpl implements UsagesClient { * The interface defining all the services for SqlManagementClientUsages to be used by the proxy service to perform * REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientUsages") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientU") public interface UsagesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/usages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByInstancePool(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByInstancePool(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("instancePoolName") String instancePoolName, - @QueryParam("expandChildren") Boolean expandChildren, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("expandChildren") Boolean expandChildren, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByInstancePoolNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets all instance pool usage metrics. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param expandChildren Optional request parameter to include managed instance usages within the instance pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -100,10 +100,6 @@ private Mono> listByInstancePoolSinglePageAsync(String 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.")); @@ -112,10 +108,15 @@ private Mono> listByInstancePoolSinglePageAsync(String return Mono .error(new IllegalArgumentException("Parameter instancePoolName 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"; return FluxUtil - .withContext(context -> service.listByInstancePool(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, instancePoolName, expandChildren, accept, context)) + .withContext( + context -> service.listByInstancePool(this.client.getEndpoint(), resourceGroupName, instancePoolName, + expandChildren, this.client.getSubscriptionId(), 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())); @@ -124,7 +125,8 @@ private Mono> listByInstancePoolSinglePageAsync(String /** * Gets all instance pool usage metrics. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param expandChildren Optional request parameter to include managed instance usages within the instance pool. * @param context The context to associate with this operation. @@ -141,10 +143,6 @@ private Mono> listByInstancePoolSinglePageAsync(String 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.")); @@ -153,11 +151,15 @@ private Mono> listByInstancePoolSinglePageAsync(String return Mono .error(new IllegalArgumentException("Parameter instancePoolName 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 - .listByInstancePool(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, instancePoolName, expandChildren, accept, context) + .listByInstancePool(this.client.getEndpoint(), resourceGroupName, instancePoolName, expandChildren, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -165,7 +167,8 @@ private Mono> listByInstancePoolSinglePageAsync(String /** * Gets all instance pool usage metrics. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param expandChildren Optional request parameter to include managed instance usages within the instance pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -184,7 +187,8 @@ public PagedFlux listByInstancePoolAsync(String resourceGroupName, S /** * Gets all instance pool usage metrics. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -202,7 +206,8 @@ public PagedFlux listByInstancePoolAsync(String resourceGroupName, S /** * Gets all instance pool usage metrics. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param expandChildren Optional request parameter to include managed instance usages within the instance pool. * @param context The context to associate with this operation. @@ -222,7 +227,8 @@ private PagedFlux listByInstancePoolAsync(String resourceGroupName, /** * Gets all instance pool usage metrics. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -238,7 +244,8 @@ public PagedIterable listByInstancePool(String resourceGroupName, St /** * Gets all instance pool usage metrics. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param instancePoolName The name of the instance pool to be retrieved. * @param expandChildren Optional request parameter to include managed instance usages within the instance pool. * @param context The context to associate with this operation. @@ -261,8 +268,7 @@ public PagedIterable listByInstancePool(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 instance pool usage metrics along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of usages along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInstancePoolNextSinglePageAsync(String nextLink) { @@ -290,8 +296,7 @@ private Mono> listByInstancePoolNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 instance pool usage metrics along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of usages along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByInstancePoolNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/VirtualClustersClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/VirtualClustersClientImpl.java index 8908ddcfcc36..52a5a5e45181 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/VirtualClustersClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/VirtualClustersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -15,7 +15,6 @@ 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; import com.azure.core.annotation.ServiceInterface; @@ -37,9 +36,9 @@ import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; import com.azure.resourcemanager.sql.fluent.VirtualClustersClient; -import com.azure.resourcemanager.sql.fluent.models.UpdateVirtualClusterDnsServersOperationInner; +import com.azure.resourcemanager.sql.fluent.models.UpdateManagedInstanceDnsServersOperationInner; import com.azure.resourcemanager.sql.fluent.models.VirtualClusterInner; -import com.azure.resourcemanager.sql.implementation.models.VirtualClusterListResult; +import com.azure.resourcemanager.sql.models.VirtualClusterListResult; import com.azure.resourcemanager.sql.models.VirtualClusterUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -75,105 +74,94 @@ public final class VirtualClustersClientImpl implements InnerSupportsGet> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualClusterName") String virtualClusterName, @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}") - @ExpectedResponses({ 200, 201, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualClusterName") String virtualClusterName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") VirtualClusterInner parameters, - Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualClusterName") String virtualClusterName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") VirtualClusterUpdate parameters, - Context context); + @PathParam("virtualClusterName") String virtualClusterName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualClusterName") String virtualClusterName, Context context); + @PathParam("virtualClusterName") String virtualClusterName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters") - @ExpectedResponses({ 200 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualClusterName") String virtualClusterName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VirtualClusterUpdate parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}/updateManagedInstanceDnsServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> updateDnsServers( + @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("virtualClusterName") String virtualClusterName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}/updateManagedInstanceDnsServers") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateDnsServers(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualClusterName") String virtualClusterName, @HeaderParam("Accept") String accept, - Context context); - @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a virtual cluster. + * Gets a list of all virtualClusters in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual cluster along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all virtualClusters in the subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String virtualClusterName) { + private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -182,35 +170,27 @@ public Mono> getByResourceGroupWithResponseAsync(S 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 (virtualClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualClusterName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualClusterName, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + 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())); } /** - * Gets a virtual cluster. + * Gets a list of all virtualClusters in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. * @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 virtual cluster along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all virtualClusters in the subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String virtualClusterName, Context context) { + 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.")); @@ -219,328 +199,258 @@ private Mono> getByResourceGroupWithResponseAsync( 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 (virtualClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualClusterName 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, virtualClusterName, accept, context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a virtual cluster. + * Gets a list of all virtualClusters in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual cluster on successful completion of {@link Mono}. + * @return a list of all virtualClusters in the subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String virtualClusterName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, virtualClusterName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Gets a virtual cluster. + * Gets a list of all virtualClusters in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. * @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 virtual cluster along with {@link Response}. + * @return a list of all virtualClusters in the subscription as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String virtualClusterName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, virtualClusterName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Gets a virtual cluster. + * Gets a list of all virtualClusters in the subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. + * @throws ManagementException 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 all virtualClusters in the subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of all virtualClusters in the 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 a virtual cluster. + * @return a list of all virtualClusters in the subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualClusterInner getByResourceGroup(String resourceGroupName, String virtualClusterName) { - return getByResourceGroupWithResponse(resourceGroupName, virtualClusterName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** - * Creates virtual cluster. + * Gets a list of virtual clusters in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure SQL virtual cluster along with {@link Response} on successful completion of {@link Mono}. + * @return a list of virtual clusters in a resource group along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String virtualClusterName, VirtualClusterInner parameters) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { 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 (virtualClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualClusterName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualClusterName, contentType, accept, parameters, - context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, + this.client.getSubscriptionId(), 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())); } /** - * Creates virtual cluster. + * Gets a list of virtual clusters in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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 an Azure SQL virtual cluster along with {@link Response} on successful completion of {@link Mono}. + * @return a list of virtual clusters in a resource group along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String virtualClusterName, VirtualClusterInner parameters, Context context) { + 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.")); } - if (virtualClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualClusterName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualClusterName, contentType, accept, parameters, - context); + return service + .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Creates virtual cluster. + * Gets a list of virtual clusters in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an Azure SQL virtual cluster. + * @return a list of virtual clusters in a resource group as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, VirtualClusterInner> - beginCreateOrUpdateAsync(String resourceGroupName, String virtualClusterName, VirtualClusterInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, virtualClusterName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VirtualClusterInner.class, VirtualClusterInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Creates virtual cluster. + * Gets a list of virtual clusters in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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 an Azure SQL virtual cluster. + * @return a list of virtual clusters in a resource group as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualClusterInner> beginCreateOrUpdateAsync( - String resourceGroupName, String virtualClusterName, VirtualClusterInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, virtualClusterName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VirtualClusterInner.class, VirtualClusterInner.class, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Creates virtual cluster. + * Gets a list of virtual clusters in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an Azure SQL virtual cluster. + * @return a list of virtual clusters in a resource group as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualClusterInner> - beginCreateOrUpdate(String resourceGroupName, String virtualClusterName, VirtualClusterInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, virtualClusterName, parameters).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } /** - * Creates virtual cluster. + * Gets a list of virtual clusters in a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @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 an Azure SQL virtual cluster. + * @return a list of virtual clusters in a resource group as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualClusterInner> beginCreateOrUpdate( - String resourceGroupName, String virtualClusterName, VirtualClusterInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, virtualClusterName, parameters, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** - * Creates virtual cluster. + * Gets a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster on successful completion of {@link Mono}. + * @return a virtual cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String virtualClusterName, - VirtualClusterInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, virtualClusterName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String virtualClusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (virtualClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter virtualClusterName 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"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, + virtualClusterName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates virtual cluster. + * Gets a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster on successful completion of {@link Mono}. + * @return a virtual cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String virtualClusterName, - VirtualClusterInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, virtualClusterName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualClusterInner createOrUpdate(String resourceGroupName, String virtualClusterName, - VirtualClusterInner parameters) { - return createOrUpdateAsync(resourceGroupName, virtualClusterName, parameters).block(); - } - - /** - * Creates virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualClusterInner createOrUpdate(String resourceGroupName, String virtualClusterName, - VirtualClusterInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, virtualClusterName, parameters, context).block(); - } - - /** - * Updates an existing virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String virtualClusterName, - VirtualClusterUpdate parameters) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String virtualClusterName, 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.")); @@ -549,216 +459,72 @@ public Mono>> updateWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter virtualClusterName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualClusterName, contentType, accept, parameters, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates an existing virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String virtualClusterName, VirtualClusterUpdate 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 (virtualClusterName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualClusterName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, virtualClusterName, contentType, accept, parameters, context); + return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, virtualClusterName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** - * Updates an existing virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 the {@link PollerFlux} for polling of an Azure SQL virtual cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, VirtualClusterInner> beginUpdateAsync(String resourceGroupName, - String virtualClusterName, VirtualClusterUpdate parameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, virtualClusterName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VirtualClusterInner.class, VirtualClusterInner.class, this.client.getContext()); - } - - /** - * Updates an existing virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 the {@link PollerFlux} for polling of an Azure SQL virtual cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualClusterInner> beginUpdateAsync(String resourceGroupName, - String virtualClusterName, VirtualClusterUpdate parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, virtualClusterName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VirtualClusterInner.class, VirtualClusterInner.class, context); - } - - /** - * Updates an existing virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 the {@link SyncPoller} for polling of an Azure SQL virtual cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualClusterInner> beginUpdate(String resourceGroupName, - String virtualClusterName, VirtualClusterUpdate parameters) { - return this.beginUpdateAsync(resourceGroupName, virtualClusterName, parameters).getSyncPoller(); - } - - /** - * Updates an existing virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 the {@link SyncPoller} for polling of an Azure SQL virtual cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualClusterInner> beginUpdate(String resourceGroupName, - String virtualClusterName, VirtualClusterUpdate parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, virtualClusterName, parameters, context).getSyncPoller(); - } - - /** - * Updates an existing virtual cluster. + * Gets a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster on successful completion of {@link Mono}. + * @return a virtual cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String virtualClusterName, - VirtualClusterUpdate parameters) { - return beginUpdateAsync(resourceGroupName, virtualClusterName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono getByResourceGroupAsync(String resourceGroupName, String virtualClusterName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, virtualClusterName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Updates an existing virtual cluster. + * Gets a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String virtualClusterName, - VirtualClusterUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, virtualClusterName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates an existing virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster. + * @return a virtual cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualClusterInner update(String resourceGroupName, String virtualClusterName, - VirtualClusterUpdate parameters) { - return updateAsync(resourceGroupName, virtualClusterName, parameters).block(); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String virtualClusterName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, virtualClusterName, context).block(); } /** - * Updates an existing virtual cluster. + * Gets a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. - * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster. + * @return a virtual cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualClusterInner update(String resourceGroupName, String virtualClusterName, - VirtualClusterUpdate parameters, Context context) { - return updateAsync(resourceGroupName, virtualClusterName, parameters, context).block(); + public VirtualClusterInner getByResourceGroup(String resourceGroupName, String virtualClusterName) { + return getByResourceGroupWithResponse(resourceGroupName, virtualClusterName, Context.NONE).getValue(); } /** * Deletes a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -772,10 +538,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -784,16 +546,21 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter virtualClusterName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualClusterName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, virtualClusterName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -808,10 +575,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -820,15 +583,20 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter virtualClusterName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, virtualClusterName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, virtualClusterName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -845,7 +613,8 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -865,7 +634,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -880,7 +650,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -897,323 +668,88 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 virtualClusterName) { - return beginDeleteAsync(resourceGroupName, virtualClusterName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. - * @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 virtualClusterName, Context context) { - return beginDeleteAsync(resourceGroupName, virtualClusterName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 virtualClusterName) { - deleteAsync(resourceGroupName, virtualClusterName).block(); - } - - /** - * Deletes a virtual cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param virtualClusterName The name of the virtual cluster. - * @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 virtualClusterName, Context context) { - deleteAsync(resourceGroupName, virtualClusterName, context).block(); - } - - /** - * Gets a list of virtual clusters 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. - * @throws ManagementException 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 clusters in a resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - 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"; - return FluxUtil - .withContext(context -> 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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of virtual clusters 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 clusters in a resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @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)); - } - - /** - * Gets a list of virtual clusters 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. - * @throws ManagementException 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 clusters in a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of virtual clusters 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 clusters in a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of virtual clusters 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. - * @throws ManagementException 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 clusters in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Gets a list of virtual clusters 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 clusters in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Gets a list of all virtualClusters in the 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 a list of all virtualClusters in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - 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"; - return FluxUtil - .withContext(context -> 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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of all virtualClusters in the 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 a list of all virtualClusters in the subscription 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)); - } - - /** - * Gets a list of all virtualClusters in the 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 a list of all virtualClusters in the subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String virtualClusterName) { + return beginDeleteAsync(resourceGroupName, virtualClusterName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a list of all virtualClusters in the subscription. + * Deletes a virtual cluster. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. * @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 all virtualClusters in the subscription as paginated response with {@link PagedFlux}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String virtualClusterName, Context context) { + return beginDeleteAsync(resourceGroupName, virtualClusterName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a list of all virtualClusters in the subscription. + * Deletes a virtual cluster. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 all virtualClusters in the subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String virtualClusterName) { + deleteAsync(resourceGroupName, virtualClusterName).block(); } /** - * Gets a list of all virtualClusters in the subscription. + * Deletes a virtual cluster. * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. * @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 all virtualClusters in the subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String virtualClusterName, Context context) { + deleteAsync(resourceGroupName, virtualClusterName, context).block(); } /** - * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. + * Updates a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 refresh DNS servers operation along with {@link Response} on successful completion of {@link Mono}. + * @return an Azure SQL virtual cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateDnsServersWithResponseAsync(String resourceGroupName, - String virtualClusterName) { + public Mono>> updateWithResponseAsync(String resourceGroupName, String virtualClusterName, + VirtualClusterUpdate 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.")); @@ -1222,35 +758,42 @@ public Mono>> updateDnsServersWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter virtualClusterName 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.updateDnsServers(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualClusterName, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, virtualClusterName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. + * Updates a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 refresh DNS servers operation along with {@link Response} on successful completion of {@link Mono}. + * @return an Azure SQL virtual cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDnsServersWithResponseAsync(String resourceGroupName, - String virtualClusterName, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String virtualClusterName, VirtualClusterUpdate 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.")); @@ -1259,159 +802,305 @@ private Mono>> updateDnsServersWithResponseAsync(Strin return Mono .error(new IllegalArgumentException("Parameter virtualClusterName 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"; context = this.client.mergeContext(context); - return service.updateDnsServers(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, virtualClusterName, accept, context); + return service.update(this.client.getEndpoint(), resourceGroupName, virtualClusterName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** - * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. + * Updates a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 the {@link PollerFlux} for polling of a refresh DNS servers operation. + * @return the {@link PollerFlux} for polling of an Azure SQL virtual cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - PollerFlux, UpdateVirtualClusterDnsServersOperationInner> - beginUpdateDnsServersAsync(String resourceGroupName, String virtualClusterName) { + public PollerFlux, VirtualClusterInner> beginUpdateAsync(String resourceGroupName, + String virtualClusterName, VirtualClusterUpdate parameters) { Mono>> mono - = updateDnsServersWithResponseAsync(resourceGroupName, virtualClusterName); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), UpdateVirtualClusterDnsServersOperationInner.class, - UpdateVirtualClusterDnsServersOperationInner.class, this.client.getContext()); + = updateWithResponseAsync(resourceGroupName, virtualClusterName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VirtualClusterInner.class, VirtualClusterInner.class, this.client.getContext()); } /** - * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. + * Updates a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 the {@link PollerFlux} for polling of a refresh DNS servers operation. + * @return the {@link PollerFlux} for polling of an Azure SQL virtual cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private - PollerFlux, UpdateVirtualClusterDnsServersOperationInner> - beginUpdateDnsServersAsync(String resourceGroupName, String virtualClusterName, Context context) { + private PollerFlux, VirtualClusterInner> beginUpdateAsync(String resourceGroupName, + String virtualClusterName, VirtualClusterUpdate parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateDnsServersWithResponseAsync(resourceGroupName, virtualClusterName, context); - return this.client - .getLroResult( - mono, this.client.getHttpPipeline(), UpdateVirtualClusterDnsServersOperationInner.class, - UpdateVirtualClusterDnsServersOperationInner.class, context); + = updateWithResponseAsync(resourceGroupName, virtualClusterName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VirtualClusterInner.class, VirtualClusterInner.class, context); } /** - * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. + * Updates a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 the {@link SyncPoller} for polling of a refresh DNS servers operation. + * @return the {@link SyncPoller} for polling of an Azure SQL virtual cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, UpdateVirtualClusterDnsServersOperationInner> - beginUpdateDnsServers(String resourceGroupName, String virtualClusterName) { - return this.beginUpdateDnsServersAsync(resourceGroupName, virtualClusterName).getSyncPoller(); + public SyncPoller, VirtualClusterInner> beginUpdate(String resourceGroupName, + String virtualClusterName, VirtualClusterUpdate parameters) { + return this.beginUpdateAsync(resourceGroupName, virtualClusterName, parameters).getSyncPoller(); } /** - * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. + * Updates a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 the {@link SyncPoller} for polling of a refresh DNS servers operation. + * @return the {@link SyncPoller} for polling of an Azure SQL virtual cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public - SyncPoller, UpdateVirtualClusterDnsServersOperationInner> - beginUpdateDnsServers(String resourceGroupName, String virtualClusterName, Context context) { - return this.beginUpdateDnsServersAsync(resourceGroupName, virtualClusterName, context).getSyncPoller(); + public SyncPoller, VirtualClusterInner> beginUpdate(String resourceGroupName, + String virtualClusterName, VirtualClusterUpdate parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, virtualClusterName, parameters, context).getSyncPoller(); } /** - * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. + * Updates a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 refresh DNS servers operation on successful completion of {@link Mono}. + * @return an Azure SQL virtual cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateDnsServersAsync(String resourceGroupName, - String virtualClusterName) { - return beginUpdateDnsServersAsync(resourceGroupName, virtualClusterName).last() + public Mono updateAsync(String resourceGroupName, String virtualClusterName, + VirtualClusterUpdate parameters) { + return beginUpdateAsync(resourceGroupName, virtualClusterName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. + * Updates a virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 refresh DNS servers operation on successful completion of {@link Mono}. + * @return an Azure SQL virtual cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDnsServersAsync(String resourceGroupName, - String virtualClusterName, Context context) { - return beginUpdateDnsServersAsync(resourceGroupName, virtualClusterName, context).last() + private Mono updateAsync(String resourceGroupName, String virtualClusterName, + VirtualClusterUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, virtualClusterName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } + /** + * Updates a virtual cluster. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualClusterInner update(String resourceGroupName, String virtualClusterName, + VirtualClusterUpdate parameters) { + return updateAsync(resourceGroupName, virtualClusterName, parameters).block(); + } + + /** + * Updates a virtual cluster. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @param parameters The requested virtual cluster resource 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 an Azure SQL virtual cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualClusterInner update(String resourceGroupName, String virtualClusterName, + VirtualClusterUpdate parameters, Context context) { + return updateAsync(resourceGroupName, virtualClusterName, parameters, context).block(); + } + + /** + * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a recoverable managed database resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + updateDnsServersWithResponseAsync(String resourceGroupName, String virtualClusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (virtualClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter virtualClusterName 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"; + return FluxUtil + .withContext(context -> service.updateDnsServers(this.client.getEndpoint(), resourceGroupName, + virtualClusterName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @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 recoverable managed database resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + updateDnsServersWithResponseAsync(String resourceGroupName, String virtualClusterName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (virtualClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter virtualClusterName 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.updateDnsServers(this.client.getEndpoint(), resourceGroupName, virtualClusterName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); + } + /** * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a refresh DNS servers operation. + * @return a recoverable managed database resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateVirtualClusterDnsServersOperationInner updateDnsServers(String resourceGroupName, + public Mono updateDnsServersAsync(String resourceGroupName, String virtualClusterName) { - return updateDnsServersAsync(resourceGroupName, virtualClusterName).block(); + return updateDnsServersWithResponseAsync(resourceGroupName, virtualClusterName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param virtualClusterName The name of the virtual cluster. * @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 refresh DNS servers operation. + * @return a recoverable managed database resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateVirtualClusterDnsServersOperationInner updateDnsServers(String resourceGroupName, - String virtualClusterName, Context context) { - return updateDnsServersAsync(resourceGroupName, virtualClusterName, context).block(); + public Response + updateDnsServersWithResponse(String resourceGroupName, String virtualClusterName, Context context) { + return updateDnsServersWithResponseAsync(resourceGroupName, virtualClusterName, context).block(); + } + + /** + * Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param virtualClusterName The name of the virtual cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a recoverable managed database resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateManagedInstanceDnsServersOperationInner updateDnsServers(String resourceGroupName, + String virtualClusterName) { + return updateDnsServersWithResponse(resourceGroupName, virtualClusterName, Context.NONE).getValue(); } /** @@ -1421,11 +1110,10 @@ public UpdateVirtualClusterDnsServersOperationInner updateDnsServers(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 virtual clusters in a resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of virtual clusters along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1434,9 +1122,7 @@ private Mono> listByResourceGroupNextSinglePa new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -1450,12 +1136,10 @@ private Mono> listByResourceGroupNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 clusters in a resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of virtual clusters along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1465,7 +1149,7 @@ private Mono> listByResourceGroupNextSinglePa } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, 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)); } @@ -1477,11 +1161,10 @@ private Mono> listByResourceGroupNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 all virtualClusters in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of virtual clusters along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1490,7 +1173,9 @@ private Mono> listNextSinglePageAsync(String 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.listByResourceGroupNext(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())); @@ -1504,11 +1189,11 @@ 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 a list of all virtualClusters in the subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of virtual clusters along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1518,7 +1203,7 @@ private Mono> listNextSinglePageAsync(String } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, 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)); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/VirtualNetworkRulesClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/VirtualNetworkRulesClientImpl.java index e2bd9f5e5237..a7de4c901047 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/VirtualNetworkRulesClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/VirtualNetworkRulesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.VirtualNetworkRulesClient; import com.azure.resourcemanager.sql.fluent.models.VirtualNetworkRuleInner; -import com.azure.resourcemanager.sql.implementation.models.VirtualNetworkRuleListResult; +import com.azure.resourcemanager.sql.models.VirtualNetworkRuleListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,60 +67,212 @@ public final class VirtualNetworkRulesClientImpl implements VirtualNetworkRulesC * The interface defining all the services for SqlManagementClientVirtualNetworkRules to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientVirtualNetworkRules") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientV") public interface VirtualNetworkRulesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServer(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("virtualNetworkRuleName") String virtualNetworkRuleName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("virtualNetworkRuleName") String virtualNetworkRuleName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("virtualNetworkRuleName") String virtualNetworkRuleName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") VirtualNetworkRuleInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VirtualNetworkRuleInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("virtualNetworkRuleName") String virtualNetworkRuleName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("endpoint") 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); + @PathParam("virtualNetworkRuleName") String virtualNetworkRuleName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a list of virtual network rules in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 network rules in a 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 (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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), resourceGroupName, serverName, + this.client.getSubscriptionId(), 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())); + } + + /** + * Gets a list of virtual network rules in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 virtual network rules in a server along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 + .listByServer(this.client.getEndpoint(), resourceGroupName, serverName, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of virtual network rules in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 network rules in a 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)); + } + + /** + * Gets a list of virtual network rules in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 virtual network rules in a server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByServerAsync(String resourceGroupName, String serverName, + Context context) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of virtual network rules in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 network rules in a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); + } + + /** + * Gets a list of virtual network rules in a server. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @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 virtual network rules in a server as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); + } + /** * Gets a virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -135,10 +287,6 @@ public Mono> getWithResponseAsync(String resou 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.")); @@ -150,16 +298,22 @@ public Mono> getWithResponseAsync(String resou return Mono.error( new IllegalArgumentException("Parameter virtualNetworkRuleName 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"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, virtualNetworkRuleName, accept, context)) + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, + virtualNetworkRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -175,10 +329,6 @@ private Mono> getWithResponseAsync(String reso 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.")); @@ -190,16 +340,21 @@ private Mono> getWithResponseAsync(String reso return Mono.error( new IllegalArgumentException("Parameter virtualNetworkRuleName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, virtualNetworkRuleName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, virtualNetworkRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -217,7 +372,8 @@ public Mono getAsync(String resourceGroupName, String s /** * Gets a virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -235,7 +391,8 @@ public Response getWithResponse(String resourceGroupNam /** * Gets a virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -251,7 +408,8 @@ public VirtualNetworkRuleInner get(String resourceGroupName, String serverName, /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -267,10 +425,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -282,24 +436,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono.error( new IllegalArgumentException("Parameter virtualNetworkRuleName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, virtualNetworkRuleName, contentType, - accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + virtualNetworkRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -316,10 +474,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -331,23 +485,26 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter virtualNetworkRuleName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, virtualNetworkRuleName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, virtualNetworkRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -370,7 +527,8 @@ public PollerFlux, VirtualNetworkRuleInner> /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -394,7 +552,8 @@ private PollerFlux, VirtualNetworkRuleInner> /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -414,7 +573,8 @@ public SyncPoller, VirtualNetworkRuleInner> /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -435,7 +595,8 @@ public SyncPoller, VirtualNetworkRuleInner> /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -454,7 +615,8 @@ public Mono createOrUpdateAsync(String resourceGroupNam /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -475,7 +637,8 @@ private Mono createOrUpdateAsync(String resourceGroupNa /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -493,7 +656,8 @@ public VirtualNetworkRuleInner createOrUpdate(String resourceGroupName, String s /** * Creates or updates an existing virtual network rule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param parameters The requested virtual Network Rule Resource state. @@ -512,7 +676,8 @@ public VirtualNetworkRuleInner createOrUpdate(String resourceGroupName, String s /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -527,10 +692,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -542,16 +703,21 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error( new IllegalArgumentException("Parameter virtualNetworkRuleName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, virtualNetworkRuleName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + virtualNetworkRuleName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -567,10 +733,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -582,15 +744,20 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter virtualNetworkRuleName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, virtualNetworkRuleName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, virtualNetworkRuleName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -610,7 +777,8 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -632,7 +800,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -649,7 +818,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -667,7 +837,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -684,7 +855,8 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -703,7 +875,8 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -718,7 +891,8 @@ public void delete(String resourceGroupName, String serverName, String virtualNe /** * Deletes the virtual network rule with the given name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param virtualNetworkRuleName The name of the virtual network rule. * @param context The context to associate with this operation. @@ -731,149 +905,6 @@ public void delete(String resourceGroupName, String serverName, String virtualNe deleteAsync(resourceGroupName, serverName, virtualNetworkRuleName, context).block(); } - /** - * Gets a list of virtual network 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 virtual network rules in a 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())); - } - - /** - * Gets a list of virtual network rules in 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 virtual network rules in a server along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return 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)); - } - - /** - * Gets a list of virtual network 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 virtual network rules in a 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)); - } - - /** - * Gets a list of virtual network rules in 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 virtual network rules in a server as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServerAsync(String resourceGroupName, String serverName, - Context context) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of virtual network 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 virtual network rules in a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); - } - - /** - * Gets a list of virtual network rules in 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 virtual network rules in a server as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); - } - /** * Get the next page of items. * @@ -881,7 +912,7 @@ public PagedIterable listByServer(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 virtual network rules in a server along with {@link PagedResponse} on successful completion of + * @return a list of virtual network rules along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -909,7 +940,7 @@ private Mono> listByServerNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 network rules in a server along with {@link PagedResponse} on successful completion of + * @return a list of virtual network rules along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadClassifiersClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadClassifiersClientImpl.java index b4135fd19c7d..b27ee617fa0a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadClassifiersClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadClassifiersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.WorkloadClassifiersClient; import com.azure.resourcemanager.sql.fluent.models.WorkloadClassifierInner; -import com.azure.resourcemanager.sql.implementation.models.WorkloadClassifierListResult; +import com.azure.resourcemanager.sql.models.WorkloadClassifierListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,67 +67,251 @@ public final class WorkloadClassifiersClientImpl implements WorkloadClassifiersC * The interface defining all the services for SqlManagementClientWorkloadClassifiers to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientWorkloadClassifiers") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientW") public interface WorkloadClassifiersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("workloadGroupName") String workloadGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("workloadGroupName") String workloadGroupName, - @PathParam("workloadClassifierName") String workloadClassifierName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("workloadClassifierName") String workloadClassifierName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("workloadGroupName") String workloadGroupName, @PathParam("workloadClassifierName") String workloadClassifierName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") WorkloadClassifierInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") WorkloadClassifierInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("workloadGroupName") String workloadGroupName, - @PathParam("workloadClassifierName") String workloadClassifierName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @PathParam("workloadGroupName") String workloadGroupName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("workloadClassifierName") String workloadClassifierName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByWorkloadGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets the list of workload classifiers for a workload group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param workloadGroupName The name of the workload group from which to receive the classifiers from. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of workload classifiers for a workload group along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkloadGroupSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String workloadGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (workloadGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadGroupName 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"; + return FluxUtil + .withContext(context -> service.listByWorkloadGroup(this.client.getEndpoint(), resourceGroupName, + serverName, databaseName, workloadGroupName, this.client.getSubscriptionId(), + 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())); + } + + /** + * Gets the list of workload classifiers for a workload group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param workloadGroupName The name of the workload group from which to receive the classifiers from. + * @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 list of workload classifiers for a workload group along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkloadGroupSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, String workloadGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (workloadGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadGroupName 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 + .listByWorkloadGroup(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + workloadGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets the list of workload classifiers for a workload group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param workloadGroupName The name of the workload group from which to receive the classifiers from. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of workload classifiers for a workload group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByWorkloadGroupAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName) { + return new PagedFlux<>( + () -> listByWorkloadGroupSinglePageAsync(resourceGroupName, serverName, databaseName, workloadGroupName), + nextLink -> listByWorkloadGroupNextSinglePageAsync(nextLink)); + } + + /** + * Gets the list of workload classifiers for a workload group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param workloadGroupName The name of the workload group from which to receive the classifiers from. + * @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 list of workload classifiers for a workload group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadGroupAsync(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, Context context) { + return new PagedFlux<>(() -> listByWorkloadGroupSinglePageAsync(resourceGroupName, serverName, databaseName, + workloadGroupName, context), nextLink -> listByWorkloadGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the list of workload classifiers for a workload group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param workloadGroupName The name of the workload group from which to receive the classifiers from. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of workload classifiers for a workload group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadGroup(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName) { + return new PagedIterable<>( + listByWorkloadGroupAsync(resourceGroupName, serverName, databaseName, workloadGroupName)); + } + + /** + * Gets the list of workload classifiers for a workload group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param workloadGroupName The name of the workload group from which to receive the classifiers from. + * @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 list of workload classifiers for a workload group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadGroup(String resourceGroupName, String serverName, + String databaseName, String workloadGroupName, Context context) { + return new PagedIterable<>( + listByWorkloadGroupAsync(resourceGroupName, serverName, databaseName, workloadGroupName, context)); + } + /** * Gets a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. * @param workloadClassifierName The name of the workload classifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -141,10 +325,6 @@ public Mono> getWithResponseAsync(String resou 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.")); @@ -163,21 +343,26 @@ public Mono> getWithResponseAsync(String resou return Mono.error( new IllegalArgumentException("Parameter workloadClassifierName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, workloadGroupName, - workloadClassifierName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + workloadGroupName, workloadClassifierName, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. * @param workloadClassifierName The name of the workload classifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -192,10 +377,6 @@ private Mono> getWithResponseAsync(String reso 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.")); @@ -214,19 +395,24 @@ private Mono> getWithResponseAsync(String reso return Mono.error( new IllegalArgumentException("Parameter workloadClassifierName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, workloadGroupName, + workloadClassifierName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. * @param workloadClassifierName The name of the workload classifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -243,10 +429,11 @@ public Mono getAsync(String resourceGroupName, String s /** * Gets a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. * @param workloadClassifierName The name of the workload classifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -264,10 +451,11 @@ public Response getWithResponse(String resourceGroupNam /** * Gets a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. * @param workloadClassifierName The name of the workload classifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -284,11 +472,12 @@ public WorkloadClassifierInner get(String resourceGroupName, String serverName, /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -304,10 +493,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -326,28 +511,32 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono.error( new IllegalArgumentException("Parameter workloadClassifierName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, workloadGroupName, - workloadClassifierName, contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, workloadGroupName, workloadClassifierName, this.client.getSubscriptionId(), + this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -364,10 +553,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -386,27 +571,31 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter workloadClassifierName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, workloadGroupName, - workloadClassifierName, contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + workloadGroupName, workloadClassifierName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context); } /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -427,11 +616,12 @@ public PollerFlux, WorkloadClassifierInner> /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -453,11 +643,12 @@ private PollerFlux, WorkloadClassifierInner> /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -477,11 +668,12 @@ public SyncPoller, WorkloadClassifierInner> /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -502,11 +694,12 @@ public SyncPoller, WorkloadClassifierInner> /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -524,11 +717,12 @@ public Mono createOrUpdateAsync(String resourceGroupNam /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -547,11 +741,12 @@ private Mono createOrUpdateAsync(String resourceGroupNa /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -568,11 +763,12 @@ public WorkloadClassifierInner createOrUpdate(String resourceGroupName, String s /** * Creates or updates a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to create/update. * @param parameters The properties of the workload classifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -590,11 +786,12 @@ public WorkloadClassifierInner createOrUpdate(String resourceGroupName, String s /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -607,10 +804,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -629,21 +822,26 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error( new IllegalArgumentException("Parameter workloadClassifierName 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.")); + } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, workloadGroupName, - workloadClassifierName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, workloadGroupName, workloadClassifierName, this.client.getSubscriptionId(), + this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @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,10 +855,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -679,19 +873,24 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter workloadClassifierName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, workloadGroupName, + workloadClassifierName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -709,11 +908,12 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @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. @@ -733,11 +933,12 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -754,11 +955,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @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. @@ -777,11 +979,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -798,11 +1001,12 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @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. @@ -819,11 +1023,12 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -837,11 +1042,12 @@ public void delete(String resourceGroupName, String serverName, String databaseN /** * Deletes a workload classifier. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. - * @param workloadClassifierName The name of the workload classifier. + * @param workloadGroupName The name of the workload group from which to receive the classifier from. + * @param workloadClassifierName The name of the workload classifier to delete. * @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. @@ -854,182 +1060,6 @@ public void delete(String resourceGroupName, String serverName, String databaseN .block(); } - /** - * Gets the list of workload classifiers for a workload group. - * - * @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 workloadGroupName The name of the workload group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of workload classifiers for a workload group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkloadGroupSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, String workloadGroupName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (workloadGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByWorkloadGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, workloadGroupName, 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 list of workload classifiers for a workload group. - * - * @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 workloadGroupName The name of the workload group. - * @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 list of workload classifiers for a workload group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkloadGroupSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, String workloadGroupName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (workloadGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByWorkloadGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, workloadGroupName, accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of workload classifiers for a workload group. - * - * @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 workloadGroupName The name of the workload group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of workload classifiers for a workload group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByWorkloadGroupAsync(String resourceGroupName, String serverName, - String databaseName, String workloadGroupName) { - return new PagedFlux<>( - () -> listByWorkloadGroupSinglePageAsync(resourceGroupName, serverName, databaseName, workloadGroupName), - nextLink -> listByWorkloadGroupNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of workload classifiers for a workload group. - * - * @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 workloadGroupName The name of the workload group. - * @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 list of workload classifiers for a workload group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkloadGroupAsync(String resourceGroupName, String serverName, - String databaseName, String workloadGroupName, Context context) { - return new PagedFlux<>(() -> listByWorkloadGroupSinglePageAsync(resourceGroupName, serverName, databaseName, - workloadGroupName, context), nextLink -> listByWorkloadGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of workload classifiers for a workload group. - * - * @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 workloadGroupName The name of the workload group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of workload classifiers for a workload group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkloadGroup(String resourceGroupName, String serverName, - String databaseName, String workloadGroupName) { - return new PagedIterable<>( - listByWorkloadGroupAsync(resourceGroupName, serverName, databaseName, workloadGroupName)); - } - - /** - * Gets the list of workload classifiers for a workload group. - * - * @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 workloadGroupName The name of the workload group. - * @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 list of workload classifiers for a workload group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkloadGroup(String resourceGroupName, String serverName, - String databaseName, String workloadGroupName, Context context) { - return new PagedIterable<>( - listByWorkloadGroupAsync(resourceGroupName, serverName, databaseName, workloadGroupName, context)); - } - /** * Get the next page of items. * @@ -1037,7 +1067,7 @@ public PagedIterable listByWorkloadGroup(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 list of workload classifiers for a workload group along with {@link PagedResponse} on successful + * @return a list of workload classifiers for a workload group along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1066,7 +1096,7 @@ private Mono> listByWorkloadGroupNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of workload classifiers for a workload group along with {@link PagedResponse} on successful + * @return a list of workload classifiers for a workload group along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadGroupsClientImpl.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadGroupsClientImpl.java index fbbe78fac3fd..c3fea2af3212 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadGroupsClientImpl.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadGroupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.WorkloadGroupsClient; import com.azure.resourcemanager.sql.fluent.models.WorkloadGroupInner; -import com.azure.resourcemanager.sql.implementation.models.WorkloadGroupListResult; +import com.azure.resourcemanager.sql.models.WorkloadGroupListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,61 +67,225 @@ public final class WorkloadGroupsClientImpl implements WorkloadGroupsClient { * The interface defining all the services for SqlManagementClientWorkloadGroups to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "SqlManagementClientWorkloadGroups") + @Host("{$host}") + @ServiceInterface(name = "SqlManagementClientW") public interface WorkloadGroupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDatabase(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("workloadGroupName") String workloadGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("workloadGroupName") String workloadGroupName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") WorkloadGroupInner parameters, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") WorkloadGroupInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("databaseName") String databaseName, @PathParam("workloadGroupName") String workloadGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByDatabase(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets the list of workload groups. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 list of workload groups along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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"; + return FluxUtil + .withContext(context -> service.listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, this.client.getSubscriptionId(), 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())); + } + + /** + * Gets the list of workload groups. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 list of workload groups along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, + String serverName, String databaseName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName 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 + .listByDatabase(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets the list of workload groups. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 list of workload groups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName) { + return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * Gets the list of workload groups. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 list of workload groups as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), + nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the list of workload groups. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 list of workload groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); + } + + /** + * Gets the list of workload groups. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the 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 list of workload groups as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase(String resourceGroupName, String serverName, + String databaseName, Context context) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); + } + /** * Gets a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -137,10 +301,6 @@ public Mono> getWithResponseAsync(String resourceGr 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.")); @@ -155,18 +315,22 @@ public Mono> getWithResponseAsync(String resourceGr return Mono .error(new IllegalArgumentException("Parameter workloadGroupName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, workloadGroupName, accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + workloadGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -183,10 +347,6 @@ private Mono> getWithResponseAsync(String resourceG 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.")); @@ -201,16 +361,21 @@ private Mono> getWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter workloadGroupName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, workloadGroupName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, workloadGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context); } /** * Gets a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -229,7 +394,8 @@ public Mono getAsync(String resourceGroupName, String server /** * Gets a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -248,7 +414,8 @@ public Response getWithResponse(String resourceGroupName, St /** * Gets a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -266,7 +433,8 @@ public WorkloadGroupInner get(String resourceGroupName, String serverName, Strin /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -284,10 +452,6 @@ public Mono>> createOrUpdateWithResponseAsync(String r 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.")); @@ -302,24 +466,28 @@ public Mono>> createOrUpdateWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter workloadGroupName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, workloadGroupName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, workloadGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -339,10 +507,6 @@ private Mono>> createOrUpdateWithResponseAsync(String 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.")); @@ -357,23 +521,27 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter workloadGroupName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, workloadGroupName, - contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, + workloadGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, + context); } /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -396,7 +564,8 @@ public PollerFlux, WorkloadGroupInner> beginCreat /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -421,7 +590,8 @@ private PollerFlux, WorkloadGroupInner> beginCrea /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -441,7 +611,8 @@ public SyncPoller, WorkloadGroupInner> beginCreat /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -465,7 +636,8 @@ public SyncPoller, WorkloadGroupInner> beginCreat /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -486,7 +658,8 @@ public Mono createOrUpdateAsync(String resourceGroupName, St /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -507,7 +680,8 @@ private Mono createOrUpdateAsync(String resourceGroupName, S /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -526,7 +700,8 @@ public WorkloadGroupInner createOrUpdate(String resourceGroupName, String server /** * Creates or updates a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param workloadGroupName The name of the workload group. @@ -547,10 +722,11 @@ public WorkloadGroupInner createOrUpdate(String resourceGroupName, String server /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -563,10 +739,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -581,18 +753,24 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter workloadGroupName is required and cannot be null.")); } - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, workloadGroupName, context)) + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serverName, + databaseName, workloadGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @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. @@ -606,10 +784,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -624,18 +798,23 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter workloadGroupName 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.")); + } context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, workloadGroupName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, serverName, databaseName, workloadGroupName, + this.client.getSubscriptionId(), this.client.getApiVersion(), context); } /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -653,10 +832,11 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @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. @@ -676,10 +856,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -694,10 +875,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @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. @@ -714,10 +896,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -733,10 +916,11 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @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. @@ -753,10 +937,11 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -769,10 +954,11 @@ public void delete(String resourceGroupName, String serverName, String databaseN /** * Deletes a workload group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param workloadGroupName The name of the workload group. + * @param workloadGroupName The name of the workload group to delete. * @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. @@ -784,162 +970,6 @@ public void delete(String resourceGroupName, String serverName, String databaseN deleteAsync(resourceGroupName, serverName, databaseName, workloadGroupName, context).block(); } - /** - * Gets the list of workload groups. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of workload groups along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, 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 list of workload groups. - * - * @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 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 list of workload groups along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByDatabaseSinglePageAsync(String resourceGroupName, - String serverName, String databaseName, 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 (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByDatabase(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of workload groups. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of workload groups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName) { - return new PagedFlux<>(() -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of workload groups. - * - * @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 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 list of workload groups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByDatabaseAsync(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedFlux<>( - () -> listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName, context), - nextLink -> listByDatabaseNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of workload groups. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of workload groups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName)); - } - - /** - * Gets the list of workload groups. - * - * @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 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 list of workload groups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByDatabase(String resourceGroupName, String serverName, - String databaseName, Context context) { - return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, serverName, databaseName, context)); - } - /** * Get the next page of items. * @@ -947,7 +977,7 @@ public PagedIterable listByDatabase(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 the list of workload groups along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of workload groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink) { @@ -974,7 +1004,7 @@ private Mono> listByDatabaseNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of workload groups along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of workload groups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByDatabaseNextSinglePageAsync(String nextLink, diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSqlVulnerabilityAssessmentBaselineSetListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSqlVulnerabilityAssessmentBaselineSetListResult.java deleted file mode 100644 index a08e95f0b9e2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSqlVulnerabilityAssessmentBaselineSetListResult.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.fluent.models.DatabaseSqlVulnerabilityAssessmentBaselineSetInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a DatabaseSqlVulnerabilityAssessmentBaselineSet list operation. - */ -@Immutable -public final class DatabaseSqlVulnerabilityAssessmentBaselineSetListResult - implements JsonSerializable { - /* - * The DatabaseSqlVulnerabilityAssessmentBaselineSet items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of DatabaseSqlVulnerabilityAssessmentBaselineSetListResult class. - */ - private DatabaseSqlVulnerabilityAssessmentBaselineSetListResult() { - } - - /** - * Get the value property: The DatabaseSqlVulnerabilityAssessmentBaselineSet items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model DatabaseSqlVulnerabilityAssessmentBaselineSetListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER - = new ClientLogger(DatabaseSqlVulnerabilityAssessmentBaselineSetListResult.class); - - /** - * {@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 DatabaseSqlVulnerabilityAssessmentBaselineSetListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabaseSqlVulnerabilityAssessmentBaselineSetListResult 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 DatabaseSqlVulnerabilityAssessmentBaselineSetListResult. - */ - public static DatabaseSqlVulnerabilityAssessmentBaselineSetListResult fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DatabaseSqlVulnerabilityAssessmentBaselineSetListResult deserializedDatabaseSqlVulnerabilityAssessmentBaselineSetListResult - = new DatabaseSqlVulnerabilityAssessmentBaselineSetListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader - .readArray(reader1 -> DatabaseSqlVulnerabilityAssessmentBaselineSetInner.fromJson(reader1)); - deserializedDatabaseSqlVulnerabilityAssessmentBaselineSetListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentBaselineSetListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDatabaseSqlVulnerabilityAssessmentBaselineSetListResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult.java deleted file mode 100644 index 6b8b1e4c822e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.fluent.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a DatabaseSqlVulnerabilityAssessmentRuleBaseline list operation. - */ -@Immutable -public final class DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult - implements JsonSerializable { - /* - * The DatabaseSqlVulnerabilityAssessmentRuleBaseline items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult class. - */ - private DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult() { - } - - /** - * Get the value property: The DatabaseSqlVulnerabilityAssessmentRuleBaseline items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER - = new ClientLogger(DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult.class); - - /** - * {@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 DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult 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 - * DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult. - */ - public static DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineListResult - = new DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader - .readArray(reader1 -> DatabaseSqlVulnerabilityAssessmentRuleBaselineInner.fromJson(reader1)); - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineListResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/InstancePoolOperationListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/InstancePoolOperationListResult.java deleted file mode 100644 index 89a010bc2d03..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/InstancePoolOperationListResult.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.fluent.models.InstancePoolOperationInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a InstancePoolOperation list operation. - */ -@Immutable -public final class InstancePoolOperationListResult implements JsonSerializable { - /* - * The InstancePoolOperation items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of InstancePoolOperationListResult class. - */ - private InstancePoolOperationListResult() { - } - - /** - * Get the value property: The InstancePoolOperation items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model InstancePoolOperationListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(InstancePoolOperationListResult.class); - - /** - * {@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 InstancePoolOperationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InstancePoolOperationListResult 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 InstancePoolOperationListResult. - */ - public static InstancePoolOperationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InstancePoolOperationListResult deserializedInstancePoolOperationListResult - = new InstancePoolOperationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> InstancePoolOperationInner.fromJson(reader1)); - deserializedInstancePoolOperationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedInstancePoolOperationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedInstancePoolOperationListResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobPrivateEndpointListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobPrivateEndpointListResult.java deleted file mode 100644 index 85c6b705d024..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobPrivateEndpointListResult.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.fluent.models.JobPrivateEndpointInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a JobPrivateEndpoint list operation. - */ -@Immutable -public final class JobPrivateEndpointListResult implements JsonSerializable { - /* - * The JobPrivateEndpoint items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of JobPrivateEndpointListResult class. - */ - private JobPrivateEndpointListResult() { - } - - /** - * Get the value property: The JobPrivateEndpoint items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model JobPrivateEndpointListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JobPrivateEndpointListResult.class); - - /** - * {@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 JobPrivateEndpointListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobPrivateEndpointListResult 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 JobPrivateEndpointListResult. - */ - public static JobPrivateEndpointListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobPrivateEndpointListResult deserializedJobPrivateEndpointListResult = new JobPrivateEndpointListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> JobPrivateEndpointInner.fromJson(reader1)); - deserializedJobPrivateEndpointListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedJobPrivateEndpointListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobPrivateEndpointListResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseAdvancedThreatProtectionListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseAdvancedThreatProtectionListResult.java deleted file mode 100644 index a23d9f72f6c2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseAdvancedThreatProtectionListResult.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseAdvancedThreatProtectionInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a ManagedDatabaseAdvancedThreatProtection list operation. - */ -@Immutable -public final class ManagedDatabaseAdvancedThreatProtectionListResult - implements JsonSerializable { - /* - * The ManagedDatabaseAdvancedThreatProtection items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of ManagedDatabaseAdvancedThreatProtectionListResult class. - */ - private ManagedDatabaseAdvancedThreatProtectionListResult() { - } - - /** - * Get the value property: The ManagedDatabaseAdvancedThreatProtection items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedDatabaseAdvancedThreatProtectionListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER - = new ClientLogger(ManagedDatabaseAdvancedThreatProtectionListResult.class); - - /** - * {@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 ManagedDatabaseAdvancedThreatProtectionListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedDatabaseAdvancedThreatProtectionListResult 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 ManagedDatabaseAdvancedThreatProtectionListResult. - */ - public static ManagedDatabaseAdvancedThreatProtectionListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedDatabaseAdvancedThreatProtectionListResult deserializedManagedDatabaseAdvancedThreatProtectionListResult - = new ManagedDatabaseAdvancedThreatProtectionListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ManagedDatabaseAdvancedThreatProtectionInner.fromJson(reader1)); - deserializedManagedDatabaseAdvancedThreatProtectionListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedManagedDatabaseAdvancedThreatProtectionListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedDatabaseAdvancedThreatProtectionListResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseMoveOperationListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseMoveOperationListResult.java deleted file mode 100644 index 1beeeaa2d7b7..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseMoveOperationListResult.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation.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.sql.fluent.models.ManagedDatabaseMoveOperationResultInner; -import java.io.IOException; -import java.util.List; - -/** - * List of managed database move operations. - */ -@Immutable -public final class ManagedDatabaseMoveOperationListResult - implements JsonSerializable { - /* - * Array of results. - */ - private List value; - - /* - * Link to retrieve next page of results. - */ - private String nextLink; - - /** - * Creates an instance of ManagedDatabaseMoveOperationListResult class. - */ - private ManagedDatabaseMoveOperationListResult() { - } - - /** - * 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 ManagedDatabaseMoveOperationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedDatabaseMoveOperationListResult 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 ManagedDatabaseMoveOperationListResult. - */ - public static ManagedDatabaseMoveOperationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedDatabaseMoveOperationListResult deserializedManagedDatabaseMoveOperationListResult - = new ManagedDatabaseMoveOperationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ManagedDatabaseMoveOperationResultInner.fromJson(reader1)); - deserializedManagedDatabaseMoveOperationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedManagedDatabaseMoveOperationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedDatabaseMoveOperationListResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceAdvancedThreatProtectionListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceAdvancedThreatProtectionListResult.java deleted file mode 100644 index 90a120dbae70..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceAdvancedThreatProtectionListResult.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.fluent.models.ManagedInstanceAdvancedThreatProtectionInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a ManagedInstanceAdvancedThreatProtection list operation. - */ -@Immutable -public final class ManagedInstanceAdvancedThreatProtectionListResult - implements JsonSerializable { - /* - * The ManagedInstanceAdvancedThreatProtection items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of ManagedInstanceAdvancedThreatProtectionListResult class. - */ - private ManagedInstanceAdvancedThreatProtectionListResult() { - } - - /** - * Get the value property: The ManagedInstanceAdvancedThreatProtection items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedInstanceAdvancedThreatProtectionListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER - = new ClientLogger(ManagedInstanceAdvancedThreatProtectionListResult.class); - - /** - * {@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 ManagedInstanceAdvancedThreatProtectionListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedInstanceAdvancedThreatProtectionListResult 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 ManagedInstanceAdvancedThreatProtectionListResult. - */ - public static ManagedInstanceAdvancedThreatProtectionListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedInstanceAdvancedThreatProtectionListResult deserializedManagedInstanceAdvancedThreatProtectionListResult - = new ManagedInstanceAdvancedThreatProtectionListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ManagedInstanceAdvancedThreatProtectionInner.fromJson(reader1)); - deserializedManagedInstanceAdvancedThreatProtectionListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedManagedInstanceAdvancedThreatProtectionListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedInstanceAdvancedThreatProtectionListResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceDtcListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceDtcListResult.java deleted file mode 100644 index 59495977a001..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceDtcListResult.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.fluent.models.ManagedInstanceDtcInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a ManagedInstanceDtc list operation. - */ -@Immutable -public final class ManagedInstanceDtcListResult implements JsonSerializable { - /* - * The ManagedInstanceDtc items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of ManagedInstanceDtcListResult class. - */ - private ManagedInstanceDtcListResult() { - } - - /** - * Get the value property: The ManagedInstanceDtc items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedInstanceDtcListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedInstanceDtcListResult.class); - - /** - * {@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 ManagedInstanceDtcListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedInstanceDtcListResult 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 ManagedInstanceDtcListResult. - */ - public static ManagedInstanceDtcListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedInstanceDtcListResult deserializedManagedInstanceDtcListResult = new ManagedInstanceDtcListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ManagedInstanceDtcInner.fromJson(reader1)); - deserializedManagedInstanceDtcListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedManagedInstanceDtcListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedInstanceDtcListResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedLedgerDigestUploadsListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedLedgerDigestUploadsListResult.java deleted file mode 100644 index 3fc5144ef876..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedLedgerDigestUploadsListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.fluent.models.ManagedLedgerDigestUploadsInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a ManagedLedgerDigestUploads list operation. - */ -@Immutable -public final class ManagedLedgerDigestUploadsListResult - implements JsonSerializable { - /* - * The ManagedLedgerDigestUploads items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of ManagedLedgerDigestUploadsListResult class. - */ - private ManagedLedgerDigestUploadsListResult() { - } - - /** - * Get the value property: The ManagedLedgerDigestUploads items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedLedgerDigestUploadsListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedLedgerDigestUploadsListResult.class); - - /** - * {@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 ManagedLedgerDigestUploadsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedLedgerDigestUploadsListResult 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 ManagedLedgerDigestUploadsListResult. - */ - public static ManagedLedgerDigestUploadsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedLedgerDigestUploadsListResult deserializedManagedLedgerDigestUploadsListResult - = new ManagedLedgerDigestUploadsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ManagedLedgerDigestUploadsInner.fromJson(reader1)); - deserializedManagedLedgerDigestUploadsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedManagedLedgerDigestUploadsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedLedgerDigestUploadsListResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/NetworkSecurityPerimeterConfigurationListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/NetworkSecurityPerimeterConfigurationListResult.java deleted file mode 100644 index f86f98062730..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/NetworkSecurityPerimeterConfigurationListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.fluent.models.NetworkSecurityPerimeterConfigurationInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a NetworkSecurityPerimeterConfiguration list operation. - */ -@Immutable -public final class NetworkSecurityPerimeterConfigurationListResult - implements JsonSerializable { - /* - * The NetworkSecurityPerimeterConfiguration items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of NetworkSecurityPerimeterConfigurationListResult class. - */ - private NetworkSecurityPerimeterConfigurationListResult() { - } - - /** - * Get the value property: The NetworkSecurityPerimeterConfiguration items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model NetworkSecurityPerimeterConfigurationListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkSecurityPerimeterConfigurationListResult.class); - - /** - * {@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 NetworkSecurityPerimeterConfigurationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkSecurityPerimeterConfigurationListResult 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 NetworkSecurityPerimeterConfigurationListResult. - */ - public static NetworkSecurityPerimeterConfigurationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkSecurityPerimeterConfigurationListResult deserializedNetworkSecurityPerimeterConfigurationListResult - = new NetworkSecurityPerimeterConfigurationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> NetworkSecurityPerimeterConfigurationInner.fromJson(reader1)); - deserializedNetworkSecurityPerimeterConfigurationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkSecurityPerimeterConfigurationListResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SQLVulnerabilityAssessmentScanListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SQLVulnerabilityAssessmentScanListResult.java deleted file mode 100644 index 4e8634fe45ac..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SQLVulnerabilityAssessmentScanListResult.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation.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.sql.fluent.models.SqlVulnerabilityAssessmentScanResultsInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of vulnerability assessment scan results. - */ -@Immutable -public final class SQLVulnerabilityAssessmentScanListResult - implements JsonSerializable { - /* - * Array of results. - */ - private List value; - - /* - * Link to retrieve next page of results. - */ - private String nextLink; - - /** - * Creates an instance of SQLVulnerabilityAssessmentScanListResult class. - */ - private SQLVulnerabilityAssessmentScanListResult() { - } - - /** - * 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 SQLVulnerabilityAssessmentScanListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SQLVulnerabilityAssessmentScanListResult 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 SQLVulnerabilityAssessmentScanListResult. - */ - public static SQLVulnerabilityAssessmentScanListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SQLVulnerabilityAssessmentScanListResult deserializedSQLVulnerabilityAssessmentScanListResult - = new SQLVulnerabilityAssessmentScanListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> SqlVulnerabilityAssessmentScanResultsInner.fromJson(reader1)); - deserializedSQLVulnerabilityAssessmentScanListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedSQLVulnerabilityAssessmentScanListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSQLVulnerabilityAssessmentScanListResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerConfigurationOptionListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerConfigurationOptionListResult.java deleted file mode 100644 index 8106125bf1d3..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerConfigurationOptionListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.fluent.models.ServerConfigurationOptionInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a ServerConfigurationOption list operation. - */ -@Immutable -public final class ServerConfigurationOptionListResult - implements JsonSerializable { - /* - * The ServerConfigurationOption items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of ServerConfigurationOptionListResult class. - */ - private ServerConfigurationOptionListResult() { - } - - /** - * Get the value property: The ServerConfigurationOption items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ServerConfigurationOptionListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ServerConfigurationOptionListResult.class); - - /** - * {@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 ServerConfigurationOptionListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServerConfigurationOptionListResult 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 ServerConfigurationOptionListResult. - */ - public static ServerConfigurationOptionListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServerConfigurationOptionListResult deserializedServerConfigurationOptionListResult - = new ServerConfigurationOptionListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ServerConfigurationOptionInner.fromJson(reader1)); - deserializedServerConfigurationOptionListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedServerConfigurationOptionListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedServerConfigurationOptionListResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SqlVulnerabilityAssessmentListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SqlVulnerabilityAssessmentListResult.java deleted file mode 100644 index a2403b590d2e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SqlVulnerabilityAssessmentListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.fluent.models.SqlVulnerabilityAssessmentInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a SqlVulnerabilityAssessment list operation. - */ -@Immutable -public final class SqlVulnerabilityAssessmentListResult - implements JsonSerializable { - /* - * The SqlVulnerabilityAssessment items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of SqlVulnerabilityAssessmentListResult class. - */ - private SqlVulnerabilityAssessmentListResult() { - } - - /** - * Get the value property: The SqlVulnerabilityAssessment items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model SqlVulnerabilityAssessmentListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SqlVulnerabilityAssessmentListResult.class); - - /** - * {@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 SqlVulnerabilityAssessmentListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SqlVulnerabilityAssessmentListResult 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 SqlVulnerabilityAssessmentListResult. - */ - public static SqlVulnerabilityAssessmentListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SqlVulnerabilityAssessmentListResult deserializedSqlVulnerabilityAssessmentListResult - = new SqlVulnerabilityAssessmentListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> SqlVulnerabilityAssessmentInner.fromJson(reader1)); - deserializedSqlVulnerabilityAssessmentListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSqlVulnerabilityAssessmentListResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SqlVulnerabilityAssessmentScanRecordListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SqlVulnerabilityAssessmentScanRecordListResult.java deleted file mode 100644 index 7c189c25b2a8..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SqlVulnerabilityAssessmentScanRecordListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.fluent.models.SqlVulnerabilityAssessmentScanRecordInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a SqlVulnerabilityAssessmentScanRecord list operation. - */ -@Immutable -public final class SqlVulnerabilityAssessmentScanRecordListResult - implements JsonSerializable { - /* - * The SqlVulnerabilityAssessmentScanRecord items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of SqlVulnerabilityAssessmentScanRecordListResult class. - */ - private SqlVulnerabilityAssessmentScanRecordListResult() { - } - - /** - * Get the value property: The SqlVulnerabilityAssessmentScanRecord items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model SqlVulnerabilityAssessmentScanRecordListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SqlVulnerabilityAssessmentScanRecordListResult.class); - - /** - * {@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 SqlVulnerabilityAssessmentScanRecordListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SqlVulnerabilityAssessmentScanRecordListResult 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 SqlVulnerabilityAssessmentScanRecordListResult. - */ - public static SqlVulnerabilityAssessmentScanRecordListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SqlVulnerabilityAssessmentScanRecordListResult deserializedSqlVulnerabilityAssessmentScanRecordListResult - = new SqlVulnerabilityAssessmentScanRecordListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> SqlVulnerabilityAssessmentScanRecordInner.fromJson(reader1)); - deserializedSqlVulnerabilityAssessmentScanRecordListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanRecordListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSqlVulnerabilityAssessmentScanRecordListResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/StartStopManagedInstanceScheduleListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/StartStopManagedInstanceScheduleListResult.java deleted file mode 100644 index 54a33688e8b7..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/StartStopManagedInstanceScheduleListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.fluent.models.StartStopManagedInstanceScheduleInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a StartStopManagedInstanceSchedule list operation. - */ -@Immutable -public final class StartStopManagedInstanceScheduleListResult - implements JsonSerializable { - /* - * The StartStopManagedInstanceSchedule items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of StartStopManagedInstanceScheduleListResult class. - */ - private StartStopManagedInstanceScheduleListResult() { - } - - /** - * Get the value property: The StartStopManagedInstanceSchedule items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model StartStopManagedInstanceScheduleListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(StartStopManagedInstanceScheduleListResult.class); - - /** - * {@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 StartStopManagedInstanceScheduleListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StartStopManagedInstanceScheduleListResult 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 StartStopManagedInstanceScheduleListResult. - */ - public static StartStopManagedInstanceScheduleListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StartStopManagedInstanceScheduleListResult deserializedStartStopManagedInstanceScheduleListResult - = new StartStopManagedInstanceScheduleListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> StartStopManagedInstanceScheduleInner.fromJson(reader1)); - deserializedStartStopManagedInstanceScheduleListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedStartStopManagedInstanceScheduleListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedStartStopManagedInstanceScheduleListResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SynapseLinkWorkspaceListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SynapseLinkWorkspaceListResult.java deleted file mode 100644 index 9230a67c15d4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SynapseLinkWorkspaceListResult.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.implementation.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.sql.fluent.models.SynapseLinkWorkspaceInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a SynapseLinkWorkspace list operation. - */ -@Immutable -public final class SynapseLinkWorkspaceListResult implements JsonSerializable { - /* - * The SynapseLinkWorkspace items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of SynapseLinkWorkspaceListResult class. - */ - private SynapseLinkWorkspaceListResult() { - } - - /** - * Get the value property: The SynapseLinkWorkspace items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model SynapseLinkWorkspaceListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SynapseLinkWorkspaceListResult.class); - - /** - * {@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 SynapseLinkWorkspaceListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SynapseLinkWorkspaceListResult 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 SynapseLinkWorkspaceListResult. - */ - public static SynapseLinkWorkspaceListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SynapseLinkWorkspaceListResult deserializedSynapseLinkWorkspaceListResult - = new SynapseLinkWorkspaceListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> SynapseLinkWorkspaceInner.fromJson(reader1)); - deserializedSynapseLinkWorkspaceListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedSynapseLinkWorkspaceListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSynapseLinkWorkspaceListResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/AdministratorListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorListResult.java similarity index 95% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/AdministratorListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorListResult.java index 6e6fe2e49d4f..3ecc336c8492 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/AdministratorListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -31,7 +31,7 @@ public final class AdministratorListResult implements JsonSerializable { /** - * ActiveDirectory. + * Static value ActiveDirectory for AdministratorName. */ public static final AdministratorName ACTIVE_DIRECTORY = fromString("ActiveDirectory"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorType.java index bde410a7d42e..6dfdbe7410df 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdministratorType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class AdministratorType extends ExpandableStringEnum { /** - * ActiveDirectory. + * Static value ActiveDirectory for AdministratorType. */ public static final AdministratorType ACTIVE_DIRECTORY = fromString("ActiveDirectory"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionName.java index 1aa35bbb1fa4..6c86c13514d9 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class AdvancedThreatProtectionName extends ExpandableStringEnum { /** - * Default. + * Static value Default for AdvancedThreatProtectionName. */ public static final AdvancedThreatProtectionName DEFAULT = fromString("Default"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionState.java index 05f16540093d..d8d6ef0060a0 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -10,17 +10,17 @@ */ public enum AdvancedThreatProtectionState { /** - * New. + * Enum value New. */ NEW("New"), /** - * Enabled. + * Enum value Enabled. */ ENABLED("Enabled"), /** - * Disabled. + * Enum value Disabled. */ DISABLED("Disabled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvisorStatus.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvisorStatus.java index a49838ca3355..96fe784c3e64 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvisorStatus.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AdvisorStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -10,22 +10,22 @@ */ public enum AdvisorStatus { /** - * GA. + * Enum value GA. */ GA("GA"), /** - * PublicPreview. + * Enum value PublicPreview. */ PUBLIC_PREVIEW("PublicPreview"), /** - * LimitedPublicPreview. + * Enum value LimitedPublicPreview. */ LIMITED_PUBLIC_PREVIEW("LimitedPublicPreview"), /** - * PrivatePreview. + * Enum value PrivatePreview. */ PRIVATE_PREVIEW("PrivatePreview"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AggregationFunctionType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AggregationFunctionType.java index ec52d32f0fd8..4a6a3244bbce 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AggregationFunctionType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AggregationFunctionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,27 +12,27 @@ */ public final class AggregationFunctionType extends ExpandableStringEnum { /** - * avg. + * Static value avg for AggregationFunctionType. */ public static final AggregationFunctionType AVG = fromString("avg"); /** - * min. + * Static value min for AggregationFunctionType. */ public static final AggregationFunctionType MIN = fromString("min"); /** - * max. + * Static value max for AggregationFunctionType. */ public static final AggregationFunctionType MAX = fromString("max"); /** - * stdev. + * Static value stdev for AggregationFunctionType. */ public static final AggregationFunctionType STDEV = fromString("stdev"); /** - * sum. + * Static value sum for AggregationFunctionType. */ public static final AggregationFunctionType SUM = fromString("sum"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AlwaysEncryptedEnclaveType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AlwaysEncryptedEnclaveType.java deleted file mode 100644 index 6d6c06ac024f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AlwaysEncryptedEnclaveType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of enclave requested on the database i.e. Default or VBS enclaves. - */ -public final class AlwaysEncryptedEnclaveType extends ExpandableStringEnum { - /** - * Default. - */ - public static final AlwaysEncryptedEnclaveType DEFAULT = fromString("Default"); - - /** - * VBS. - */ - public static final AlwaysEncryptedEnclaveType VBS = fromString("VBS"); - - /** - * Creates a new instance of AlwaysEncryptedEnclaveType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AlwaysEncryptedEnclaveType() { - } - - /** - * Creates or finds a AlwaysEncryptedEnclaveType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AlwaysEncryptedEnclaveType. - */ - public static AlwaysEncryptedEnclaveType fromString(String name) { - return fromString(name, AlwaysEncryptedEnclaveType.class); - } - - /** - * Gets known AlwaysEncryptedEnclaveType values. - * - * @return known AlwaysEncryptedEnclaveType values. - */ - public static Collection values() { - return values(AlwaysEncryptedEnclaveType.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AuthMetadataLookupModes.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AuthMetadataLookupModes.java deleted file mode 100644 index ad5bec0d67a9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AuthMetadataLookupModes.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The managed instance's authentication metadata lookup mode. - */ -public final class AuthMetadataLookupModes extends ExpandableStringEnum { - /** - * AzureAD. - */ - public static final AuthMetadataLookupModes AZURE_AD = fromString("AzureAD"); - - /** - * Paired. - */ - public static final AuthMetadataLookupModes PAIRED = fromString("Paired"); - - /** - * Windows. - */ - public static final AuthMetadataLookupModes WINDOWS = fromString("Windows"); - - /** - * Creates a new instance of AuthMetadataLookupModes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AuthMetadataLookupModes() { - } - - /** - * Creates or finds a AuthMetadataLookupModes from its string representation. - * - * @param name a name to look for. - * @return the corresponding AuthMetadataLookupModes. - */ - public static AuthMetadataLookupModes fromString(String name) { - return fromString(name, AuthMetadataLookupModes.class); - } - - /** - * Gets known AuthMetadataLookupModes values. - * - * @return known AuthMetadataLookupModes values. - */ - public static Collection values() { - return values(AuthMetadataLookupModes.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AuthenticationName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AuthenticationName.java index 2a8a9b0d59cd..603a419cff70 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AuthenticationName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AuthenticationName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class AuthenticationName extends ExpandableStringEnum { /** - * Default. + * Static value Default for AuthenticationName. */ public static final AuthenticationName DEFAULT = fromString("Default"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatus.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatus.java index 809ac02b9c4c..74b9a59dccd9 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatus.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -10,17 +10,17 @@ */ public enum AutoExecuteStatus { /** - * Enabled. + * Enum value Enabled. */ ENABLED("Enabled"), /** - * Disabled. + * Enum value Disabled. */ DISABLED("Disabled"), /** - * Default. + * Enum value Default. */ DEFAULT("Default"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatusInheritedFrom.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatusInheritedFrom.java index 6f730e77a3fb..174253daf07e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatusInheritedFrom.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatusInheritedFrom.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -11,27 +11,27 @@ */ public enum AutoExecuteStatusInheritedFrom { /** - * Default. + * Enum value Default. */ DEFAULT("Default"), /** - * Subscription. + * Enum value Subscription. */ SUBSCRIPTION("Subscription"), /** - * Server. + * Enum value Server. */ SERVER("Server"), /** - * ElasticPool. + * Enum value ElasticPool. */ ELASTIC_POOL("ElasticPool"), /** - * Database. + * Enum value Database. */ DATABASE("Database"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoPauseDelayTimeRange.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoPauseDelayTimeRange.java index 4480b6c8b633..b3c661e7d2ad 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoPauseDelayTimeRange.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AutoPauseDelayTimeRange.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -49,7 +49,7 @@ public final class AutoPauseDelayTimeRange implements JsonSerializable { - /** - * NoPreference. - */ - public static final AvailabilityZoneType NO_PREFERENCE = fromString("NoPreference"); - - /** - * 1. - */ - public static final AvailabilityZoneType ONE = fromString("1"); - - /** - * 2. - */ - public static final AvailabilityZoneType TWO = fromString("2"); - - /** - * 3. - */ - public static final AvailabilityZoneType THREE = fromString("3"); - - /** - * Creates a new instance of AvailabilityZoneType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AvailabilityZoneType() { - } - - /** - * Creates or finds a AvailabilityZoneType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AvailabilityZoneType. - */ - public static AvailabilityZoneType fromString(String name) { - return fromString(name, AvailabilityZoneType.class); - } - - /** - * Gets known AvailabilityZoneType values. - * - * @return known AvailabilityZoneType values. - */ - public static Collection values() { - return values(AvailabilityZoneType.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/AzureADOnlyAuthListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AzureADOnlyAuthListResult.java similarity index 95% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/AzureADOnlyAuthListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AzureADOnlyAuthListResult.java index 80f23dbf142b..28e7983162a4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/AzureADOnlyAuthListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/AzureADOnlyAuthListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -31,7 +31,7 @@ public final class AzureADOnlyAuthListResult implements JsonSerializable { /* - * The BackupShortTermRetentionPolicy items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of BackupShortTermRetentionPolicyListResult class. */ - private BackupShortTermRetentionPolicyListResult() { + public BackupShortTermRetentionPolicyListResult() { } /** - * Get the value property: The BackupShortTermRetentionPolicy items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model BackupShortTermRetentionPolicyListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(BackupShortTermRetentionPolicyListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of BackupShortTermRetentionPolicyListResult 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 BackupShortTermRetentionPolicyListResult. */ public static BackupShortTermRetentionPolicyListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BackupStorageAccessTier.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BackupStorageAccessTier.java deleted file mode 100644 index b901e7fac3ff..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BackupStorageAccessTier.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The BackupStorageAccessTier for the LTR backup. - */ -public final class BackupStorageAccessTier extends ExpandableStringEnum { - /** - * Hot. - */ - public static final BackupStorageAccessTier HOT = fromString("Hot"); - - /** - * Archive. - */ - public static final BackupStorageAccessTier ARCHIVE = fromString("Archive"); - - /** - * Creates a new instance of BackupStorageAccessTier value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BackupStorageAccessTier() { - } - - /** - * Creates or finds a BackupStorageAccessTier from its string representation. - * - * @param name a name to look for. - * @return the corresponding BackupStorageAccessTier. - */ - public static BackupStorageAccessTier fromString(String name) { - return fromString(name, BackupStorageAccessTier.class); - } - - /** - * Gets known BackupStorageAccessTier values. - * - * @return known BackupStorageAccessTier values. - */ - public static Collection values() { - return values(BackupStorageAccessTier.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BackupStorageRedundancy.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BackupStorageRedundancy.java index 4a1a6dfc82a5..404141e560f8 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BackupStorageRedundancy.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BackupStorageRedundancy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,22 +12,22 @@ */ public final class BackupStorageRedundancy extends ExpandableStringEnum { /** - * Geo. + * Static value Geo for BackupStorageRedundancy. */ public static final BackupStorageRedundancy GEO = fromString("Geo"); /** - * Local. + * Static value Local for BackupStorageRedundancy. */ public static final BackupStorageRedundancy LOCAL = fromString("Local"); /** - * Zone. + * Static value Zone for BackupStorageRedundancy. */ public static final BackupStorageRedundancy ZONE = fromString("Zone"); /** - * GeoZone. + * Static value GeoZone for BackupStorageRedundancy. */ public static final BackupStorageRedundancy GEO_ZONE = fromString("GeoZone"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Baseline.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Baseline.java deleted file mode 100644 index 5f757af82e02..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Baseline.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.annotation.Immutable; -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; -import java.util.List; - -/** - * SQL Vulnerability Assessment baseline Details. - */ -@Immutable -public final class Baseline implements JsonSerializable { - /* - * SQL Vulnerability Assessment baseline expected results - */ - private List> expectedResults; - - /* - * SQL Vulnerability Assessment baseline update time (UTC) - */ - private OffsetDateTime updatedTime; - - /** - * Creates an instance of Baseline class. - */ - private Baseline() { - } - - /** - * Get the expectedResults property: SQL Vulnerability Assessment baseline expected results. - * - * @return the expectedResults value. - */ - public List> expectedResults() { - return this.expectedResults; - } - - /** - * Get the updatedTime property: SQL Vulnerability Assessment baseline update time (UTC). - * - * @return the updatedTime value. - */ - public OffsetDateTime updatedTime() { - return this.updatedTime; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Baseline from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Baseline 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 Baseline. - */ - public static Baseline fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Baseline deserializedBaseline = new Baseline(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("expectedResults".equals(fieldName)) { - List> expectedResults - = reader.readArray(reader1 -> reader1.readArray(reader2 -> reader2.getString())); - deserializedBaseline.expectedResults = expectedResults; - } else if ("updatedTime".equals(fieldName)) { - deserializedBaseline.updatedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedBaseline; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BaselineAdjustedResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BaselineAdjustedResult.java deleted file mode 100644 index 50c5febbc2f0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BaselineAdjustedResult.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; -import java.util.List; - -/** - * SQL Vulnerability Assessment baseline adjusted results. - */ -@Immutable -public final class BaselineAdjustedResult implements JsonSerializable { - /* - * SQL Vulnerability Assessment baseline details - */ - private Baseline baseline; - - /* - * SQL Vulnerability Assessment baseline status - */ - private RuleStatus status; - - /* - * SQL Vulnerability Assessment results that are not in baseline - */ - private List> resultsNotInBaseline; - - /* - * SQL Vulnerability Assessment results that are in baseline. - */ - private List> resultsOnlyInBaseline; - - /** - * Creates an instance of BaselineAdjustedResult class. - */ - private BaselineAdjustedResult() { - } - - /** - * Get the baseline property: SQL Vulnerability Assessment baseline details. - * - * @return the baseline value. - */ - public Baseline baseline() { - return this.baseline; - } - - /** - * Get the status property: SQL Vulnerability Assessment baseline status. - * - * @return the status value. - */ - public RuleStatus status() { - return this.status; - } - - /** - * Get the resultsNotInBaseline property: SQL Vulnerability Assessment results that are not in baseline. - * - * @return the resultsNotInBaseline value. - */ - public List> resultsNotInBaseline() { - return this.resultsNotInBaseline; - } - - /** - * Get the resultsOnlyInBaseline property: SQL Vulnerability Assessment results that are in baseline. - * - * @return the resultsOnlyInBaseline value. - */ - public List> resultsOnlyInBaseline() { - return this.resultsOnlyInBaseline; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (baseline() != null) { - baseline().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BaselineAdjustedResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BaselineAdjustedResult 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 BaselineAdjustedResult. - */ - public static BaselineAdjustedResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BaselineAdjustedResult deserializedBaselineAdjustedResult = new BaselineAdjustedResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("baseline".equals(fieldName)) { - deserializedBaselineAdjustedResult.baseline = Baseline.fromJson(reader); - } else if ("status".equals(fieldName)) { - deserializedBaselineAdjustedResult.status = RuleStatus.fromString(reader.getString()); - } else if ("resultsNotInBaseline".equals(fieldName)) { - List> resultsNotInBaseline - = reader.readArray(reader1 -> reader1.readArray(reader2 -> reader2.getString())); - deserializedBaselineAdjustedResult.resultsNotInBaseline = resultsNotInBaseline; - } else if ("resultsOnlyInBaseline".equals(fieldName)) { - List> resultsOnlyInBaseline - = reader.readArray(reader1 -> reader1.readArray(reader2 -> reader2.getString())); - deserializedBaselineAdjustedResult.resultsOnlyInBaseline = resultsOnlyInBaseline; - } else { - reader.skipChildren(); - } - } - - return deserializedBaselineAdjustedResult; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BaselineName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BaselineName.java deleted file mode 100644 index d78a1d18eda9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BaselineName.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for BaselineName. - */ -public final class BaselineName extends ExpandableStringEnum { - /** - * default. - */ - public static final BaselineName DEFAULT = fromString("default"); - - /** - * Creates a new instance of BaselineName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BaselineName() { - } - - /** - * Creates or finds a BaselineName from its string representation. - * - * @param name a name to look for. - * @return the corresponding BaselineName. - */ - public static BaselineName fromString(String name) { - return fromString(name, BaselineName.class); - } - - /** - * Gets known BaselineName values. - * - * @return known BaselineName values. - */ - public static Collection values() { - return values(BaselineName.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BenchmarkReference.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BenchmarkReference.java deleted file mode 100644 index 633c8b84dd63..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BenchmarkReference.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; - -/** - * SQL Vulnerability Assessment benchmark reference. - */ -@Immutable -public final class BenchmarkReference implements JsonSerializable { - /* - * SQL Vulnerability Assessment benchmark name - */ - private String benchmark; - - /* - * SQL Vulnerability Assessment benchmark reference. - */ - private String reference; - - /** - * Creates an instance of BenchmarkReference class. - */ - private BenchmarkReference() { - } - - /** - * Get the benchmark property: SQL Vulnerability Assessment benchmark name. - * - * @return the benchmark value. - */ - public String benchmark() { - return this.benchmark; - } - - /** - * Get the reference property: SQL Vulnerability Assessment benchmark reference. - * - * @return the reference value. - */ - public String reference() { - return this.reference; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BenchmarkReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BenchmarkReference 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 BenchmarkReference. - */ - public static BenchmarkReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BenchmarkReference deserializedBenchmarkReference = new BenchmarkReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("benchmark".equals(fieldName)) { - deserializedBenchmarkReference.benchmark = reader.getString(); - } else if ("reference".equals(fieldName)) { - deserializedBenchmarkReference.reference = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBenchmarkReference; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BlobAuditingPolicyName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BlobAuditingPolicyName.java deleted file mode 100644 index c2ede9c443e7..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BlobAuditingPolicyName.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -/** - * Defines values for BlobAuditingPolicyName. - */ -public enum BlobAuditingPolicyName { - /** - * default. - */ - DEFAULT("default"); - - /** - * The actual serialized value for a BlobAuditingPolicyName instance. - */ - private final String value; - - BlobAuditingPolicyName(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a BlobAuditingPolicyName instance. - * - * @param value the serialized value to parse. - * @return the parsed BlobAuditingPolicyName object, or null if unable to parse. - */ - public static BlobAuditingPolicyName fromString(String value) { - if (value == null) { - return null; - } - BlobAuditingPolicyName[] items = BlobAuditingPolicyName.values(); - for (BlobAuditingPolicyName item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BlobAuditingPolicyState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BlobAuditingPolicyState.java index f7f73045905b..6a4e67cbc5bb 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BlobAuditingPolicyState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/BlobAuditingPolicyState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,12 +9,12 @@ */ public enum BlobAuditingPolicyState { /** - * Enabled. + * Enum value Enabled. */ ENABLED("Enabled"), /** - * Disabled. + * Enum value Disabled. */ DISABLED("Disabled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CapabilityGroup.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CapabilityGroup.java index 3d4379bd82e4..a6c3327a337c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CapabilityGroup.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CapabilityGroup.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,37 +12,32 @@ */ public final class CapabilityGroup extends ExpandableStringEnum { /** - * supportedEditions. + * Static value supportedEditions for CapabilityGroup. */ public static final CapabilityGroup SUPPORTED_EDITIONS = fromString("supportedEditions"); /** - * supportedElasticPoolEditions. + * Static value supportedElasticPoolEditions for CapabilityGroup. */ public static final CapabilityGroup SUPPORTED_ELASTIC_POOL_EDITIONS = fromString("supportedElasticPoolEditions"); /** - * supportedManagedInstanceVersions. + * Static value supportedManagedInstanceVersions for CapabilityGroup. */ public static final CapabilityGroup SUPPORTED_MANAGED_INSTANCE_VERSIONS = fromString("supportedManagedInstanceVersions"); /** - * supportedInstancePoolEditions. + * Static value supportedInstancePoolEditions for CapabilityGroup. */ public static final CapabilityGroup SUPPORTED_INSTANCE_POOL_EDITIONS = fromString("supportedInstancePoolEditions"); /** - * supportedManagedInstanceEditions. + * Static value supportedManagedInstanceEditions for CapabilityGroup. */ public static final CapabilityGroup SUPPORTED_MANAGED_INSTANCE_EDITIONS = fromString("supportedManagedInstanceEditions"); - /** - * supportedJobAgentVersions. - */ - public static final CapabilityGroup SUPPORTED_JOB_AGENT_VERSIONS = fromString("supportedJobAgentVersions"); - /** * Creates a new instance of CapabilityGroup value. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CapabilityStatus.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CapabilityStatus.java index 18f426a7d19c..9ffd6537ff18 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CapabilityStatus.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CapabilityStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,22 +9,22 @@ */ public enum CapabilityStatus { /** - * Visible. + * Enum value Visible. */ VISIBLE("Visible"), /** - * Available. + * Enum value Available. */ AVAILABLE("Available"), /** - * Default. + * Enum value Default. */ DEFAULT("Default"), /** - * Disabled. + * Enum value Disabled. */ DISABLED("Disabled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CatalogCollationType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CatalogCollationType.java index 2f2a9aec6052..a7dfdd5ccf06 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CatalogCollationType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CatalogCollationType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,12 +12,12 @@ */ public final class CatalogCollationType extends ExpandableStringEnum { /** - * DATABASE_DEFAULT. + * Static value DATABASE_DEFAULT for CatalogCollationType. */ public static final CatalogCollationType DATABASE_DEFAULT = fromString("DATABASE_DEFAULT"); /** - * SQL_Latin1_General_CP1_CI_AS. + * Static value SQL_Latin1_General_CP1_CI_AS for CatalogCollationType. */ public static final CatalogCollationType SQL_LATIN1_GENERAL_CP1_CI_AS = fromString("SQL_Latin1_General_CP1_CI_AS"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CertificateInfo.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CertificateInfo.java deleted file mode 100644 index a823af797c21..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CertificateInfo.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.annotation.Immutable; -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; - -/** - * Certificate information. - */ -@Immutable -public final class CertificateInfo implements JsonSerializable { - /* - * The certificate name - */ - private String certificateName; - - /* - * The certificate expiry date - */ - private OffsetDateTime expiryDate; - - /** - * Creates an instance of CertificateInfo class. - */ - private CertificateInfo() { - } - - /** - * Get the certificateName property: The certificate name. - * - * @return the certificateName value. - */ - public String certificateName() { - return this.certificateName; - } - - /** - * Get the expiryDate property: The certificate expiry date. - * - * @return the expiryDate value. - */ - public OffsetDateTime expiryDate() { - return this.expiryDate; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CertificateInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CertificateInfo 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 CertificateInfo. - */ - public static CertificateInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CertificateInfo deserializedCertificateInfo = new CertificateInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("certificateName".equals(fieldName)) { - deserializedCertificateInfo.certificateName = reader.getString(); - } else if ("expiryDate".equals(fieldName)) { - deserializedCertificateInfo.expiryDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedCertificateInfo; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ChangeLongTermRetentionBackupAccessTierParameters.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ChangeLongTermRetentionBackupAccessTierParameters.java deleted file mode 100644 index 99d0f8bb50da..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ChangeLongTermRetentionBackupAccessTierParameters.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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; - -/** - * Contains the information necessary to change long term retention backup access tier and related operation mode. - */ -@Fluent -public final class ChangeLongTermRetentionBackupAccessTierParameters - implements JsonSerializable { - /* - * The long term retention backup storage access tier - */ - private String backupStorageAccessTier; - - /* - * The operation mode when updating ltr backup storage access tier - */ - private String operationMode; - - /** - * Creates an instance of ChangeLongTermRetentionBackupAccessTierParameters class. - */ - public ChangeLongTermRetentionBackupAccessTierParameters() { - } - - /** - * Get the backupStorageAccessTier property: The long term retention backup storage access tier. - * - * @return the backupStorageAccessTier value. - */ - public String backupStorageAccessTier() { - return this.backupStorageAccessTier; - } - - /** - * Set the backupStorageAccessTier property: The long term retention backup storage access tier. - * - * @param backupStorageAccessTier the backupStorageAccessTier value to set. - * @return the ChangeLongTermRetentionBackupAccessTierParameters object itself. - */ - public ChangeLongTermRetentionBackupAccessTierParameters - withBackupStorageAccessTier(String backupStorageAccessTier) { - this.backupStorageAccessTier = backupStorageAccessTier; - return this; - } - - /** - * Get the operationMode property: The operation mode when updating ltr backup storage access tier. - * - * @return the operationMode value. - */ - public String operationMode() { - return this.operationMode; - } - - /** - * Set the operationMode property: The operation mode when updating ltr backup storage access tier. - * - * @param operationMode the operationMode value to set. - * @return the ChangeLongTermRetentionBackupAccessTierParameters object itself. - */ - public ChangeLongTermRetentionBackupAccessTierParameters withOperationMode(String operationMode) { - this.operationMode = operationMode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (backupStorageAccessTier() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property backupStorageAccessTier in model ChangeLongTermRetentionBackupAccessTierParameters")); - } - if (operationMode() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property operationMode in model ChangeLongTermRetentionBackupAccessTierParameters")); - } - } - - private static final ClientLogger LOGGER - = new ClientLogger(ChangeLongTermRetentionBackupAccessTierParameters.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("backupStorageAccessTier", this.backupStorageAccessTier); - jsonWriter.writeStringField("operationMode", this.operationMode); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ChangeLongTermRetentionBackupAccessTierParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ChangeLongTermRetentionBackupAccessTierParameters 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 ChangeLongTermRetentionBackupAccessTierParameters. - */ - public static ChangeLongTermRetentionBackupAccessTierParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ChangeLongTermRetentionBackupAccessTierParameters deserializedChangeLongTermRetentionBackupAccessTierParameters - = new ChangeLongTermRetentionBackupAccessTierParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("backupStorageAccessTier".equals(fieldName)) { - deserializedChangeLongTermRetentionBackupAccessTierParameters.backupStorageAccessTier - = reader.getString(); - } else if ("operationMode".equals(fieldName)) { - deserializedChangeLongTermRetentionBackupAccessTierParameters.operationMode = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedChangeLongTermRetentionBackupAccessTierParameters; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityReason.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityReason.java index ce042c707ac4..f9614a68cb77 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityReason.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityReason.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,12 +9,12 @@ */ public enum CheckNameAvailabilityReason { /** - * Invalid. + * Enum value Invalid. */ INVALID("Invalid"), /** - * AlreadyExists. + * Enum value AlreadyExists. */ ALREADY_EXISTS("AlreadyExists"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityRequest.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityRequest.java index 1ee45a268cf5..b0c2c116db6e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityRequest.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -25,7 +25,7 @@ public final class CheckNameAvailabilityRequest implements JsonSerializable { - /** - * None. - */ - public static final ClientClassificationSource NONE = fromString("None"); - - /** - * Native. - */ - public static final ClientClassificationSource NATIVE = fromString("Native"); - - /** - * Recommended. - */ - public static final ClientClassificationSource RECOMMENDED = fromString("Recommended"); - - /** - * MIP. - */ - public static final ClientClassificationSource MIP = fromString("MIP"); - - /** - * Creates a new instance of ClientClassificationSource value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClientClassificationSource() { - } - - /** - * Creates or finds a ClientClassificationSource from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClientClassificationSource. - */ - public static ClientClassificationSource fromString(String name) { - return fromString(name, ClientClassificationSource.class); - } - - /** - * Gets known ClientClassificationSource values. - * - * @return known ClientClassificationSource values. - */ - public static Collection values() { - return values(ClientClassificationSource.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ColumnDataType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ColumnDataType.java index e01fb52b053b..7c62a2d9c3e4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ColumnDataType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ColumnDataType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,172 +12,172 @@ */ public final class ColumnDataType extends ExpandableStringEnum { /** - * image. + * Static value image for ColumnDataType. */ public static final ColumnDataType IMAGE = fromString("image"); /** - * text. + * Static value text for ColumnDataType. */ public static final ColumnDataType TEXT = fromString("text"); /** - * uniqueidentifier. + * Static value uniqueidentifier for ColumnDataType. */ public static final ColumnDataType UNIQUEIDENTIFIER = fromString("uniqueidentifier"); /** - * date. + * Static value date for ColumnDataType. */ public static final ColumnDataType DATE = fromString("date"); /** - * time. + * Static value time for ColumnDataType. */ public static final ColumnDataType TIME = fromString("time"); /** - * datetime2. + * Static value datetime2 for ColumnDataType. */ public static final ColumnDataType DATETIME2 = fromString("datetime2"); /** - * datetimeoffset. + * Static value datetimeoffset for ColumnDataType. */ public static final ColumnDataType DATETIMEOFFSET = fromString("datetimeoffset"); /** - * tinyint. + * Static value tinyint for ColumnDataType. */ public static final ColumnDataType TINYINT = fromString("tinyint"); /** - * smallint. + * Static value smallint for ColumnDataType. */ public static final ColumnDataType SMALLINT = fromString("smallint"); /** - * int. + * Static value int for ColumnDataType. */ public static final ColumnDataType INT = fromString("int"); /** - * smalldatetime. + * Static value smalldatetime for ColumnDataType. */ public static final ColumnDataType SMALLDATETIME = fromString("smalldatetime"); /** - * real. + * Static value real for ColumnDataType. */ public static final ColumnDataType REAL = fromString("real"); /** - * money. + * Static value money for ColumnDataType. */ public static final ColumnDataType MONEY = fromString("money"); /** - * datetime. + * Static value datetime for ColumnDataType. */ public static final ColumnDataType DATETIME = fromString("datetime"); /** - * float. + * Static value float for ColumnDataType. */ public static final ColumnDataType FLOAT = fromString("float"); /** - * sql_variant. + * Static value sql_variant for ColumnDataType. */ public static final ColumnDataType SQL_VARIANT = fromString("sql_variant"); /** - * ntext. + * Static value ntext for ColumnDataType. */ public static final ColumnDataType NTEXT = fromString("ntext"); /** - * bit. + * Static value bit for ColumnDataType. */ public static final ColumnDataType BIT = fromString("bit"); /** - * decimal. + * Static value decimal for ColumnDataType. */ public static final ColumnDataType DECIMAL = fromString("decimal"); /** - * numeric. + * Static value numeric for ColumnDataType. */ public static final ColumnDataType NUMERIC = fromString("numeric"); /** - * smallmoney. + * Static value smallmoney for ColumnDataType. */ public static final ColumnDataType SMALLMONEY = fromString("smallmoney"); /** - * bigint. + * Static value bigint for ColumnDataType. */ public static final ColumnDataType BIGINT = fromString("bigint"); /** - * hierarchyid. + * Static value hierarchyid for ColumnDataType. */ public static final ColumnDataType HIERARCHYID = fromString("hierarchyid"); /** - * geometry. + * Static value geometry for ColumnDataType. */ public static final ColumnDataType GEOMETRY = fromString("geometry"); /** - * geography. + * Static value geography for ColumnDataType. */ public static final ColumnDataType GEOGRAPHY = fromString("geography"); /** - * varbinary. + * Static value varbinary for ColumnDataType. */ public static final ColumnDataType VARBINARY = fromString("varbinary"); /** - * varchar. + * Static value varchar for ColumnDataType. */ public static final ColumnDataType VARCHAR = fromString("varchar"); /** - * binary. + * Static value binary for ColumnDataType. */ public static final ColumnDataType BINARY = fromString("binary"); /** - * char. + * Static value char for ColumnDataType. */ public static final ColumnDataType CHAR = fromString("char"); /** - * timestamp. + * Static value timestamp for ColumnDataType. */ public static final ColumnDataType TIMESTAMP = fromString("timestamp"); /** - * nvarchar. + * Static value nvarchar for ColumnDataType. */ public static final ColumnDataType NVARCHAR = fromString("nvarchar"); /** - * nchar. + * Static value nchar for ColumnDataType. */ public static final ColumnDataType NCHAR = fromString("nchar"); /** - * xml. + * Static value xml for ColumnDataType. */ public static final ColumnDataType XML = fromString("xml"); /** - * sysname. + * Static value sysname for ColumnDataType. */ public static final ColumnDataType SYSNAME = fromString("sysname"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CompleteDatabaseRestoreDefinition.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CompleteDatabaseRestoreDefinition.java index 375e3764f243..a38c5fb0e558 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CompleteDatabaseRestoreDefinition.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CompleteDatabaseRestoreDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ConnectionPolicyName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ConnectionPolicyName.java index abb2a8f86562..a9cf697e5c74 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ConnectionPolicyName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ConnectionPolicyName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class ConnectionPolicyName extends ExpandableStringEnum { /** - * default. + * Static value default for ConnectionPolicyName. */ public static final ConnectionPolicyName DEFAULT = fromString("default"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CopyLongTermRetentionBackupParameters.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CopyLongTermRetentionBackupParameters.java index 215d39a2d271..f581dc1fc345 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CopyLongTermRetentionBackupParameters.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CopyLongTermRetentionBackupParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CreateDatabaseRestorePointDefinition.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CreateDatabaseRestorePointDefinition.java index bb4e289ee063..4cb9486c1b5e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CreateDatabaseRestorePointDefinition.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CreateDatabaseRestorePointDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CreateMode.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CreateMode.java index 25a3d8f2a22e..2d53be8c1fe1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CreateMode.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CreateMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -36,52 +36,52 @@ */ public final class CreateMode extends ExpandableStringEnum { /** - * Default. + * Static value Default for CreateMode. */ public static final CreateMode DEFAULT = fromString("Default"); /** - * Copy. + * Static value Copy for CreateMode. */ public static final CreateMode COPY = fromString("Copy"); /** - * Secondary. + * Static value Secondary for CreateMode. */ public static final CreateMode SECONDARY = fromString("Secondary"); /** - * PointInTimeRestore. + * Static value PointInTimeRestore for CreateMode. */ public static final CreateMode POINT_IN_TIME_RESTORE = fromString("PointInTimeRestore"); /** - * Restore. + * Static value Restore for CreateMode. */ public static final CreateMode RESTORE = fromString("Restore"); /** - * Recovery. + * Static value Recovery for CreateMode. */ public static final CreateMode RECOVERY = fromString("Recovery"); /** - * RestoreExternalBackup. + * Static value RestoreExternalBackup for CreateMode. */ public static final CreateMode RESTORE_EXTERNAL_BACKUP = fromString("RestoreExternalBackup"); /** - * RestoreExternalBackupSecondary. + * Static value RestoreExternalBackupSecondary for CreateMode. */ public static final CreateMode RESTORE_EXTERNAL_BACKUP_SECONDARY = fromString("RestoreExternalBackupSecondary"); /** - * RestoreLongTermRetentionBackup. + * Static value RestoreLongTermRetentionBackup for CreateMode. */ public static final CreateMode RESTORE_LONG_TERM_RETENTION_BACKUP = fromString("RestoreLongTermRetentionBackup"); /** - * OnlineSecondary. + * Static value OnlineSecondary for CreateMode. */ public static final CreateMode ONLINE_SECONDARY = fromString("OnlineSecondary"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CurrentSensitivityLabelSource.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CurrentSensitivityLabelSource.java deleted file mode 100644 index 090a9cd130d1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/CurrentSensitivityLabelSource.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -/** - * Defines values for CurrentSensitivityLabelSource. - */ -public enum CurrentSensitivityLabelSource { - /** - * current. - */ - CURRENT("current"); - - /** - * The actual serialized value for a CurrentSensitivityLabelSource instance. - */ - private final String value; - - CurrentSensitivityLabelSource(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a CurrentSensitivityLabelSource instance. - * - * @param value the serialized value to parse. - * @return the parsed CurrentSensitivityLabelSource object, or null if unable to parse. - */ - public static CurrentSensitivityLabelSource fromString(String value) { - if (value == null) { - return null; - } - CurrentSensitivityLabelSource[] items = CurrentSensitivityLabelSource.values(); - for (CurrentSensitivityLabelSource item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingFunction.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingFunction.java index 2635b21f1c56..3ee00bd9f221 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingFunction.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingFunction.java @@ -1,71 +1,76 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - /** * The masking function that is used for the data masking rule. */ -public final class DataMaskingFunction extends ExpandableStringEnum { +public enum DataMaskingFunction { /** - * Default. + * Enum value Default. */ - public static final DataMaskingFunction DEFAULT = fromString("Default"); + DEFAULT("Default"), /** - * CCN. + * Enum value CCN. */ - public static final DataMaskingFunction CCN = fromString("CCN"); + CCN("CCN"), /** - * Email. + * Enum value Email. */ - public static final DataMaskingFunction EMAIL = fromString("Email"); + EMAIL("Email"), /** - * Number. + * Enum value Number. */ - public static final DataMaskingFunction NUMBER = fromString("Number"); + NUMBER("Number"), /** - * SSN. + * Enum value SSN. */ - public static final DataMaskingFunction SSN = fromString("SSN"); + SSN("SSN"), /** - * Text. + * Enum value Text. */ - public static final DataMaskingFunction TEXT = fromString("Text"); + TEXT("Text"); /** - * Creates a new instance of DataMaskingFunction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. + * The actual serialized value for a DataMaskingFunction instance. */ - @Deprecated - public DataMaskingFunction() { + private final String value; + + DataMaskingFunction(String value) { + this.value = value; } /** - * Creates or finds a DataMaskingFunction from its string representation. + * Parses a serialized value to a DataMaskingFunction instance. * - * @param name a name to look for. - * @return the corresponding DataMaskingFunction. + * @param value the serialized value to parse. + * @return the parsed DataMaskingFunction object, or null if unable to parse. */ - public static DataMaskingFunction fromString(String name) { - return fromString(name, DataMaskingFunction.class); + public static DataMaskingFunction fromString(String value) { + if (value == null) { + return null; + } + DataMaskingFunction[] items = DataMaskingFunction.values(); + for (DataMaskingFunction item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; } /** - * Gets known DataMaskingFunction values. - * - * @return known DataMaskingFunction values. + * {@inheritDoc} */ - public static Collection values() { - return values(DataMaskingFunction.class); + @Override + public String toString() { + return this.value; } } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingPolicyName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingPolicyName.java index 3a91b8f53085..e39c034b16a4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingPolicyName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingPolicyName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class DataMaskingPolicyName extends ExpandableStringEnum { /** - * Default. + * Static value Default for DataMaskingPolicyName. */ public static final DataMaskingPolicyName DEFAULT = fromString("Default"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DataMaskingRuleListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingRuleListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DataMaskingRuleListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingRuleListResult.java index 2b55709e8ac5..629ab3e9765d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DataMaskingRuleListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingRuleListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a DataMaskingRule list operation. + * The list of database data masking rules. */ @Immutable public final class DataMaskingRuleListResult implements JsonSerializable { /* - * The DataMaskingRule items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of DataMaskingRuleListResult class. */ - private DataMaskingRuleListResult() { + public DataMaskingRuleListResult() { } /** - * Get the value property: The DataMaskingRule items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property value in model DataMaskingRuleListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(DataMaskingRuleListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DataMaskingRuleListResult 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 DataMaskingRuleListResult. */ public static DataMaskingRuleListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingRuleState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingRuleState.java index e2e6f14bcccc..23bad1d5a652 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingRuleState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingRuleState.java @@ -1,53 +1,58 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - /** * The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, * maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be * created with ruleState set to enabled, regardless of the provided value of ruleState. */ -public final class DataMaskingRuleState extends ExpandableStringEnum { +public enum DataMaskingRuleState { /** - * Enabled. + * Enum value Enabled. */ - public static final DataMaskingRuleState ENABLED = fromString("Enabled"); + ENABLED("Enabled"), /** - * Disabled. + * Enum value Disabled. */ - public static final DataMaskingRuleState DISABLED = fromString("Disabled"); + DISABLED("Disabled"); /** - * Creates a new instance of DataMaskingRuleState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. + * The actual serialized value for a DataMaskingRuleState instance. */ - @Deprecated - public DataMaskingRuleState() { + private final String value; + + DataMaskingRuleState(String value) { + this.value = value; } /** - * Creates or finds a DataMaskingRuleState from its string representation. + * Parses a serialized value to a DataMaskingRuleState instance. * - * @param name a name to look for. - * @return the corresponding DataMaskingRuleState. + * @param value the serialized value to parse. + * @return the parsed DataMaskingRuleState object, or null if unable to parse. */ - public static DataMaskingRuleState fromString(String name) { - return fromString(name, DataMaskingRuleState.class); + public static DataMaskingRuleState fromString(String value) { + if (value == null) { + return null; + } + DataMaskingRuleState[] items = DataMaskingRuleState.values(); + for (DataMaskingRuleState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; } /** - * Gets known DataMaskingRuleState values. - * - * @return known DataMaskingRuleState values. + * {@inheritDoc} */ - public static Collection values() { - return values(DataMaskingRuleState.class); + @Override + public String toString() { + return this.value; } } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingState.java index afa54322a31e..4aec362be5c1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataMaskingState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,12 +9,12 @@ */ public enum DataMaskingState { /** - * Enabled. + * Enum value Enabled. */ ENABLED("Enabled"), /** - * Disabled. + * Enum value Disabled. */ DISABLED("Disabled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataSyncParticipantIdentity.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataSyncParticipantIdentity.java deleted file mode 100644 index 6c1b8ee151c2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataSyncParticipantIdentity.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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; -import java.util.Map; -import java.util.Objects; -import java.util.UUID; - -/** - * Azure Active Directory identity configuration for a resource. - */ -@Fluent -public final class DataSyncParticipantIdentity implements JsonSerializable { - /* - * The Datasync identity type - */ - private DataSyncParticipantIdentityType type; - - /* - * The DataSync participant identity tenant id - */ - private UUID tenantId; - - /* - * The resource ids of the user assigned identities to use - */ - private Map userAssignedIdentities; - - /** - * Creates an instance of DataSyncParticipantIdentity class. - */ - public DataSyncParticipantIdentity() { - } - - /** - * Get the type property: The Datasync identity type. - * - * @return the type value. - */ - public DataSyncParticipantIdentityType type() { - return this.type; - } - - /** - * Set the type property: The Datasync identity type. - * - * @param type the type value to set. - * @return the DataSyncParticipantIdentity object itself. - */ - public DataSyncParticipantIdentity withType(DataSyncParticipantIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the tenantId property: The DataSync participant identity tenant id. - * - * @return the tenantId value. - */ - public UUID tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: The DataSync participant identity tenant id. - * - * @param tenantId the tenantId value to set. - * @return the DataSyncParticipantIdentity object itself. - */ - public DataSyncParticipantIdentity withTenantId(UUID tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the userAssignedIdentities property: The resource ids of the user assigned identities to use. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The resource ids of the user assigned identities to use. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the DataSyncParticipantIdentity object itself. - */ - public DataSyncParticipantIdentity - withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property type in model DataSyncParticipantIdentity")); - } - if (userAssignedIdentities() != null) { - userAssignedIdentities().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataSyncParticipantIdentity.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); - jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataSyncParticipantIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataSyncParticipantIdentity 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 DataSyncParticipantIdentity. - */ - public static DataSyncParticipantIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataSyncParticipantIdentity deserializedDataSyncParticipantIdentity = new DataSyncParticipantIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedDataSyncParticipantIdentity.type - = DataSyncParticipantIdentityType.fromString(reader.getString()); - } else if ("tenantId".equals(fieldName)) { - deserializedDataSyncParticipantIdentity.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities - = reader.readMap(reader1 -> DataSyncParticipantUserAssignedIdentity.fromJson(reader1)); - deserializedDataSyncParticipantIdentity.userAssignedIdentities = userAssignedIdentities; - } else { - reader.skipChildren(); - } - } - - return deserializedDataSyncParticipantIdentity; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataSyncParticipantIdentityType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataSyncParticipantIdentityType.java deleted file mode 100644 index 856e92126864..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataSyncParticipantIdentityType.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for DataSyncParticipantIdentityType. - */ -public final class DataSyncParticipantIdentityType extends ExpandableStringEnum { - /** - * None. - */ - public static final DataSyncParticipantIdentityType NONE = fromString("None"); - - /** - * SystemAssigned. - */ - public static final DataSyncParticipantIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** - * UserAssigned. - */ - public static final DataSyncParticipantIdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** - * SystemAssignedUserAssigned. - */ - public static final DataSyncParticipantIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED - = fromString("SystemAssignedUserAssigned"); - - /** - * Creates a new instance of DataSyncParticipantIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DataSyncParticipantIdentityType() { - } - - /** - * Creates or finds a DataSyncParticipantIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataSyncParticipantIdentityType. - */ - public static DataSyncParticipantIdentityType fromString(String name) { - return fromString(name, DataSyncParticipantIdentityType.class); - } - - /** - * Gets known DataSyncParticipantIdentityType values. - * - * @return known DataSyncParticipantIdentityType values. - */ - public static Collection values() { - return values(DataSyncParticipantIdentityType.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataSyncParticipantUserAssignedIdentity.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataSyncParticipantUserAssignedIdentity.java deleted file mode 100644 index f5b1e9394511..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataSyncParticipantUserAssignedIdentity.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; -import java.util.UUID; - -/** - * Azure Active Directory identity configuration for a resource. - */ -@Immutable -public final class DataSyncParticipantUserAssignedIdentity - implements JsonSerializable { - /* - * The Azure Active Directory principal id. - */ - private UUID principalId; - - /* - * The Azure Active Directory client id. - */ - private UUID clientId; - - /** - * Creates an instance of DataSyncParticipantUserAssignedIdentity class. - */ - public DataSyncParticipantUserAssignedIdentity() { - } - - /** - * Get the principalId property: The Azure Active Directory principal id. - * - * @return the principalId value. - */ - public UUID principalId() { - return this.principalId; - } - - /** - * Get the clientId property: The Azure Active Directory client id. - * - * @return the clientId value. - */ - public UUID clientId() { - return this.clientId; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataSyncParticipantUserAssignedIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataSyncParticipantUserAssignedIdentity 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 DataSyncParticipantUserAssignedIdentity. - */ - public static DataSyncParticipantUserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataSyncParticipantUserAssignedIdentity deserializedDataSyncParticipantUserAssignedIdentity - = new DataSyncParticipantUserAssignedIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalId".equals(fieldName)) { - deserializedDataSyncParticipantUserAssignedIdentity.principalId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("clientId".equals(fieldName)) { - deserializedDataSyncParticipantUserAssignedIdentity.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedDataSyncParticipantUserAssignedIdentity; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DataWarehouseUserActivitiesListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataWarehouseUserActivitiesListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DataWarehouseUserActivitiesListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataWarehouseUserActivitiesListResult.java index 9bb39c26631e..08afa42f6a59 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DataWarehouseUserActivitiesListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataWarehouseUserActivitiesListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a DataWarehouseUserActivities list operation. + * User activities of a data warehouse. */ @Immutable public final class DataWarehouseUserActivitiesListResult implements JsonSerializable { /* - * The DataWarehouseUserActivities items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of DataWarehouseUserActivitiesListResult class. */ - private DataWarehouseUserActivitiesListResult() { + public DataWarehouseUserActivitiesListResult() { } /** - * Get the value property: The DataWarehouseUserActivities items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model DataWarehouseUserActivitiesListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(DataWarehouseUserActivitiesListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DataWarehouseUserActivitiesListResult 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 DataWarehouseUserActivitiesListResult. */ public static DataWarehouseUserActivitiesListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataWarehouseUserActivityName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataWarehouseUserActivityName.java index 13af3ed8c581..88bc62a9b617 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataWarehouseUserActivityName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DataWarehouseUserActivityName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class DataWarehouseUserActivityName extends ExpandableStringEnum { /** - * current. + * Static value current for DataWarehouseUserActivityName. */ public static final DataWarehouseUserActivityName CURRENT = fromString("current"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseAdvancedThreatProtectionListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseAdvancedThreatProtectionListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseAdvancedThreatProtectionListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseAdvancedThreatProtectionListResult.java index 467396e1cbce..1b9d2b3d2ce8 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseAdvancedThreatProtectionListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseAdvancedThreatProtectionListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a DatabaseAdvancedThreatProtection list operation. + * A list of the database's Advanced Threat Protection configurations. */ @Immutable public final class DatabaseAdvancedThreatProtectionListResult implements JsonSerializable { /* - * The DatabaseAdvancedThreatProtection items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of DatabaseAdvancedThreatProtectionListResult class. */ - private DatabaseAdvancedThreatProtectionListResult() { + public DatabaseAdvancedThreatProtectionListResult() { } /** - * Get the value property: The DatabaseAdvancedThreatProtection items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model DatabaseAdvancedThreatProtectionListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(DatabaseAdvancedThreatProtectionListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DatabaseAdvancedThreatProtectionListResult 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 DatabaseAdvancedThreatProtectionListResult. */ public static DatabaseAdvancedThreatProtectionListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseBlobAuditingPolicyListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseBlobAuditingPolicyListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseBlobAuditingPolicyListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseBlobAuditingPolicyListResult.java index a5a0d645b9f9..f564cce5b6f3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseBlobAuditingPolicyListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseBlobAuditingPolicyListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a DatabaseBlobAuditingPolicy list operation. + * A list of database auditing settings. */ @Immutable public final class DatabaseBlobAuditingPolicyListResult implements JsonSerializable { /* - * The DatabaseBlobAuditingPolicy items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of DatabaseBlobAuditingPolicyListResult class. */ - private DatabaseBlobAuditingPolicyListResult() { + public DatabaseBlobAuditingPolicyListResult() { } /** - * Get the value property: The DatabaseBlobAuditingPolicy items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model DatabaseBlobAuditingPolicyListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(DatabaseBlobAuditingPolicyListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DatabaseBlobAuditingPolicyListResult 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 DatabaseBlobAuditingPolicyListResult. */ public static DatabaseBlobAuditingPolicyListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseColumnListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseColumnListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseColumnListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseColumnListResult.java index 052e180c898a..db9059b0ac2f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseColumnListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseColumnListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a DatabaseColumn list operation. + * A list of database columns. */ @Immutable public final class DatabaseColumnListResult implements JsonSerializable { /* - * The DatabaseColumn items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of DatabaseColumnListResult class. */ - private DatabaseColumnListResult() { + public DatabaseColumnListResult() { } /** - * Get the value property: The DatabaseColumn items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model DatabaseColumnListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(DatabaseColumnListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DatabaseColumnListResult 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 DatabaseColumnListResult. */ public static DatabaseColumnListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseExtensions.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseExtensions.java index b3028a2ddfdb..f881b5cd9a6c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseExtensions.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseExtensions.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -23,11 +22,6 @@ public final class DatabaseExtensions extends ProxyResource { */ private DatabaseExtensionsProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -58,15 +52,6 @@ private DatabaseExtensionsProperties 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. * @@ -121,7 +106,7 @@ public DatabaseExtensions withOperationMode(OperationMode operationMode) { } /** - * Get the storageKeyType property: Storage key type: StorageAccessKey, SharedAccessKey or ManagedIdentity. + * Get the storageKeyType property: Storage key type: StorageAccessKey or SharedAccessKey. * * @return the storageKeyType value. */ @@ -130,7 +115,7 @@ public StorageKeyType storageKeyType() { } /** - * Set the storageKeyType property: Storage key type: StorageAccessKey, SharedAccessKey or ManagedIdentity. + * Set the storageKeyType property: Storage key type: StorageAccessKey or SharedAccessKey. * * @param storageKeyType the storageKeyType value to set. * @return the DatabaseExtensions object itself. @@ -144,8 +129,7 @@ public DatabaseExtensions withStorageKeyType(StorageKeyType storageKeyType) { } /** - * Get the storageKey property: Storage key for the storage account. If StorageKeyType is ManagedIdentity, this - * field should specify the Managed Identity's resource ID. + * Get the storageKey property: Storage key for the storage account. * * @return the storageKey value. */ @@ -154,8 +138,7 @@ public String storageKey() { } /** - * Set the storageKey property: Storage key for the storage account. If StorageKeyType is ManagedIdentity, this - * field should specify the Managed Identity's resource ID. + * Set the storageKey property: Storage key for the storage account. * * @param storageKey the storageKey value to set. * @return the DatabaseExtensions object itself. @@ -192,8 +175,7 @@ public DatabaseExtensions withStorageUri(String storageUri) { } /** - * Get the administratorLogin property: Administrator login name. If AuthenticationType is ManagedIdentity, this - * field should specify the Managed Identity's resource ID. + * Get the administratorLogin property: Administrator login name. * * @return the administratorLogin value. */ @@ -202,8 +184,7 @@ public String administratorLogin() { } /** - * Set the administratorLogin property: Administrator login name. If AuthenticationType is ManagedIdentity, this - * field should specify the Managed Identity's resource ID. + * Set the administratorLogin property: Administrator login name. * * @param administratorLogin the administratorLogin value to set. * @return the DatabaseExtensions object itself. @@ -217,8 +198,7 @@ public DatabaseExtensions withAdministratorLogin(String administratorLogin) { } /** - * Get the administratorLoginPassword property: Administrator login password. If AuthenticationType is - * ManagedIdentity, this field should not be specified. + * Get the administratorLoginPassword property: Administrator login password. * * @return the administratorLoginPassword value. */ @@ -227,8 +207,7 @@ public String administratorLoginPassword() { } /** - * Set the administratorLoginPassword property: Administrator login password. If AuthenticationType is - * ManagedIdentity, this field should not be specified. + * Set the administratorLoginPassword property: Administrator login password. * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the DatabaseExtensions object itself. @@ -242,8 +221,7 @@ public DatabaseExtensions withAdministratorLoginPassword(String administratorLog } /** - * Get the authenticationType property: Authentication type used to access the SQL: Sql, ADPassword or - * ManagedIdentity. + * Get the authenticationType property: Authentication type: SQL authentication or AD password. * * @return the authenticationType value. */ @@ -252,8 +230,7 @@ public String authenticationType() { } /** - * Set the authenticationType property: Authentication type used to access the SQL: Sql, ADPassword or - * ManagedIdentity. + * Set the authenticationType property: Authentication type: SQL authentication or AD password. * * @param authenticationType the authenticationType value to set. * @return the DatabaseExtensions object itself. @@ -409,8 +386,6 @@ public static DatabaseExtensions fromJson(JsonReader jsonReader) throws IOExcept deserializedDatabaseExtensions.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedDatabaseExtensions.innerProperties = DatabaseExtensionsProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseExtensions.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentity.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentity.java index 00bbb6b32de6..c6747aff8d9f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentity.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentityType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentityType.java index d10035f76296..90e569586946 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentityType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,12 +12,12 @@ */ public final class DatabaseIdentityType extends ExpandableStringEnum { /** - * None. + * Static value None for DatabaseIdentityType. */ public static final DatabaseIdentityType NONE = fromString("None"); /** - * UserAssigned. + * Static value UserAssigned for DatabaseIdentityType. */ public static final DatabaseIdentityType USER_ASSIGNED = fromString("UserAssigned"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseKey.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseKey.java deleted file mode 100644 index b44d55018777..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseKey.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.annotation.Immutable; -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; - -/** - * Database level key used for encryption at rest. - */ -@Immutable -public final class DatabaseKey implements JsonSerializable { - /* - * The database key type. Only supported value is 'AzureKeyVault'. - */ - private DatabaseKeyType type; - - /* - * Thumbprint of the database key. - */ - private String thumbprint; - - /* - * The database key creation date. - */ - private OffsetDateTime creationDate; - - /* - * Subregion of the server key. - */ - private String subregion; - - /* - * The database key's version. - */ - private String keyVersion; - - /** - * Creates an instance of DatabaseKey class. - */ - public DatabaseKey() { - } - - /** - * Get the type property: The database key type. Only supported value is 'AzureKeyVault'. - * - * @return the type value. - */ - public DatabaseKeyType type() { - return this.type; - } - - /** - * Get the thumbprint property: Thumbprint of the database key. - * - * @return the thumbprint value. - */ - public String thumbprint() { - return this.thumbprint; - } - - /** - * Get the creationDate property: The database key creation date. - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.creationDate; - } - - /** - * Get the subregion property: Subregion of the server key. - * - * @return the subregion value. - */ - public String subregion() { - return this.subregion; - } - - /** - * Get the keyVersion property: The database key's version. - * - * @return the keyVersion value. - */ - public String keyVersion() { - return this.keyVersion; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatabaseKey from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabaseKey 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 DatabaseKey. - */ - public static DatabaseKey fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DatabaseKey deserializedDatabaseKey = new DatabaseKey(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedDatabaseKey.type = DatabaseKeyType.fromString(reader.getString()); - } else if ("thumbprint".equals(fieldName)) { - deserializedDatabaseKey.thumbprint = reader.getString(); - } else if ("creationDate".equals(fieldName)) { - deserializedDatabaseKey.creationDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("subregion".equals(fieldName)) { - deserializedDatabaseKey.subregion = reader.getString(); - } else if ("keyVersion".equals(fieldName)) { - deserializedDatabaseKey.keyVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDatabaseKey; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseKeyType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseKeyType.java deleted file mode 100644 index ddbb8b45df07..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseKeyType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The database key type. Only supported value is 'AzureKeyVault'. - */ -public final class DatabaseKeyType extends ExpandableStringEnum { - /** - * AzureKeyVault. - */ - public static final DatabaseKeyType AZURE_KEY_VAULT = fromString("AzureKeyVault"); - - /** - * Creates a new instance of DatabaseKeyType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DatabaseKeyType() { - } - - /** - * Creates or finds a DatabaseKeyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DatabaseKeyType. - */ - public static DatabaseKeyType fromString(String name) { - return fromString(name, DatabaseKeyType.class); - } - - /** - * Gets known DatabaseKeyType values. - * - * @return known DatabaseKeyType values. - */ - public static Collection values() { - return values(DatabaseKeyType.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseLicenseType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseLicenseType.java index 78168b251ed2..418835fcc84c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseLicenseType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseLicenseType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -13,12 +13,12 @@ */ public final class DatabaseLicenseType extends ExpandableStringEnum { /** - * LicenseIncluded. + * Static value LicenseIncluded for DatabaseLicenseType. */ public static final DatabaseLicenseType LICENSE_INCLUDED = fromString("LicenseIncluded"); /** - * BasePrice. + * Static value BasePrice for DatabaseLicenseType. */ public static final DatabaseLicenseType BASE_PRICE = fromString("BasePrice"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseListResult.java index 4cce1cc9fe6a..310de55d20ab 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a Database list operation. + * A list of databases. */ @Immutable public final class DatabaseListResult implements JsonSerializable { /* - * The Database items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of DatabaseListResult class. */ - private DatabaseListResult() { + public DatabaseListResult() { } /** - * Get the value property: The Database items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model DatabaseListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(DatabaseListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 * 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 DatabaseListResult. */ public static DatabaseListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseOperationListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseOperationListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseOperationListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseOperationListResult.java index 87b21617b386..cafd64fd9c93 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseOperationListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseOperationListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a DatabaseOperation list operation. + * The response to a list database operations request. */ @Immutable public final class DatabaseOperationListResult implements JsonSerializable { /* - * The DatabaseOperation items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of DatabaseOperationListResult class. */ - private DatabaseOperationListResult() { + public DatabaseOperationListResult() { } /** - * Get the value property: The DatabaseOperation items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model DatabaseOperationListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(DatabaseOperationListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DatabaseOperationListResult 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 DatabaseOperationListResult. */ public static DatabaseOperationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseReadScale.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseReadScale.java index 5d20fa7186e5..47a992d44b11 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseReadScale.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseReadScale.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -14,12 +14,12 @@ */ public final class DatabaseReadScale extends ExpandableStringEnum { /** - * Enabled. + * Static value Enabled for DatabaseReadScale. */ public static final DatabaseReadScale ENABLED = fromString("Enabled"); /** - * Disabled. + * Static value Disabled for DatabaseReadScale. */ public static final DatabaseReadScale DISABLED = fromString("Disabled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSchemaListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSchemaListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSchemaListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSchemaListResult.java index 0ff46e565e18..22d3fc130071 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSchemaListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSchemaListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a DatabaseSchema list operation. + * A list of database schemas. */ @Immutable public final class DatabaseSchemaListResult implements JsonSerializable { /* - * The DatabaseSchema items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of DatabaseSchemaListResult class. */ - private DatabaseSchemaListResult() { + public DatabaseSchemaListResult() { } /** - * Get the value property: The DatabaseSchema items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model DatabaseSchemaListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(DatabaseSchemaListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DatabaseSchemaListResult 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 DatabaseSchemaListResult. */ public static DatabaseSchemaListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSecurityAlertListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSecurityAlertListResult.java similarity index 95% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSecurityAlertListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSecurityAlertListResult.java index 84178e079da8..b71cd2238da5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSecurityAlertListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSecurityAlertListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -31,7 +31,7 @@ public final class DatabaseSecurityAlertListResult implements JsonSerializable> results() { - return this.innerProperties() == null ? null : this.innerProperties().results(); - } - - /** - * Set the results property: The rule baseline result. - * - * @param results the results value to set. - * @return the DatabaseSqlVulnerabilityAssessmentRuleBaselineInput object itself. - */ - public DatabaseSqlVulnerabilityAssessmentRuleBaselineInput withResults(List> results) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties(); - } - this.innerProperties().withResults(results); - 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineInput 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 DatabaseSqlVulnerabilityAssessmentRuleBaselineInput. - */ - public static DatabaseSqlVulnerabilityAssessmentRuleBaselineInput fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DatabaseSqlVulnerabilityAssessmentRuleBaselineInput deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInput - = new DatabaseSqlVulnerabilityAssessmentRuleBaselineInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInput.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInput.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInput.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInput.innerProperties - = DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInput.systemData - = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineInput; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput.java deleted file mode 100644 index d79ad30d5458..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput.java +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * A database sql vulnerability assessment rule baseline list input. - */ -@Fluent -public final class DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput extends ProxyResource { - /* - * Resource properties. - */ - private DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties 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 DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput class. - */ - public DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties 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 latestScan property: The latest scan flag. - * - * @return the latestScan value. - */ - public Boolean latestScan() { - return this.innerProperties() == null ? null : this.innerProperties().latestScan(); - } - - /** - * Set the latestScan property: The latest scan flag. - * - * @param latestScan the latestScan value to set. - * @return the DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput object itself. - */ - public DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput withLatestScan(Boolean latestScan) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties(); - } - this.innerProperties().withLatestScan(latestScan); - return this; - } - - /** - * Get the results property: The rule baseline result list. - * - * @return the results value. - */ - public Map>> results() { - return this.innerProperties() == null ? null : this.innerProperties().results(); - } - - /** - * Set the results property: The rule baseline result list. - * - * @param results the results value to set. - * @return the DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput object itself. - */ - public DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput - withResults(Map>> results) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties(); - } - this.innerProperties().withResults(results); - 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput 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 DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput. - */ - public static DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineListInput - = new DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineListInput.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineListInput.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineListInput.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineListInput.innerProperties - = DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineListInput.systemData - = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDatabaseSqlVulnerabilityAssessmentRuleBaselineListInput; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseState.java index 279b26aed50b..ea9cefdfdc56 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,17 +12,17 @@ */ public final class DatabaseState extends ExpandableStringEnum { /** - * All. + * Static value All for DatabaseState. */ public static final DatabaseState ALL = fromString("All"); /** - * Live. + * Static value Live for DatabaseState. */ public static final DatabaseState LIVE = fromString("Live"); /** - * Deleted. + * Static value Deleted for DatabaseState. */ public static final DatabaseState DELETED = fromString("Deleted"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseStatus.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseStatus.java index fcf6b8de7a58..3551210b218c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseStatus.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,124 +12,124 @@ */ public final class DatabaseStatus extends ExpandableStringEnum { /** - * Online. + * Static value Online for DatabaseStatus. */ public static final DatabaseStatus ONLINE = fromString("Online"); /** - * Restoring. + * Static value Restoring for DatabaseStatus. */ public static final DatabaseStatus RESTORING = fromString("Restoring"); /** - * RecoveryPending. + * Static value RecoveryPending for DatabaseStatus. */ public static final DatabaseStatus RECOVERY_PENDING = fromString("RecoveryPending"); /** - * Recovering. + * Static value Recovering for DatabaseStatus. */ public static final DatabaseStatus RECOVERING = fromString("Recovering"); /** - * Suspect. + * Static value Suspect for DatabaseStatus. */ public static final DatabaseStatus SUSPECT = fromString("Suspect"); /** - * Offline. + * Static value Offline for DatabaseStatus. */ public static final DatabaseStatus OFFLINE = fromString("Offline"); /** - * Standby. + * Static value Standby for DatabaseStatus. */ public static final DatabaseStatus STANDBY = fromString("Standby"); /** - * Shutdown. + * Static value Shutdown for DatabaseStatus. */ public static final DatabaseStatus SHUTDOWN = fromString("Shutdown"); /** - * EmergencyMode. + * Static value EmergencyMode for DatabaseStatus. */ public static final DatabaseStatus EMERGENCY_MODE = fromString("EmergencyMode"); /** - * AutoClosed. + * Static value AutoClosed for DatabaseStatus. */ public static final DatabaseStatus AUTO_CLOSED = fromString("AutoClosed"); /** - * Copying. + * Static value Copying for DatabaseStatus. */ public static final DatabaseStatus COPYING = fromString("Copying"); /** - * Creating. + * Static value Creating for DatabaseStatus. */ public static final DatabaseStatus CREATING = fromString("Creating"); /** - * Inaccessible. + * Static value Inaccessible for DatabaseStatus. */ public static final DatabaseStatus INACCESSIBLE = fromString("Inaccessible"); /** - * OfflineSecondary. + * Static value OfflineSecondary for DatabaseStatus. */ public static final DatabaseStatus OFFLINE_SECONDARY = fromString("OfflineSecondary"); /** - * Pausing. + * Static value Pausing for DatabaseStatus. */ public static final DatabaseStatus PAUSING = fromString("Pausing"); /** - * Paused. + * Static value Paused for DatabaseStatus. */ public static final DatabaseStatus PAUSED = fromString("Paused"); /** - * Resuming. + * Static value Resuming for DatabaseStatus. */ public static final DatabaseStatus RESUMING = fromString("Resuming"); /** - * Scaling. + * Static value Scaling for DatabaseStatus. */ public static final DatabaseStatus SCALING = fromString("Scaling"); /** - * OfflineChangingDwPerformanceTiers. + * Static value OfflineChangingDwPerformanceTiers for DatabaseStatus. */ public static final DatabaseStatus OFFLINE_CHANGING_DW_PERFORMANCE_TIERS = fromString("OfflineChangingDwPerformanceTiers"); /** - * OnlineChangingDwPerformanceTiers. + * Static value OnlineChangingDwPerformanceTiers for DatabaseStatus. */ public static final DatabaseStatus ONLINE_CHANGING_DW_PERFORMANCE_TIERS = fromString("OnlineChangingDwPerformanceTiers"); /** - * Disabled. + * Static value Disabled for DatabaseStatus. */ public static final DatabaseStatus DISABLED = fromString("Disabled"); /** - * Stopping. + * Static value Stopping for DatabaseStatus. */ public static final DatabaseStatus STOPPING = fromString("Stopping"); /** - * Stopped. + * Static value Stopped for DatabaseStatus. */ public static final DatabaseStatus STOPPED = fromString("Stopped"); /** - * Starting. + * Static value Starting for DatabaseStatus. */ public static final DatabaseStatus STARTING = fromString("Starting"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseTableListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseTableListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseTableListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseTableListResult.java index 797b1a1b7c61..5feac018ab93 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseTableListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseTableListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a DatabaseTable list operation. + * A list of database tables. */ @Immutable public final class DatabaseTableListResult implements JsonSerializable { /* - * The DatabaseTable items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of DatabaseTableListResult class. */ - private DatabaseTableListResult() { + public DatabaseTableListResult() { } /** - * Get the value property: The DatabaseTable items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model DatabaseTableListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(DatabaseTableListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DatabaseTableListResult 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 DatabaseTableListResult. */ public static DatabaseTableListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUpdate.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUpdate.java index 80db8785c8cc..5b5a7c0d17a3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUpdate.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -636,9 +636,8 @@ public DatabaseUpdate withReadScale(DatabaseReadScale readScale) { } /** - * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the Business - * Critical, Premium, or Hyperscale edition database that are used to provide high availability. Not applicable to a - * Hyperscale database within an elastic pool. + * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that + * are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. * * @return the highAvailabilityReplicaCount value. */ @@ -647,9 +646,8 @@ public Integer highAvailabilityReplicaCount() { } /** - * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the Business - * Critical, Premium, or Hyperscale edition database that are used to provide high availability. Not applicable to a - * Hyperscale database within an elastic pool. + * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that + * are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. * * @param highAvailabilityReplicaCount the highAvailabilityReplicaCount value to set. * @return the DatabaseUpdate object itself. @@ -663,8 +661,8 @@ public DatabaseUpdate withHighAvailabilityReplicaCount(Integer highAvailabilityR } /** - * Get the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo, - * Named and Standby. + * Get the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and + * Named. * * @return the secondaryType value. */ @@ -673,8 +671,8 @@ public SecondaryType secondaryType() { } /** - * Set the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo, - * Named and Standby. + * Set the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and + * Named. * * @param secondaryType the secondaryType value to set. * @return the DatabaseUpdate object itself. @@ -884,255 +882,6 @@ public DatabaseUpdate withFederatedClientId(UUID federatedClientId) { return this; } - /** - * Get the keys property: The resource ids of the user assigned identities to use. - * - * @return the keys value. - */ - public Map keys() { - return this.innerProperties() == null ? null : this.innerProperties().keys(); - } - - /** - * Set the keys property: The resource ids of the user assigned identities to use. - * - * @param keys the keys value to set. - * @return the DatabaseUpdate object itself. - */ - public DatabaseUpdate withKeys(Map keys) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseUpdateProperties(); - } - this.innerProperties().withKeys(keys); - return this; - } - - /** - * Get the encryptionProtector property: The azure key vault URI of the database if it's configured with per - * Database Customer Managed Keys. - * - * @return the encryptionProtector value. - */ - public String encryptionProtector() { - return this.innerProperties() == null ? null : this.innerProperties().encryptionProtector(); - } - - /** - * Set the encryptionProtector property: The azure key vault URI of the database if it's configured with per - * Database Customer Managed Keys. - * - * @param encryptionProtector the encryptionProtector value to set. - * @return the DatabaseUpdate object itself. - */ - public DatabaseUpdate withEncryptionProtector(String encryptionProtector) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseUpdateProperties(); - } - this.innerProperties().withEncryptionProtector(encryptionProtector); - return this; - } - - /** - * Get the preferredEnclaveType property: Type of enclave requested on the database i.e. Default or VBS enclaves. - * - * @return the preferredEnclaveType value. - */ - public AlwaysEncryptedEnclaveType preferredEnclaveType() { - return this.innerProperties() == null ? null : this.innerProperties().preferredEnclaveType(); - } - - /** - * Set the preferredEnclaveType property: Type of enclave requested on the database i.e. Default or VBS enclaves. - * - * @param preferredEnclaveType the preferredEnclaveType value to set. - * @return the DatabaseUpdate object itself. - */ - public DatabaseUpdate withPreferredEnclaveType(AlwaysEncryptedEnclaveType preferredEnclaveType) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseUpdateProperties(); - } - this.innerProperties().withPreferredEnclaveType(preferredEnclaveType); - return this; - } - - /** - * Get the useFreeLimit property: Whether or not the database uses free monthly limits. Allowed on one database in a - * subscription. - * - * @return the useFreeLimit value. - */ - public Boolean useFreeLimit() { - return this.innerProperties() == null ? null : this.innerProperties().useFreeLimit(); - } - - /** - * Set the useFreeLimit property: Whether or not the database uses free monthly limits. Allowed on one database in a - * subscription. - * - * @param useFreeLimit the useFreeLimit value to set. - * @return the DatabaseUpdate object itself. - */ - public DatabaseUpdate withUseFreeLimit(Boolean useFreeLimit) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseUpdateProperties(); - } - this.innerProperties().withUseFreeLimit(useFreeLimit); - return this; - } - - /** - * Get the freeLimitExhaustionBehavior property: Specifies the behavior when monthly free limits are exhausted for - * the free database. - * - * AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. - * - * BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be - * billed. - * - * @return the freeLimitExhaustionBehavior value. - */ - public FreeLimitExhaustionBehavior freeLimitExhaustionBehavior() { - return this.innerProperties() == null ? null : this.innerProperties().freeLimitExhaustionBehavior(); - } - - /** - * Set the freeLimitExhaustionBehavior property: Specifies the behavior when monthly free limits are exhausted for - * the free database. - * - * AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. - * - * BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be - * billed. - * - * @param freeLimitExhaustionBehavior the freeLimitExhaustionBehavior value to set. - * @return the DatabaseUpdate object itself. - */ - public DatabaseUpdate withFreeLimitExhaustionBehavior(FreeLimitExhaustionBehavior freeLimitExhaustionBehavior) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseUpdateProperties(); - } - this.innerProperties().withFreeLimitExhaustionBehavior(freeLimitExhaustionBehavior); - return this; - } - - /** - * Get the manualCutover property: Whether or not customer controlled manual cutover needs to be done during Update - * Database operation to Hyperscale tier. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier. - * - * When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale - * database. - * - * To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state. - * - * @return the manualCutover value. - */ - public Boolean manualCutover() { - return this.innerProperties() == null ? null : this.innerProperties().manualCutover(); - } - - /** - * Set the manualCutover property: Whether or not customer controlled manual cutover needs to be done during Update - * Database operation to Hyperscale tier. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier. - * - * When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale - * database. - * - * To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state. - * - * @param manualCutover the manualCutover value to set. - * @return the DatabaseUpdate object itself. - */ - public DatabaseUpdate withManualCutover(Boolean manualCutover) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseUpdateProperties(); - } - this.innerProperties().withManualCutover(manualCutover); - return this; - } - - /** - * Get the performCutover property: To trigger customer controlled manual cutover during the wait state while - * Scaling operation is in progress. - * - * This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' - * parameter. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier is already in progress. - * - * When performCutover is specified, the scaling operation will trigger cutover and perform role-change to - * Hyperscale database. - * - * @return the performCutover value. - */ - public Boolean performCutover() { - return this.innerProperties() == null ? null : this.innerProperties().performCutover(); - } - - /** - * Set the performCutover property: To trigger customer controlled manual cutover during the wait state while - * Scaling operation is in progress. - * - * This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' - * parameter. - * - * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard - * tier to Hyperscale tier is already in progress. - * - * When performCutover is specified, the scaling operation will trigger cutover and perform role-change to - * Hyperscale database. - * - * @param performCutover the performCutover value to set. - * @return the DatabaseUpdate object itself. - */ - public DatabaseUpdate withPerformCutover(Boolean performCutover) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseUpdateProperties(); - } - this.innerProperties().withPerformCutover(performCutover); - return this; - } - - /** - * Get the encryptionProtectorAutoRotation property: The flag to enable or disable auto rotation of database - * encryption protector AKV key. - * - * @return the encryptionProtectorAutoRotation value. - */ - public Boolean encryptionProtectorAutoRotation() { - return this.innerProperties() == null ? null : this.innerProperties().encryptionProtectorAutoRotation(); - } - - /** - * Set the encryptionProtectorAutoRotation property: The flag to enable or disable auto rotation of database - * encryption protector AKV key. - * - * @param encryptionProtectorAutoRotation the encryptionProtectorAutoRotation value to set. - * @return the DatabaseUpdate object itself. - */ - public DatabaseUpdate withEncryptionProtectorAutoRotation(Boolean encryptionProtectorAutoRotation) { - if (this.innerProperties() == null) { - this.innerProperties = new DatabaseUpdateProperties(); - } - this.innerProperties().withEncryptionProtectorAutoRotation(encryptionProtectorAutoRotation); - return this; - } - - /** - * Get the provisioningState property: Specifies the provisioning state for this resource. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseUsageListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUsageListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseUsageListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUsageListResult.java index 62508e80647f..6177b7e89738 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseUsageListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUsageListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a DatabaseUsage list operation. + * A list of database usage metrics. */ @Immutable public final class DatabaseUsageListResult implements JsonSerializable { /* - * The DatabaseUsage items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of DatabaseUsageListResult class. */ - private DatabaseUsageListResult() { + public DatabaseUsageListResult() { } /** - * Get the value property: The DatabaseUsage items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model DatabaseUsageListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(DatabaseUsageListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DatabaseUsageListResult 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 DatabaseUsageListResult. */ public static DatabaseUsageListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUserIdentity.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUserIdentity.java index 9382aa9afd8a..0cc4ad56a30c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUserIdentity.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseUserIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseVulnerabilityAssessmentListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseVulnerabilityAssessmentListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentListResult.java index 4c7416683837..333123029c15 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseVulnerabilityAssessmentListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a DatabaseVulnerabilityAssessment list operation. + * A list of the database's vulnerability assessments. */ @Immutable public final class DatabaseVulnerabilityAssessmentListResult implements JsonSerializable { /* - * The DatabaseVulnerabilityAssessment items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of DatabaseVulnerabilityAssessmentListResult class. */ - private DatabaseVulnerabilityAssessmentListResult() { + public DatabaseVulnerabilityAssessmentListResult() { } /** - * Get the value property: The DatabaseVulnerabilityAssessment items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model DatabaseVulnerabilityAssessmentListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(DatabaseVulnerabilityAssessmentListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DatabaseVulnerabilityAssessmentListResult 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 DatabaseVulnerabilityAssessmentListResult. */ public static DatabaseVulnerabilityAssessmentListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentListResultAutoGenerated.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentListResultAutoGenerated.java new file mode 100644 index 000000000000..1fbcf22b3824 --- /dev/null +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentListResultAutoGenerated.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.sql.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.sql.fluent.models.DatabaseVulnerabilityAssessmentAutoGeneratedInner; +import java.io.IOException; +import java.util.List; + +/** + * A list of the database's vulnerability assessments. + */ +@Immutable +public final class DatabaseVulnerabilityAssessmentListResultAutoGenerated + implements JsonSerializable { + /* + * Array of results. + */ + private List value; + + /* + * Link to retrieve next page of results. + */ + private String nextLink; + + /** + * Creates an instance of DatabaseVulnerabilityAssessmentListResultAutoGenerated class. + */ + public DatabaseVulnerabilityAssessmentListResultAutoGenerated() { + } + + /** + * 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 DatabaseVulnerabilityAssessmentListResultAutoGenerated from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseVulnerabilityAssessmentListResultAutoGenerated 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 DatabaseVulnerabilityAssessmentListResultAutoGenerated. + */ + public static DatabaseVulnerabilityAssessmentListResultAutoGenerated fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + DatabaseVulnerabilityAssessmentListResultAutoGenerated deserializedDatabaseVulnerabilityAssessmentListResultAutoGenerated + = new DatabaseVulnerabilityAssessmentListResultAutoGenerated(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader + .readArray(reader1 -> DatabaseVulnerabilityAssessmentAutoGeneratedInner.fromJson(reader1)); + deserializedDatabaseVulnerabilityAssessmentListResultAutoGenerated.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDatabaseVulnerabilityAssessmentListResultAutoGenerated.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseVulnerabilityAssessmentListResultAutoGenerated; + }); + } +} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentRuleBaselineItem.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentRuleBaselineItem.java index fe97e58eb29c..8aee64750590 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentRuleBaselineItem.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentRuleBaselineItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DayOfWeek.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DayOfWeek.java index b9a96e467730..f6a90e6757d0 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DayOfWeek.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DayOfWeek.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,37 +12,37 @@ */ public final class DayOfWeek extends ExpandableStringEnum { /** - * Sunday. + * Static value Sunday for DayOfWeek. */ public static final DayOfWeek SUNDAY = fromString("Sunday"); /** - * Monday. + * Static value Monday for DayOfWeek. */ public static final DayOfWeek MONDAY = fromString("Monday"); /** - * Tuesday. + * Static value Tuesday for DayOfWeek. */ public static final DayOfWeek TUESDAY = fromString("Tuesday"); /** - * Wednesday. + * Static value Wednesday for DayOfWeek. */ public static final DayOfWeek WEDNESDAY = fromString("Wednesday"); /** - * Thursday. + * Static value Thursday for DayOfWeek. */ public static final DayOfWeek THURSDAY = fromString("Thursday"); /** - * Friday. + * Static value Friday for DayOfWeek. */ public static final DayOfWeek FRIDAY = fromString("Friday"); /** - * Saturday. + * Static value Saturday for DayOfWeek. */ public static final DayOfWeek SATURDAY = fromString("Saturday"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DeletedServerListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DeletedServerListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DeletedServerListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DeletedServerListResult.java index ffd50f82aad1..9c9d8365871d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DeletedServerListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DeletedServerListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a DeletedServer list operation. + * A list of deleted servers. */ @Immutable public final class DeletedServerListResult implements JsonSerializable { /* - * The DeletedServer items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of DeletedServerListResult class. */ - private DeletedServerListResult() { + public DeletedServerListResult() { } /** - * Get the value property: The DeletedServer items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model DeletedServerListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(DeletedServerListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DeletedServerListResult 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 DeletedServerListResult. */ public static DeletedServerListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DevOpsAuditingSettingsName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DevOpsAuditingSettingsName.java deleted file mode 100644 index 31f7f0e47d23..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DevOpsAuditingSettingsName.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for DevOpsAuditingSettingsName. - */ -public final class DevOpsAuditingSettingsName extends ExpandableStringEnum { - /** - * Default. - */ - public static final DevOpsAuditingSettingsName DEFAULT = fromString("Default"); - - /** - * Creates a new instance of DevOpsAuditingSettingsName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DevOpsAuditingSettingsName() { - } - - /** - * Creates or finds a DevOpsAuditingSettingsName from its string representation. - * - * @param name a name to look for. - * @return the corresponding DevOpsAuditingSettingsName. - */ - public static DevOpsAuditingSettingsName fromString(String name) { - return fromString(name, DevOpsAuditingSettingsName.class); - } - - /** - * Gets known DevOpsAuditingSettingsName values. - * - * @return known DevOpsAuditingSettingsName values. - */ - public static Collection values() { - return values(DevOpsAuditingSettingsName.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DiffBackupIntervalInHours.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DiffBackupIntervalInHours.java index 7584d171e139..9a2e54f5b824 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DiffBackupIntervalInHours.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DiffBackupIntervalInHours.java @@ -1,122 +1,52 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; -import com.azure.core.util.ExpandableEnum; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; +import com.azure.core.util.ExpandableStringEnum; import java.util.Collection; -import java.util.Map; -import java.util.Objects; -import java.util.concurrent.ConcurrentHashMap; -import java.util.function.Function; /** * The differential backup interval in hours. This is how many interval hours between each differential backup will be * supported. This is only applicable to live databases but not dropped databases. */ -public final class DiffBackupIntervalInHours - implements ExpandableEnum, JsonSerializable { - private static final Map VALUES = new ConcurrentHashMap<>(); - - private static final Function NEW_INSTANCE = DiffBackupIntervalInHours::new; - +public final class DiffBackupIntervalInHours extends ExpandableStringEnum { /** - * 12. + * Static value 12 for DiffBackupIntervalInHours. */ - public static final DiffBackupIntervalInHours ONE_TWO = fromValue(12); + public static final DiffBackupIntervalInHours ONE_TWO = fromInt(12); /** - * 24. + * Static value 24 for DiffBackupIntervalInHours. */ - public static final DiffBackupIntervalInHours TWO_FOUR = fromValue(24); - - private final Integer value; - - private DiffBackupIntervalInHours(Integer value) { - this.value = value; - } + public static final DiffBackupIntervalInHours TWO_FOUR = fromInt(24); /** - * Creates or finds a DiffBackupIntervalInHours. + * Creates a new instance of DiffBackupIntervalInHours value. * - * @param value a value to look for. - * @return the corresponding DiffBackupIntervalInHours. - * @throws IllegalArgumentException if value is null. + * @deprecated Use the {@link #fromInt(int)} factory method. */ - public static DiffBackupIntervalInHours fromValue(Integer value) { - if (value == null) { - throw new IllegalArgumentException("'value' cannot be null."); - } - return VALUES.computeIfAbsent(value, NEW_INSTANCE); - } - - /** - * Gets known DiffBackupIntervalInHours values. - * - * @return Known DiffBackupIntervalInHours values. - */ - public static Collection values() { - return new ArrayList<>(VALUES.values()); + @Deprecated + public DiffBackupIntervalInHours() { } /** - * Gets the value of the DiffBackupIntervalInHours instance. + * Creates or finds a DiffBackupIntervalInHours from its string representation. * - * @return the value of the DiffBackupIntervalInHours instance. - */ - @Override - public Integer getValue() { - return this.value; - } - - /** - * {@inheritDoc} + * @param name a name to look for. + * @return the corresponding DiffBackupIntervalInHours. */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - return jsonWriter.writeInt(getValue()); + public static DiffBackupIntervalInHours fromInt(int name) { + return fromString(String.valueOf(name), DiffBackupIntervalInHours.class); } /** - * Reads an instance of DiffBackupIntervalInHours from the JsonReader. + * Gets known DiffBackupIntervalInHours values. * - * @param jsonReader The JsonReader being read. - * @return An instance of DiffBackupIntervalInHours if the JsonReader was pointing to an instance of it, or null if - * the JsonReader was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiffBackupIntervalInHours. - * @throws IllegalStateException If unexpected JSON token is found. + * @return known DiffBackupIntervalInHours values. */ - public static DiffBackupIntervalInHours fromJson(JsonReader jsonReader) throws IOException { - JsonToken nextToken = jsonReader.nextToken(); - if (nextToken == JsonToken.NULL) { - return null; - } - if (nextToken != JsonToken.NUMBER) { - throw new IllegalStateException( - String.format("Unexpected JSON token for %s deserialization: %s", JsonToken.NUMBER, nextToken)); - } - return DiffBackupIntervalInHours.fromValue(jsonReader.getInt()); - } - - @Override - public String toString() { - return Objects.toString(this.value); - } - - @Override - public boolean equals(Object obj) { - return this == obj; - } - - @Override - public int hashCode() { - return Objects.hashCode(this.value); + public static Collection values() { + return values(DiffBackupIntervalInHours.class); } } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupDatabase.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupDatabase.java deleted file mode 100644 index 8ace57525f34..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupDatabase.java +++ /dev/null @@ -1,433 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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; -import java.util.UUID; - -/** - * Database specific information. - */ -@Fluent -public final class DistributedAvailabilityGroupDatabase - implements JsonSerializable { - /* - * The name of the database in link - */ - private String databaseName; - - /* - * Managed instance replica id - */ - private UUID instanceReplicaId; - - /* - * SQL server replica id - */ - private UUID partnerReplicaId; - - /* - * Current link state - */ - private String replicaState; - - /* - * Seeding progress - */ - private String seedingProgress; - - /* - * Link health state - */ - private ReplicaSynchronizationHealth synchronizationHealth; - - /* - * Link connected state - */ - private ReplicaConnectedState connectedState; - - /* - * Last received LSN - */ - private String lastReceivedLsn; - - /* - * Last received LSN time - */ - private OffsetDateTime lastReceivedTime; - - /* - * Last sent LSN - */ - private String lastSentLsn; - - /* - * Last sent LSN time - */ - private OffsetDateTime lastSentTime; - - /* - * Last commit LSN - */ - private String lastCommitLsn; - - /* - * Last commit LSN time - */ - private OffsetDateTime lastCommitTime; - - /* - * Last hardened LSN - */ - private String lastHardenedLsn; - - /* - * Last hardened LSN time - */ - private OffsetDateTime lastHardenedTime; - - /* - * Last backup LSN - */ - private String lastBackupLsn; - - /* - * Last backup LSN time - */ - private OffsetDateTime lastBackupTime; - - /* - * The most recent link connection error description - */ - private String mostRecentLinkError; - - /* - * SQL server certificate validity - */ - private CertificateInfo partnerAuthCertValidity; - - /* - * Replication lag when Managed Instance link side is primary - */ - private Integer instanceSendReplicationLagSeconds; - - /* - * Redo lag when Managed Instance link side is primary - */ - private Integer instanceRedoReplicationLagSeconds; - - /** - * Creates an instance of DistributedAvailabilityGroupDatabase class. - */ - public DistributedAvailabilityGroupDatabase() { - } - - /** - * Get the databaseName property: The name of the database in link. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Set the databaseName property: The name of the database in link. - * - * @param databaseName the databaseName value to set. - * @return the DistributedAvailabilityGroupDatabase object itself. - */ - public DistributedAvailabilityGroupDatabase withDatabaseName(String databaseName) { - this.databaseName = databaseName; - return this; - } - - /** - * Get the instanceReplicaId property: Managed instance replica id. - * - * @return the instanceReplicaId value. - */ - public UUID instanceReplicaId() { - return this.instanceReplicaId; - } - - /** - * Get the partnerReplicaId property: SQL server replica id. - * - * @return the partnerReplicaId value. - */ - public UUID partnerReplicaId() { - return this.partnerReplicaId; - } - - /** - * Get the replicaState property: Current link state. - * - * @return the replicaState value. - */ - public String replicaState() { - return this.replicaState; - } - - /** - * Get the seedingProgress property: Seeding progress. - * - * @return the seedingProgress value. - */ - public String seedingProgress() { - return this.seedingProgress; - } - - /** - * Get the synchronizationHealth property: Link health state. - * - * @return the synchronizationHealth value. - */ - public ReplicaSynchronizationHealth synchronizationHealth() { - return this.synchronizationHealth; - } - - /** - * Get the connectedState property: Link connected state. - * - * @return the connectedState value. - */ - public ReplicaConnectedState connectedState() { - return this.connectedState; - } - - /** - * Get the lastReceivedLsn property: Last received LSN. - * - * @return the lastReceivedLsn value. - */ - public String lastReceivedLsn() { - return this.lastReceivedLsn; - } - - /** - * Get the lastReceivedTime property: Last received LSN time. - * - * @return the lastReceivedTime value. - */ - public OffsetDateTime lastReceivedTime() { - return this.lastReceivedTime; - } - - /** - * Get the lastSentLsn property: Last sent LSN. - * - * @return the lastSentLsn value. - */ - public String lastSentLsn() { - return this.lastSentLsn; - } - - /** - * Get the lastSentTime property: Last sent LSN time. - * - * @return the lastSentTime value. - */ - public OffsetDateTime lastSentTime() { - return this.lastSentTime; - } - - /** - * Get the lastCommitLsn property: Last commit LSN. - * - * @return the lastCommitLsn value. - */ - public String lastCommitLsn() { - return this.lastCommitLsn; - } - - /** - * Get the lastCommitTime property: Last commit LSN time. - * - * @return the lastCommitTime value. - */ - public OffsetDateTime lastCommitTime() { - return this.lastCommitTime; - } - - /** - * Get the lastHardenedLsn property: Last hardened LSN. - * - * @return the lastHardenedLsn value. - */ - public String lastHardenedLsn() { - return this.lastHardenedLsn; - } - - /** - * Get the lastHardenedTime property: Last hardened LSN time. - * - * @return the lastHardenedTime value. - */ - public OffsetDateTime lastHardenedTime() { - return this.lastHardenedTime; - } - - /** - * Get the lastBackupLsn property: Last backup LSN. - * - * @return the lastBackupLsn value. - */ - public String lastBackupLsn() { - return this.lastBackupLsn; - } - - /** - * Get the lastBackupTime property: Last backup LSN time. - * - * @return the lastBackupTime value. - */ - public OffsetDateTime lastBackupTime() { - return this.lastBackupTime; - } - - /** - * Get the mostRecentLinkError property: The most recent link connection error description. - * - * @return the mostRecentLinkError value. - */ - public String mostRecentLinkError() { - return this.mostRecentLinkError; - } - - /** - * Get the partnerAuthCertValidity property: SQL server certificate validity. - * - * @return the partnerAuthCertValidity value. - */ - public CertificateInfo partnerAuthCertValidity() { - return this.partnerAuthCertValidity; - } - - /** - * Get the instanceSendReplicationLagSeconds property: Replication lag when Managed Instance link side is primary. - * - * @return the instanceSendReplicationLagSeconds value. - */ - public Integer instanceSendReplicationLagSeconds() { - return this.instanceSendReplicationLagSeconds; - } - - /** - * Get the instanceRedoReplicationLagSeconds property: Redo lag when Managed Instance link side is primary. - * - * @return the instanceRedoReplicationLagSeconds value. - */ - public Integer instanceRedoReplicationLagSeconds() { - return this.instanceRedoReplicationLagSeconds; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (partnerAuthCertValidity() != null) { - partnerAuthCertValidity().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("databaseName", this.databaseName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DistributedAvailabilityGroupDatabase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DistributedAvailabilityGroupDatabase 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 DistributedAvailabilityGroupDatabase. - */ - public static DistributedAvailabilityGroupDatabase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DistributedAvailabilityGroupDatabase deserializedDistributedAvailabilityGroupDatabase - = new DistributedAvailabilityGroupDatabase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("databaseName".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.databaseName = reader.getString(); - } else if ("instanceReplicaId".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.instanceReplicaId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("partnerReplicaId".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.partnerReplicaId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("replicaState".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.replicaState = reader.getString(); - } else if ("seedingProgress".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.seedingProgress = reader.getString(); - } else if ("synchronizationHealth".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.synchronizationHealth - = ReplicaSynchronizationHealth.fromString(reader.getString()); - } else if ("connectedState".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.connectedState - = ReplicaConnectedState.fromString(reader.getString()); - } else if ("lastReceivedLsn".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.lastReceivedLsn = reader.getString(); - } else if ("lastReceivedTime".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.lastReceivedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastSentLsn".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.lastSentLsn = reader.getString(); - } else if ("lastSentTime".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.lastSentTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastCommitLsn".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.lastCommitLsn = reader.getString(); - } else if ("lastCommitTime".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.lastCommitTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastHardenedLsn".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.lastHardenedLsn = reader.getString(); - } else if ("lastHardenedTime".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.lastHardenedTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastBackupLsn".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.lastBackupLsn = reader.getString(); - } else if ("lastBackupTime".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.lastBackupTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("mostRecentLinkError".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.mostRecentLinkError = reader.getString(); - } else if ("partnerAuthCertValidity".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.partnerAuthCertValidity - = CertificateInfo.fromJson(reader); - } else if ("instanceSendReplicationLagSeconds".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.instanceSendReplicationLagSeconds - = reader.getNullable(JsonReader::getInt); - } else if ("instanceRedoReplicationLagSeconds".equals(fieldName)) { - deserializedDistributedAvailabilityGroupDatabase.instanceRedoReplicationLagSeconds - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedDistributedAvailabilityGroupDatabase; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupSetRole.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupSetRole.java deleted file mode 100644 index 2e3873bc3f5d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupSetRole.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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; - -/** - * Distributed availability group failover request. - */ -@Fluent -public final class DistributedAvailabilityGroupSetRole - implements JsonSerializable { - /* - * New role of managed instance in a distributed availability group, can be Primary or Secondary. - */ - private InstanceRole instanceRole; - - /* - * The type of the role change, can be Planned or Forced. - */ - private RoleChangeType roleChangeType; - - /** - * Creates an instance of DistributedAvailabilityGroupSetRole class. - */ - public DistributedAvailabilityGroupSetRole() { - } - - /** - * Get the instanceRole property: New role of managed instance in a distributed availability group, can be Primary - * or Secondary. - * - * @return the instanceRole value. - */ - public InstanceRole instanceRole() { - return this.instanceRole; - } - - /** - * Set the instanceRole property: New role of managed instance in a distributed availability group, can be Primary - * or Secondary. - * - * @param instanceRole the instanceRole value to set. - * @return the DistributedAvailabilityGroupSetRole object itself. - */ - public DistributedAvailabilityGroupSetRole withInstanceRole(InstanceRole instanceRole) { - this.instanceRole = instanceRole; - return this; - } - - /** - * Get the roleChangeType property: The type of the role change, can be Planned or Forced. - * - * @return the roleChangeType value. - */ - public RoleChangeType roleChangeType() { - return this.roleChangeType; - } - - /** - * Set the roleChangeType property: The type of the role change, can be Planned or Forced. - * - * @param roleChangeType the roleChangeType value to set. - * @return the DistributedAvailabilityGroupSetRole object itself. - */ - public DistributedAvailabilityGroupSetRole withRoleChangeType(RoleChangeType roleChangeType) { - this.roleChangeType = roleChangeType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (instanceRole() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property instanceRole in model DistributedAvailabilityGroupSetRole")); - } - if (roleChangeType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property roleChangeType in model DistributedAvailabilityGroupSetRole")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DistributedAvailabilityGroupSetRole.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("instanceRole", this.instanceRole == null ? null : this.instanceRole.toString()); - jsonWriter.writeStringField("roleChangeType", - this.roleChangeType == null ? null : this.roleChangeType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DistributedAvailabilityGroupSetRole from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DistributedAvailabilityGroupSetRole 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 DistributedAvailabilityGroupSetRole. - */ - public static DistributedAvailabilityGroupSetRole fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DistributedAvailabilityGroupSetRole deserializedDistributedAvailabilityGroupSetRole - = new DistributedAvailabilityGroupSetRole(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("instanceRole".equals(fieldName)) { - deserializedDistributedAvailabilityGroupSetRole.instanceRole - = InstanceRole.fromString(reader.getString()); - } else if ("roleChangeType".equals(fieldName)) { - deserializedDistributedAvailabilityGroupSetRole.roleChangeType - = RoleChangeType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDistributedAvailabilityGroupSetRole; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupsFailoverRequest.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupsFailoverRequest.java deleted file mode 100644 index dbff8501d211..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupsFailoverRequest.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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; - -/** - * Distributed availability group failover. - */ -@Fluent -public final class DistributedAvailabilityGroupsFailoverRequest - implements JsonSerializable { - /* - * The failover type, can be ForcedAllowDataLoss or Planned. - */ - private FailoverType failoverType; - - /** - * Creates an instance of DistributedAvailabilityGroupsFailoverRequest class. - */ - public DistributedAvailabilityGroupsFailoverRequest() { - } - - /** - * Get the failoverType property: The failover type, can be ForcedAllowDataLoss or Planned. - * - * @return the failoverType value. - */ - public FailoverType failoverType() { - return this.failoverType; - } - - /** - * Set the failoverType property: The failover type, can be ForcedAllowDataLoss or Planned. - * - * @param failoverType the failoverType value to set. - * @return the DistributedAvailabilityGroupsFailoverRequest object itself. - */ - public DistributedAvailabilityGroupsFailoverRequest withFailoverType(FailoverType failoverType) { - this.failoverType = failoverType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (failoverType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property failoverType in model DistributedAvailabilityGroupsFailoverRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DistributedAvailabilityGroupsFailoverRequest.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("failoverType", this.failoverType == null ? null : this.failoverType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DistributedAvailabilityGroupsFailoverRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DistributedAvailabilityGroupsFailoverRequest 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 DistributedAvailabilityGroupsFailoverRequest. - */ - public static DistributedAvailabilityGroupsFailoverRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DistributedAvailabilityGroupsFailoverRequest deserializedDistributedAvailabilityGroupsFailoverRequest - = new DistributedAvailabilityGroupsFailoverRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("failoverType".equals(fieldName)) { - deserializedDistributedAvailabilityGroupsFailoverRequest.failoverType - = FailoverType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDistributedAvailabilityGroupsFailoverRequest; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DistributedAvailabilityGroupsListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupsListResult.java similarity index 95% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DistributedAvailabilityGroupsListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupsListResult.java index 0bffbb4f13c0..80201576ad9f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/DistributedAvailabilityGroupsListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupsListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -32,7 +32,7 @@ public final class DistributedAvailabilityGroupsListResult /** * Creates an instance of DistributedAvailabilityGroupsListResult class. */ - private DistributedAvailabilityGroupsListResult() { + public DistributedAvailabilityGroupsListResult() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DnsRefreshConfigurationPropertiesStatus.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DnsRefreshConfigurationPropertiesStatus.java index 5d2bd786a613..60c750d6c990 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DnsRefreshConfigurationPropertiesStatus.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DnsRefreshConfigurationPropertiesStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -13,20 +13,15 @@ public final class DnsRefreshConfigurationPropertiesStatus extends ExpandableStringEnum { /** - * Succeeded. + * Static value Succeeded for DnsRefreshConfigurationPropertiesStatus. */ public static final DnsRefreshConfigurationPropertiesStatus SUCCEEDED = fromString("Succeeded"); /** - * Failed. + * Static value Failed for DnsRefreshConfigurationPropertiesStatus. */ public static final DnsRefreshConfigurationPropertiesStatus FAILED = fromString("Failed"); - /** - * InProgress. - */ - public static final DnsRefreshConfigurationPropertiesStatus IN_PROGRESS = fromString("InProgress"); - /** * Creates a new instance of DnsRefreshConfigurationPropertiesStatus value. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DtcName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DtcName.java deleted file mode 100644 index fff2cc71dda6..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/DtcName.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for DtcName. - */ -public final class DtcName extends ExpandableStringEnum { - /** - * current. - */ - public static final DtcName CURRENT = fromString("current"); - - /** - * Creates a new instance of DtcName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DtcName() { - } - - /** - * Creates or finds a DtcName from its string representation. - * - * @param name a name to look for. - * @return the corresponding DtcName. - */ - public static DtcName fromString(String name) { - return fromString(name, DtcName.class); - } - - /** - * Gets known DtcName values. - * - * @return known DtcName values. - */ - public static Collection values() { - return values(DtcName.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EditionCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EditionCapability.java index f0ac8a9bbaba..b8a19ac3a1f1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EditionCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EditionCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -15,7 +15,7 @@ /** * The edition capability. */ -@Immutable +@Fluent public final class EditionCapability implements JsonSerializable { /* * The database edition name. @@ -42,11 +42,6 @@ public final class EditionCapability implements JsonSerializable supportedStorageCapabilities; - /* - * Whether or not zone pinning is supported for the edition. - */ - private Boolean zonePinning; - /* * The status of the capability. */ @@ -60,7 +55,7 @@ public final class EditionCapability implements JsonSerializable supportedStorageCapabilities() { return this.supportedStorageCapabilities; } - /** - * Get the zonePinning property: Whether or not zone pinning is supported for the edition. - * - * @return the zonePinning value. - */ - public Boolean zonePinning() { - return this.zonePinning; - } - /** * Get the status property: The status of the capability. * @@ -135,6 +121,17 @@ public String reason() { return this.reason; } + /** + * Set the reason property: The reason for the capability not being available. + * + * @param reason the reason value to set. + * @return the EditionCapability object itself. + */ + public EditionCapability withReason(String reason) { + this.reason = reason; + return this; + } + /** * Validates the instance. * @@ -191,8 +188,6 @@ public static EditionCapability fromJson(JsonReader jsonReader) throws IOExcepti List supportedStorageCapabilities = reader.readArray(reader1 -> StorageCapability.fromJson(reader1)); deserializedEditionCapability.supportedStorageCapabilities = supportedStorageCapabilities; - } else if ("zonePinning".equals(fieldName)) { - deserializedEditionCapability.zonePinning = reader.getNullable(JsonReader::getBoolean); } else if ("status".equals(fieldName)) { deserializedEditionCapability.status = CapabilityStatus.fromString(reader.getString()); } else if ("reason".equals(fieldName)) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolEditionCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolEditionCapability.java index 070508e19e8c..a3fa7b8a9330 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolEditionCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolEditionCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -15,7 +15,7 @@ /** * The elastic pool edition capability. */ -@Immutable +@Fluent public final class ElasticPoolEditionCapability implements JsonSerializable { /* * The elastic pool edition name. @@ -32,11 +32,6 @@ public final class ElasticPoolEditionCapability implements JsonSerializable { /** - * LicenseIncluded. + * Static value LicenseIncluded for ElasticPoolLicenseType. */ public static final ElasticPoolLicenseType LICENSE_INCLUDED = fromString("LicenseIncluded"); /** - * BasePrice. + * Static value BasePrice for ElasticPoolLicenseType. */ public static final ElasticPoolLicenseType BASE_PRICE = fromString("BasePrice"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ElasticPoolListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ElasticPoolListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolListResult.java index eec654849bc9..08d4667753df 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ElasticPoolListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a ElasticPool list operation. + * The result of an elastic pool list request. */ @Immutable public final class ElasticPoolListResult implements JsonSerializable { /* - * The ElasticPool items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ElasticPoolListResult class. */ - private ElasticPoolListResult() { + public ElasticPoolListResult() { } /** - * Get the value property: The ElasticPool items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model ElasticPoolListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ElasticPoolListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ElasticPoolListResult 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 ElasticPoolListResult. */ public static ElasticPoolListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ElasticPoolOperationListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolOperationListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ElasticPoolOperationListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolOperationListResult.java index 11629cd36829..cc6686df1d64 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ElasticPoolOperationListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolOperationListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a ElasticPoolOperation list operation. + * The response to a list elastic pool operations request. */ @Immutable public final class ElasticPoolOperationListResult implements JsonSerializable { /* - * The ElasticPoolOperation items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ElasticPoolOperationListResult class. */ - private ElasticPoolOperationListResult() { + public ElasticPoolOperationListResult() { } /** - * Get the value property: The ElasticPoolOperation items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ElasticPoolOperationListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ElasticPoolOperationListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ElasticPoolOperationListResult 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 ElasticPoolOperationListResult. */ public static ElasticPoolOperationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMaxPerformanceLevelCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMaxPerformanceLevelCapability.java index e01e13154021..5836448b92ed 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMaxPerformanceLevelCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMaxPerformanceLevelCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -15,7 +15,7 @@ /** * The max per-database performance level capability. */ -@Immutable +@Fluent public final class ElasticPoolPerDatabaseMaxPerformanceLevelCapability implements JsonSerializable { /* @@ -46,7 +46,7 @@ public final class ElasticPoolPerDatabaseMaxPerformanceLevelCapability /** * Creates an instance of ElasticPoolPerDatabaseMaxPerformanceLevelCapability class. */ - private ElasticPoolPerDatabaseMaxPerformanceLevelCapability() { + public ElasticPoolPerDatabaseMaxPerformanceLevelCapability() { } /** @@ -94,6 +94,17 @@ public String reason() { return this.reason; } + /** + * Set the reason property: The reason for the capability not being available. + * + * @param reason the reason value to set. + * @return the ElasticPoolPerDatabaseMaxPerformanceLevelCapability object itself. + */ + public ElasticPoolPerDatabaseMaxPerformanceLevelCapability withReason(String reason) { + this.reason = reason; + return this; + } + /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMinPerformanceLevelCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMinPerformanceLevelCapability.java index 9b7309927cca..48f47bb09aa9 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMinPerformanceLevelCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMinPerformanceLevelCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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,7 +14,7 @@ /** * The minimum per-database performance level capability. */ -@Immutable +@Fluent public final class ElasticPoolPerDatabaseMinPerformanceLevelCapability implements JsonSerializable { /* @@ -40,7 +40,7 @@ public final class ElasticPoolPerDatabaseMinPerformanceLevelCapability /** * Creates an instance of ElasticPoolPerDatabaseMinPerformanceLevelCapability class. */ - private ElasticPoolPerDatabaseMinPerformanceLevelCapability() { + public ElasticPoolPerDatabaseMinPerformanceLevelCapability() { } /** @@ -79,6 +79,17 @@ public String reason() { return this.reason; } + /** + * Set the reason property: The reason for the capability not being available. + * + * @param reason the reason value to set. + * @return the ElasticPoolPerDatabaseMinPerformanceLevelCapability object itself. + */ + public ElasticPoolPerDatabaseMinPerformanceLevelCapability withReason(String reason) { + this.reason = reason; + return this; + } + /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseSettings.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseSettings.java index 0dbceabf8833..56913fb07cfb 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseSettings.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -26,11 +26,6 @@ public final class ElasticPoolPerDatabaseSettings implements JsonSerializable { /* @@ -68,26 +68,6 @@ public final class ElasticPoolPerformanceLevelCapability */ private List supportedMaintenanceConfigurations; - /* - * List of supported min capacities - */ - private List supportedMinCapacities; - - /* - * Supported time range for auto pause delay - */ - private AutoPauseDelayTimeRange supportedAutoPauseDelay; - - /* - * Supported time range for per database auto pause delay - */ - private PerDatabaseAutoPauseDelayTimeRange supportedPerDatabaseAutoPauseDelay; - - /* - * List of supported availability zones - */ - private List supportedZones; - /* * The status of the capability. */ @@ -101,7 +81,7 @@ public final class ElasticPoolPerformanceLevelCapability /** * Creates an instance of ElasticPoolPerformanceLevelCapability class. */ - private ElasticPoolPerformanceLevelCapability() { + public ElasticPoolPerformanceLevelCapability() { } /** @@ -195,42 +175,6 @@ public List supportedMaintenanceConfiguratio return this.supportedMaintenanceConfigurations; } - /** - * Get the supportedMinCapacities property: List of supported min capacities. - * - * @return the supportedMinCapacities value. - */ - public List supportedMinCapacities() { - return this.supportedMinCapacities; - } - - /** - * Get the supportedAutoPauseDelay property: Supported time range for auto pause delay. - * - * @return the supportedAutoPauseDelay value. - */ - public AutoPauseDelayTimeRange supportedAutoPauseDelay() { - return this.supportedAutoPauseDelay; - } - - /** - * Get the supportedPerDatabaseAutoPauseDelay property: Supported time range for per database auto pause delay. - * - * @return the supportedPerDatabaseAutoPauseDelay value. - */ - public PerDatabaseAutoPauseDelayTimeRange supportedPerDatabaseAutoPauseDelay() { - return this.supportedPerDatabaseAutoPauseDelay; - } - - /** - * Get the supportedZones property: List of supported availability zones. - * - * @return the supportedZones value. - */ - public List supportedZones() { - return this.supportedZones; - } - /** * Get the status property: The status of the capability. * @@ -249,6 +193,17 @@ public String reason() { return this.reason; } + /** + * Set the reason property: The reason for the capability not being available. + * + * @param reason the reason value to set. + * @return the ElasticPoolPerformanceLevelCapability object itself. + */ + public ElasticPoolPerformanceLevelCapability withReason(String reason) { + this.reason = reason; + return this; + } + /** * Validates the instance. * @@ -279,18 +234,6 @@ public void validate() { if (supportedMaintenanceConfigurations() != null) { supportedMaintenanceConfigurations().forEach(e -> e.validate()); } - if (supportedMinCapacities() != null) { - supportedMinCapacities().forEach(e -> e.validate()); - } - if (supportedAutoPauseDelay() != null) { - supportedAutoPauseDelay().validate(); - } - if (supportedPerDatabaseAutoPauseDelay() != null) { - supportedPerDatabaseAutoPauseDelay().validate(); - } - if (supportedZones() != null) { - supportedZones().forEach(e -> e.validate()); - } } /** @@ -357,20 +300,6 @@ public static ElasticPoolPerformanceLevelCapability fromJson(JsonReader jsonRead = reader.readArray(reader1 -> MaintenanceConfigurationCapability.fromJson(reader1)); deserializedElasticPoolPerformanceLevelCapability.supportedMaintenanceConfigurations = supportedMaintenanceConfigurations; - } else if ("supportedMinCapacities".equals(fieldName)) { - List supportedMinCapacities - = reader.readArray(reader1 -> MinCapacityCapability.fromJson(reader1)); - deserializedElasticPoolPerformanceLevelCapability.supportedMinCapacities = supportedMinCapacities; - } else if ("supportedAutoPauseDelay".equals(fieldName)) { - deserializedElasticPoolPerformanceLevelCapability.supportedAutoPauseDelay - = AutoPauseDelayTimeRange.fromJson(reader); - } else if ("supportedPerDatabaseAutoPauseDelay".equals(fieldName)) { - deserializedElasticPoolPerformanceLevelCapability.supportedPerDatabaseAutoPauseDelay - = PerDatabaseAutoPauseDelayTimeRange.fromJson(reader); - } else if ("supportedZones".equals(fieldName)) { - List supportedZones - = reader.readArray(reader1 -> ZonePinningCapability.fromJson(reader1)); - deserializedElasticPoolPerformanceLevelCapability.supportedZones = supportedZones; } else if ("status".equals(fieldName)) { deserializedElasticPoolPerformanceLevelCapability.status = CapabilityStatus.fromString(reader.getString()); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolState.java index 25e2221e7939..15110e4b649a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,17 +12,17 @@ */ public final class ElasticPoolState extends ExpandableStringEnum { /** - * Creating. + * Static value Creating for ElasticPoolState. */ public static final ElasticPoolState CREATING = fromString("Creating"); /** - * Ready. + * Static value Ready for ElasticPoolState. */ public static final ElasticPoolState READY = fromString("Ready"); /** - * Disabled. + * Static value Disabled for ElasticPoolState. */ public static final ElasticPoolState DISABLED = fromString("Disabled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolUpdate.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolUpdate.java index ebb6c5976735..55e712447f65 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolUpdate.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -231,9 +231,8 @@ public ElasticPoolUpdate withMaintenanceConfigurationId(String maintenanceConfig } /** - * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the Business - * Critical, Premium, or Hyperscale edition elastic pool that are used to provide high availability. Applicable only - * to Hyperscale elastic pools. + * Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the elastic pool + * that are used to provide high availability. Applicable only to Hyperscale elastic pools. * * @return the highAvailabilityReplicaCount value. */ @@ -242,9 +241,8 @@ public Integer highAvailabilityReplicaCount() { } /** - * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the Business - * Critical, Premium, or Hyperscale edition elastic pool that are used to provide high availability. Applicable only - * to Hyperscale elastic pools. + * Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the elastic pool + * that are used to provide high availability. Applicable only to Hyperscale elastic pools. * * @param highAvailabilityReplicaCount the highAvailabilityReplicaCount value to set. * @return the ElasticPoolUpdate object itself. @@ -257,86 +255,6 @@ public ElasticPoolUpdate withHighAvailabilityReplicaCount(Integer highAvailabili return this; } - /** - * Get the autoPauseDelay property: Time in minutes after which elastic pool is automatically paused. A value of -1 - * means that automatic pause is disabled. - * - * @return the autoPauseDelay value. - */ - public Integer autoPauseDelay() { - return this.innerProperties() == null ? null : this.innerProperties().autoPauseDelay(); - } - - /** - * Set the autoPauseDelay property: Time in minutes after which elastic pool is automatically paused. A value of -1 - * means that automatic pause is disabled. - * - * @param autoPauseDelay the autoPauseDelay value to set. - * @return the ElasticPoolUpdate object itself. - */ - public ElasticPoolUpdate withAutoPauseDelay(Integer autoPauseDelay) { - if (this.innerProperties() == null) { - this.innerProperties = new ElasticPoolUpdateProperties(); - } - this.innerProperties().withAutoPauseDelay(autoPauseDelay); - return this; - } - - /** - * Get the preferredEnclaveType property: Type of enclave requested on the elastic pool. - * - * @return the preferredEnclaveType value. - */ - public AlwaysEncryptedEnclaveType preferredEnclaveType() { - return this.innerProperties() == null ? null : this.innerProperties().preferredEnclaveType(); - } - - /** - * Set the preferredEnclaveType property: Type of enclave requested on the elastic pool. - * - * @param preferredEnclaveType the preferredEnclaveType value to set. - * @return the ElasticPoolUpdate object itself. - */ - public ElasticPoolUpdate withPreferredEnclaveType(AlwaysEncryptedEnclaveType preferredEnclaveType) { - if (this.innerProperties() == null) { - this.innerProperties = new ElasticPoolUpdateProperties(); - } - this.innerProperties().withPreferredEnclaveType(preferredEnclaveType); - return this; - } - - /** - * Get the availabilityZone property: Specifies the availability zone the pool's primary replica is pinned to. - * - * @return the availabilityZone value. - */ - public AvailabilityZoneType availabilityZone() { - return this.innerProperties() == null ? null : this.innerProperties().availabilityZone(); - } - - /** - * Set the availabilityZone property: Specifies the availability zone the pool's primary replica is pinned to. - * - * @param availabilityZone the availabilityZone value to set. - * @return the ElasticPoolUpdate object itself. - */ - public ElasticPoolUpdate withAvailabilityZone(AvailabilityZoneType availabilityZone) { - if (this.innerProperties() == null) { - this.innerProperties = new ElasticPoolUpdateProperties(); - } - this.innerProperties().withAvailabilityZone(availabilityZone); - return this; - } - - /** - * Get the currentSku property: The name and tier of the current SKU. - * - * @return the currentSku value. - */ - public Sku currentSku() { - return this.innerProperties() == null ? null : this.innerProperties().currentSku(); - } - /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/EncryptionProtectorListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EncryptionProtectorListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/EncryptionProtectorListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EncryptionProtectorListResult.java index 83995980f2a3..ee6c7ccb0be1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/EncryptionProtectorListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EncryptionProtectorListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a EncryptionProtector list operation. + * A list of server encryption protectors. */ @Immutable public final class EncryptionProtectorListResult implements JsonSerializable { /* - * The EncryptionProtector items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of EncryptionProtectorListResult class. */ - private EncryptionProtectorListResult() { + public EncryptionProtectorListResult() { } /** - * Get the value property: The EncryptionProtector items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model EncryptionProtectorListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(EncryptionProtectorListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of EncryptionProtectorListResult 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 EncryptionProtectorListResult. */ public static EncryptionProtectorListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EncryptionProtectorName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EncryptionProtectorName.java index 398cc9ad0945..3ede35d26113 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EncryptionProtectorName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EncryptionProtectorName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class EncryptionProtectorName extends ExpandableStringEnum { /** - * current. + * Static value current for EncryptionProtectorName. */ public static final EncryptionProtectorName CURRENT = fromString("current"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/EndpointCertificateListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointCertificateListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/EndpointCertificateListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointCertificateListResult.java index 6b8f7f855349..706b562eae76 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/EndpointCertificateListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointCertificateListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a EndpointCertificate list operation. + * A list of endpoint certificates on the target instance. */ @Immutable public final class EndpointCertificateListResult implements JsonSerializable { /* - * The EndpointCertificate items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of EndpointCertificateListResult class. */ - private EndpointCertificateListResult() { + public EndpointCertificateListResult() { } /** - * Get the value property: The EndpointCertificate items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model EndpointCertificateListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(EndpointCertificateListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of EndpointCertificateListResult 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 EndpointCertificateListResult. */ public static EndpointCertificateListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointDependency.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointDependency.java index 9c18cc0d8768..e761558528ab 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointDependency.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/EndpointDependency.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -30,7 +30,7 @@ public final class EndpointDependency implements JsonSerializable { /** * Creates an instance of EndpointDetail class. */ - private EndpointDetail() { + public EndpointDetail() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ErrorType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ErrorType.java deleted file mode 100644 index 3afcd10cea73..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ErrorType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Error type (e.g. None, User). - */ -public final class ErrorType extends ExpandableStringEnum { - /** - * None. - */ - public static final ErrorType NONE = fromString("None"); - - /** - * User. - */ - public static final ErrorType USER = fromString("User"); - - /** - * Creates a new instance of ErrorType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ErrorType() { - } - - /** - * Creates or finds a ErrorType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ErrorType. - */ - public static ErrorType fromString(String name) { - return fromString(name, ErrorType.class); - } - - /** - * Gets known ErrorType values. - * - * @return known ErrorType values. - */ - public static Collection values() { - return values(ErrorType.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExportDatabaseDefinition.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExportDatabaseDefinition.java index 959cadbe4e47..d429e02fa5ca 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExportDatabaseDefinition.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExportDatabaseDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -18,13 +18,12 @@ @Fluent public final class ExportDatabaseDefinition implements JsonSerializable { /* - * Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity. + * Storage key type. */ private StorageKeyType storageKeyType; /* - * Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed - * Identity's resource ID. + * Storage key. */ private String storageKey; @@ -34,18 +33,17 @@ public final class ExportDatabaseDefinition implements JsonSerializable { /* - * The ExtendedDatabaseBlobAuditingPolicy items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ExtendedDatabaseBlobAuditingPolicyListResult class. */ - private ExtendedDatabaseBlobAuditingPolicyListResult() { + public ExtendedDatabaseBlobAuditingPolicyListResult() { } /** - * Get the value property: The ExtendedDatabaseBlobAuditingPolicy items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ExtendedDatabaseBlobAuditingPolicyListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ExtendedDatabaseBlobAuditingPolicyListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ExtendedDatabaseBlobAuditingPolicyListResult 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 ExtendedDatabaseBlobAuditingPolicyListResult. */ public static ExtendedDatabaseBlobAuditingPolicyListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ExtendedServerBlobAuditingPolicyListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExtendedServerBlobAuditingPolicyListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ExtendedServerBlobAuditingPolicyListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExtendedServerBlobAuditingPolicyListResult.java index 5c506cd5a6be..1984cf70522a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ExtendedServerBlobAuditingPolicyListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExtendedServerBlobAuditingPolicyListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a ExtendedServerBlobAuditingPolicy list operation. + * A list of server extended auditing settings. */ @Immutable public final class ExtendedServerBlobAuditingPolicyListResult implements JsonSerializable { /* - * The ExtendedServerBlobAuditingPolicy items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ExtendedServerBlobAuditingPolicyListResult class. */ - private ExtendedServerBlobAuditingPolicyListResult() { + public ExtendedServerBlobAuditingPolicyListResult() { } /** - * Get the value property: The ExtendedServerBlobAuditingPolicy items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ExtendedServerBlobAuditingPolicyListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ExtendedServerBlobAuditingPolicyListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ExtendedServerBlobAuditingPolicyListResult 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 ExtendedServerBlobAuditingPolicyListResult. */ public static ExtendedServerBlobAuditingPolicyListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExternalGovernanceStatus.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExternalGovernanceStatus.java deleted file mode 100644 index 229ecf660c4d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ExternalGovernanceStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Status of external governance. - */ -public final class ExternalGovernanceStatus extends ExpandableStringEnum { - /** - * Enabled. - */ - public static final ExternalGovernanceStatus ENABLED = fromString("Enabled"); - - /** - * Disabled. - */ - public static final ExternalGovernanceStatus DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of ExternalGovernanceStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ExternalGovernanceStatus() { - } - - /** - * Creates or finds a ExternalGovernanceStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ExternalGovernanceStatus. - */ - public static ExternalGovernanceStatus fromString(String name) { - return fromString(name, ExternalGovernanceStatus.class); - } - - /** - * Gets known ExternalGovernanceStatus values. - * - * @return known ExternalGovernanceStatus values. - */ - public static Collection values() { - return values(ExternalGovernanceStatus.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupDatabasesSecondaryType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupDatabasesSecondaryType.java deleted file mode 100644 index e4bfa596261d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupDatabasesSecondaryType.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Databases secondary type on partner server. - */ -public final class FailoverGroupDatabasesSecondaryType - extends ExpandableStringEnum { - /** - * Geo. - */ - public static final FailoverGroupDatabasesSecondaryType GEO = fromString("Geo"); - - /** - * Standby. - */ - public static final FailoverGroupDatabasesSecondaryType STANDBY = fromString("Standby"); - - /** - * Creates a new instance of FailoverGroupDatabasesSecondaryType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public FailoverGroupDatabasesSecondaryType() { - } - - /** - * Creates or finds a FailoverGroupDatabasesSecondaryType from its string representation. - * - * @param name a name to look for. - * @return the corresponding FailoverGroupDatabasesSecondaryType. - */ - public static FailoverGroupDatabasesSecondaryType fromString(String name) { - return fromString(name, FailoverGroupDatabasesSecondaryType.class); - } - - /** - * Gets known FailoverGroupDatabasesSecondaryType values. - * - * @return known FailoverGroupDatabasesSecondaryType values. - */ - public static Collection values() { - return values(FailoverGroupDatabasesSecondaryType.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/FailoverGroupListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/FailoverGroupListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupListResult.java index 8d66d3392934..77e1078c9f33 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/FailoverGroupListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a FailoverGroup list operation. + * A list of failover groups. */ @Immutable public final class FailoverGroupListResult implements JsonSerializable { /* - * The FailoverGroup items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of FailoverGroupListResult class. */ - private FailoverGroupListResult() { + public FailoverGroupListResult() { } /** - * Get the value property: The FailoverGroup items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model FailoverGroupListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(FailoverGroupListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of FailoverGroupListResult 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 FailoverGroupListResult. */ public static FailoverGroupListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReadOnlyEndpoint.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReadOnlyEndpoint.java index 862af9ba7b3f..80b8ab05369b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReadOnlyEndpoint.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReadOnlyEndpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -21,11 +21,6 @@ public final class FailoverGroupReadOnlyEndpoint implements JsonSerializable { /** - * Primary. + * Static value Primary for FailoverGroupReplicationRole. */ public static final FailoverGroupReplicationRole PRIMARY = fromString("Primary"); /** - * Secondary. + * Static value Secondary for FailoverGroupReplicationRole. */ public static final FailoverGroupReplicationRole SECONDARY = fromString("Secondary"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupUpdate.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupUpdate.java index 2a364dfe81cc..175ddff098a4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupUpdate.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -133,52 +133,6 @@ public FailoverGroupUpdate withDatabases(List databases) { return this; } - /** - * Get the partnerServers property: List of partner server information for the failover group. - * - * @return the partnerServers value. - */ - public List partnerServers() { - return this.innerProperties() == null ? null : this.innerProperties().partnerServers(); - } - - /** - * Set the partnerServers property: List of partner server information for the failover group. - * - * @param partnerServers the partnerServers value to set. - * @return the FailoverGroupUpdate object itself. - */ - public FailoverGroupUpdate withPartnerServers(List partnerServers) { - if (this.innerProperties() == null) { - this.innerProperties = new FailoverGroupUpdateProperties(); - } - this.innerProperties().withPartnerServers(partnerServers); - return this; - } - - /** - * Get the secondaryType property: Databases secondary type on partner server. - * - * @return the secondaryType value. - */ - public FailoverGroupDatabasesSecondaryType secondaryType() { - return this.innerProperties() == null ? null : this.innerProperties().secondaryType(); - } - - /** - * Set the secondaryType property: Databases secondary type on partner server. - * - * @param secondaryType the secondaryType value to set. - * @return the FailoverGroupUpdate object itself. - */ - public FailoverGroupUpdate withSecondaryType(FailoverGroupDatabasesSecondaryType secondaryType) { - if (this.innerProperties() == null) { - this.innerProperties = new FailoverGroupUpdateProperties(); - } - this.innerProperties().withSecondaryType(secondaryType); - return this; - } - /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverModeType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverModeType.java deleted file mode 100644 index 157928babb04..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverModeType.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The link failover mode - can be Manual if intended to be used for two-way failover with a supported SQL Server, or - * None for one-way failover to Azure. - */ -public final class FailoverModeType extends ExpandableStringEnum { - /** - * None. - */ - public static final FailoverModeType NONE = fromString("None"); - - /** - * Manual. - */ - public static final FailoverModeType MANUAL = fromString("Manual"); - - /** - * Creates a new instance of FailoverModeType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public FailoverModeType() { - } - - /** - * Creates or finds a FailoverModeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding FailoverModeType. - */ - public static FailoverModeType fromString(String name) { - return fromString(name, FailoverModeType.class); - } - - /** - * Gets known FailoverModeType values. - * - * @return known FailoverModeType values. - */ - public static Collection values() { - return values(FailoverModeType.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverType.java deleted file mode 100644 index 56733148dd94..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FailoverType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The failover type, can be ForcedAllowDataLoss or Planned. - */ -public final class FailoverType extends ExpandableStringEnum { - /** - * ForcedAllowDataLoss. - */ - public static final FailoverType FORCED_ALLOW_DATA_LOSS = fromString("ForcedAllowDataLoss"); - - /** - * Planned. - */ - public static final FailoverType PLANNED = fromString("Planned"); - - /** - * Creates a new instance of FailoverType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public FailoverType() { - } - - /** - * Creates or finds a FailoverType from its string representation. - * - * @param name a name to look for. - * @return the corresponding FailoverType. - */ - public static FailoverType fromString(String name) { - return fromString(name, FailoverType.class); - } - - /** - * Gets known FailoverType values. - * - * @return known FailoverType values. - */ - public static Collection values() { - return values(FailoverType.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FirewallRuleList.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FirewallRuleList.java index dfa372a73a51..e69cbb7e80f2 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FirewallRuleList.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FirewallRuleList.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/FirewallRuleListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FirewallRuleListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/FirewallRuleListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FirewallRuleListResult.java index ff55b45de611..7191f701c5ac 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/FirewallRuleListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FirewallRuleListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a FirewallRule list operation. + * The response to a list firewall rules request. */ @Immutable public final class FirewallRuleListResult implements JsonSerializable { /* - * The FirewallRule items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of FirewallRuleListResult class. */ - private FirewallRuleListResult() { + public FirewallRuleListResult() { } /** - * Get the value property: The FirewallRule items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model FirewallRuleListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(FirewallRuleListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the FirewallRuleListResult. */ public static FirewallRuleListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FreeLimitExhaustionBehavior.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FreeLimitExhaustionBehavior.java deleted file mode 100644 index 9ad0c808a8a1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FreeLimitExhaustionBehavior.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the behavior when monthly free limits are exhausted for the free database. - * - * AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. - * - * BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed. - */ -public final class FreeLimitExhaustionBehavior extends ExpandableStringEnum { - /** - * AutoPause. - */ - public static final FreeLimitExhaustionBehavior AUTO_PAUSE = fromString("AutoPause"); - - /** - * BillOverUsage. - */ - public static final FreeLimitExhaustionBehavior BILL_OVER_USAGE = fromString("BillOverUsage"); - - /** - * Creates a new instance of FreeLimitExhaustionBehavior value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public FreeLimitExhaustionBehavior() { - } - - /** - * Creates or finds a FreeLimitExhaustionBehavior from its string representation. - * - * @param name a name to look for. - * @return the corresponding FreeLimitExhaustionBehavior. - */ - public static FreeLimitExhaustionBehavior fromString(String name) { - return fromString(name, FreeLimitExhaustionBehavior.class); - } - - /** - * Gets known FreeLimitExhaustionBehavior values. - * - * @return known FreeLimitExhaustionBehavior values. - */ - public static Collection values() { - return values(FreeLimitExhaustionBehavior.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FreeLimitExhaustionBehaviorCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FreeLimitExhaustionBehaviorCapability.java deleted file mode 100644 index 166063d81550..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/FreeLimitExhaustionBehaviorCapability.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; - -/** - * Supported free limit exhaustion behavior options. - */ -@Immutable -public final class FreeLimitExhaustionBehaviorCapability - implements JsonSerializable { - /* - * Free limit exhaustion behavior type - */ - private FreeLimitExhaustionBehavior exhaustionBehaviorType; - - /* - * Free limit exhaustion behavior status - */ - private CapabilityStatus status; - - /** - * Creates an instance of FreeLimitExhaustionBehaviorCapability class. - */ - private FreeLimitExhaustionBehaviorCapability() { - } - - /** - * Get the exhaustionBehaviorType property: Free limit exhaustion behavior type. - * - * @return the exhaustionBehaviorType value. - */ - public FreeLimitExhaustionBehavior exhaustionBehaviorType() { - return this.exhaustionBehaviorType; - } - - /** - * Get the status property: Free limit exhaustion behavior status. - * - * @return the status value. - */ - public CapabilityStatus status() { - return this.status; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FreeLimitExhaustionBehaviorCapability from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FreeLimitExhaustionBehaviorCapability 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 FreeLimitExhaustionBehaviorCapability. - */ - public static FreeLimitExhaustionBehaviorCapability fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FreeLimitExhaustionBehaviorCapability deserializedFreeLimitExhaustionBehaviorCapability - = new FreeLimitExhaustionBehaviorCapability(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("exhaustionBehaviorType".equals(fieldName)) { - deserializedFreeLimitExhaustionBehaviorCapability.exhaustionBehaviorType - = FreeLimitExhaustionBehavior.fromString(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedFreeLimitExhaustionBehaviorCapability.status - = CapabilityStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedFreeLimitExhaustionBehaviorCapability; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/GeoBackupPolicyListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/GeoBackupPolicyListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyListResult.java index 84d89f356427..5c165a15708f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/GeoBackupPolicyListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a GeoBackupPolicy list operation. + * The list of geo backup policies. */ @Immutable public final class GeoBackupPolicyListResult implements JsonSerializable { /* - * The GeoBackupPolicy items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of GeoBackupPolicyListResult class. */ - private GeoBackupPolicyListResult() { + public GeoBackupPolicyListResult() { } /** - * Get the value property: The GeoBackupPolicy items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property value in model GeoBackupPolicyListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(GeoBackupPolicyListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of GeoBackupPolicyListResult 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 GeoBackupPolicyListResult. */ public static GeoBackupPolicyListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyName.java index c7faf70480e0..2ed0db59642a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class GeoBackupPolicyName extends ExpandableStringEnum { /** - * Default. + * Static value Default for GeoBackupPolicyName. */ public static final GeoBackupPolicyName DEFAULT = fromString("Default"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyState.java index 23b6fcb0d018..aa9f74657fa1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,12 +9,12 @@ */ public enum GeoBackupPolicyState { /** - * Enabled. + * Enum value Enabled. */ ENABLED("Enabled"), /** - * Disabled. + * Enum value Disabled. */ DISABLED("Disabled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/HybridSecondaryUsage.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/HybridSecondaryUsage.java deleted file mode 100644 index 9771f15da2e0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/HybridSecondaryUsage.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Hybrid secondary usage. Possible values are 'Active' (default value) and 'Passive' (customer uses the secondary as - * Passive DR). - */ -public final class HybridSecondaryUsage extends ExpandableStringEnum { - /** - * Active. - */ - public static final HybridSecondaryUsage ACTIVE = fromString("Active"); - - /** - * Passive. - */ - public static final HybridSecondaryUsage PASSIVE = fromString("Passive"); - - /** - * Creates a new instance of HybridSecondaryUsage value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public HybridSecondaryUsage() { - } - - /** - * Creates or finds a HybridSecondaryUsage from its string representation. - * - * @param name a name to look for. - * @return the corresponding HybridSecondaryUsage. - */ - public static HybridSecondaryUsage fromString(String name) { - return fromString(name, HybridSecondaryUsage.class); - } - - /** - * Gets known HybridSecondaryUsage values. - * - * @return known HybridSecondaryUsage values. - */ - public static Collection values() { - return values(HybridSecondaryUsage.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/HybridSecondaryUsageDetected.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/HybridSecondaryUsageDetected.java deleted file mode 100644 index 002d1d624d3e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/HybridSecondaryUsageDetected.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Hybrid secondary usage detected. Possible values are 'Active' (customer does not meet the requirements to use the - * secondary as Passive DR) and 'Passive' (customer meets the requirements to use the secondary as Passive DR). - */ -public final class HybridSecondaryUsageDetected extends ExpandableStringEnum { - /** - * Active. - */ - public static final HybridSecondaryUsageDetected ACTIVE = fromString("Active"); - - /** - * Passive. - */ - public static final HybridSecondaryUsageDetected PASSIVE = fromString("Passive"); - - /** - * Creates a new instance of HybridSecondaryUsageDetected value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public HybridSecondaryUsageDetected() { - } - - /** - * Creates or finds a HybridSecondaryUsageDetected from its string representation. - * - * @param name a name to look for. - * @return the corresponding HybridSecondaryUsageDetected. - */ - public static HybridSecondaryUsageDetected fromString(String name) { - return fromString(name, HybridSecondaryUsageDetected.class); - } - - /** - * Gets known HybridSecondaryUsageDetected values. - * - * @return known HybridSecondaryUsageDetected values. - */ - public static Collection values() { - return values(HybridSecondaryUsageDetected.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/IPv6FirewallRuleListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IPv6FirewallRuleListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/IPv6FirewallRuleListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IPv6FirewallRuleListResult.java index 6aa5cc072d17..96a3fd7b0acd 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/IPv6FirewallRuleListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IPv6FirewallRuleListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a IPv6FirewallRule list operation. + * The response to a list IPv6 firewall rules request. */ @Immutable public final class IPv6FirewallRuleListResult implements JsonSerializable { /* - * The IPv6FirewallRule items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of IPv6FirewallRuleListResult class. */ - private IPv6FirewallRuleListResult() { + public IPv6FirewallRuleListResult() { } /** - * Get the value property: The IPv6FirewallRule items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model IPv6FirewallRuleListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(IPv6FirewallRuleListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of IPv6FirewallRuleListResult 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 IPv6FirewallRuleListResult. */ public static IPv6FirewallRuleListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IdentityType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IdentityType.java index a48273083420..b18fa8736c7c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IdentityType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -13,22 +13,22 @@ */ public final class IdentityType extends ExpandableStringEnum { /** - * None. + * Static value None for IdentityType. */ public static final IdentityType NONE = fromString("None"); /** - * SystemAssigned. + * Static value SystemAssigned for IdentityType. */ public static final IdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * UserAssigned. + * Static value UserAssigned for IdentityType. */ public static final IdentityType USER_ASSIGNED = fromString("UserAssigned"); /** - * SystemAssigned,UserAssigned. + * Static value SystemAssigned,UserAssigned for IdentityType. */ public static final IdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = fromString("SystemAssigned,UserAssigned"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImplementationMethod.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImplementationMethod.java index 0381eeab66bb..a17617e277e6 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImplementationMethod.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImplementationMethod.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,12 +9,12 @@ */ public enum ImplementationMethod { /** - * TSql. + * Enum value TSql. */ TSQL("TSql"), /** - * AzurePowerShell. + * Enum value AzurePowerShell. */ AZURE_POWER_SHELL("AzurePowerShell"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportExistingDatabaseDefinition.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportExistingDatabaseDefinition.java index 421e736292a7..fc7797bb929f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportExistingDatabaseDefinition.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportExistingDatabaseDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -18,13 +18,12 @@ @Fluent public final class ImportExistingDatabaseDefinition implements JsonSerializable { /* - * Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity. + * Storage key type. */ private StorageKeyType storageKeyType; /* - * Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed - * Identity's resource ID. + * Storage key. */ private String storageKey; @@ -34,18 +33,17 @@ public final class ImportExistingDatabaseDefinition implements JsonSerializable< private String storageUri; /* - * Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed - * Identity's resource ID. + * Administrator login name. */ private String administratorLogin; /* - * Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified. + * Administrator login password. */ private String administratorLoginPassword; /* - * Type of credentials provided for access to the target SQL server: SQL, ADPassword or ManagedIdentity. + * Authentication type. */ private String authenticationType; @@ -61,7 +59,7 @@ public ImportExistingDatabaseDefinition() { } /** - * Get the storageKeyType property: Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity. + * Get the storageKeyType property: Storage key type. * * @return the storageKeyType value. */ @@ -70,7 +68,7 @@ public StorageKeyType storageKeyType() { } /** - * Set the storageKeyType property: Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity. + * Set the storageKeyType property: Storage key type. * * @param storageKeyType the storageKeyType value to set. * @return the ImportExistingDatabaseDefinition object itself. @@ -81,8 +79,7 @@ public ImportExistingDatabaseDefinition withStorageKeyType(StorageKeyType storag } /** - * Get the storageKey property: Storage key for the storage account. If StorageKeyType is ManagedIdentity, this - * field should specify the Managed Identity's resource ID. + * Get the storageKey property: Storage key. * * @return the storageKey value. */ @@ -91,8 +88,7 @@ public String storageKey() { } /** - * Set the storageKey property: Storage key for the storage account. If StorageKeyType is ManagedIdentity, this - * field should specify the Managed Identity's resource ID. + * Set the storageKey property: Storage key. * * @param storageKey the storageKey value to set. * @return the ImportExistingDatabaseDefinition object itself. @@ -123,8 +119,7 @@ public ImportExistingDatabaseDefinition withStorageUri(String storageUri) { } /** - * Get the administratorLogin property: Administrator login name. If AuthenticationType is ManagedIdentity, this - * field should specify the Managed Identity's resource ID. + * Get the administratorLogin property: Administrator login name. * * @return the administratorLogin value. */ @@ -133,8 +128,7 @@ public String administratorLogin() { } /** - * Set the administratorLogin property: Administrator login name. If AuthenticationType is ManagedIdentity, this - * field should specify the Managed Identity's resource ID. + * Set the administratorLogin property: Administrator login name. * * @param administratorLogin the administratorLogin value to set. * @return the ImportExistingDatabaseDefinition object itself. @@ -145,8 +139,7 @@ public ImportExistingDatabaseDefinition withAdministratorLogin(String administra } /** - * Get the administratorLoginPassword property: Administrator login password. If AuthenticationType is - * ManagedIdentity, this field should not be specified. + * Get the administratorLoginPassword property: Administrator login password. * * @return the administratorLoginPassword value. */ @@ -155,8 +148,7 @@ public String administratorLoginPassword() { } /** - * Set the administratorLoginPassword property: Administrator login password. If AuthenticationType is - * ManagedIdentity, this field should not be specified. + * Set the administratorLoginPassword property: Administrator login password. * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ImportExistingDatabaseDefinition object itself. @@ -167,8 +159,7 @@ public ImportExistingDatabaseDefinition withAdministratorLoginPassword(String ad } /** - * Get the authenticationType property: Type of credentials provided for access to the target SQL server: SQL, - * ADPassword or ManagedIdentity. + * Get the authenticationType property: Authentication type. * * @return the authenticationType value. */ @@ -177,8 +168,7 @@ public String authenticationType() { } /** - * Set the authenticationType property: Type of credentials provided for access to the target SQL server: SQL, - * ADPassword or ManagedIdentity. + * Set the authenticationType property: Authentication type. * * @param authenticationType the authenticationType value to set. * @return the ImportExistingDatabaseDefinition object itself. @@ -234,6 +224,11 @@ public void validate() { .log(new IllegalArgumentException( "Missing required property administratorLogin in model ImportExistingDatabaseDefinition")); } + if (administratorLoginPassword() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property administratorLoginPassword in model ImportExistingDatabaseDefinition")); + } if (networkIsolation() != null) { networkIsolation().validate(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ImportExportExtensionsOperationListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportExportExtensionsOperationListResult.java similarity index 95% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ImportExportExtensionsOperationListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportExportExtensionsOperationListResult.java index 95a51e4f92a7..c27f19095820 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ImportExportExtensionsOperationListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportExportExtensionsOperationListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -32,7 +32,7 @@ public final class ImportExportExtensionsOperationListResult /** * Creates an instance of ImportExportExtensionsOperationListResult class. */ - private ImportExportExtensionsOperationListResult() { + public ImportExportExtensionsOperationListResult() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportNewDatabaseDefinition.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportNewDatabaseDefinition.java index 461c034024be..d29fb5f0ea70 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportNewDatabaseDefinition.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ImportNewDatabaseDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -38,13 +38,12 @@ public final class ImportNewDatabaseDefinition implements JsonSerializable { - /** - * Unknown. - */ - public static final InaccessibilityReason UNKNOWN = fromString("Unknown"); - - /** - * TransparentDataEncryption. - */ - public static final InaccessibilityReason TRANSPARENT_DATA_ENCRYPTION = fromString("TransparentDataEncryption"); - - /** - * DatabaseReplication. - */ - public static final InaccessibilityReason DATABASE_REPLICATION = fromString("DatabaseReplication"); - - /** - * Creates a new instance of InaccessibilityReason value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public InaccessibilityReason() { - } - - /** - * Creates or finds a InaccessibilityReason from its string representation. - * - * @param name a name to look for. - * @return the corresponding InaccessibilityReason. - */ - public static InaccessibilityReason fromString(String name) { - return fromString(name, InaccessibilityReason.class); - } - - /** - * Gets known InaccessibilityReason values. - * - * @return known InaccessibilityReason values. - */ - public static Collection values() { - return values(InaccessibilityReason.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/InstanceFailoverGroupListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/InstanceFailoverGroupListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupListResult.java index 65c592797b4f..750f5d7474b9 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/InstanceFailoverGroupListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a InstanceFailoverGroup list operation. + * A list of instance failover groups. */ @Immutable public final class InstanceFailoverGroupListResult implements JsonSerializable { /* - * The InstanceFailoverGroup items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of InstanceFailoverGroupListResult class. */ - private InstanceFailoverGroupListResult() { + public InstanceFailoverGroupListResult() { } /** - * Get the value property: The InstanceFailoverGroup items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model InstanceFailoverGroupListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(InstanceFailoverGroupListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of InstanceFailoverGroupListResult 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 InstanceFailoverGroupListResult. */ public static InstanceFailoverGroupListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadOnlyEndpoint.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadOnlyEndpoint.java index b8aa47878d51..381d239c7b55 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadOnlyEndpoint.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadOnlyEndpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadWriteEndpoint.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadWriteEndpoint.java index af423d73c9cf..950d823acc90 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadWriteEndpoint.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadWriteEndpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReplicationRole.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReplicationRole.java index 058fc058ee67..b9f6909a2a05 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReplicationRole.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReplicationRole.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -13,12 +13,12 @@ public final class InstanceFailoverGroupReplicationRole extends ExpandableStringEnum { /** - * Primary. + * Static value Primary for InstanceFailoverGroupReplicationRole. */ public static final InstanceFailoverGroupReplicationRole PRIMARY = fromString("Primary"); /** - * Secondary. + * Static value Secondary for InstanceFailoverGroupReplicationRole. */ public static final InstanceFailoverGroupReplicationRole SECONDARY = fromString("Secondary"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolEditionCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolEditionCapability.java index c06d0080e654..bd13531a80d8 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolEditionCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolEditionCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -15,7 +15,7 @@ /** * The instance pool capability. */ -@Immutable +@Fluent public final class InstancePoolEditionCapability implements JsonSerializable { /* * The instance pool version name. @@ -40,7 +40,7 @@ public final class InstancePoolEditionCapability implements JsonSerializable { /* * Family name. @@ -45,7 +45,7 @@ public final class InstancePoolFamilyCapability implements JsonSerializable { /** - * LicenseIncluded. + * Static value LicenseIncluded for InstancePoolLicenseType. */ public static final InstancePoolLicenseType LICENSE_INCLUDED = fromString("LicenseIncluded"); /** - * BasePrice. + * Static value BasePrice for InstancePoolLicenseType. */ public static final InstancePoolLicenseType BASE_PRICE = fromString("BasePrice"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/InstancePoolListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/InstancePoolListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolListResult.java index c7de646fc7a7..c71936c07011 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/InstancePoolListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a InstancePool list operation. + * A list of Azure SQL instance pools. */ @Immutable public final class InstancePoolListResult implements JsonSerializable { /* - * The InstancePool items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of InstancePoolListResult class. */ - private InstancePoolListResult() { + public InstancePoolListResult() { } /** - * Get the value property: The InstancePool items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model InstancePoolListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(InstancePoolListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of InstancePoolListResult 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 InstancePoolListResult. */ public static InstancePoolListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolUpdate.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolUpdate.java index 3f62a0e4c28f..0f98a4544535 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolUpdate.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,7 +9,6 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.sql.fluent.models.InstancePoolProperties; import java.io.IOException; import java.util.Map; @@ -18,16 +17,6 @@ */ @Fluent public final class InstancePoolUpdate implements JsonSerializable { - /* - * The name and tier of the SKU. - */ - private Sku sku; - - /* - * Resource properties. - */ - private InstancePoolProperties innerProperties; - /* * Resource tags. */ @@ -39,35 +28,6 @@ public final class InstancePoolUpdate implements JsonSerializable tags) { return this; } - /** - * Get the subnetId property: Resource ID of the subnet to place this instance pool in. - * - * @return the subnetId value. - */ - public String subnetId() { - return this.innerProperties() == null ? null : this.innerProperties().subnetId(); - } - - /** - * Set the subnetId property: Resource ID of the subnet to place this instance pool in. - * - * @param subnetId the subnetId value to set. - * @return the InstancePoolUpdate object itself. - */ - public InstancePoolUpdate withSubnetId(String subnetId) { - if (this.innerProperties() == null) { - this.innerProperties = new InstancePoolProperties(); - } - this.innerProperties().withSubnetId(subnetId); - return this; - } - - /** - * Get the vCores property: Count of vCores belonging to this instance pool. - * - * @return the vCores value. - */ - public Integer vCores() { - return this.innerProperties() == null ? null : this.innerProperties().vCores(); - } - - /** - * Set the vCores property: Count of vCores belonging to this instance pool. - * - * @param vCores the vCores value to set. - * @return the InstancePoolUpdate object itself. - */ - public InstancePoolUpdate withVCores(Integer vCores) { - if (this.innerProperties() == null) { - this.innerProperties = new InstancePoolProperties(); - } - this.innerProperties().withVCores(vCores); - return this; - } - - /** - * Get the licenseType property: The license type. Possible values are 'LicenseIncluded' (price for SQL license is - * included) and 'BasePrice' (without SQL license price). - * - * @return the licenseType value. - */ - public InstancePoolLicenseType licenseType() { - return this.innerProperties() == null ? null : this.innerProperties().licenseType(); - } - - /** - * Set the licenseType property: The license type. Possible values are 'LicenseIncluded' (price for SQL license is - * included) and 'BasePrice' (without SQL license price). - * - * @param licenseType the licenseType value to set. - * @return the InstancePoolUpdate object itself. - */ - public InstancePoolUpdate withLicenseType(InstancePoolLicenseType licenseType) { - if (this.innerProperties() == null) { - this.innerProperties = new InstancePoolProperties(); - } - this.innerProperties().withLicenseType(licenseType); - return this; - } - - /** - * Get the dnsZone property: The Dns Zone that the managed instance pool is in. - * - * @return the dnsZone value. - */ - public String dnsZone() { - return this.innerProperties() == null ? null : this.innerProperties().dnsZone(); - } - - /** - * Get the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this managed - * instance. - * - * @return the maintenanceConfigurationId value. - */ - public String maintenanceConfigurationId() { - return this.innerProperties() == null ? null : this.innerProperties().maintenanceConfigurationId(); - } - - /** - * Set the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this managed - * instance. - * - * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. - * @return the InstancePoolUpdate object itself. - */ - public InstancePoolUpdate withMaintenanceConfigurationId(String maintenanceConfigurationId) { - if (this.innerProperties() == null) { - this.innerProperties = new InstancePoolProperties(); - } - this.innerProperties().withMaintenanceConfigurationId(maintenanceConfigurationId); - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (sku() != null) { - sku().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } } /** @@ -213,8 +62,6 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("sku", this.sku); - jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -234,11 +81,7 @@ public static InstancePoolUpdate fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("sku".equals(fieldName)) { - deserializedInstancePoolUpdate.sku = Sku.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedInstancePoolUpdate.innerProperties = InstancePoolProperties.fromJson(reader); - } else if ("tags".equals(fieldName)) { + if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedInstancePoolUpdate.tags = tags; } else { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolVcoresCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolVcoresCapability.java index 9298ab7f316e..5e2f947c2eac 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolVcoresCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/InstancePoolVcoresCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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,7 +14,7 @@ /** * The managed instance virtual cores capability. */ -@Immutable +@Fluent public final class InstancePoolVcoresCapability implements JsonSerializable { /* * The virtual cores identifier. @@ -44,7 +44,7 @@ public final class InstancePoolVcoresCapability implements JsonSerializable { - /** - * Primary. - */ - public static final InstanceRole PRIMARY = fromString("Primary"); - - /** - * Secondary. - */ - public static final InstanceRole SECONDARY = fromString("Secondary"); - - /** - * Creates a new instance of InstanceRole value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public InstanceRole() { - } - - /** - * Creates or finds a InstanceRole from its string representation. - * - * @param name a name to look for. - * @return the corresponding InstanceRole. - */ - public static InstanceRole fromString(String name) { - return fromString(name, InstanceRole.class); - } - - /** - * Gets known InstanceRole values. - * - * @return known InstanceRole values. - */ - public static Collection values() { - return values(InstanceRole.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IsRetryable.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IsRetryable.java index 98896b923542..0849a0d246b2 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IsRetryable.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/IsRetryable.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,12 +9,12 @@ */ public enum IsRetryable { /** - * Yes. + * Enum value Yes. */ YES("Yes"), /** - * No. + * Enum value No. */ NO("No"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentEditionCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentEditionCapability.java deleted file mode 100644 index 8941c0d53d19..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentEditionCapability.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; -import java.util.List; - -/** - * The job agent edition capability. - */ -@Immutable -public final class JobAgentEditionCapability implements JsonSerializable { - /* - * The job agent edition name. - */ - private String name; - - /* - * The list of supported service level objectives for the edition. - */ - private List supportedServiceLevelObjectives; - - /* - * The status of the capability. - */ - private CapabilityStatus status; - - /* - * The reason for the capability not being available. - */ - private String reason; - - /** - * Creates an instance of JobAgentEditionCapability class. - */ - private JobAgentEditionCapability() { - } - - /** - * Get the name property: The job agent edition name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the supportedServiceLevelObjectives property: The list of supported service level objectives for the edition. - * - * @return the supportedServiceLevelObjectives value. - */ - public List supportedServiceLevelObjectives() { - return this.supportedServiceLevelObjectives; - } - - /** - * Get the status property: The status of the capability. - * - * @return the status value. - */ - public CapabilityStatus status() { - return this.status; - } - - /** - * Get the reason property: The reason for the capability not being available. - * - * @return the reason value. - */ - public String reason() { - return this.reason; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (supportedServiceLevelObjectives() != null) { - supportedServiceLevelObjectives().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("reason", this.reason); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobAgentEditionCapability from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobAgentEditionCapability 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 JobAgentEditionCapability. - */ - public static JobAgentEditionCapability fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobAgentEditionCapability deserializedJobAgentEditionCapability = new JobAgentEditionCapability(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedJobAgentEditionCapability.name = reader.getString(); - } else if ("supportedServiceLevelObjectives".equals(fieldName)) { - List supportedServiceLevelObjectives - = reader.readArray(reader1 -> JobAgentServiceLevelObjectiveCapability.fromJson(reader1)); - deserializedJobAgentEditionCapability.supportedServiceLevelObjectives - = supportedServiceLevelObjectives; - } else if ("status".equals(fieldName)) { - deserializedJobAgentEditionCapability.status = CapabilityStatus.fromString(reader.getString()); - } else if ("reason".equals(fieldName)) { - deserializedJobAgentEditionCapability.reason = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobAgentEditionCapability; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentIdentity.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentIdentity.java deleted file mode 100644 index a08d91812d19..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentIdentity.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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; -import java.util.Map; -import java.util.Objects; -import java.util.UUID; - -/** - * Azure Active Directory identity configuration for a resource. - */ -@Fluent -public final class JobAgentIdentity implements JsonSerializable { - /* - * The job agent identity tenant id - */ - private UUID tenantId; - - /* - * The job agent identity type - */ - private JobAgentIdentityType type; - - /* - * The resource ids of the user assigned identities to use - */ - private Map userAssignedIdentities; - - /** - * Creates an instance of JobAgentIdentity class. - */ - public JobAgentIdentity() { - } - - /** - * Get the tenantId property: The job agent identity tenant id. - * - * @return the tenantId value. - */ - public UUID tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: The job agent identity tenant id. - * - * @param tenantId the tenantId value to set. - * @return the JobAgentIdentity object itself. - */ - public JobAgentIdentity withTenantId(UUID tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the type property: The job agent identity type. - * - * @return the type value. - */ - public JobAgentIdentityType type() { - return this.type; - } - - /** - * Set the type property: The job agent identity type. - * - * @param type the type value to set. - * @return the JobAgentIdentity object itself. - */ - public JobAgentIdentity withType(JobAgentIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: The resource ids of the user assigned identities to use. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The resource ids of the user assigned identities to use. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the JobAgentIdentity object itself. - */ - public JobAgentIdentity - withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property type in model JobAgentIdentity")); - } - if (userAssignedIdentities() != null) { - userAssignedIdentities().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JobAgentIdentity.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); - jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobAgentIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobAgentIdentity 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 JobAgentIdentity. - */ - public static JobAgentIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobAgentIdentity deserializedJobAgentIdentity = new JobAgentIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedJobAgentIdentity.type = JobAgentIdentityType.fromString(reader.getString()); - } else if ("tenantId".equals(fieldName)) { - deserializedJobAgentIdentity.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities - = reader.readMap(reader1 -> JobAgentUserAssignedIdentity.fromJson(reader1)); - deserializedJobAgentIdentity.userAssignedIdentities = userAssignedIdentities; - } else { - reader.skipChildren(); - } - } - - return deserializedJobAgentIdentity; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentIdentityType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentIdentityType.java deleted file mode 100644 index a954ddfe62af..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentIdentityType.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The job agent identity type. - */ -public final class JobAgentIdentityType extends ExpandableStringEnum { - /** - * None. - */ - public static final JobAgentIdentityType NONE = fromString("None"); - - /** - * SystemAssigned. - */ - public static final JobAgentIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** - * UserAssigned. - */ - public static final JobAgentIdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** - * SystemAssignedUserAssigned. - */ - public static final JobAgentIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = fromString("SystemAssignedUserAssigned"); - - /** - * Creates a new instance of JobAgentIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobAgentIdentityType() { - } - - /** - * Creates or finds a JobAgentIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobAgentIdentityType. - */ - public static JobAgentIdentityType fromString(String name) { - return fromString(name, JobAgentIdentityType.class); - } - - /** - * Gets known JobAgentIdentityType values. - * - * @return known JobAgentIdentityType values. - */ - public static Collection values() { - return values(JobAgentIdentityType.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobAgentListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobAgentListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentListResult.java index 0c1d6664c68e..1634ba41c19d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobAgentListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a JobAgent list operation. + * A list of Azure SQL job agents. */ @Immutable public final class JobAgentListResult implements JsonSerializable { /* - * The JobAgent items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of JobAgentListResult class. */ - private JobAgentListResult() { + public JobAgentListResult() { } /** - * Get the value property: The JobAgent items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model JobAgentListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(JobAgentListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of JobAgentListResult 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 JobAgentListResult. */ public static JobAgentListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentServiceLevelObjectiveCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentServiceLevelObjectiveCapability.java deleted file mode 100644 index 564899c7037d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentServiceLevelObjectiveCapability.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; - -/** - * The job agent service level objective capability. - */ -@Immutable -public final class JobAgentServiceLevelObjectiveCapability - implements JsonSerializable { - /* - * The service objective name. - */ - private String name; - - /* - * The sku. - */ - private Sku sku; - - /* - * The status of the capability. - */ - private CapabilityStatus status; - - /* - * The reason for the capability not being available. - */ - private String reason; - - /** - * Creates an instance of JobAgentServiceLevelObjectiveCapability class. - */ - private JobAgentServiceLevelObjectiveCapability() { - } - - /** - * Get the name property: The service objective name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the sku property: The sku. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Get the status property: The status of the capability. - * - * @return the status value. - */ - public CapabilityStatus status() { - return this.status; - } - - /** - * Get the reason property: The reason for the capability not being available. - * - * @return the reason value. - */ - public String reason() { - return this.reason; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("reason", this.reason); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobAgentServiceLevelObjectiveCapability from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobAgentServiceLevelObjectiveCapability 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 JobAgentServiceLevelObjectiveCapability. - */ - public static JobAgentServiceLevelObjectiveCapability fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobAgentServiceLevelObjectiveCapability deserializedJobAgentServiceLevelObjectiveCapability - = new JobAgentServiceLevelObjectiveCapability(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedJobAgentServiceLevelObjectiveCapability.name = reader.getString(); - } else if ("sku".equals(fieldName)) { - deserializedJobAgentServiceLevelObjectiveCapability.sku = Sku.fromJson(reader); - } else if ("status".equals(fieldName)) { - deserializedJobAgentServiceLevelObjectiveCapability.status - = CapabilityStatus.fromString(reader.getString()); - } else if ("reason".equals(fieldName)) { - deserializedJobAgentServiceLevelObjectiveCapability.reason = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobAgentServiceLevelObjectiveCapability; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentState.java index c06d23fdc3f2..aabb8b51bb11 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,27 +12,27 @@ */ public final class JobAgentState extends ExpandableStringEnum { /** - * Creating. + * Static value Creating for JobAgentState. */ public static final JobAgentState CREATING = fromString("Creating"); /** - * Ready. + * Static value Ready for JobAgentState. */ public static final JobAgentState READY = fromString("Ready"); /** - * Updating. + * Static value Updating for JobAgentState. */ public static final JobAgentState UPDATING = fromString("Updating"); /** - * Deleting. + * Static value Deleting for JobAgentState. */ public static final JobAgentState DELETING = fromString("Deleting"); /** - * Disabled. + * Static value Disabled for JobAgentState. */ public static final JobAgentState DISABLED = fromString("Disabled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentUpdate.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentUpdate.java index 1e0112c0428b..8603d35635aa 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentUpdate.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -17,16 +17,6 @@ */ @Fluent public final class JobAgentUpdate implements JsonSerializable { - /* - * Managed identity assigned to job agent - */ - private JobAgentIdentity identity; - - /* - * The name and tier of the SKU. - */ - private Sku sku; - /* * Resource tags. */ @@ -38,46 +28,6 @@ public final class JobAgentUpdate implements JsonSerializable { public JobAgentUpdate() { } - /** - * Get the identity property: Managed identity assigned to job agent. - * - * @return the identity value. - */ - public JobAgentIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed identity assigned to job agent. - * - * @param identity the identity value to set. - * @return the JobAgentUpdate object itself. - */ - public JobAgentUpdate withIdentity(JobAgentIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the sku property: The name and tier of the SKU. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The name and tier of the SKU. - * - * @param sku the sku value to set. - * @return the JobAgentUpdate object itself. - */ - public JobAgentUpdate withSku(Sku sku) { - this.sku = sku; - return this; - } - /** * Get the tags property: Resource tags. * @@ -104,12 +54,6 @@ public JobAgentUpdate withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } } /** @@ -118,8 +62,6 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeJsonField("sku", this.sku); jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -139,11 +81,7 @@ public static JobAgentUpdate fromJson(JsonReader jsonReader) throws IOException String fieldName = reader.getFieldName(); reader.nextToken(); - if ("identity".equals(fieldName)) { - deserializedJobAgentUpdate.identity = JobAgentIdentity.fromJson(reader); - } else if ("sku".equals(fieldName)) { - deserializedJobAgentUpdate.sku = Sku.fromJson(reader); - } else if ("tags".equals(fieldName)) { + if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedJobAgentUpdate.tags = tags; } else { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentUserAssignedIdentity.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentUserAssignedIdentity.java deleted file mode 100644 index 55c5b410f4db..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentUserAssignedIdentity.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; -import java.util.UUID; - -/** - * Azure Active Directory identity configuration for a resource. - */ -@Immutable -public final class JobAgentUserAssignedIdentity implements JsonSerializable { - /* - * The Azure Active Directory principal id. - */ - private UUID principalId; - - /* - * The Azure Active Directory client id. - */ - private UUID clientId; - - /** - * Creates an instance of JobAgentUserAssignedIdentity class. - */ - public JobAgentUserAssignedIdentity() { - } - - /** - * Get the principalId property: The Azure Active Directory principal id. - * - * @return the principalId value. - */ - public UUID principalId() { - return this.principalId; - } - - /** - * Get the clientId property: The Azure Active Directory client id. - * - * @return the clientId value. - */ - public UUID clientId() { - return this.clientId; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobAgentUserAssignedIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobAgentUserAssignedIdentity 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 JobAgentUserAssignedIdentity. - */ - public static JobAgentUserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobAgentUserAssignedIdentity deserializedJobAgentUserAssignedIdentity = new JobAgentUserAssignedIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalId".equals(fieldName)) { - deserializedJobAgentUserAssignedIdentity.principalId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("clientId".equals(fieldName)) { - deserializedJobAgentUserAssignedIdentity.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedJobAgentUserAssignedIdentity; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentVersionCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentVersionCapability.java deleted file mode 100644 index 6c7e144e6090..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobAgentVersionCapability.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; -import java.util.List; - -/** - * The job agent version capability. - */ -@Immutable -public final class JobAgentVersionCapability implements JsonSerializable { - /* - * The job agent version name. - */ - private String name; - - /* - * The list of supported editions. - */ - private List supportedEditions; - - /* - * The status of the capability. - */ - private CapabilityStatus status; - - /* - * The reason for the capability not being available. - */ - private String reason; - - /** - * Creates an instance of JobAgentVersionCapability class. - */ - private JobAgentVersionCapability() { - } - - /** - * Get the name property: The job agent version name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the supportedEditions property: The list of supported editions. - * - * @return the supportedEditions value. - */ - public List supportedEditions() { - return this.supportedEditions; - } - - /** - * Get the status property: The status of the capability. - * - * @return the status value. - */ - public CapabilityStatus status() { - return this.status; - } - - /** - * Get the reason property: The reason for the capability not being available. - * - * @return the reason value. - */ - public String reason() { - return this.reason; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (supportedEditions() != null) { - supportedEditions().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("reason", this.reason); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobAgentVersionCapability from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobAgentVersionCapability 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 JobAgentVersionCapability. - */ - public static JobAgentVersionCapability fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobAgentVersionCapability deserializedJobAgentVersionCapability = new JobAgentVersionCapability(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedJobAgentVersionCapability.name = reader.getString(); - } else if ("supportedEditions".equals(fieldName)) { - List supportedEditions - = reader.readArray(reader1 -> JobAgentEditionCapability.fromJson(reader1)); - deserializedJobAgentVersionCapability.supportedEditions = supportedEditions; - } else if ("status".equals(fieldName)) { - deserializedJobAgentVersionCapability.status = CapabilityStatus.fromString(reader.getString()); - } else if ("reason".equals(fieldName)) { - deserializedJobAgentVersionCapability.reason = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobAgentVersionCapability; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobCredentialListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobCredentialListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobCredentialListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobCredentialListResult.java index 827d1095b407..3154354b0cc3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobCredentialListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobCredentialListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a JobCredential list operation. + * A list of job credentials. */ @Immutable public final class JobCredentialListResult implements JsonSerializable { /* - * The JobCredential items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of JobCredentialListResult class. */ - private JobCredentialListResult() { + public JobCredentialListResult() { } /** - * Get the value property: The JobCredential items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model JobCredentialListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(JobCredentialListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of JobCredentialListResult 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 JobCredentialListResult. */ public static JobCredentialListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionLifecycle.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionLifecycle.java index 098747bda8ca..c1c556bbb3f7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionLifecycle.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionLifecycle.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,53 +12,53 @@ */ public final class JobExecutionLifecycle extends ExpandableStringEnum { /** - * Created. + * Static value Created for JobExecutionLifecycle. */ public static final JobExecutionLifecycle CREATED = fromString("Created"); /** - * InProgress. + * Static value InProgress for JobExecutionLifecycle. */ public static final JobExecutionLifecycle IN_PROGRESS = fromString("InProgress"); /** - * WaitingForChildJobExecutions. + * Static value WaitingForChildJobExecutions for JobExecutionLifecycle. */ public static final JobExecutionLifecycle WAITING_FOR_CHILD_JOB_EXECUTIONS = fromString("WaitingForChildJobExecutions"); /** - * WaitingForRetry. + * Static value WaitingForRetry for JobExecutionLifecycle. */ public static final JobExecutionLifecycle WAITING_FOR_RETRY = fromString("WaitingForRetry"); /** - * Succeeded. + * Static value Succeeded for JobExecutionLifecycle. */ public static final JobExecutionLifecycle SUCCEEDED = fromString("Succeeded"); /** - * SucceededWithSkipped. + * Static value SucceededWithSkipped for JobExecutionLifecycle. */ public static final JobExecutionLifecycle SUCCEEDED_WITH_SKIPPED = fromString("SucceededWithSkipped"); /** - * Failed. + * Static value Failed for JobExecutionLifecycle. */ public static final JobExecutionLifecycle FAILED = fromString("Failed"); /** - * TimedOut. + * Static value TimedOut for JobExecutionLifecycle. */ public static final JobExecutionLifecycle TIMED_OUT = fromString("TimedOut"); /** - * Canceled. + * Static value Canceled for JobExecutionLifecycle. */ public static final JobExecutionLifecycle CANCELED = fromString("Canceled"); /** - * Skipped. + * Static value Skipped for JobExecutionLifecycle. */ public static final JobExecutionLifecycle SKIPPED = fromString("Skipped"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobExecutionListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobExecutionListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionListResult.java index 5db04374e01d..ea4e94f61eae 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobExecutionListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a JobExecution list operation. + * A list of job executions. */ @Immutable public final class JobExecutionListResult implements JsonSerializable { /* - * The JobExecution items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of JobExecutionListResult class. */ - private JobExecutionListResult() { + public JobExecutionListResult() { } /** - * Get the value property: The JobExecution items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model JobExecutionListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(JobExecutionListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of JobExecutionListResult 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 JobExecutionListResult. */ public static JobExecutionListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionTarget.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionTarget.java index a285e0da8884..6e2d9b8134ff 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionTarget.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobExecutionTarget.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -34,7 +34,7 @@ public final class JobExecutionTarget implements JsonSerializable { /* - * The Job items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of JobListResult class. */ - private JobListResult() { + public JobListResult() { } /** - * Get the value property: The Job items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model JobListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(JobListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of JobListResult 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 JobListResult. */ public static JobListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobSchedule.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobSchedule.java index a4cc2e70c32e..423c34026238 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobSchedule.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobSchedule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobScheduleType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobScheduleType.java index 3cb634c403e3..e4b3798d85ba 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobScheduleType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobScheduleType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,12 +9,12 @@ */ public enum JobScheduleType { /** - * Once. + * Enum value Once. */ ONCE("Once"), /** - * Recurring. + * Enum value Recurring. */ RECURRING("Recurring"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepAction.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepAction.java index 46f7ce89db2e..df15accb87c2 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepAction.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepActionSource.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepActionSource.java index 8f81f6674904..40f08e6f07d9 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepActionSource.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepActionSource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class JobStepActionSource extends ExpandableStringEnum { /** - * Inline. + * Static value Inline for JobStepActionSource. */ public static final JobStepActionSource INLINE = fromString("Inline"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepActionType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepActionType.java index 540da5b1ea46..0720a7349908 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepActionType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class JobStepActionType extends ExpandableStringEnum { /** - * TSql. + * Static value TSql for JobStepActionType. */ public static final JobStepActionType TSQL = fromString("TSql"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepExecutionOptions.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepExecutionOptions.java index 2347f9fac856..28b443e89140 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepExecutionOptions.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepExecutionOptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobStepListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobStepListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepListResult.java index 6a2eaf2fcef1..853cefd9cbc1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobStepListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a JobStep list operation. + * A list of job steps. */ @Immutable public final class JobStepListResult implements JsonSerializable { /* - * The JobStep items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of JobStepListResult class. */ - private JobStepListResult() { + public JobStepListResult() { } /** - * Get the value property: The JobStep items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model JobStepListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(JobStepListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of JobStepListResult 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 JobStepListResult. */ public static JobStepListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepOutput.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepOutput.java index 51852d3cd450..a698a286dbaa 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepOutput.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepOutput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -243,6 +243,10 @@ public void validate() { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property tableName in model JobStepOutput")); } + if (credential() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property credential in model JobStepOutput")); + } } private static final ClientLogger LOGGER = new ClientLogger(JobStepOutput.class); @@ -256,11 +260,11 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("serverName", this.serverName); jsonWriter.writeStringField("databaseName", this.databaseName); jsonWriter.writeStringField("tableName", this.tableName); + jsonWriter.writeStringField("credential", this.credential); jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); jsonWriter.writeStringField("subscriptionId", Objects.toString(this.subscriptionId, null)); jsonWriter.writeStringField("resourceGroupName", this.resourceGroupName); jsonWriter.writeStringField("schemaName", this.schemaName); - jsonWriter.writeStringField("credential", this.credential); return jsonWriter.writeEndObject(); } @@ -286,6 +290,8 @@ public static JobStepOutput fromJson(JsonReader jsonReader) throws IOException { deserializedJobStepOutput.databaseName = reader.getString(); } else if ("tableName".equals(fieldName)) { deserializedJobStepOutput.tableName = reader.getString(); + } else if ("credential".equals(fieldName)) { + deserializedJobStepOutput.credential = reader.getString(); } else if ("type".equals(fieldName)) { deserializedJobStepOutput.type = JobStepOutputType.fromString(reader.getString()); } else if ("subscriptionId".equals(fieldName)) { @@ -295,8 +301,6 @@ public static JobStepOutput fromJson(JsonReader jsonReader) throws IOException { deserializedJobStepOutput.resourceGroupName = reader.getString(); } else if ("schemaName".equals(fieldName)) { deserializedJobStepOutput.schemaName = reader.getString(); - } else if ("credential".equals(fieldName)) { - deserializedJobStepOutput.credential = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepOutputType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepOutputType.java index 2b9d7d7b8e87..27bd84fa0123 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepOutputType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobStepOutputType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class JobStepOutputType extends ExpandableStringEnum { /** - * SqlDatabase. + * Static value SqlDatabase for JobStepOutputType. */ public static final JobStepOutputType SQL_DATABASE = fromString("SqlDatabase"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTarget.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTarget.java index f8db7e35d080..5cf249291cf6 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTarget.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTarget.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobTargetGroupListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetGroupListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobTargetGroupListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetGroupListResult.java index 293d923c760a..e74d4c1a05be 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobTargetGroupListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetGroupListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a JobTargetGroup list operation. + * A list of target groups. */ @Immutable public final class JobTargetGroupListResult implements JsonSerializable { /* - * The JobTargetGroup items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of JobTargetGroupListResult class. */ - private JobTargetGroupListResult() { + public JobTargetGroupListResult() { } /** - * Get the value property: The JobTargetGroup items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model JobTargetGroupListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(JobTargetGroupListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of JobTargetGroupListResult 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 JobTargetGroupListResult. */ public static JobTargetGroupListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetGroupMembershipType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetGroupMembershipType.java index 1a59a09495cb..02ffe3f04479 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetGroupMembershipType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetGroupMembershipType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,12 +9,12 @@ */ public enum JobTargetGroupMembershipType { /** - * Include. + * Enum value Include. */ INCLUDE("Include"), /** - * Exclude. + * Enum value Exclude. */ EXCLUDE("Exclude"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetType.java index 7ebfa24dc4fc..e5f480f4e434 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobTargetType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,27 +12,27 @@ */ public final class JobTargetType extends ExpandableStringEnum { /** - * TargetGroup. + * Static value TargetGroup for JobTargetType. */ public static final JobTargetType TARGET_GROUP = fromString("TargetGroup"); /** - * SqlDatabase. + * Static value SqlDatabase for JobTargetType. */ public static final JobTargetType SQL_DATABASE = fromString("SqlDatabase"); /** - * SqlElasticPool. + * Static value SqlElasticPool for JobTargetType. */ public static final JobTargetType SQL_ELASTIC_POOL = fromString("SqlElasticPool"); /** - * SqlShardMap. + * Static value SqlShardMap for JobTargetType. */ public static final JobTargetType SQL_SHARD_MAP = fromString("SqlShardMap"); /** - * SqlServer. + * Static value SqlServer for JobTargetType. */ public static final JobTargetType SQL_SERVER = fromString("SqlServer"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobVersionListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobVersionListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobVersionListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobVersionListResult.java index b2e7e6ef32d2..951a17f99520 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/JobVersionListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/JobVersionListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a JobVersion list operation. + * A list of job versions. */ @Immutable public final class JobVersionListResult implements JsonSerializable { /* - * The JobVersion items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of JobVersionListResult class. */ - private JobVersionListResult() { + public JobVersionListResult() { } /** - * Get the value property: The JobVersion items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model JobVersionListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(JobVersionListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of JobVersionListResult 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 JobVersionListResult. */ public static JobVersionListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LedgerDigestUploadsListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LedgerDigestUploadsListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsListResult.java index 8fe177f16414..3e94383f71a0 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LedgerDigestUploadsListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a LedgerDigestUploads list operation. + * A list of ledger digest upload settings. */ @Immutable public final class LedgerDigestUploadsListResult implements JsonSerializable { /* - * The LedgerDigestUploads items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of LedgerDigestUploadsListResult class. */ - private LedgerDigestUploadsListResult() { + public LedgerDigestUploadsListResult() { } /** - * Get the value property: The LedgerDigestUploads items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model LedgerDigestUploadsListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(LedgerDigestUploadsListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of LedgerDigestUploadsListResult 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 LedgerDigestUploadsListResult. */ public static LedgerDigestUploadsListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsName.java index eb6dacd79ffa..37b272f3a81b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class LedgerDigestUploadsName extends ExpandableStringEnum { /** - * current. + * Static value current for LedgerDigestUploadsName. */ public static final LedgerDigestUploadsName CURRENT = fromString("current"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsState.java index 62adbc356aa8..61f6df5a9649 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,12 +9,12 @@ */ public enum LedgerDigestUploadsState { /** - * Enabled. + * Enum value Enabled. */ ENABLED("Enabled"), /** - * Disabled. + * Enum value Disabled. */ DISABLED("Disabled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LicenseTypeCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LicenseTypeCapability.java index a95b2a9a5892..9addb8842005 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LicenseTypeCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LicenseTypeCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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,7 +14,7 @@ /** * The license type capability. */ -@Immutable +@Fluent public final class LicenseTypeCapability implements JsonSerializable { /* * License type identifier. @@ -34,7 +34,7 @@ public final class LicenseTypeCapability implements JsonSerializable { - /** - * Primary. - */ - public static final LinkRole PRIMARY = fromString("Primary"); - - /** - * Secondary. - */ - public static final LinkRole SECONDARY = fromString("Secondary"); - - /** - * Creates a new instance of LinkRole value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LinkRole() { - } - - /** - * Creates or finds a LinkRole from its string representation. - * - * @param name a name to look for. - * @return the corresponding LinkRole. - */ - public static LinkRole fromString(String name) { - return fromString(name, LinkRole.class); - } - - /** - * Gets known LinkRole values. - * - * @return known LinkRole values. - */ - public static Collection values() { - return values(LinkRole.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogSizeCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogSizeCapability.java index 68b8e15dfb4e..b8c821a32b83 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogSizeCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogSizeCapability.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -29,7 +29,7 @@ public final class LogSizeCapability implements JsonSerializable { /** - * Megabytes. + * Static value Megabytes for LogSizeUnit. */ public static final LogSizeUnit MEGABYTES = fromString("Megabytes"); /** - * Gigabytes. + * Static value Gigabytes for LogSizeUnit. */ public static final LogSizeUnit GIGABYTES = fromString("Gigabytes"); /** - * Terabytes. + * Static value Terabytes for LogSizeUnit. */ public static final LogSizeUnit TERABYTES = fromString("Terabytes"); /** - * Petabytes. + * Static value Petabytes for LogSizeUnit. */ public static final LogSizeUnit PETABYTES = fromString("Petabytes"); /** - * Percent. + * Static value Percent for LogSizeUnit. */ public static final LogSizeUnit PERCENT = fromString("Percent"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LogicalDatabaseTransparentDataEncryptionListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalDatabaseTransparentDataEncryptionListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LogicalDatabaseTransparentDataEncryptionListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalDatabaseTransparentDataEncryptionListResult.java index 8334167c69a8..e4aa4e9f852e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LogicalDatabaseTransparentDataEncryptionListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalDatabaseTransparentDataEncryptionListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a LogicalDatabaseTransparentDataEncryption list operation. + * A list of transparent data encryptions. */ @Immutable public final class LogicalDatabaseTransparentDataEncryptionListResult implements JsonSerializable { /* - * The LogicalDatabaseTransparentDataEncryption items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of LogicalDatabaseTransparentDataEncryptionListResult class. */ - private LogicalDatabaseTransparentDataEncryptionListResult() { + public LogicalDatabaseTransparentDataEncryptionListResult() { } /** - * Get the value property: The LogicalDatabaseTransparentDataEncryption items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,26 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model LogicalDatabaseTransparentDataEncryptionListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER - = new ClientLogger(LogicalDatabaseTransparentDataEncryptionListResult.class); - /** * {@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(); } @@ -89,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of LogicalDatabaseTransparentDataEncryptionListResult 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 LogicalDatabaseTransparentDataEncryptionListResult. */ public static LogicalDatabaseTransparentDataEncryptionListResult fromJson(JsonReader jsonReader) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LogicalServerAdvancedThreatProtectionListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalServerAdvancedThreatProtectionListResult.java similarity index 94% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LogicalServerAdvancedThreatProtectionListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalServerAdvancedThreatProtectionListResult.java index d803691db56f..b6d981880570 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LogicalServerAdvancedThreatProtectionListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalServerAdvancedThreatProtectionListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -32,7 +32,7 @@ public final class LogicalServerAdvancedThreatProtectionListResult /** * Creates an instance of LogicalServerAdvancedThreatProtectionListResult class. */ - private LogicalServerAdvancedThreatProtectionListResult() { + public LogicalServerAdvancedThreatProtectionListResult() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LogicalServerSecurityAlertPolicyListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalServerSecurityAlertPolicyListResult.java similarity index 94% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LogicalServerSecurityAlertPolicyListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalServerSecurityAlertPolicyListResult.java index 0df232d15f20..88cc4eec7364 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LogicalServerSecurityAlertPolicyListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LogicalServerSecurityAlertPolicyListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -32,7 +32,7 @@ public final class LogicalServerSecurityAlertPolicyListResult /** * Creates an instance of LogicalServerSecurityAlertPolicyListResult class. */ - private LogicalServerSecurityAlertPolicyListResult() { + public LogicalServerSecurityAlertPolicyListResult() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LongTermRetentionBackupListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionBackupListResult.java similarity index 95% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LongTermRetentionBackupListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionBackupListResult.java index 31a10d59ef2e..47d2936b56fe 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LongTermRetentionBackupListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionBackupListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -31,7 +31,7 @@ public final class LongTermRetentionBackupListResult implements JsonSerializable /** * Creates an instance of LongTermRetentionBackupListResult class. */ - private LongTermRetentionBackupListResult() { + public LongTermRetentionBackupListResult() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LongTermRetentionPolicyListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionPolicyListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LongTermRetentionPolicyListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionPolicyListResult.java index cc90b5bed515..bc02c6a4efb7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/LongTermRetentionPolicyListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionPolicyListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a LongTermRetentionPolicy list operation. + * A list of long term retention policies. */ @Immutable public final class LongTermRetentionPolicyListResult implements JsonSerializable { /* - * The LongTermRetentionPolicy items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of LongTermRetentionPolicyListResult class. */ - private LongTermRetentionPolicyListResult() { + public LongTermRetentionPolicyListResult() { } /** - * Get the value property: The LongTermRetentionPolicy items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model LongTermRetentionPolicyListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(LongTermRetentionPolicyListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of LongTermRetentionPolicyListResult 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 LongTermRetentionPolicyListResult. */ public static LongTermRetentionPolicyListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionPolicyName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionPolicyName.java index b60501d3b2f9..be4236be35f3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionPolicyName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionPolicyName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class LongTermRetentionPolicyName extends ExpandableStringEnum { /** - * default. + * Static value default for LongTermRetentionPolicyName. */ public static final LongTermRetentionPolicyName DEFAULT = fromString("default"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaintenanceConfigurationCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaintenanceConfigurationCapability.java index 7b1405fd171c..7aa109e16bc3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaintenanceConfigurationCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaintenanceConfigurationCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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,7 +14,7 @@ /** * The maintenance configuration capability. */ -@Immutable +@Fluent public final class MaintenanceConfigurationCapability implements JsonSerializable { /* * Maintenance configuration name @@ -39,7 +39,7 @@ public final class MaintenanceConfigurationCapability implements JsonSerializabl /** * Creates an instance of MaintenanceConfigurationCapability class. */ - private MaintenanceConfigurationCapability() { + public MaintenanceConfigurationCapability() { } /** @@ -78,6 +78,17 @@ public String reason() { return this.reason; } + /** + * Set the reason property: The reason for the capability not being available. + * + * @param reason the reason value to set. + * @return the MaintenanceConfigurationCapability object itself. + */ + public MaintenanceConfigurationCapability withReason(String reason) { + this.reason = reason; + return this; + } + /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaintenanceWindowTimeRange.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaintenanceWindowTimeRange.java index b0562668c943..cc462b70574f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaintenanceWindowTimeRange.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaintenanceWindowTimeRange.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedBackupShortTermRetentionPolicyListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedBackupShortTermRetentionPolicyListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedBackupShortTermRetentionPolicyListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedBackupShortTermRetentionPolicyListResult.java index 6070702ec4f6..35b8b5f3c400 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedBackupShortTermRetentionPolicyListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedBackupShortTermRetentionPolicyListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a ManagedBackupShortTermRetentionPolicy list operation. + * A list of short term retention policies. */ @Immutable public final class ManagedBackupShortTermRetentionPolicyListResult implements JsonSerializable { /* - * The ManagedBackupShortTermRetentionPolicy items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedBackupShortTermRetentionPolicyListResult class. */ - private ManagedBackupShortTermRetentionPolicyListResult() { + public ManagedBackupShortTermRetentionPolicyListResult() { } /** - * Get the value property: The ManagedBackupShortTermRetentionPolicy items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedBackupShortTermRetentionPolicyListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagedBackupShortTermRetentionPolicyListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedBackupShortTermRetentionPolicyListResult 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 ManagedBackupShortTermRetentionPolicyListResult. */ public static ManagedBackupShortTermRetentionPolicyListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseCreateMode.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseCreateMode.java index 5cb01d00abfe..7432f3a20488 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseCreateMode.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseCreateMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -18,27 +18,27 @@ */ public final class ManagedDatabaseCreateMode extends ExpandableStringEnum { /** - * Default. + * Static value Default for ManagedDatabaseCreateMode. */ public static final ManagedDatabaseCreateMode DEFAULT = fromString("Default"); /** - * RestoreExternalBackup. + * Static value RestoreExternalBackup for ManagedDatabaseCreateMode. */ public static final ManagedDatabaseCreateMode RESTORE_EXTERNAL_BACKUP = fromString("RestoreExternalBackup"); /** - * PointInTimeRestore. + * Static value PointInTimeRestore for ManagedDatabaseCreateMode. */ public static final ManagedDatabaseCreateMode POINT_IN_TIME_RESTORE = fromString("PointInTimeRestore"); /** - * Recovery. + * Static value Recovery for ManagedDatabaseCreateMode. */ public static final ManagedDatabaseCreateMode RECOVERY = fromString("Recovery"); /** - * RestoreLongTermRetentionBackup. + * Static value RestoreLongTermRetentionBackup for ManagedDatabaseCreateMode. */ public static final ManagedDatabaseCreateMode RESTORE_LONG_TERM_RETENTION_BACKUP = fromString("RestoreLongTermRetentionBackup"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseExtendedAccessibilityInfo.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseExtendedAccessibilityInfo.java deleted file mode 100644 index 49845c4f7405..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseExtendedAccessibilityInfo.java +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; - -/** - * Managed Database Extended Accessibility Information. - */ -@Immutable -public final class ManagedDatabaseExtendedAccessibilityInfo - implements JsonSerializable { - /* - * SQL Server error code connected to the inaccessibility root cause. - */ - private String inaccessibilityReasonErrorCode; - - /* - * Root cause explanation and mitigation action. - */ - private String inaccessibilityReasonDescription; - - /* - * Root cause kind. Allowed values are “TransparentDataEncryption”, “DatabaseReplication”, and “Unknown”. - */ - private InaccessibilityReason inaccessibilityReasonKind; - - /* - * For the root cause kind “TransparentDataEncryption”, the CMK URI. - */ - private String inaccessibilityReasonTdeKeyUri; - - /** - * Creates an instance of ManagedDatabaseExtendedAccessibilityInfo class. - */ - private ManagedDatabaseExtendedAccessibilityInfo() { - } - - /** - * Get the inaccessibilityReasonErrorCode property: SQL Server error code connected to the inaccessibility root - * cause. - * - * @return the inaccessibilityReasonErrorCode value. - */ - public String inaccessibilityReasonErrorCode() { - return this.inaccessibilityReasonErrorCode; - } - - /** - * Get the inaccessibilityReasonDescription property: Root cause explanation and mitigation action. - * - * @return the inaccessibilityReasonDescription value. - */ - public String inaccessibilityReasonDescription() { - return this.inaccessibilityReasonDescription; - } - - /** - * Get the inaccessibilityReasonKind property: Root cause kind. Allowed values are “TransparentDataEncryption”, - * “DatabaseReplication”, and “Unknown”. - * - * @return the inaccessibilityReasonKind value. - */ - public InaccessibilityReason inaccessibilityReasonKind() { - return this.inaccessibilityReasonKind; - } - - /** - * Get the inaccessibilityReasonTdeKeyUri property: For the root cause kind “TransparentDataEncryption”, the CMK - * URI. - * - * @return the inaccessibilityReasonTdeKeyUri value. - */ - public String inaccessibilityReasonTdeKeyUri() { - return this.inaccessibilityReasonTdeKeyUri; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedDatabaseExtendedAccessibilityInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedDatabaseExtendedAccessibilityInfo 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 ManagedDatabaseExtendedAccessibilityInfo. - */ - public static ManagedDatabaseExtendedAccessibilityInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedDatabaseExtendedAccessibilityInfo deserializedManagedDatabaseExtendedAccessibilityInfo - = new ManagedDatabaseExtendedAccessibilityInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("inaccessibilityReasonErrorCode".equals(fieldName)) { - deserializedManagedDatabaseExtendedAccessibilityInfo.inaccessibilityReasonErrorCode - = reader.getString(); - } else if ("inaccessibilityReasonDescription".equals(fieldName)) { - deserializedManagedDatabaseExtendedAccessibilityInfo.inaccessibilityReasonDescription - = reader.getString(); - } else if ("inaccessibilityReasonKind".equals(fieldName)) { - deserializedManagedDatabaseExtendedAccessibilityInfo.inaccessibilityReasonKind - = InaccessibilityReason.fromString(reader.getString()); - } else if ("inaccessibilityReasonTdeKeyUri".equals(fieldName)) { - deserializedManagedDatabaseExtendedAccessibilityInfo.inaccessibilityReasonTdeKeyUri - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedDatabaseExtendedAccessibilityInfo; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseListResult.java index 2534eaa059a6..9fec223b2ccc 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a ManagedDatabase list operation. + * A list of managed databases. */ @Immutable public final class ManagedDatabaseListResult implements JsonSerializable { /* - * The ManagedDatabase items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedDatabaseListResult class. */ - private ManagedDatabaseListResult() { + public ManagedDatabaseListResult() { } /** - * Get the value property: The ManagedDatabase items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property value in model ManagedDatabaseListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagedDatabaseListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedDatabaseListResult 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 ManagedDatabaseListResult. */ public static ManagedDatabaseListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseMoveDefinition.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseMoveDefinition.java index 1b36da3718fb..556db21e58e4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseMoveDefinition.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseMoveDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseRestoreDetailsBackupSetProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseRestoreDetailsBackupSetProperties.java deleted file mode 100644 index 7ef3e26ebb58..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseRestoreDetailsBackupSetProperties.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.annotation.Immutable; -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; - -/** - * The managed database's restore details backup set properties. - */ -@Immutable -public final class ManagedDatabaseRestoreDetailsBackupSetProperties - implements JsonSerializable { - /* - * Backup set status. - */ - private String status; - - /* - * First stripe name. - */ - private String firstStripeName; - - /* - * Number of stripes. - */ - private Integer numberOfStripes; - - /* - * Backup size. - */ - private Integer backupSizeMB; - - /* - * Last restored file time. - */ - private OffsetDateTime restoreStartedTimestampUtc; - - /* - * Last restored file time. - */ - private OffsetDateTime restoreFinishedTimestampUtc; - - /** - * Creates an instance of ManagedDatabaseRestoreDetailsBackupSetProperties class. - */ - private ManagedDatabaseRestoreDetailsBackupSetProperties() { - } - - /** - * Get the status property: Backup set status. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Get the firstStripeName property: First stripe name. - * - * @return the firstStripeName value. - */ - public String firstStripeName() { - return this.firstStripeName; - } - - /** - * Get the numberOfStripes property: Number of stripes. - * - * @return the numberOfStripes value. - */ - public Integer numberOfStripes() { - return this.numberOfStripes; - } - - /** - * Get the backupSizeMB property: Backup size. - * - * @return the backupSizeMB value. - */ - public Integer backupSizeMB() { - return this.backupSizeMB; - } - - /** - * Get the restoreStartedTimestampUtc property: Last restored file time. - * - * @return the restoreStartedTimestampUtc value. - */ - public OffsetDateTime restoreStartedTimestampUtc() { - return this.restoreStartedTimestampUtc; - } - - /** - * Get the restoreFinishedTimestampUtc property: Last restored file time. - * - * @return the restoreFinishedTimestampUtc value. - */ - public OffsetDateTime restoreFinishedTimestampUtc() { - return this.restoreFinishedTimestampUtc; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedDatabaseRestoreDetailsBackupSetProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedDatabaseRestoreDetailsBackupSetProperties 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 ManagedDatabaseRestoreDetailsBackupSetProperties. - */ - public static ManagedDatabaseRestoreDetailsBackupSetProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedDatabaseRestoreDetailsBackupSetProperties deserializedManagedDatabaseRestoreDetailsBackupSetProperties - = new ManagedDatabaseRestoreDetailsBackupSetProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsBackupSetProperties.status = reader.getString(); - } else if ("firstStripeName".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsBackupSetProperties.firstStripeName = reader.getString(); - } else if ("numberOfStripes".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsBackupSetProperties.numberOfStripes - = reader.getNullable(JsonReader::getInt); - } else if ("backupSizeMB".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsBackupSetProperties.backupSizeMB - = reader.getNullable(JsonReader::getInt); - } else if ("restoreStartedTimestampUtc".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsBackupSetProperties.restoreStartedTimestampUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("restoreFinishedTimestampUtc".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsBackupSetProperties.restoreFinishedTimestampUtc = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedDatabaseRestoreDetailsBackupSetProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseRestoreDetailsUnrestorableFileProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseRestoreDetailsUnrestorableFileProperties.java deleted file mode 100644 index 4eaafd0fa47c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseRestoreDetailsUnrestorableFileProperties.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; - -/** - * The managed database's restore details unrestorable file properties. - */ -@Immutable -public final class ManagedDatabaseRestoreDetailsUnrestorableFileProperties - implements JsonSerializable { - /* - * File name. - */ - private String name; - - /** - * Creates an instance of ManagedDatabaseRestoreDetailsUnrestorableFileProperties class. - */ - private ManagedDatabaseRestoreDetailsUnrestorableFileProperties() { - } - - /** - * Get the name property: File name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedDatabaseRestoreDetailsUnrestorableFileProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedDatabaseRestoreDetailsUnrestorableFileProperties 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 ManagedDatabaseRestoreDetailsUnrestorableFileProperties. - */ - public static ManagedDatabaseRestoreDetailsUnrestorableFileProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedDatabaseRestoreDetailsUnrestorableFileProperties deserializedManagedDatabaseRestoreDetailsUnrestorableFileProperties - = new ManagedDatabaseRestoreDetailsUnrestorableFileProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedManagedDatabaseRestoreDetailsUnrestorableFileProperties.name = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedDatabaseRestoreDetailsUnrestorableFileProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseSecurityAlertPolicyListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseSecurityAlertPolicyListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseSecurityAlertPolicyListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseSecurityAlertPolicyListResult.java index 23f512641e9e..da285c251178 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseSecurityAlertPolicyListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseSecurityAlertPolicyListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a ManagedDatabaseSecurityAlertPolicy list operation. + * A list of the managed database's security alert policies. */ @Immutable public final class ManagedDatabaseSecurityAlertPolicyListResult implements JsonSerializable { /* - * The ManagedDatabaseSecurityAlertPolicy items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedDatabaseSecurityAlertPolicyListResult class. */ - private ManagedDatabaseSecurityAlertPolicyListResult() { + public ManagedDatabaseSecurityAlertPolicyListResult() { } /** - * Get the value property: The ManagedDatabaseSecurityAlertPolicy items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedDatabaseSecurityAlertPolicyListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagedDatabaseSecurityAlertPolicyListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedDatabaseSecurityAlertPolicyListResult 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 ManagedDatabaseSecurityAlertPolicyListResult. */ public static ManagedDatabaseSecurityAlertPolicyListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStartMoveDefinition.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStartMoveDefinition.java index dcd198fd05b0..cf24be2fd91a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStartMoveDefinition.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStartMoveDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStatus.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStatus.java index bd430af0922b..11d96725a6ff 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStatus.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,65 +12,40 @@ */ public final class ManagedDatabaseStatus extends ExpandableStringEnum { /** - * Online. + * Static value Online for ManagedDatabaseStatus. */ public static final ManagedDatabaseStatus ONLINE = fromString("Online"); /** - * Offline. + * Static value Offline for ManagedDatabaseStatus. */ public static final ManagedDatabaseStatus OFFLINE = fromString("Offline"); /** - * Shutdown. + * Static value Shutdown for ManagedDatabaseStatus. */ public static final ManagedDatabaseStatus SHUTDOWN = fromString("Shutdown"); /** - * Creating. + * Static value Creating for ManagedDatabaseStatus. */ public static final ManagedDatabaseStatus CREATING = fromString("Creating"); /** - * Inaccessible. + * Static value Inaccessible for ManagedDatabaseStatus. */ public static final ManagedDatabaseStatus INACCESSIBLE = fromString("Inaccessible"); /** - * Restoring. + * Static value Restoring for ManagedDatabaseStatus. */ public static final ManagedDatabaseStatus RESTORING = fromString("Restoring"); /** - * Updating. + * Static value Updating for ManagedDatabaseStatus. */ public static final ManagedDatabaseStatus UPDATING = fromString("Updating"); - /** - * Stopping. - */ - public static final ManagedDatabaseStatus STOPPING = fromString("Stopping"); - - /** - * Stopped. - */ - public static final ManagedDatabaseStatus STOPPED = fromString("Stopped"); - - /** - * Starting. - */ - public static final ManagedDatabaseStatus STARTING = fromString("Starting"); - - /** - * DbMoving. - */ - public static final ManagedDatabaseStatus DB_MOVING = fromString("DbMoving"); - - /** - * DbCopying. - */ - public static final ManagedDatabaseStatus DB_COPYING = fromString("DbCopying"); - /** * Creates a new instance of ManagedDatabaseStatus value. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseUpdate.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseUpdate.java index b191a2cd28ce..9334e19673c0 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseUpdate.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -258,31 +258,6 @@ public ManagedDatabaseUpdate withSourceDatabaseId(String sourceDatabaseId) { return this; } - /** - * Get the crossSubscriptionSourceDatabaseId property: The resource identifier of the cross-subscription source - * database associated with create operation of this database. - * - * @return the crossSubscriptionSourceDatabaseId value. - */ - public String crossSubscriptionSourceDatabaseId() { - return this.innerProperties() == null ? null : this.innerProperties().crossSubscriptionSourceDatabaseId(); - } - - /** - * Set the crossSubscriptionSourceDatabaseId property: The resource identifier of the cross-subscription source - * database associated with create operation of this database. - * - * @param crossSubscriptionSourceDatabaseId the crossSubscriptionSourceDatabaseId value to set. - * @return the ManagedDatabaseUpdate object itself. - */ - public ManagedDatabaseUpdate withCrossSubscriptionSourceDatabaseId(String crossSubscriptionSourceDatabaseId) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedDatabaseProperties(); - } - this.innerProperties().withCrossSubscriptionSourceDatabaseId(crossSubscriptionSourceDatabaseId); - return this; - } - /** * Get the restorableDroppedDatabaseId property: The restorable dropped database resource id to restore when * creating this database. @@ -309,66 +284,8 @@ public ManagedDatabaseUpdate withRestorableDroppedDatabaseId(String restorableDr } /** - * Get the crossSubscriptionRestorableDroppedDatabaseId property: The restorable cross-subscription dropped database - * resource id to restore when creating this database. - * - * @return the crossSubscriptionRestorableDroppedDatabaseId value. - */ - public String crossSubscriptionRestorableDroppedDatabaseId() { - return this.innerProperties() == null - ? null - : this.innerProperties().crossSubscriptionRestorableDroppedDatabaseId(); - } - - /** - * Set the crossSubscriptionRestorableDroppedDatabaseId property: The restorable cross-subscription dropped database - * resource id to restore when creating this database. - * - * @param crossSubscriptionRestorableDroppedDatabaseId the crossSubscriptionRestorableDroppedDatabaseId value to - * set. - * @return the ManagedDatabaseUpdate object itself. - */ - public ManagedDatabaseUpdate - withCrossSubscriptionRestorableDroppedDatabaseId(String crossSubscriptionRestorableDroppedDatabaseId) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedDatabaseProperties(); - } - this.innerProperties() - .withCrossSubscriptionRestorableDroppedDatabaseId(crossSubscriptionRestorableDroppedDatabaseId); - return this; - } - - /** - * Get the storageContainerIdentity property: Conditional. If createMode is RestoreExternalBackup, this value is - * used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or - * 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed. - * - * @return the storageContainerIdentity value. - */ - public String storageContainerIdentity() { - return this.innerProperties() == null ? null : this.innerProperties().storageContainerIdentity(); - } - - /** - * Set the storageContainerIdentity property: Conditional. If createMode is RestoreExternalBackup, this value is - * used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or - * 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed. - * - * @param storageContainerIdentity the storageContainerIdentity value to set. - * @return the ManagedDatabaseUpdate object itself. - */ - public ManagedDatabaseUpdate withStorageContainerIdentity(String storageContainerIdentity) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedDatabaseProperties(); - } - this.innerProperties().withStorageContainerIdentity(storageContainerIdentity); - return this; - } - - /** - * Get the storageContainerSasToken property: Conditional. If createMode is RestoreExternalBackup and - * storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas - * token. + * Get the storageContainerSasToken property: Conditional. If createMode is RestoreExternalBackup, this value is + * required. Specifies the storage container sas token. * * @return the storageContainerSasToken value. */ @@ -377,9 +294,8 @@ public String storageContainerSasToken() { } /** - * Set the storageContainerSasToken property: Conditional. If createMode is RestoreExternalBackup and - * storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas - * token. + * Set the storageContainerSasToken property: Conditional. If createMode is RestoreExternalBackup, this value is + * required. Specifies the storage container sas token. * * @param storageContainerSasToken the storageContainerSasToken value to set. * @return the ManagedDatabaseUpdate object itself. @@ -498,71 +414,6 @@ public ManagedDatabaseUpdate withLastBackupName(String lastBackupName) { return this; } - /** - * Get the crossSubscriptionTargetManagedInstanceId property: Target managed instance id used in cross-subscription - * restore. - * - * @return the crossSubscriptionTargetManagedInstanceId value. - */ - public String crossSubscriptionTargetManagedInstanceId() { - return this.innerProperties() == null - ? null - : this.innerProperties().crossSubscriptionTargetManagedInstanceId(); - } - - /** - * Set the crossSubscriptionTargetManagedInstanceId property: Target managed instance id used in cross-subscription - * restore. - * - * @param crossSubscriptionTargetManagedInstanceId the crossSubscriptionTargetManagedInstanceId value to set. - * @return the ManagedDatabaseUpdate object itself. - */ - public ManagedDatabaseUpdate - withCrossSubscriptionTargetManagedInstanceId(String crossSubscriptionTargetManagedInstanceId) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedDatabaseProperties(); - } - this.innerProperties().withCrossSubscriptionTargetManagedInstanceId(crossSubscriptionTargetManagedInstanceId); - return this; - } - - /** - * Get the isLedgerOn property: Whether or not this database is a ledger database, which means all tables in the - * database are ledger tables. Note: the value of this property cannot be changed after the database has been - * created. - * - * @return the isLedgerOn value. - */ - public Boolean isLedgerOn() { - return this.innerProperties() == null ? null : this.innerProperties().isLedgerOn(); - } - - /** - * Set the isLedgerOn property: Whether or not this database is a ledger database, which means all tables in the - * database are ledger tables. Note: the value of this property cannot be changed after the database has been - * created. - * - * @param isLedgerOn the isLedgerOn value to set. - * @return the ManagedDatabaseUpdate object itself. - */ - public ManagedDatabaseUpdate withIsLedgerOn(Boolean isLedgerOn) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedDatabaseProperties(); - } - this.innerProperties().withIsLedgerOn(isLedgerOn); - return this; - } - - /** - * Get the extendedAccessibilityInfo property: Additional observability and troubleshooting information for - * databases in ‘Inaccessible’ state. - * - * @return the extendedAccessibilityInfo value. - */ - public ManagedDatabaseExtendedAccessibilityInfo extendedAccessibilityInfo() { - return this.innerProperties() == null ? null : this.innerProperties().extendedAccessibilityInfo(); - } - /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceAdministratorListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAdministratorListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceAdministratorListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAdministratorListResult.java index 4d003e7b4dab..ce39629d4d2b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceAdministratorListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAdministratorListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a ManagedInstanceAdministrator list operation. + * A list of managed instance administrators. */ @Immutable public final class ManagedInstanceAdministratorListResult implements JsonSerializable { /* - * The ManagedInstanceAdministrator items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedInstanceAdministratorListResult class. */ - private ManagedInstanceAdministratorListResult() { + public ManagedInstanceAdministratorListResult() { } /** - * Get the value property: The ManagedInstanceAdministrator items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedInstanceAdministratorListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagedInstanceAdministratorListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedInstanceAdministratorListResult 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 ManagedInstanceAdministratorListResult. */ public static ManagedInstanceAdministratorListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAdministratorType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAdministratorType.java index 05e9daa3a125..b8dd46e91ecc 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAdministratorType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAdministratorType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class ManagedInstanceAdministratorType extends ExpandableStringEnum { /** - * ActiveDirectory. + * Static value ActiveDirectory for ManagedInstanceAdministratorType. */ public static final ManagedInstanceAdministratorType ACTIVE_DIRECTORY = fromString("ActiveDirectory"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceAzureADOnlyAuthListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAzureADOnlyAuthListResult.java similarity index 93% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceAzureADOnlyAuthListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAzureADOnlyAuthListResult.java index 657481cbb6c3..1cb1ec687a19 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceAzureADOnlyAuthListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAzureADOnlyAuthListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -14,7 +14,7 @@ import java.util.List; /** - * List of managed database move operations. + * A list of active directory only authentications. */ @Immutable public final class ManagedInstanceAzureADOnlyAuthListResult @@ -32,7 +32,7 @@ public final class ManagedInstanceAzureADOnlyAuthListResult /** * Creates an instance of ManagedInstanceAzureADOnlyAuthListResult class. */ - private ManagedInstanceAzureADOnlyAuthListResult() { + public ManagedInstanceAzureADOnlyAuthListResult() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceDatabaseFormat.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceDatabaseFormat.java deleted file mode 100644 index 9fea5247743a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceDatabaseFormat.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the internal format of instance databases specific to the SQL engine version. - */ -public final class ManagedInstanceDatabaseFormat extends ExpandableStringEnum { - /** - * AlwaysUpToDate. - */ - public static final ManagedInstanceDatabaseFormat ALWAYS_UP_TO_DATE = fromString("AlwaysUpToDate"); - - /** - * SQLServer2022. - */ - public static final ManagedInstanceDatabaseFormat SQLSERVER2022 = fromString("SQLServer2022"); - - /** - * SQLServer2025. - */ - public static final ManagedInstanceDatabaseFormat SQLSERVER2025 = fromString("SQLServer2025"); - - /** - * Creates a new instance of ManagedInstanceDatabaseFormat value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedInstanceDatabaseFormat() { - } - - /** - * Creates or finds a ManagedInstanceDatabaseFormat from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedInstanceDatabaseFormat. - */ - public static ManagedInstanceDatabaseFormat fromString(String name) { - return fromString(name, ManagedInstanceDatabaseFormat.class); - } - - /** - * Gets known ManagedInstanceDatabaseFormat values. - * - * @return known ManagedInstanceDatabaseFormat values. - */ - public static Collection values() { - return values(ManagedInstanceDatabaseFormat.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceDtcSecuritySettings.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceDtcSecuritySettings.java deleted file mode 100644 index 770c35cea466..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceDtcSecuritySettings.java +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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; - -/** - * The Security Settings of managed instance DTC. - */ -@Fluent -public final class ManagedInstanceDtcSecuritySettings implements JsonSerializable { - /* - * Transaction Manager communication settings of managed instance DTC. - */ - private ManagedInstanceDtcTransactionManagerCommunicationSettings transactionManagerCommunicationSettings; - - /* - * Allow XA Transactions to managed instance DTC. - */ - private Boolean xaTransactionsEnabled; - - /* - * Allow SNA LU 6.2 Transactions to managed instance DTC. - */ - private Boolean snaLu6point2TransactionsEnabled; - - /* - * Default timeout for XA Transactions (in seconds). - */ - private Integer xaTransactionsDefaultTimeout; - - /* - * Maximum timeout for XA Transactions (in seconds). - */ - private Integer xaTransactionsMaximumTimeout; - - /** - * Creates an instance of ManagedInstanceDtcSecuritySettings class. - */ - public ManagedInstanceDtcSecuritySettings() { - } - - /** - * Get the transactionManagerCommunicationSettings property: Transaction Manager communication settings of managed - * instance DTC. - * - * @return the transactionManagerCommunicationSettings value. - */ - public ManagedInstanceDtcTransactionManagerCommunicationSettings transactionManagerCommunicationSettings() { - return this.transactionManagerCommunicationSettings; - } - - /** - * Set the transactionManagerCommunicationSettings property: Transaction Manager communication settings of managed - * instance DTC. - * - * @param transactionManagerCommunicationSettings the transactionManagerCommunicationSettings value to set. - * @return the ManagedInstanceDtcSecuritySettings object itself. - */ - public ManagedInstanceDtcSecuritySettings withTransactionManagerCommunicationSettings( - ManagedInstanceDtcTransactionManagerCommunicationSettings transactionManagerCommunicationSettings) { - this.transactionManagerCommunicationSettings = transactionManagerCommunicationSettings; - return this; - } - - /** - * Get the xaTransactionsEnabled property: Allow XA Transactions to managed instance DTC. - * - * @return the xaTransactionsEnabled value. - */ - public Boolean xaTransactionsEnabled() { - return this.xaTransactionsEnabled; - } - - /** - * Set the xaTransactionsEnabled property: Allow XA Transactions to managed instance DTC. - * - * @param xaTransactionsEnabled the xaTransactionsEnabled value to set. - * @return the ManagedInstanceDtcSecuritySettings object itself. - */ - public ManagedInstanceDtcSecuritySettings withXaTransactionsEnabled(Boolean xaTransactionsEnabled) { - this.xaTransactionsEnabled = xaTransactionsEnabled; - return this; - } - - /** - * Get the snaLu6point2TransactionsEnabled property: Allow SNA LU 6.2 Transactions to managed instance DTC. - * - * @return the snaLu6point2TransactionsEnabled value. - */ - public Boolean snaLu6point2TransactionsEnabled() { - return this.snaLu6point2TransactionsEnabled; - } - - /** - * Set the snaLu6point2TransactionsEnabled property: Allow SNA LU 6.2 Transactions to managed instance DTC. - * - * @param snaLu6point2TransactionsEnabled the snaLu6point2TransactionsEnabled value to set. - * @return the ManagedInstanceDtcSecuritySettings object itself. - */ - public ManagedInstanceDtcSecuritySettings - withSnaLu6point2TransactionsEnabled(Boolean snaLu6point2TransactionsEnabled) { - this.snaLu6point2TransactionsEnabled = snaLu6point2TransactionsEnabled; - return this; - } - - /** - * Get the xaTransactionsDefaultTimeout property: Default timeout for XA Transactions (in seconds). - * - * @return the xaTransactionsDefaultTimeout value. - */ - public Integer xaTransactionsDefaultTimeout() { - return this.xaTransactionsDefaultTimeout; - } - - /** - * Set the xaTransactionsDefaultTimeout property: Default timeout for XA Transactions (in seconds). - * - * @param xaTransactionsDefaultTimeout the xaTransactionsDefaultTimeout value to set. - * @return the ManagedInstanceDtcSecuritySettings object itself. - */ - public ManagedInstanceDtcSecuritySettings withXaTransactionsDefaultTimeout(Integer xaTransactionsDefaultTimeout) { - this.xaTransactionsDefaultTimeout = xaTransactionsDefaultTimeout; - return this; - } - - /** - * Get the xaTransactionsMaximumTimeout property: Maximum timeout for XA Transactions (in seconds). - * - * @return the xaTransactionsMaximumTimeout value. - */ - public Integer xaTransactionsMaximumTimeout() { - return this.xaTransactionsMaximumTimeout; - } - - /** - * Set the xaTransactionsMaximumTimeout property: Maximum timeout for XA Transactions (in seconds). - * - * @param xaTransactionsMaximumTimeout the xaTransactionsMaximumTimeout value to set. - * @return the ManagedInstanceDtcSecuritySettings object itself. - */ - public ManagedInstanceDtcSecuritySettings withXaTransactionsMaximumTimeout(Integer xaTransactionsMaximumTimeout) { - this.xaTransactionsMaximumTimeout = xaTransactionsMaximumTimeout; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (transactionManagerCommunicationSettings() != null) { - transactionManagerCommunicationSettings().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("transactionManagerCommunicationSettings", - this.transactionManagerCommunicationSettings); - jsonWriter.writeBooleanField("xaTransactionsEnabled", this.xaTransactionsEnabled); - jsonWriter.writeBooleanField("snaLu6point2TransactionsEnabled", this.snaLu6point2TransactionsEnabled); - jsonWriter.writeNumberField("xaTransactionsDefaultTimeout", this.xaTransactionsDefaultTimeout); - jsonWriter.writeNumberField("xaTransactionsMaximumTimeout", this.xaTransactionsMaximumTimeout); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedInstanceDtcSecuritySettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedInstanceDtcSecuritySettings 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 ManagedInstanceDtcSecuritySettings. - */ - public static ManagedInstanceDtcSecuritySettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedInstanceDtcSecuritySettings deserializedManagedInstanceDtcSecuritySettings - = new ManagedInstanceDtcSecuritySettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("transactionManagerCommunicationSettings".equals(fieldName)) { - deserializedManagedInstanceDtcSecuritySettings.transactionManagerCommunicationSettings - = ManagedInstanceDtcTransactionManagerCommunicationSettings.fromJson(reader); - } else if ("xaTransactionsEnabled".equals(fieldName)) { - deserializedManagedInstanceDtcSecuritySettings.xaTransactionsEnabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("snaLu6point2TransactionsEnabled".equals(fieldName)) { - deserializedManagedInstanceDtcSecuritySettings.snaLu6point2TransactionsEnabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("xaTransactionsDefaultTimeout".equals(fieldName)) { - deserializedManagedInstanceDtcSecuritySettings.xaTransactionsDefaultTimeout - = reader.getNullable(JsonReader::getInt); - } else if ("xaTransactionsMaximumTimeout".equals(fieldName)) { - deserializedManagedInstanceDtcSecuritySettings.xaTransactionsMaximumTimeout - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedInstanceDtcSecuritySettings; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceDtcTransactionManagerCommunicationSettings.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceDtcTransactionManagerCommunicationSettings.java deleted file mode 100644 index 42088f0ed621..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceDtcTransactionManagerCommunicationSettings.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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; - -/** - * The Transaction Manager Communication Settings of managed instance DTC. - */ -@Fluent -public final class ManagedInstanceDtcTransactionManagerCommunicationSettings - implements JsonSerializable { - /* - * Allow Inbound traffic to managed instance DTC. - */ - private Boolean allowInboundEnabled; - - /* - * Allow Outbound traffic of managed instance DTC. - */ - private Boolean allowOutboundEnabled; - - /* - * Authentication type of managed instance DTC. - */ - private String authentication; - - /** - * Creates an instance of ManagedInstanceDtcTransactionManagerCommunicationSettings class. - */ - public ManagedInstanceDtcTransactionManagerCommunicationSettings() { - } - - /** - * Get the allowInboundEnabled property: Allow Inbound traffic to managed instance DTC. - * - * @return the allowInboundEnabled value. - */ - public Boolean allowInboundEnabled() { - return this.allowInboundEnabled; - } - - /** - * Set the allowInboundEnabled property: Allow Inbound traffic to managed instance DTC. - * - * @param allowInboundEnabled the allowInboundEnabled value to set. - * @return the ManagedInstanceDtcTransactionManagerCommunicationSettings object itself. - */ - public ManagedInstanceDtcTransactionManagerCommunicationSettings - withAllowInboundEnabled(Boolean allowInboundEnabled) { - this.allowInboundEnabled = allowInboundEnabled; - return this; - } - - /** - * Get the allowOutboundEnabled property: Allow Outbound traffic of managed instance DTC. - * - * @return the allowOutboundEnabled value. - */ - public Boolean allowOutboundEnabled() { - return this.allowOutboundEnabled; - } - - /** - * Set the allowOutboundEnabled property: Allow Outbound traffic of managed instance DTC. - * - * @param allowOutboundEnabled the allowOutboundEnabled value to set. - * @return the ManagedInstanceDtcTransactionManagerCommunicationSettings object itself. - */ - public ManagedInstanceDtcTransactionManagerCommunicationSettings - withAllowOutboundEnabled(Boolean allowOutboundEnabled) { - this.allowOutboundEnabled = allowOutboundEnabled; - return this; - } - - /** - * Get the authentication property: Authentication type of managed instance DTC. - * - * @return the authentication value. - */ - public String authentication() { - return this.authentication; - } - - /** - * Set the authentication property: Authentication type of managed instance DTC. - * - * @param authentication the authentication value to set. - * @return the ManagedInstanceDtcTransactionManagerCommunicationSettings object itself. - */ - public ManagedInstanceDtcTransactionManagerCommunicationSettings withAuthentication(String authentication) { - this.authentication = authentication; - 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.writeBooleanField("allowInboundEnabled", this.allowInboundEnabled); - jsonWriter.writeBooleanField("allowOutboundEnabled", this.allowOutboundEnabled); - jsonWriter.writeStringField("authentication", this.authentication); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedInstanceDtcTransactionManagerCommunicationSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedInstanceDtcTransactionManagerCommunicationSettings 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 - * ManagedInstanceDtcTransactionManagerCommunicationSettings. - */ - public static ManagedInstanceDtcTransactionManagerCommunicationSettings fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedInstanceDtcTransactionManagerCommunicationSettings deserializedManagedInstanceDtcTransactionManagerCommunicationSettings - = new ManagedInstanceDtcTransactionManagerCommunicationSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("allowInboundEnabled".equals(fieldName)) { - deserializedManagedInstanceDtcTransactionManagerCommunicationSettings.allowInboundEnabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("allowOutboundEnabled".equals(fieldName)) { - deserializedManagedInstanceDtcTransactionManagerCommunicationSettings.allowOutboundEnabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("authentication".equals(fieldName)) { - deserializedManagedInstanceDtcTransactionManagerCommunicationSettings.authentication - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedInstanceDtcTransactionManagerCommunicationSettings; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceEditionCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceEditionCapability.java index fdb2ef3fb8ca..0434ad6d3f62 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceEditionCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceEditionCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -15,18 +15,13 @@ /** * The managed server capability. */ -@Immutable +@Fluent public final class ManagedInstanceEditionCapability implements JsonSerializable { /* * The managed server version name. */ private String name; - /* - * Whether or not this is a GPv2 variant of General Purpose edition. - */ - private Boolean isGeneralPurposeV2; - /* * The supported families. */ @@ -37,6 +32,11 @@ public final class ManagedInstanceEditionCapability implements JsonSerializable< */ private List supportedStorageCapabilities; + /* + * Whether or not zone redundancy is supported for the edition. + */ + private Boolean zoneRedundant; + /* * The status of the capability. */ @@ -50,7 +50,7 @@ public final class ManagedInstanceEditionCapability implements JsonSerializable< /** * Creates an instance of ManagedInstanceEditionCapability class. */ - private ManagedInstanceEditionCapability() { + public ManagedInstanceEditionCapability() { } /** @@ -62,15 +62,6 @@ public String name() { return this.name; } - /** - * Get the isGeneralPurposeV2 property: Whether or not this is a GPv2 variant of General Purpose edition. - * - * @return the isGeneralPurposeV2 value. - */ - public Boolean isGeneralPurposeV2() { - return this.isGeneralPurposeV2; - } - /** * Get the supportedFamilies property: The supported families. * @@ -89,6 +80,15 @@ public List supportedStorageCapabilities() { return this.supportedStorageCapabilities; } + /** + * Get the zoneRedundant property: Whether or not zone redundancy is supported for the edition. + * + * @return the zoneRedundant value. + */ + public Boolean zoneRedundant() { + return this.zoneRedundant; + } + /** * Get the status property: The status of the capability. * @@ -107,6 +107,17 @@ public String reason() { return this.reason; } + /** + * Set the reason property: The reason for the capability not being available. + * + * @param reason the reason value to set. + * @return the ManagedInstanceEditionCapability object itself. + */ + public ManagedInstanceEditionCapability withReason(String reason) { + this.reason = reason; + return this; + } + /** * Validates the instance. * @@ -149,9 +160,6 @@ public static ManagedInstanceEditionCapability fromJson(JsonReader jsonReader) t if ("name".equals(fieldName)) { deserializedManagedInstanceEditionCapability.name = reader.getString(); - } else if ("isGeneralPurposeV2".equals(fieldName)) { - deserializedManagedInstanceEditionCapability.isGeneralPurposeV2 - = reader.getNullable(JsonReader::getBoolean); } else if ("supportedFamilies".equals(fieldName)) { List supportedFamilies = reader.readArray(reader1 -> ManagedInstanceFamilyCapability.fromJson(reader1)); @@ -161,6 +169,9 @@ public static ManagedInstanceEditionCapability fromJson(JsonReader jsonReader) t = reader.readArray(reader1 -> StorageCapability.fromJson(reader1)); deserializedManagedInstanceEditionCapability.supportedStorageCapabilities = supportedStorageCapabilities; + } else if ("zoneRedundant".equals(fieldName)) { + deserializedManagedInstanceEditionCapability.zoneRedundant + = reader.getNullable(JsonReader::getBoolean); } else if ("status".equals(fieldName)) { deserializedManagedInstanceEditionCapability.status = CapabilityStatus.fromString(reader.getString()); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceEncryptionProtectorListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceEncryptionProtectorListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceEncryptionProtectorListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceEncryptionProtectorListResult.java index ed1cc9fc91d1..38c2abbf5741 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceEncryptionProtectorListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceEncryptionProtectorListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a ManagedInstanceEncryptionProtector list operation. + * A list of managed instance encryption protectors. */ @Immutable public final class ManagedInstanceEncryptionProtectorListResult implements JsonSerializable { /* - * The ManagedInstanceEncryptionProtector items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedInstanceEncryptionProtectorListResult class. */ - private ManagedInstanceEncryptionProtectorListResult() { + public ManagedInstanceEncryptionProtectorListResult() { } /** - * Get the value property: The ManagedInstanceEncryptionProtector items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedInstanceEncryptionProtectorListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagedInstanceEncryptionProtectorListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedInstanceEncryptionProtectorListResult 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 ManagedInstanceEncryptionProtectorListResult. */ public static ManagedInstanceEncryptionProtectorListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceExternalAdministrator.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceExternalAdministrator.java index d4f8252521be..3d799ed7cf5f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceExternalAdministrator.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceExternalAdministrator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceFamilyCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceFamilyCapability.java index dd711e12c120..5f3748ef668e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceFamilyCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceFamilyCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -15,7 +15,7 @@ /** * The managed server family capability. */ -@Immutable +@Fluent public final class ManagedInstanceFamilyCapability implements JsonSerializable { /* * Family name. @@ -27,11 +27,6 @@ public final class ManagedInstanceFamilyCapability implements JsonSerializable supportedLicenseTypes = reader.readArray(reader1 -> LicenseTypeCapability.fromJson(reader1)); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceKeyListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceKeyListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceKeyListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceKeyListResult.java index e78ca78f9ed9..61e85914cdd4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceKeyListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceKeyListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a ManagedInstanceKey list operation. + * A list of managed instance keys. */ @Immutable public final class ManagedInstanceKeyListResult implements JsonSerializable { /* - * The ManagedInstanceKey items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedInstanceKeyListResult class. */ - private ManagedInstanceKeyListResult() { + public ManagedInstanceKeyListResult() { } /** - * Get the value property: The ManagedInstanceKey items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedInstanceKeyListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagedInstanceKeyListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedInstanceKeyListResult 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 ManagedInstanceKeyListResult. */ public static ManagedInstanceKeyListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLicenseType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLicenseType.java index c067b7835557..7b7b43b67100 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLicenseType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLicenseType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -13,12 +13,12 @@ */ public final class ManagedInstanceLicenseType extends ExpandableStringEnum { /** - * LicenseIncluded. + * Static value LicenseIncluded for ManagedInstanceLicenseType. */ public static final ManagedInstanceLicenseType LICENSE_INCLUDED = fromString("LicenseIncluded"); /** - * BasePrice. + * Static value BasePrice for ManagedInstanceLicenseType. */ public static final ManagedInstanceLicenseType BASE_PRICE = fromString("BasePrice"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceListResult.java index 5007830ad927..6ce1c3f912a5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a ManagedInstance list operation. + * A list of managed instances. */ @Immutable public final class ManagedInstanceListResult implements JsonSerializable { /* - * The ManagedInstance items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedInstanceListResult class. */ - private ManagedInstanceListResult() { + public ManagedInstanceListResult() { } /** - * Get the value property: The ManagedInstance items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property value in model ManagedInstanceListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagedInstanceListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedInstanceListResult 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 ManagedInstanceListResult. */ public static ManagedInstanceListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceLongTermRetentionBackupListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionBackupListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceLongTermRetentionBackupListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionBackupListResult.java index e9982243efab..60b451e20a08 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceLongTermRetentionBackupListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionBackupListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a ManagedInstanceLongTermRetentionBackup list operation. + * A list of long term retention backups for managed database(s). */ @Immutable public final class ManagedInstanceLongTermRetentionBackupListResult implements JsonSerializable { /* - * The ManagedInstanceLongTermRetentionBackup items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedInstanceLongTermRetentionBackupListResult class. */ - private ManagedInstanceLongTermRetentionBackupListResult() { + public ManagedInstanceLongTermRetentionBackupListResult() { } /** - * Get the value property: The ManagedInstanceLongTermRetentionBackup items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedInstanceLongTermRetentionBackupListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagedInstanceLongTermRetentionBackupListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedInstanceLongTermRetentionBackupListResult 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 ManagedInstanceLongTermRetentionBackupListResult. */ public static ManagedInstanceLongTermRetentionBackupListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceLongTermRetentionPolicyListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionPolicyListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceLongTermRetentionPolicyListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionPolicyListResult.java index 278dd5e7e29d..3aaf8031bd43 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceLongTermRetentionPolicyListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionPolicyListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a ManagedInstanceLongTermRetentionPolicy list operation. + * A list of long term retention policies. */ @Immutable public final class ManagedInstanceLongTermRetentionPolicyListResult implements JsonSerializable { /* - * The ManagedInstanceLongTermRetentionPolicy items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedInstanceLongTermRetentionPolicyListResult class. */ - private ManagedInstanceLongTermRetentionPolicyListResult() { + public ManagedInstanceLongTermRetentionPolicyListResult() { } /** - * Get the value property: The ManagedInstanceLongTermRetentionPolicy items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedInstanceLongTermRetentionPolicyListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagedInstanceLongTermRetentionPolicyListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedInstanceLongTermRetentionPolicyListResult 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 ManagedInstanceLongTermRetentionPolicyListResult. */ public static ManagedInstanceLongTermRetentionPolicyListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionPolicyName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionPolicyName.java index de6cf0cb4238..1e6c25e63371 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionPolicyName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionPolicyName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -13,7 +13,7 @@ public final class ManagedInstanceLongTermRetentionPolicyName extends ExpandableStringEnum { /** - * default. + * Static value default for ManagedInstanceLongTermRetentionPolicyName. */ public static final ManagedInstanceLongTermRetentionPolicyName DEFAULT = fromString("default"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceMaintenanceConfigurationCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceMaintenanceConfigurationCapability.java index 9f4be6b8c71f..5ab57476cc30 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceMaintenanceConfigurationCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceMaintenanceConfigurationCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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,7 +14,7 @@ /** * The maintenance configuration capability. */ -@Immutable +@Fluent public final class ManagedInstanceMaintenanceConfigurationCapability implements JsonSerializable { /* @@ -35,7 +35,7 @@ public final class ManagedInstanceMaintenanceConfigurationCapability /** * Creates an instance of ManagedInstanceMaintenanceConfigurationCapability class. */ - private ManagedInstanceMaintenanceConfigurationCapability() { + public ManagedInstanceMaintenanceConfigurationCapability() { } /** @@ -65,6 +65,17 @@ public String reason() { return this.reason; } + /** + * Set the reason property: The reason for the capability not being available. + * + * @param reason the reason value to set. + * @return the ManagedInstanceMaintenanceConfigurationCapability object itself. + */ + public ManagedInstanceMaintenanceConfigurationCapability withReason(String reason) { + this.reason = reason; + return this; + } + /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceOperationListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceOperationListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationListResult.java index 5889d1b6468a..9d4775c1f748 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceOperationListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a ManagedInstanceOperation list operation. + * The response to a list managed instance operations request. */ @Immutable public final class ManagedInstanceOperationListResult implements JsonSerializable { /* - * The ManagedInstanceOperation items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedInstanceOperationListResult class. */ - private ManagedInstanceOperationListResult() { + public ManagedInstanceOperationListResult() { } /** - * Get the value property: The ManagedInstanceOperation items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedInstanceOperationListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagedInstanceOperationListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedInstanceOperationListResult 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 ManagedInstanceOperationListResult. */ public static ManagedInstanceOperationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationParametersPair.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationParametersPair.java index 6e6524c4615d..93ab7ca16f9d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationParametersPair.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationParametersPair.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -30,7 +30,7 @@ public final class ManagedInstanceOperationParametersPair /** * Creates an instance of ManagedInstanceOperationParametersPair class. */ - private ManagedInstanceOperationParametersPair() { + public ManagedInstanceOperationParametersPair() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationSteps.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationSteps.java index 8a26e12e281a..06817284252e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationSteps.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationSteps.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -35,7 +35,7 @@ public final class ManagedInstanceOperationSteps implements JsonSerializable { /* - * The ManagedInstancePrivateEndpointConnection items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedInstancePrivateEndpointConnectionListResult class. */ - private ManagedInstancePrivateEndpointConnectionListResult() { + public ManagedInstancePrivateEndpointConnectionListResult() { } /** - * Get the value property: The ManagedInstancePrivateEndpointConnection items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,26 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedInstancePrivateEndpointConnectionListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER - = new ClientLogger(ManagedInstancePrivateEndpointConnectionListResult.class); - /** * {@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(); } @@ -89,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedInstancePrivateEndpointConnectionListResult 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 ManagedInstancePrivateEndpointConnectionListResult. */ public static ManagedInstancePrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateEndpointProperty.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateEndpointProperty.java index ff7acdd2776d..f92e73bca8bb 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateEndpointProperty.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateEndpointProperty.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstancePrivateLinkListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstancePrivateLinkListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkListResult.java index cf59f4c0f982..b0183affddc5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstancePrivateLinkListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a ManagedInstancePrivateLink list operation. + * A list of private link resources. */ @Immutable public final class ManagedInstancePrivateLinkListResult implements JsonSerializable { /* - * The ManagedInstancePrivateLink items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedInstancePrivateLinkListResult class. */ - private ManagedInstancePrivateLinkListResult() { + public ManagedInstancePrivateLinkListResult() { } /** - * Get the value property: The ManagedInstancePrivateLink items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedInstancePrivateLinkListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagedInstancePrivateLinkListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedInstancePrivateLinkListResult 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 ManagedInstancePrivateLinkListResult. */ public static ManagedInstancePrivateLinkListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkProperties.java index 3cc91aff8ac1..b15ed8678316 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -36,7 +36,7 @@ public final class ManagedInstancePrivateLinkProperties /** * Creates an instance of ManagedInstancePrivateLinkProperties class. */ - private ManagedInstancePrivateLinkProperties() { + public ManagedInstancePrivateLinkProperties() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkServiceConnectionStateProperty.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkServiceConnectionStateProperty.java index ea4f0d7964d4..4c7f335d54e7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkServiceConnectionStateProperty.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkServiceConnectionStateProperty.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePropertiesProvisioningState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePropertiesProvisioningState.java new file mode 100644 index 000000000000..c96a33d82a84 --- /dev/null +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePropertiesProvisioningState.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.sql.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ManagedInstancePropertiesProvisioningState. + */ +public final class ManagedInstancePropertiesProvisioningState + extends ExpandableStringEnum { + /** + * Static value Creating for ManagedInstancePropertiesProvisioningState. + */ + public static final ManagedInstancePropertiesProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Deleting for ManagedInstancePropertiesProvisioningState. + */ + public static final ManagedInstancePropertiesProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Updating for ManagedInstancePropertiesProvisioningState. + */ + public static final ManagedInstancePropertiesProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Unknown for ManagedInstancePropertiesProvisioningState. + */ + public static final ManagedInstancePropertiesProvisioningState UNKNOWN = fromString("Unknown"); + + /** + * Static value Succeeded for ManagedInstancePropertiesProvisioningState. + */ + public static final ManagedInstancePropertiesProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ManagedInstancePropertiesProvisioningState. + */ + public static final ManagedInstancePropertiesProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Accepted for ManagedInstancePropertiesProvisioningState. + */ + public static final ManagedInstancePropertiesProvisioningState ACCEPTED = fromString("Accepted"); + + /** + * Static value Created for ManagedInstancePropertiesProvisioningState. + */ + public static final ManagedInstancePropertiesProvisioningState CREATED = fromString("Created"); + + /** + * Static value Deleted for ManagedInstancePropertiesProvisioningState. + */ + public static final ManagedInstancePropertiesProvisioningState DELETED = fromString("Deleted"); + + /** + * Static value Unrecognized for ManagedInstancePropertiesProvisioningState. + */ + public static final ManagedInstancePropertiesProvisioningState UNRECOGNIZED = fromString("Unrecognized"); + + /** + * Static value Running for ManagedInstancePropertiesProvisioningState. + */ + public static final ManagedInstancePropertiesProvisioningState RUNNING = fromString("Running"); + + /** + * Static value Canceled for ManagedInstancePropertiesProvisioningState. + */ + public static final ManagedInstancePropertiesProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value NotSpecified for ManagedInstancePropertiesProvisioningState. + */ + public static final ManagedInstancePropertiesProvisioningState NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value Registering for ManagedInstancePropertiesProvisioningState. + */ + public static final ManagedInstancePropertiesProvisioningState REGISTERING = fromString("Registering"); + + /** + * Static value TimedOut for ManagedInstancePropertiesProvisioningState. + */ + public static final ManagedInstancePropertiesProvisioningState TIMED_OUT = fromString("TimedOut"); + + /** + * Creates a new instance of ManagedInstancePropertiesProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedInstancePropertiesProvisioningState() { + } + + /** + * Creates or finds a ManagedInstancePropertiesProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedInstancePropertiesProvisioningState. + */ + public static ManagedInstancePropertiesProvisioningState fromString(String name) { + return fromString(name, ManagedInstancePropertiesProvisioningState.class); + } + + /** + * Gets known ManagedInstancePropertiesProvisioningState values. + * + * @return known ManagedInstancePropertiesProvisioningState values. + */ + public static Collection values() { + return values(ManagedInstancePropertiesProvisioningState.class); + } +} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceProxyOverride.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceProxyOverride.java index a4c050923a37..516016981c03 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceProxyOverride.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceProxyOverride.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,17 +12,17 @@ */ public final class ManagedInstanceProxyOverride extends ExpandableStringEnum { /** - * Proxy. + * Static value Proxy for ManagedInstanceProxyOverride. */ public static final ManagedInstanceProxyOverride PROXY = fromString("Proxy"); /** - * Redirect. + * Static value Redirect for ManagedInstanceProxyOverride. */ public static final ManagedInstanceProxyOverride REDIRECT = fromString("Redirect"); /** - * Default. + * Static value Default for ManagedInstanceProxyOverride. */ public static final ManagedInstanceProxyOverride DEFAULT = fromString("Default"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceQueryStatistics.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceQueryStatistics.java similarity index 73% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceQueryStatistics.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceQueryStatistics.java index 490e2b08c70a..55b4a45cbbb2 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceQueryStatistics.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceQueryStatistics.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,23 +19,23 @@ @Immutable public final class ManagedInstanceQueryStatistics implements JsonSerializable { /* - * The QueryStatistics items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedInstanceQueryStatistics class. */ - private ManagedInstanceQueryStatistics() { + public ManagedInstanceQueryStatistics() { } /** - * Get the value property: The QueryStatistics items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedInstanceQueryStatistics")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagedInstanceQueryStatistics.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedInstanceQueryStatistics 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 ManagedInstanceQueryStatistics. */ public static ManagedInstanceQueryStatistics fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceUpdate.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceUpdate.java index b800eae2c089..0ef7fa54b150 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceUpdate.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -116,11 +116,11 @@ public ManagedInstanceUpdate withTags(Map tags) { } /** - * Get the provisioningState property: Provisioning state of managed instance. + * Get the provisioningState property: The provisioningState property. * * @return the provisioningState value. */ - public ProvisioningState provisioningState() { + public ManagedInstancePropertiesProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } @@ -166,29 +166,6 @@ public String fullyQualifiedDomainName() { return this.innerProperties() == null ? null : this.innerProperties().fullyQualifiedDomainName(); } - /** - * Get the isGeneralPurposeV2 property: Whether or not this is a GPv2 variant of General Purpose edition. - * - * @return the isGeneralPurposeV2 value. - */ - public Boolean isGeneralPurposeV2() { - return this.innerProperties() == null ? null : this.innerProperties().isGeneralPurposeV2(); - } - - /** - * Set the isGeneralPurposeV2 property: Whether or not this is a GPv2 variant of General Purpose edition. - * - * @param isGeneralPurposeV2 the isGeneralPurposeV2 value to set. - * @return the ManagedInstanceUpdate object itself. - */ - public ManagedInstanceUpdate withIsGeneralPurposeV2(Boolean isGeneralPurposeV2) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withIsGeneralPurposeV2(isGeneralPurposeV2); - return this; - } - /** * Get the administratorLogin property: Administrator username for the managed instance. Can only be specified when * the managed instance is being created (and is required for creation). @@ -297,44 +274,7 @@ public ManagedInstanceUpdate withLicenseType(ManagedInstanceLicenseType licenseT } /** - * Get the hybridSecondaryUsage property: Hybrid secondary usage. Possible values are 'Active' (default value) and - * 'Passive' (customer uses the secondary as Passive DR). - * - * @return the hybridSecondaryUsage value. - */ - public HybridSecondaryUsage hybridSecondaryUsage() { - return this.innerProperties() == null ? null : this.innerProperties().hybridSecondaryUsage(); - } - - /** - * Set the hybridSecondaryUsage property: Hybrid secondary usage. Possible values are 'Active' (default value) and - * 'Passive' (customer uses the secondary as Passive DR). - * - * @param hybridSecondaryUsage the hybridSecondaryUsage value to set. - * @return the ManagedInstanceUpdate object itself. - */ - public ManagedInstanceUpdate withHybridSecondaryUsage(HybridSecondaryUsage hybridSecondaryUsage) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withHybridSecondaryUsage(hybridSecondaryUsage); - return this; - } - - /** - * Get the hybridSecondaryUsageDetected property: Hybrid secondary usage detected. Possible values are 'Active' - * (customer does not meet the requirements to use the secondary as Passive DR) and 'Passive' (customer meets the - * requirements to use the secondary as Passive DR). - * - * @return the hybridSecondaryUsageDetected value. - */ - public HybridSecondaryUsageDetected hybridSecondaryUsageDetected() { - return this.innerProperties() == null ? null : this.innerProperties().hybridSecondaryUsageDetected(); - } - - /** - * Get the vCores property: The number of vCores. Allowed values: 4, 6, 8, 10, 12, 16, 20, 24, 32, 40, 48, 56, 64, - * 80, 96, 128. Supported vCores depends on the selected hardware family and service tier. + * Get the vCores property: The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. * * @return the vCores value. */ @@ -343,8 +283,7 @@ public Integer vCores() { } /** - * Set the vCores property: The number of vCores. Allowed values: 4, 6, 8, 10, 12, 16, 20, 24, 32, 40, 48, 56, 64, - * 80, 96, 128. Supported vCores depends on the selected hardware family and service tier. + * Set the vCores property: The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. * * @param vCores the vCores value to set. * @return the ManagedInstanceUpdate object itself. @@ -358,7 +297,7 @@ public ManagedInstanceUpdate withVCores(Integer vCores) { } /** - * Get the storageSizeInGB property: Storage size in GB. Minimum value: 32. Maximum value: 32768. Increments of 32 + * Get the storageSizeInGB property: Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 * GB allowed only. Maximum value depends on the selected hardware family and number of vCores. * * @return the storageSizeInGB value. @@ -368,7 +307,7 @@ public Integer storageSizeInGB() { } /** - * Set the storageSizeInGB property: Storage size in GB. Minimum value: 32. Maximum value: 32768. Increments of 32 + * Set the storageSizeInGB property: Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 * GB allowed only. Maximum value depends on the selected hardware family and number of vCores. * * @param storageSizeInGB the storageSizeInGB value to set. @@ -382,83 +321,6 @@ public ManagedInstanceUpdate withStorageSizeInGB(Integer storageSizeInGB) { return this; } - /** - * Get the storageIOps property: Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps - * allowed only. Maximum value depends on the selected hardware family and number of vCores. - * - * @return the storageIOps value. - */ - public Integer storageIOps() { - return this.innerProperties() == null ? null : this.innerProperties().storageIOps(); - } - - /** - * Set the storageIOps property: Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps - * allowed only. Maximum value depends on the selected hardware family and number of vCores. - * - * @param storageIOps the storageIOps value to set. - * @return the ManagedInstanceUpdate object itself. - */ - public ManagedInstanceUpdate withStorageIOps(Integer storageIOps) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withStorageIOps(storageIOps); - return this; - } - - /** - * Get the storageThroughputMBps property: Storage throughput MBps parameter is not supported in the instance - * create/update operation. - * - * @return the storageThroughputMBps value. - */ - public Integer storageThroughputMBps() { - return this.innerProperties() == null ? null : this.innerProperties().storageThroughputMBps(); - } - - /** - * Set the storageThroughputMBps property: Storage throughput MBps parameter is not supported in the instance - * create/update operation. - * - * @param storageThroughputMBps the storageThroughputMBps value to set. - * @return the ManagedInstanceUpdate object itself. - */ - public ManagedInstanceUpdate withStorageThroughputMBps(Integer storageThroughputMBps) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withStorageThroughputMBps(storageThroughputMBps); - return this; - } - - /** - * Get the memorySizeInGB property: Memory size in GB. Minimum value: 28. Maximum value: 870. Minimum and maximum - * value depend on the number of vCores and service tier. Read more about resource limits: - * https://aka.ms/mi-resource-limits-api. - * - * @return the memorySizeInGB value. - */ - public Integer memorySizeInGB() { - return this.innerProperties() == null ? null : this.innerProperties().memorySizeInGB(); - } - - /** - * Set the memorySizeInGB property: Memory size in GB. Minimum value: 28. Maximum value: 870. Minimum and maximum - * value depend on the number of vCores and service tier. Read more about resource limits: - * https://aka.ms/mi-resource-limits-api. - * - * @param memorySizeInGB the memorySizeInGB value to set. - * @return the ManagedInstanceUpdate object itself. - */ - public ManagedInstanceUpdate withMemorySizeInGB(Integer memorySizeInGB) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withMemorySizeInGB(memorySizeInGB); - return this; - } - /** * Get the collation property: Collation of the managed instance. * @@ -765,7 +627,7 @@ public BackupStorageRedundancy requestedBackupStorageRedundancy() { } /** - * Get the zoneRedundant property: Whether or not the zone-redundancy is enabled. + * Get the zoneRedundant property: Whether or not the multi-az is enabled. * * @return the zoneRedundant value. */ @@ -774,7 +636,7 @@ public Boolean zoneRedundant() { } /** - * Set the zoneRedundant property: Whether or not the zone-redundancy is enabled. + * Set the zoneRedundant property: Whether or not the multi-az is enabled. * * @param zoneRedundant the zoneRedundant value to set. * @return the ManagedInstanceUpdate object itself. @@ -836,9 +698,7 @@ public ManagedInstanceUpdate withKeyId(String keyId) { } /** - * Get the administrators property: The Azure Active Directory administrator can be utilized during instance - * creation and for instance updates, except for the azureADOnlyAuthentication property. To update the - * azureADOnlyAuthentication property, individual API must be used. + * Get the administrators property: The Azure Active Directory administrator of the server. * * @return the administrators value. */ @@ -847,9 +707,7 @@ public ManagedInstanceExternalAdministrator administrators() { } /** - * Set the administrators property: The Azure Active Directory administrator can be utilized during instance - * creation and for instance updates, except for the azureADOnlyAuthentication property. To update the - * azureADOnlyAuthentication property, individual API must be used. + * Set the administrators property: The Azure Active Directory administrator of the server. * * @param administrators the administrators value to set. * @return the ManagedInstanceUpdate object itself. @@ -885,130 +743,6 @@ public ManagedInstanceUpdate withServicePrincipal(ServicePrincipal servicePrinci return this; } - /** - * Get the virtualClusterId property: Virtual cluster resource id for the Managed Instance. - * - * @return the virtualClusterId value. - */ - public String virtualClusterId() { - return this.innerProperties() == null ? null : this.innerProperties().virtualClusterId(); - } - - /** - * Get the externalGovernanceStatus property: Status of external governance. - * - * @return the externalGovernanceStatus value. - */ - public ExternalGovernanceStatus externalGovernanceStatus() { - return this.innerProperties() == null ? null : this.innerProperties().externalGovernanceStatus(); - } - - /** - * Get the pricingModel property: Pricing model of Managed Instance. - * - * @return the pricingModel value. - */ - public PricingModel pricingModel() { - return this.innerProperties() == null ? null : this.innerProperties().pricingModel(); - } - - /** - * Set the pricingModel property: Pricing model of Managed Instance. - * - * @param pricingModel the pricingModel value to set. - * @return the ManagedInstanceUpdate object itself. - */ - public ManagedInstanceUpdate withPricingModel(PricingModel pricingModel) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withPricingModel(pricingModel); - return this; - } - - /** - * Get the createTime property: Specifies the point in time (ISO8601 format) of the Managed Instance creation. - * - * @return the createTime value. - */ - public OffsetDateTime createTime() { - return this.innerProperties() == null ? null : this.innerProperties().createTime(); - } - - /** - * Get the authenticationMetadata property: The managed instance's authentication metadata lookup mode. - * - * @return the authenticationMetadata value. - */ - public AuthMetadataLookupModes authenticationMetadata() { - return this.innerProperties() == null ? null : this.innerProperties().authenticationMetadata(); - } - - /** - * Set the authenticationMetadata property: The managed instance's authentication metadata lookup mode. - * - * @param authenticationMetadata the authenticationMetadata value to set. - * @return the ManagedInstanceUpdate object itself. - */ - public ManagedInstanceUpdate withAuthenticationMetadata(AuthMetadataLookupModes authenticationMetadata) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withAuthenticationMetadata(authenticationMetadata); - return this; - } - - /** - * Get the databaseFormat property: Specifies the internal format of instance databases specific to the SQL engine - * version. - * - * @return the databaseFormat value. - */ - public ManagedInstanceDatabaseFormat databaseFormat() { - return this.innerProperties() == null ? null : this.innerProperties().databaseFormat(); - } - - /** - * Set the databaseFormat property: Specifies the internal format of instance databases specific to the SQL engine - * version. - * - * @param databaseFormat the databaseFormat value to set. - * @return the ManagedInstanceUpdate object itself. - */ - public ManagedInstanceUpdate withDatabaseFormat(ManagedInstanceDatabaseFormat databaseFormat) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withDatabaseFormat(databaseFormat); - return this; - } - - /** - * Get the requestedLogicalAvailabilityZone property: Specifies the logical availability zone Managed Instance is - * pinned to. - * - * @return the requestedLogicalAvailabilityZone value. - */ - public AvailabilityZoneType requestedLogicalAvailabilityZone() { - return this.innerProperties() == null ? null : this.innerProperties().requestedLogicalAvailabilityZone(); - } - - /** - * Set the requestedLogicalAvailabilityZone property: Specifies the logical availability zone Managed Instance is - * pinned to. - * - * @param requestedLogicalAvailabilityZone the requestedLogicalAvailabilityZone value to set. - * @return the ManagedInstanceUpdate object itself. - */ - public ManagedInstanceUpdate - withRequestedLogicalAvailabilityZone(AvailabilityZoneType requestedLogicalAvailabilityZone) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedInstanceProperties(); - } - this.innerProperties().withRequestedLogicalAvailabilityZone(requestedLogicalAvailabilityZone); - return this; - } - /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest.java deleted file mode 100644 index 37f81e1c59a2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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; - -/** - * Validate azure key vault encryption key. - */ -@Fluent -public final class ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest - implements JsonSerializable { - /* - * The URI of the key. - */ - private String tdeKeyUri; - - /** - * Creates an instance of ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest class. - */ - public ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest() { - } - - /** - * Get the tdeKeyUri property: The URI of the key. - * - * @return the tdeKeyUri value. - */ - public String tdeKeyUri() { - return this.tdeKeyUri; - } - - /** - * Set the tdeKeyUri property: The URI of the key. - * - * @param tdeKeyUri the tdeKeyUri value to set. - * @return the ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest object itself. - */ - public ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest withTdeKeyUri(String tdeKeyUri) { - this.tdeKeyUri = tdeKeyUri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (tdeKeyUri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property tdeKeyUri in model ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest")); - } - } - - private static final ClientLogger LOGGER - = new ClientLogger(ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("tdeKeyUri", this.tdeKeyUri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest 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 - * ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest. - */ - public static ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest deserializedManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest - = new ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tdeKeyUri".equals(fieldName)) { - deserializedManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest.tdeKeyUri = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVcoresCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVcoresCapability.java index 965c7ceb3994..4fe6869387e7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVcoresCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVcoresCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -15,7 +15,7 @@ /** * The managed instance virtual cores capability. */ -@Immutable +@Fluent public final class ManagedInstanceVcoresCapability implements JsonSerializable { /* * The virtual cores identifier. @@ -27,16 +27,6 @@ public final class ManagedInstanceVcoresCapability implements JsonSerializable supportedStorageSizes; - /* - * Included storage IOps. - */ - private Long includedStorageIOps; - - /* - * Storage IOps ranges. - */ - private MaxLimitRangeCapability supportedStorageIOps; - - /* - * Min IOps override factor per selected storage GB. - */ - private Double iopsMinValueOverrideFactorPerSelectedStorageGB; - - /* - * Included IOps override factor per selected storage GB. - */ - private Double iopsIncludedValueOverrideFactorPerSelectedStorageGB; - - /* - * Included storage throughput MBps. - */ - private Long includedStorageThroughputMBps; - - /* - * Storage throughput MBps ranges. - */ - private MaxLimitRangeCapability supportedStorageThroughputMBps; - - /* - * Min throughput MBps override factor per selected storage GB. - */ - private Double throughputMBpsMinValueOverrideFactorPerSelectedStorageGB; - - /* - * Included throughput MBps override factor per selected storage GB. - */ - private Double throughputMBpsIncludedValueOverrideFactorPerSelectedStorageGB; - /* * True if this service objective is supported for managed instances in an instance pool. */ @@ -115,7 +65,7 @@ public final class ManagedInstanceVcoresCapability implements JsonSerializable supportedStorageSizes() { return this.supportedStorageSizes; } - /** - * Get the includedStorageIOps property: Included storage IOps. - * - * @return the includedStorageIOps value. - */ - public Long includedStorageIOps() { - return this.includedStorageIOps; - } - - /** - * Get the supportedStorageIOps property: Storage IOps ranges. - * - * @return the supportedStorageIOps value. - */ - public MaxLimitRangeCapability supportedStorageIOps() { - return this.supportedStorageIOps; - } - - /** - * Get the iopsMinValueOverrideFactorPerSelectedStorageGB property: Min IOps override factor per selected storage - * GB. - * - * @return the iopsMinValueOverrideFactorPerSelectedStorageGB value. - */ - public Double iopsMinValueOverrideFactorPerSelectedStorageGB() { - return this.iopsMinValueOverrideFactorPerSelectedStorageGB; - } - - /** - * Get the iopsIncludedValueOverrideFactorPerSelectedStorageGB property: Included IOps override factor per selected - * storage GB. - * - * @return the iopsIncludedValueOverrideFactorPerSelectedStorageGB value. - */ - public Double iopsIncludedValueOverrideFactorPerSelectedStorageGB() { - return this.iopsIncludedValueOverrideFactorPerSelectedStorageGB; - } - - /** - * Get the includedStorageThroughputMBps property: Included storage throughput MBps. - * - * @return the includedStorageThroughputMBps value. - */ - public Long includedStorageThroughputMBps() { - return this.includedStorageThroughputMBps; - } - - /** - * Get the supportedStorageThroughputMBps property: Storage throughput MBps ranges. - * - * @return the supportedStorageThroughputMBps value. - */ - public MaxLimitRangeCapability supportedStorageThroughputMBps() { - return this.supportedStorageThroughputMBps; - } - - /** - * Get the throughputMBpsMinValueOverrideFactorPerSelectedStorageGB property: Min throughput MBps override factor - * per selected storage GB. - * - * @return the throughputMBpsMinValueOverrideFactorPerSelectedStorageGB value. - */ - public Double throughputMBpsMinValueOverrideFactorPerSelectedStorageGB() { - return this.throughputMBpsMinValueOverrideFactorPerSelectedStorageGB; - } - - /** - * Get the throughputMBpsIncludedValueOverrideFactorPerSelectedStorageGB property: Included throughput MBps override - * factor per selected storage GB. - * - * @return the throughputMBpsIncludedValueOverrideFactorPerSelectedStorageGB value. - */ - public Double throughputMBpsIncludedValueOverrideFactorPerSelectedStorageGB() { - return this.throughputMBpsIncludedValueOverrideFactorPerSelectedStorageGB; - } - /** * Get the instancePoolSupported property: True if this service objective is supported for managed instances in an * instance pool. @@ -295,30 +151,29 @@ public String reason() { return this.reason; } + /** + * Set the reason property: The reason for the capability not being available. + * + * @param reason the reason value to set. + * @return the ManagedInstanceVcoresCapability object itself. + */ + public ManagedInstanceVcoresCapability withReason(String reason) { + this.reason = reason; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (supportedMemorySizesInGB() != null) { - supportedMemorySizesInGB().validate(); - } - if (supportedMemoryLimitsMB() != null) { - supportedMemoryLimitsMB().validate(); - } if (includedMaxSize() != null) { includedMaxSize().validate(); } if (supportedStorageSizes() != null) { supportedStorageSizes().forEach(e -> e.validate()); } - if (supportedStorageIOps() != null) { - supportedStorageIOps().validate(); - } - if (supportedStorageThroughputMBps() != null) { - supportedStorageThroughputMBps().validate(); - } if (supportedMaintenanceConfigurations() != null) { supportedMaintenanceConfigurations().forEach(e -> e.validate()); } @@ -354,42 +209,12 @@ public static ManagedInstanceVcoresCapability fromJson(JsonReader jsonReader) th deserializedManagedInstanceVcoresCapability.name = reader.getString(); } else if ("value".equals(fieldName)) { deserializedManagedInstanceVcoresCapability.value = reader.getNullable(JsonReader::getInt); - } else if ("supportedMemorySizesInGB".equals(fieldName)) { - deserializedManagedInstanceVcoresCapability.supportedMemorySizesInGB - = MaxLimitRangeCapability.fromJson(reader); - } else if ("supportedMemoryLimitsMB".equals(fieldName)) { - deserializedManagedInstanceVcoresCapability.supportedMemoryLimitsMB - = MaxLimitRangeCapability.fromJson(reader); } else if ("includedMaxSize".equals(fieldName)) { deserializedManagedInstanceVcoresCapability.includedMaxSize = MaxSizeCapability.fromJson(reader); } else if ("supportedStorageSizes".equals(fieldName)) { List supportedStorageSizes = reader.readArray(reader1 -> MaxSizeRangeCapability.fromJson(reader1)); deserializedManagedInstanceVcoresCapability.supportedStorageSizes = supportedStorageSizes; - } else if ("includedStorageIOps".equals(fieldName)) { - deserializedManagedInstanceVcoresCapability.includedStorageIOps - = reader.getNullable(JsonReader::getLong); - } else if ("supportedStorageIOps".equals(fieldName)) { - deserializedManagedInstanceVcoresCapability.supportedStorageIOps - = MaxLimitRangeCapability.fromJson(reader); - } else if ("iopsMinValueOverrideFactorPerSelectedStorageGB".equals(fieldName)) { - deserializedManagedInstanceVcoresCapability.iopsMinValueOverrideFactorPerSelectedStorageGB - = reader.getNullable(JsonReader::getDouble); - } else if ("iopsIncludedValueOverrideFactorPerSelectedStorageGB".equals(fieldName)) { - deserializedManagedInstanceVcoresCapability.iopsIncludedValueOverrideFactorPerSelectedStorageGB - = reader.getNullable(JsonReader::getDouble); - } else if ("includedStorageThroughputMBps".equals(fieldName)) { - deserializedManagedInstanceVcoresCapability.includedStorageThroughputMBps - = reader.getNullable(JsonReader::getLong); - } else if ("supportedStorageThroughputMBps".equals(fieldName)) { - deserializedManagedInstanceVcoresCapability.supportedStorageThroughputMBps - = MaxLimitRangeCapability.fromJson(reader); - } else if ("throughputMBpsMinValueOverrideFactorPerSelectedStorageGB".equals(fieldName)) { - deserializedManagedInstanceVcoresCapability.throughputMBpsMinValueOverrideFactorPerSelectedStorageGB - = reader.getNullable(JsonReader::getDouble); - } else if ("throughputMBpsIncludedValueOverrideFactorPerSelectedStorageGB".equals(fieldName)) { - deserializedManagedInstanceVcoresCapability.throughputMBpsIncludedValueOverrideFactorPerSelectedStorageGB - = reader.getNullable(JsonReader::getDouble); } else if ("instancePoolSupported".equals(fieldName)) { deserializedManagedInstanceVcoresCapability.instancePoolSupported = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVersionCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVersionCapability.java index fd06a86bfde1..238c03380486 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVersionCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVersionCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -15,7 +15,7 @@ /** * The managed instance capability. */ -@Immutable +@Fluent public final class ManagedInstanceVersionCapability implements JsonSerializable { /* * The server version name. @@ -45,7 +45,7 @@ public final class ManagedInstanceVersionCapability implements JsonSerializable< /** * Creates an instance of ManagedInstanceVersionCapability class. */ - private ManagedInstanceVersionCapability() { + public ManagedInstanceVersionCapability() { } /** @@ -93,6 +93,17 @@ public String reason() { return this.reason; } + /** + * Set the reason property: The reason for the capability not being available. + * + * @param reason the reason value to set. + * @return the ManagedInstanceVersionCapability object itself. + */ + public ManagedInstanceVersionCapability withReason(String reason) { + this.reason = reason; + return this; + } + /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceVulnerabilityAssessmentListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVulnerabilityAssessmentListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceVulnerabilityAssessmentListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVulnerabilityAssessmentListResult.java index 414655bb45ee..d12c3862a5a4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceVulnerabilityAssessmentListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVulnerabilityAssessmentListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a ManagedInstanceVulnerabilityAssessment list operation. + * A list of the ManagedInstance's vulnerability assessments. */ @Immutable public final class ManagedInstanceVulnerabilityAssessmentListResult implements JsonSerializable { /* - * The ManagedInstanceVulnerabilityAssessment items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedInstanceVulnerabilityAssessmentListResult class. */ - private ManagedInstanceVulnerabilityAssessmentListResult() { + public ManagedInstanceVulnerabilityAssessmentListResult() { } /** - * Get the value property: The ManagedInstanceVulnerabilityAssessment items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedInstanceVulnerabilityAssessmentListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagedInstanceVulnerabilityAssessmentListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedInstanceVulnerabilityAssessmentListResult 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 ManagedInstanceVulnerabilityAssessmentListResult. */ public static ManagedInstanceVulnerabilityAssessmentListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedLedgerDigestUploadsName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedLedgerDigestUploadsName.java deleted file mode 100644 index 537221606673..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedLedgerDigestUploadsName.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for ManagedLedgerDigestUploadsName. - */ -public final class ManagedLedgerDigestUploadsName extends ExpandableStringEnum { - /** - * current. - */ - public static final ManagedLedgerDigestUploadsName CURRENT = fromString("current"); - - /** - * Creates a new instance of ManagedLedgerDigestUploadsName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedLedgerDigestUploadsName() { - } - - /** - * Creates or finds a ManagedLedgerDigestUploadsName from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedLedgerDigestUploadsName. - */ - public static ManagedLedgerDigestUploadsName fromString(String name) { - return fromString(name, ManagedLedgerDigestUploadsName.class); - } - - /** - * Gets known ManagedLedgerDigestUploadsName values. - * - * @return known ManagedLedgerDigestUploadsName values. - */ - public static Collection values() { - return values(ManagedLedgerDigestUploadsName.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedLedgerDigestUploadsState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedLedgerDigestUploadsState.java deleted file mode 100644 index 9c5986894ef5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedLedgerDigestUploadsState.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the state of ledger digest upload. - */ -public final class ManagedLedgerDigestUploadsState extends ExpandableStringEnum { - /** - * Enabled. - */ - public static final ManagedLedgerDigestUploadsState ENABLED = fromString("Enabled"); - - /** - * Disabled. - */ - public static final ManagedLedgerDigestUploadsState DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of ManagedLedgerDigestUploadsState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedLedgerDigestUploadsState() { - } - - /** - * Creates or finds a ManagedLedgerDigestUploadsState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedLedgerDigestUploadsState. - */ - public static ManagedLedgerDigestUploadsState fromString(String name) { - return fromString(name, ManagedLedgerDigestUploadsState.class); - } - - /** - * Gets known ManagedLedgerDigestUploadsState values. - * - * @return known ManagedLedgerDigestUploadsState values. - */ - public static Collection values() { - return values(ManagedLedgerDigestUploadsState.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerCreateMode.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerCreateMode.java index 79e45a13f69a..43254ee7ce48 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerCreateMode.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerCreateMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -17,12 +17,12 @@ */ public final class ManagedServerCreateMode extends ExpandableStringEnum { /** - * Default. + * Static value Default for ManagedServerCreateMode. */ public static final ManagedServerCreateMode DEFAULT = fromString("Default"); /** - * PointInTimeRestore. + * Static value PointInTimeRestore for ManagedServerCreateMode. */ public static final ManagedServerCreateMode POINT_IN_TIME_RESTORE = fromString("PointInTimeRestore"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasAcquisition.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasAcquisition.java index 8d877ebb9aba..11a7f1cc015b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasAcquisition.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasAcquisition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasCreation.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasCreation.java index dc97459cd0e9..0f841c0f1a16 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasCreation.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasCreation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedServerDnsAliasListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedServerDnsAliasListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasListResult.java index dfd62836e062..50e1ed780cfd 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedServerDnsAliasListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a ManagedServerDnsAlias list operation. + * A list of managed server DNS aliases. */ @Immutable public final class ManagedServerDnsAliasListResult implements JsonSerializable { /* - * The ManagedServerDnsAlias items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedServerDnsAliasListResult class. */ - private ManagedServerDnsAliasListResult() { + public ManagedServerDnsAliasListResult() { } /** - * Get the value property: The ManagedServerDnsAlias items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedServerDnsAliasListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagedServerDnsAliasListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedServerDnsAliasListResult 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 ManagedServerDnsAliasListResult. */ public static ManagedServerDnsAliasListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedServerSecurityAlertPolicyListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerSecurityAlertPolicyListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedServerSecurityAlertPolicyListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerSecurityAlertPolicyListResult.java index a8d452be4836..bc96ec832113 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedServerSecurityAlertPolicyListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedServerSecurityAlertPolicyListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a ManagedServerSecurityAlertPolicy list operation. + * A list of the managed Server's security alert policies. */ @Immutable public final class ManagedServerSecurityAlertPolicyListResult implements JsonSerializable { /* - * The ManagedServerSecurityAlertPolicy items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedServerSecurityAlertPolicyListResult class. */ - private ManagedServerSecurityAlertPolicyListResult() { + public ManagedServerSecurityAlertPolicyListResult() { } /** - * Get the value property: The ManagedServerSecurityAlertPolicy items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedServerSecurityAlertPolicyListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagedServerSecurityAlertPolicyListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedServerSecurityAlertPolicyListResult 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 ManagedServerSecurityAlertPolicyListResult. */ public static ManagedServerSecurityAlertPolicyListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedShortTermRetentionPolicyName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedShortTermRetentionPolicyName.java index 7e45682ab8de..602ba5a262ae 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedShortTermRetentionPolicyName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedShortTermRetentionPolicyName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -13,7 +13,7 @@ public final class ManagedShortTermRetentionPolicyName extends ExpandableStringEnum { /** - * default. + * Static value default for ManagedShortTermRetentionPolicyName. */ public static final ManagedShortTermRetentionPolicyName DEFAULT = fromString("default"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedTransparentDataEncryptionListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedTransparentDataEncryptionListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedTransparentDataEncryptionListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedTransparentDataEncryptionListResult.java index 1e6f78f6eb58..a4df82b784db 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedTransparentDataEncryptionListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedTransparentDataEncryptionListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a ManagedTransparentDataEncryption list operation. + * A list of managed transparent data encryptions. */ @Immutable public final class ManagedTransparentDataEncryptionListResult implements JsonSerializable { /* - * The ManagedTransparentDataEncryption items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ManagedTransparentDataEncryptionListResult class. */ - private ManagedTransparentDataEncryptionListResult() { + public ManagedTransparentDataEncryptionListResult() { } /** - * Get the value property: The ManagedTransparentDataEncryption items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ManagedTransparentDataEncryptionListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagedTransparentDataEncryptionListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedTransparentDataEncryptionListResult 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 ManagedTransparentDataEncryptionListResult. */ public static ManagedTransparentDataEncryptionListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagementOperationState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagementOperationState.java index 02da7ec12f23..4dd45766a9ab 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagementOperationState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagementOperationState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,32 +12,32 @@ */ public final class ManagementOperationState extends ExpandableStringEnum { /** - * Pending. + * Static value Pending for ManagementOperationState. */ public static final ManagementOperationState PENDING = fromString("Pending"); /** - * InProgress. + * Static value InProgress for ManagementOperationState. */ public static final ManagementOperationState IN_PROGRESS = fromString("InProgress"); /** - * Succeeded. + * Static value Succeeded for ManagementOperationState. */ public static final ManagementOperationState SUCCEEDED = fromString("Succeeded"); /** - * Failed. + * Static value Failed for ManagementOperationState. */ public static final ManagementOperationState FAILED = fromString("Failed"); /** - * CancelInProgress. + * Static value CancelInProgress for ManagementOperationState. */ public static final ManagementOperationState CANCEL_IN_PROGRESS = fromString("CancelInProgress"); /** - * Cancelled. + * Static value Cancelled for ManagementOperationState. */ public static final ManagementOperationState CANCELLED = fromString("Cancelled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxLimitRangeCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxLimitRangeCapability.java deleted file mode 100644 index 311867d39e1d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxLimitRangeCapability.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; - -/** - * The maximum limit range capability. - */ -@Immutable -public final class MaxLimitRangeCapability implements JsonSerializable { - /* - * Minimum value. - */ - private Long minValue; - - /* - * Maximum value. - */ - private Long maxValue; - - /* - * Scale/step size for discrete values between the minimum value and the maximum value. - */ - private Long scaleSize; - - /* - * The status of the capability. - */ - private CapabilityStatus status; - - /* - * The reason for the capability not being available. - */ - private String reason; - - /** - * Creates an instance of MaxLimitRangeCapability class. - */ - private MaxLimitRangeCapability() { - } - - /** - * Get the minValue property: Minimum value. - * - * @return the minValue value. - */ - public Long minValue() { - return this.minValue; - } - - /** - * Get the maxValue property: Maximum value. - * - * @return the maxValue value. - */ - public Long maxValue() { - return this.maxValue; - } - - /** - * Get the scaleSize property: Scale/step size for discrete values between the minimum value and the maximum value. - * - * @return the scaleSize value. - */ - public Long scaleSize() { - return this.scaleSize; - } - - /** - * Get the status property: The status of the capability. - * - * @return the status value. - */ - public CapabilityStatus status() { - return this.status; - } - - /** - * Get the reason property: The reason for the capability not being available. - * - * @return the reason value. - */ - public String reason() { - return this.reason; - } - - /** - * 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("reason", this.reason); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MaxLimitRangeCapability from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MaxLimitRangeCapability 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 MaxLimitRangeCapability. - */ - public static MaxLimitRangeCapability fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MaxLimitRangeCapability deserializedMaxLimitRangeCapability = new MaxLimitRangeCapability(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("minValue".equals(fieldName)) { - deserializedMaxLimitRangeCapability.minValue = reader.getNullable(JsonReader::getLong); - } else if ("maxValue".equals(fieldName)) { - deserializedMaxLimitRangeCapability.maxValue = reader.getNullable(JsonReader::getLong); - } else if ("scaleSize".equals(fieldName)) { - deserializedMaxLimitRangeCapability.scaleSize = reader.getNullable(JsonReader::getLong); - } else if ("status".equals(fieldName)) { - deserializedMaxLimitRangeCapability.status = CapabilityStatus.fromString(reader.getString()); - } else if ("reason".equals(fieldName)) { - deserializedMaxLimitRangeCapability.reason = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMaxLimitRangeCapability; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxSizeCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxSizeCapability.java index aebaf0c617e2..318163d06730 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxSizeCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MaxSizeCapability.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -29,7 +29,7 @@ public final class MaxSizeCapability implements JsonSerializable { /* * Minimum value. @@ -49,7 +49,7 @@ public final class MaxSizeRangeCapability implements JsonSerializable { /** - * Megabytes. + * Static value Megabytes for MaxSizeUnit. */ public static final MaxSizeUnit MEGABYTES = fromString("Megabytes"); /** - * Gigabytes. + * Static value Gigabytes for MaxSizeUnit. */ public static final MaxSizeUnit GIGABYTES = fromString("Gigabytes"); /** - * Terabytes. + * Static value Terabytes for MaxSizeUnit. */ public static final MaxSizeUnit TERABYTES = fromString("Terabytes"); /** - * Petabytes. + * Static value Petabytes for MaxSizeUnit. */ public static final MaxSizeUnit PETABYTES = fromString("Petabytes"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MetricType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MetricType.java index 5f1ce9d7283a..f11718189e0e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MetricType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MetricType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,27 +12,27 @@ */ public final class MetricType extends ExpandableStringEnum { /** - * cpu. + * Static value cpu for MetricType. */ public static final MetricType CPU = fromString("cpu"); /** - * io. + * Static value io for MetricType. */ public static final MetricType IO = fromString("io"); /** - * logIo. + * Static value logIo for MetricType. */ public static final MetricType LOG_IO = fromString("logIo"); /** - * duration. + * Static value duration for MetricType. */ public static final MetricType DURATION = fromString("duration"); /** - * dtu. + * Static value dtu for MetricType. */ public static final MetricType DTU = fromString("dtu"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MinCapacityCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MinCapacityCapability.java index 96274224d72d..c542ee9d26e3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MinCapacityCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/MinCapacityCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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,7 +14,7 @@ /** * The min capacity capability. */ -@Immutable +@Fluent public final class MinCapacityCapability implements JsonSerializable { /* * Min capacity value @@ -34,7 +34,7 @@ public final class MinCapacityCapability implements JsonSerializable { /** - * Move. + * Static value Move for MoveOperationMode. */ public static final MoveOperationMode MOVE = fromString("Move"); /** - * Copy. + * Static value Copy for MoveOperationMode. */ public static final MoveOperationMode COPY = fromString("Copy"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigAccessRule.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigAccessRule.java deleted file mode 100644 index e562e562a5ef..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigAccessRule.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; - -/** - * The NSPConfigAccessRule model. - */ -@Immutable -public final class NSPConfigAccessRule implements JsonSerializable { - /* - * The name property. - */ - private String name; - - /* - * The properties property. - */ - private NSPConfigAccessRuleProperties properties; - - /** - * Creates an instance of NSPConfigAccessRule class. - */ - private NSPConfigAccessRule() { - } - - /** - * Get the name property: The name property. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public NSPConfigAccessRuleProperties properties() { - return this.properties; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NSPConfigAccessRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NSPConfigAccessRule 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 NSPConfigAccessRule. - */ - public static NSPConfigAccessRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NSPConfigAccessRule deserializedNSPConfigAccessRule = new NSPConfigAccessRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedNSPConfigAccessRule.name = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedNSPConfigAccessRule.properties = NSPConfigAccessRuleProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNSPConfigAccessRule; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigAccessRuleProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigAccessRuleProperties.java deleted file mode 100644 index 5525fadb06ff..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigAccessRuleProperties.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; -import java.util.List; - -/** - * The NSPConfigAccessRuleProperties model. - */ -@Immutable -public final class NSPConfigAccessRuleProperties implements JsonSerializable { - /* - * The direction property. - */ - private String direction; - - /* - * The addressPrefixes property. - */ - private List addressPrefixes; - - /* - * The fullyQualifiedDomainNames property. - */ - private List fullyQualifiedDomainNames; - - /* - * The subscriptions property. - */ - private List subscriptions; - - /* - * The networkSecurityPerimeters property. - */ - private List networkSecurityPerimeters; - - /* - * The serviceTags property. - */ - private List serviceTags; - - /** - * Creates an instance of NSPConfigAccessRuleProperties class. - */ - private NSPConfigAccessRuleProperties() { - } - - /** - * Get the direction property: The direction property. - * - * @return the direction value. - */ - public String direction() { - return this.direction; - } - - /** - * Get the addressPrefixes property: The addressPrefixes property. - * - * @return the addressPrefixes value. - */ - public List addressPrefixes() { - return this.addressPrefixes; - } - - /** - * Get the fullyQualifiedDomainNames property: The fullyQualifiedDomainNames property. - * - * @return the fullyQualifiedDomainNames value. - */ - public List fullyQualifiedDomainNames() { - return this.fullyQualifiedDomainNames; - } - - /** - * Get the subscriptions property: The subscriptions property. - * - * @return the subscriptions value. - */ - public List subscriptions() { - return this.subscriptions; - } - - /** - * Get the networkSecurityPerimeters property: The networkSecurityPerimeters property. - * - * @return the networkSecurityPerimeters value. - */ - public List networkSecurityPerimeters() { - return this.networkSecurityPerimeters; - } - - /** - * Get the serviceTags property: The serviceTags property. - * - * @return the serviceTags value. - */ - public List serviceTags() { - return this.serviceTags; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (networkSecurityPerimeters() != null) { - networkSecurityPerimeters().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("direction", this.direction); - jsonWriter.writeArrayField("addressPrefixes", this.addressPrefixes, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("fullyQualifiedDomainNames", this.fullyQualifiedDomainNames, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("subscriptions", this.subscriptions, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("networkSecurityPerimeters", this.networkSecurityPerimeters, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("serviceTags", this.serviceTags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NSPConfigAccessRuleProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NSPConfigAccessRuleProperties 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 NSPConfigAccessRuleProperties. - */ - public static NSPConfigAccessRuleProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NSPConfigAccessRuleProperties deserializedNSPConfigAccessRuleProperties - = new NSPConfigAccessRuleProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("direction".equals(fieldName)) { - deserializedNSPConfigAccessRuleProperties.direction = reader.getString(); - } else if ("addressPrefixes".equals(fieldName)) { - List addressPrefixes = reader.readArray(reader1 -> reader1.getString()); - deserializedNSPConfigAccessRuleProperties.addressPrefixes = addressPrefixes; - } else if ("fullyQualifiedDomainNames".equals(fieldName)) { - List fullyQualifiedDomainNames = reader.readArray(reader1 -> reader1.getString()); - deserializedNSPConfigAccessRuleProperties.fullyQualifiedDomainNames = fullyQualifiedDomainNames; - } else if ("subscriptions".equals(fieldName)) { - List subscriptions = reader.readArray(reader1 -> reader1.getString()); - deserializedNSPConfigAccessRuleProperties.subscriptions = subscriptions; - } else if ("networkSecurityPerimeters".equals(fieldName)) { - List networkSecurityPerimeters - = reader.readArray(reader1 -> NSPConfigNetworkSecurityPerimeterRule.fromJson(reader1)); - deserializedNSPConfigAccessRuleProperties.networkSecurityPerimeters = networkSecurityPerimeters; - } else if ("serviceTags".equals(fieldName)) { - List serviceTags = reader.readArray(reader1 -> reader1.getString()); - deserializedNSPConfigAccessRuleProperties.serviceTags = serviceTags; - } else { - reader.skipChildren(); - } - } - - return deserializedNSPConfigAccessRuleProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigAssociation.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigAssociation.java deleted file mode 100644 index 97f1a440ec77..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigAssociation.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; - -/** - * The NSPConfigAssociation model. - */ -@Immutable -public final class NSPConfigAssociation implements JsonSerializable { - /* - * The name property. - */ - private String name; - - /* - * The accessMode property. - */ - private String accessMode; - - /** - * Creates an instance of NSPConfigAssociation class. - */ - private NSPConfigAssociation() { - } - - /** - * Get the name property: The name property. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the accessMode property: The accessMode property. - * - * @return the accessMode value. - */ - public String accessMode() { - return this.accessMode; - } - - /** - * 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("accessMode", this.accessMode); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NSPConfigAssociation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NSPConfigAssociation 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 NSPConfigAssociation. - */ - public static NSPConfigAssociation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NSPConfigAssociation deserializedNSPConfigAssociation = new NSPConfigAssociation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedNSPConfigAssociation.name = reader.getString(); - } else if ("accessMode".equals(fieldName)) { - deserializedNSPConfigAssociation.accessMode = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNSPConfigAssociation; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigNetworkSecurityPerimeterRule.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigNetworkSecurityPerimeterRule.java deleted file mode 100644 index e6bb82339836..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigNetworkSecurityPerimeterRule.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; - -/** - * The NSPConfigNetworkSecurityPerimeterRule model. - */ -@Immutable -public final class NSPConfigNetworkSecurityPerimeterRule - implements JsonSerializable { - /* - * The id property. - */ - private String id; - - /* - * The perimeterGuid property. - */ - private String perimeterGuid; - - /* - * The location property. - */ - private String location; - - /** - * Creates an instance of NSPConfigNetworkSecurityPerimeterRule class. - */ - private NSPConfigNetworkSecurityPerimeterRule() { - } - - /** - * Get the id property: The id property. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the perimeterGuid property: The perimeterGuid property. - * - * @return the perimeterGuid value. - */ - public String perimeterGuid() { - return this.perimeterGuid; - } - - /** - * Get the location property: The location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * 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("id", this.id); - jsonWriter.writeStringField("perimeterGuid", this.perimeterGuid); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NSPConfigNetworkSecurityPerimeterRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NSPConfigNetworkSecurityPerimeterRule 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 NSPConfigNetworkSecurityPerimeterRule. - */ - public static NSPConfigNetworkSecurityPerimeterRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NSPConfigNetworkSecurityPerimeterRule deserializedNSPConfigNetworkSecurityPerimeterRule - = new NSPConfigNetworkSecurityPerimeterRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedNSPConfigNetworkSecurityPerimeterRule.id = reader.getString(); - } else if ("perimeterGuid".equals(fieldName)) { - deserializedNSPConfigNetworkSecurityPerimeterRule.perimeterGuid = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedNSPConfigNetworkSecurityPerimeterRule.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNSPConfigNetworkSecurityPerimeterRule; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigPerimeter.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigPerimeter.java deleted file mode 100644 index 31f21c86e5b3..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigPerimeter.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; - -/** - * The NSPConfigPerimeter model. - */ -@Immutable -public final class NSPConfigPerimeter implements JsonSerializable { - /* - * The id property. - */ - private String id; - - /* - * The perimeterGuid property. - */ - private String perimeterGuid; - - /* - * The location property. - */ - private String location; - - /** - * Creates an instance of NSPConfigPerimeter class. - */ - private NSPConfigPerimeter() { - } - - /** - * Get the id property: The id property. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the perimeterGuid property: The perimeterGuid property. - * - * @return the perimeterGuid value. - */ - public String perimeterGuid() { - return this.perimeterGuid; - } - - /** - * Get the location property: The location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * 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("id", this.id); - jsonWriter.writeStringField("perimeterGuid", this.perimeterGuid); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NSPConfigPerimeter from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NSPConfigPerimeter 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 NSPConfigPerimeter. - */ - public static NSPConfigPerimeter fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NSPConfigPerimeter deserializedNSPConfigPerimeter = new NSPConfigPerimeter(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedNSPConfigPerimeter.id = reader.getString(); - } else if ("perimeterGuid".equals(fieldName)) { - deserializedNSPConfigPerimeter.perimeterGuid = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedNSPConfigPerimeter.location = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNSPConfigPerimeter; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigProfile.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigProfile.java deleted file mode 100644 index e436b94d1c5d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPConfigProfile.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; -import java.util.List; - -/** - * The NSPConfigProfile model. - */ -@Immutable -public final class NSPConfigProfile implements JsonSerializable { - /* - * The name property. - */ - private String name; - - /* - * The accessRulesVersion property. - */ - private String accessRulesVersion; - - /* - * The accessRules property. - */ - private List accessRules; - - /** - * Creates an instance of NSPConfigProfile class. - */ - private NSPConfigProfile() { - } - - /** - * Get the name property: The name property. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the accessRulesVersion property: The accessRulesVersion property. - * - * @return the accessRulesVersion value. - */ - public String accessRulesVersion() { - return this.accessRulesVersion; - } - - /** - * Get the accessRules property: The accessRules property. - * - * @return the accessRules value. - */ - public List accessRules() { - return this.accessRules; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (accessRules() != null) { - accessRules().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("accessRulesVersion", this.accessRulesVersion); - jsonWriter.writeArrayField("accessRules", this.accessRules, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NSPConfigProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NSPConfigProfile 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 NSPConfigProfile. - */ - public static NSPConfigProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NSPConfigProfile deserializedNSPConfigProfile = new NSPConfigProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedNSPConfigProfile.name = reader.getString(); - } else if ("accessRulesVersion".equals(fieldName)) { - deserializedNSPConfigProfile.accessRulesVersion = reader.getString(); - } else if ("accessRules".equals(fieldName)) { - List accessRules - = reader.readArray(reader1 -> NSPConfigAccessRule.fromJson(reader1)); - deserializedNSPConfigProfile.accessRules = accessRules; - } else { - reader.skipChildren(); - } - } - - return deserializedNSPConfigProfile; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPProvisioningIssue.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPProvisioningIssue.java deleted file mode 100644 index c69ae7e7c976..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPProvisioningIssue.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; - -/** - * The NSPProvisioningIssue model. - */ -@Immutable -public final class NSPProvisioningIssue implements JsonSerializable { - /* - * The name property. - */ - private String name; - - /* - * The properties property. - */ - private NSPProvisioningIssueProperties properties; - - /** - * Creates an instance of NSPProvisioningIssue class. - */ - private NSPProvisioningIssue() { - } - - /** - * Get the name property: The name property. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public NSPProvisioningIssueProperties properties() { - return this.properties; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NSPProvisioningIssue from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NSPProvisioningIssue 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 NSPProvisioningIssue. - */ - public static NSPProvisioningIssue fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NSPProvisioningIssue deserializedNSPProvisioningIssue = new NSPProvisioningIssue(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedNSPProvisioningIssue.name = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedNSPProvisioningIssue.properties = NSPProvisioningIssueProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNSPProvisioningIssue; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPProvisioningIssueProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPProvisioningIssueProperties.java deleted file mode 100644 index f9bbf0106b0d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NSPProvisioningIssueProperties.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; -import java.util.List; - -/** - * The NSPProvisioningIssueProperties model. - */ -@Immutable -public final class NSPProvisioningIssueProperties implements JsonSerializable { - /* - * The issueType property. - */ - private String issueType; - - /* - * The severity property. - */ - private String severity; - - /* - * The description property. - */ - private String description; - - /* - * The suggestedResourceIds property. - */ - private List suggestedResourceIds; - - /* - * The suggestedAccessRules property. - */ - private List suggestedAccessRules; - - /** - * Creates an instance of NSPProvisioningIssueProperties class. - */ - private NSPProvisioningIssueProperties() { - } - - /** - * Get the issueType property: The issueType property. - * - * @return the issueType value. - */ - public String issueType() { - return this.issueType; - } - - /** - * Get the severity property: The severity property. - * - * @return the severity value. - */ - public String severity() { - return this.severity; - } - - /** - * Get the description property: The description property. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the suggestedResourceIds property: The suggestedResourceIds property. - * - * @return the suggestedResourceIds value. - */ - public List suggestedResourceIds() { - return this.suggestedResourceIds; - } - - /** - * Get the suggestedAccessRules property: The suggestedAccessRules property. - * - * @return the suggestedAccessRules value. - */ - public List suggestedAccessRules() { - return this.suggestedAccessRules; - } - - /** - * 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("issueType", this.issueType); - jsonWriter.writeStringField("severity", this.severity); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeArrayField("suggestedResourceIds", this.suggestedResourceIds, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("suggestedAccessRules", this.suggestedAccessRules, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NSPProvisioningIssueProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NSPProvisioningIssueProperties 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 NSPProvisioningIssueProperties. - */ - public static NSPProvisioningIssueProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NSPProvisioningIssueProperties deserializedNSPProvisioningIssueProperties - = new NSPProvisioningIssueProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("issueType".equals(fieldName)) { - deserializedNSPProvisioningIssueProperties.issueType = reader.getString(); - } else if ("severity".equals(fieldName)) { - deserializedNSPProvisioningIssueProperties.severity = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedNSPProvisioningIssueProperties.description = reader.getString(); - } else if ("suggestedResourceIds".equals(fieldName)) { - List suggestedResourceIds = reader.readArray(reader1 -> reader1.getString()); - deserializedNSPProvisioningIssueProperties.suggestedResourceIds = suggestedResourceIds; - } else if ("suggestedAccessRules".equals(fieldName)) { - List suggestedAccessRules = reader.readArray(reader1 -> reader1.getString()); - deserializedNSPProvisioningIssueProperties.suggestedAccessRules = suggestedAccessRules; - } else { - reader.skipChildren(); - } - } - - return deserializedNSPProvisioningIssueProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Name.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Name.java index b2ed5ec19395..bb053dc651fb 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Name.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Name.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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,7 +14,7 @@ /** * ARM Usage Name. */ -@Immutable +@Fluent public final class Name implements JsonSerializable { /* * Usage name value @@ -29,7 +29,7 @@ public final class Name implements JsonSerializable { /** * Creates an instance of Name class. */ - private Name() { + public Name() { } /** @@ -41,6 +41,17 @@ public String value() { return this.value; } + /** + * Set the value property: Usage name value. + * + * @param value the value value to set. + * @return the Name object itself. + */ + public Name withValue(String value) { + this.value = value; + return this; + } + /** * Get the localizedValue property: Usage name localized value. * @@ -50,6 +61,17 @@ public String localizedValue() { return this.localizedValue; } + /** + * Set the localizedValue property: Usage name localized value. + * + * @param localizedValue the localizedValue value to set. + * @return the Name object itself. + */ + public Name withLocalizedValue(String localizedValue) { + this.localizedValue = localizedValue; + return this; + } + /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NetworkIsolationSettings.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NetworkIsolationSettings.java index 79aee2ba357c..a4befee92a1a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NetworkIsolationSettings.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/NetworkIsolationSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationDisplay.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationDisplay.java index 912c1bf325e1..80e33283a6cd 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationDisplay.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationDisplay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -39,7 +39,7 @@ public final class OperationDisplay implements JsonSerializable { /** - * PolybaseImport. + * Static value PolybaseImport for OperationMode. */ public static final OperationMode POLYBASE_IMPORT = fromString("PolybaseImport"); /** - * Import. + * Static value Import for OperationMode. */ public static final OperationMode IMPORT = fromString("Import"); /** - * Export. + * Static value Export for OperationMode. */ public static final OperationMode EXPORT = fromString("Export"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationOrigin.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationOrigin.java index d2c5600bb6a0..bf92360a3239 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationOrigin.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OperationOrigin.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,12 +12,12 @@ */ public final class OperationOrigin extends ExpandableStringEnum { /** - * user. + * Static value user for OperationOrigin. */ public static final OperationOrigin USER = fromString("user"); /** - * system. + * Static value system for OperationOrigin. */ public static final OperationOrigin SYSTEM = fromString("system"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/OutboundEnvironmentEndpointCollection.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OutboundEnvironmentEndpointCollection.java similarity index 74% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/OutboundEnvironmentEndpointCollection.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OutboundEnvironmentEndpointCollection.java index 0b6e286daf7e..68e3863bed55 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/OutboundEnvironmentEndpointCollection.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OutboundEnvironmentEndpointCollection.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -21,23 +20,23 @@ public final class OutboundEnvironmentEndpointCollection implements JsonSerializable { /* - * The OutboundEnvironmentEndpoint items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of OutboundEnvironmentEndpointCollection class. */ - private OutboundEnvironmentEndpointCollection() { + public OutboundEnvironmentEndpointCollection() { } /** - * Get the value property: The OutboundEnvironmentEndpoint items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model OutboundEnvironmentEndpointCollection")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(OutboundEnvironmentEndpointCollection.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OutboundEnvironmentEndpointCollection 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 OutboundEnvironmentEndpointCollection. */ public static OutboundEnvironmentEndpointCollection fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/OutboundFirewallRuleListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OutboundFirewallRuleListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/OutboundFirewallRuleListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OutboundFirewallRuleListResult.java index f6b9c9184fc4..7a0166390e8f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/OutboundFirewallRuleListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/OutboundFirewallRuleListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a OutboundFirewallRule list operation. + * A list of outbound rules. */ @Immutable public final class OutboundFirewallRuleListResult implements JsonSerializable { /* - * The OutboundFirewallRule items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of OutboundFirewallRuleListResult class. */ - private OutboundFirewallRuleListResult() { + public OutboundFirewallRuleListResult() { } /** - * Get the value property: The OutboundFirewallRule items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model OutboundFirewallRuleListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(OutboundFirewallRuleListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OutboundFirewallRuleListResult 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 OutboundFirewallRuleListResult. */ public static OutboundFirewallRuleListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PartnerInfo.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PartnerInfo.java index 53e4b6418faf..b46084a424a1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PartnerInfo.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PartnerInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PartnerRegionInfo.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PartnerRegionInfo.java index a5abf5019afa..7830c270d067 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PartnerRegionInfo.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PartnerRegionInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PauseDelayTimeUnit.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PauseDelayTimeUnit.java index 94214cbf5d94..a6b80626200d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PauseDelayTimeUnit.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PauseDelayTimeUnit.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class PauseDelayTimeUnit extends ExpandableStringEnum { /** - * Minutes. + * Static value Minutes for PauseDelayTimeUnit. */ public static final PauseDelayTimeUnit MINUTES = fromString("Minutes"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PerDatabaseAutoPauseDelayTimeRange.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PerDatabaseAutoPauseDelayTimeRange.java deleted file mode 100644 index aed9f6329552..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PerDatabaseAutoPauseDelayTimeRange.java +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; - -/** - * Supported auto pause delay time range. - */ -@Immutable -public final class PerDatabaseAutoPauseDelayTimeRange implements JsonSerializable { - /* - * Minimum value - */ - private Integer minValue; - - /* - * Maximum value - */ - private Integer maxValue; - - /* - * Step value for discrete values between the minimum value and the maximum value. - */ - private Integer stepSize; - - /* - * Default value if no value is provided - */ - private Integer defaultProperty; - - /* - * Unit of time that delay is expressed in - */ - private PauseDelayTimeUnit unit; - - /* - * Value that is used to not pause (infinite delay before pause) - */ - private Integer doNotPauseValue; - - /** - * Creates an instance of PerDatabaseAutoPauseDelayTimeRange class. - */ - private PerDatabaseAutoPauseDelayTimeRange() { - } - - /** - * Get the minValue property: Minimum value. - * - * @return the minValue value. - */ - public Integer minValue() { - return this.minValue; - } - - /** - * Get the maxValue property: Maximum value. - * - * @return the maxValue value. - */ - public Integer maxValue() { - return this.maxValue; - } - - /** - * Get the stepSize property: Step value for discrete values between the minimum value and the maximum value. - * - * @return the stepSize value. - */ - public Integer stepSize() { - return this.stepSize; - } - - /** - * Get the defaultProperty property: Default value if no value is provided. - * - * @return the defaultProperty value. - */ - public Integer defaultProperty() { - return this.defaultProperty; - } - - /** - * Get the unit property: Unit of time that delay is expressed in. - * - * @return the unit value. - */ - public PauseDelayTimeUnit unit() { - return this.unit; - } - - /** - * Get the doNotPauseValue property: Value that is used to not pause (infinite delay before pause). - * - * @return the doNotPauseValue value. - */ - public Integer doNotPauseValue() { - return this.doNotPauseValue; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PerDatabaseAutoPauseDelayTimeRange from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PerDatabaseAutoPauseDelayTimeRange 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 PerDatabaseAutoPauseDelayTimeRange. - */ - public static PerDatabaseAutoPauseDelayTimeRange fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PerDatabaseAutoPauseDelayTimeRange deserializedPerDatabaseAutoPauseDelayTimeRange - = new PerDatabaseAutoPauseDelayTimeRange(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("minValue".equals(fieldName)) { - deserializedPerDatabaseAutoPauseDelayTimeRange.minValue = reader.getNullable(JsonReader::getInt); - } else if ("maxValue".equals(fieldName)) { - deserializedPerDatabaseAutoPauseDelayTimeRange.maxValue = reader.getNullable(JsonReader::getInt); - } else if ("stepSize".equals(fieldName)) { - deserializedPerDatabaseAutoPauseDelayTimeRange.stepSize = reader.getNullable(JsonReader::getInt); - } else if ("default".equals(fieldName)) { - deserializedPerDatabaseAutoPauseDelayTimeRange.defaultProperty - = reader.getNullable(JsonReader::getInt); - } else if ("unit".equals(fieldName)) { - deserializedPerDatabaseAutoPauseDelayTimeRange.unit - = PauseDelayTimeUnit.fromString(reader.getString()); - } else if ("doNotPauseValue".equals(fieldName)) { - deserializedPerDatabaseAutoPauseDelayTimeRange.doNotPauseValue - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedPerDatabaseAutoPauseDelayTimeRange; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PerformanceLevelCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PerformanceLevelCapability.java index df766bc092e7..5db6f3dbda2e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PerformanceLevelCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PerformanceLevelCapability.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -29,7 +29,7 @@ public final class PerformanceLevelCapability implements JsonSerializable { /** - * DTU. + * Static value DTU for PerformanceLevelUnit. */ public static final PerformanceLevelUnit DTU = fromString("DTU"); /** - * VCores. + * Static value VCores for PerformanceLevelUnit. */ public static final PerformanceLevelUnit VCORES = fromString("VCores"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Phase.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Phase.java deleted file mode 100644 index 65cddba3caf9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Phase.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The operation phase. - */ -public final class Phase extends ExpandableStringEnum { - /** - * LogTransitionInProgress. - */ - public static final Phase LOG_TRANSITION_IN_PROGRESS = fromString("LogTransitionInProgress"); - - /** - * Copying. - */ - public static final Phase COPYING = fromString("Copying"); - - /** - * BuildingHyperscaleComponents. - */ - public static final Phase BUILDING_HYPERSCALE_COMPONENTS = fromString("BuildingHyperscaleComponents"); - - /** - * Catchup. - */ - public static final Phase CATCHUP = fromString("Catchup"); - - /** - * WaitingForCutover. - */ - public static final Phase WAITING_FOR_CUTOVER = fromString("WaitingForCutover"); - - /** - * CutoverInProgress. - */ - public static final Phase CUTOVER_IN_PROGRESS = fromString("CutoverInProgress"); - - /** - * Creates a new instance of Phase value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Phase() { - } - - /** - * Creates or finds a Phase from its string representation. - * - * @param name a name to look for. - * @return the corresponding Phase. - */ - public static Phase fromString(String name) { - return fromString(name, Phase.class); - } - - /** - * Gets known Phase values. - * - * @return known Phase values. - */ - public static Collection values() { - return values(Phase.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PhaseDetails.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PhaseDetails.java deleted file mode 100644 index 98a379e9fb20..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PhaseDetails.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; -import java.util.Map; - -/** - * The phase details properties of a database operation. - */ -@Immutable -public final class PhaseDetails implements JsonSerializable { - /* - * The operation phase. - */ - private Phase phase; - - /* - * The operation phase information. - */ - private Map phaseInformation; - - /** - * Creates an instance of PhaseDetails class. - */ - private PhaseDetails() { - } - - /** - * Get the phase property: The operation phase. - * - * @return the phase value. - */ - public Phase phase() { - return this.phase; - } - - /** - * Get the phaseInformation property: The operation phase information. - * - * @return the phaseInformation value. - */ - public Map phaseInformation() { - return this.phaseInformation; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PhaseDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PhaseDetails 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 PhaseDetails. - */ - public static PhaseDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PhaseDetails deserializedPhaseDetails = new PhaseDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("phase".equals(fieldName)) { - deserializedPhaseDetails.phase = Phase.fromString(reader.getString()); - } else if ("phaseInformation".equals(fieldName)) { - Map phaseInformation = reader.readMap(reader1 -> reader1.getString()); - deserializedPhaseDetails.phaseInformation = phaseInformation; - } else { - reader.skipChildren(); - } - } - - return deserializedPhaseDetails; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PricingModel.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PricingModel.java deleted file mode 100644 index 0e5c7418e59e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PricingModel.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Pricing model of Managed Instance. - */ -public final class PricingModel extends ExpandableStringEnum { - /** - * Regular. - */ - public static final PricingModel REGULAR = fromString("Regular"); - - /** - * Freemium. - */ - public static final PricingModel FREEMIUM = fromString("Freemium"); - - /** - * Creates a new instance of PricingModel value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PricingModel() { - } - - /** - * Creates or finds a PricingModel from its string representation. - * - * @param name a name to look for. - * @return the corresponding PricingModel. - */ - public static PricingModel fromString(String name) { - return fromString(name, PricingModel.class); - } - - /** - * Gets known PricingModel values. - * - * @return known PricingModel values. - */ - public static Collection values() { - return values(PricingModel.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrincipalType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrincipalType.java index bef9f3c9b9a6..dc707e2a058a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrincipalType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrincipalType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,17 +12,17 @@ */ public final class PrincipalType extends ExpandableStringEnum { /** - * User. + * Static value User for PrincipalType. */ public static final PrincipalType USER = fromString("User"); /** - * Group. + * Static value Group for PrincipalType. */ public static final PrincipalType GROUP = fromString("Group"); /** - * Application. + * Static value Application for PrincipalType. */ public static final PrincipalType APPLICATION = fromString("Application"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/PrivateEndpointConnectionListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointConnectionListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/PrivateEndpointConnectionListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointConnectionListResult.java index 48b9a4f36bcd..d98ba5817315 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/PrivateEndpointConnectionListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointConnectionListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a PrivateEndpointConnection list operation. + * A list of private endpoint connections. */ @Immutable public final class PrivateEndpointConnectionListResult implements JsonSerializable { /* - * The PrivateEndpointConnection items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of PrivateEndpointConnectionListResult class. */ - private PrivateEndpointConnectionListResult() { + public PrivateEndpointConnectionListResult() { } /** - * Get the value property: The PrivateEndpointConnection items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model PrivateEndpointConnectionListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PrivateEndpointConnectionListResult. */ public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointConnectionRequestStatus.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointConnectionRequestStatus.java index 7cf0589d3e63..065f0f7530dd 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointConnectionRequestStatus.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointConnectionRequestStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -35,7 +35,7 @@ public final class PrivateEndpointConnectionRequestStatus /** * Creates an instance of PrivateEndpointConnectionRequestStatus class. */ - private PrivateEndpointConnectionRequestStatus() { + public PrivateEndpointConnectionRequestStatus() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProperty.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProperty.java index 12c5603a93a7..819fcceed449 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProperty.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProperty.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProvisioningState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProvisioningState.java index dc9f595c25f2..ff5793a33922 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProvisioningState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,27 +12,27 @@ */ public final class PrivateEndpointProvisioningState extends ExpandableStringEnum { /** - * Approving. + * Static value Approving for PrivateEndpointProvisioningState. */ public static final PrivateEndpointProvisioningState APPROVING = fromString("Approving"); /** - * Ready. + * Static value Ready for PrivateEndpointProvisioningState. */ public static final PrivateEndpointProvisioningState READY = fromString("Ready"); /** - * Dropping. + * Static value Dropping for PrivateEndpointProvisioningState. */ public static final PrivateEndpointProvisioningState DROPPING = fromString("Dropping"); /** - * Failed. + * Static value Failed for PrivateEndpointProvisioningState. */ public static final PrivateEndpointProvisioningState FAILED = fromString("Failed"); /** - * Rejecting. + * Static value Rejecting for PrivateEndpointProvisioningState. */ public static final PrivateEndpointProvisioningState REJECTING = fromString("Rejecting"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/PrivateLinkResourceListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkResourceListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/PrivateLinkResourceListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkResourceListResult.java index 9b083a1a1173..1a04c9af9bc4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/PrivateLinkResourceListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkResourceListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a PrivateLinkResource list operation. + * A list of private link resources. */ @Immutable public final class PrivateLinkResourceListResult implements JsonSerializable { /* - * The PrivateLinkResource items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of PrivateLinkResourceListResult class. */ - private PrivateLinkResourceListResult() { + public PrivateLinkResourceListResult() { } /** - * Get the value property: The PrivateLinkResource items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model PrivateLinkResourceListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourceListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of PrivateLinkResourceListResult 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 PrivateLinkResourceListResult. */ public static PrivateLinkResourceListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkResourceProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkResourceProperties.java index 31f9a4718e1a..3d0b7a415e80 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkResourceProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkResourceProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -35,7 +35,7 @@ public final class PrivateLinkResourceProperties implements JsonSerializable { /** - * None. + * Static value None for PrivateLinkServiceConnectionStateActionsRequire. */ public static final PrivateLinkServiceConnectionStateActionsRequire NONE = fromString("None"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateProperty.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateProperty.java index d191e67834cb..52c7df08f908 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateProperty.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateProperty.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateStatus.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateStatus.java index 072cb57a5371..c83ff231b3a2 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateStatus.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -13,22 +13,22 @@ public final class PrivateLinkServiceConnectionStateStatus extends ExpandableStringEnum { /** - * Approved. + * Static value Approved for PrivateLinkServiceConnectionStateStatus. */ public static final PrivateLinkServiceConnectionStateStatus APPROVED = fromString("Approved"); /** - * Pending. + * Static value Pending for PrivateLinkServiceConnectionStateStatus. */ public static final PrivateLinkServiceConnectionStateStatus PENDING = fromString("Pending"); /** - * Rejected. + * Static value Rejected for PrivateLinkServiceConnectionStateStatus. */ public static final PrivateLinkServiceConnectionStateStatus REJECTED = fromString("Rejected"); /** - * Disconnected. + * Static value Disconnected for PrivateLinkServiceConnectionStateStatus. */ public static final PrivateLinkServiceConnectionStateStatus DISCONNECTED = fromString("Disconnected"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ProvisioningState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ProvisioningState.java index 7d5048646822..b6b634f41caf 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ProvisioningState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,27 +12,27 @@ */ public final class ProvisioningState extends ExpandableStringEnum { /** - * Created. + * Static value Created for ProvisioningState. */ public static final ProvisioningState CREATED = fromString("Created"); /** - * InProgress. + * Static value InProgress for ProvisioningState. */ public static final ProvisioningState IN_PROGRESS = fromString("InProgress"); /** - * Succeeded. + * Static value Succeeded for ProvisioningState. */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Failed. + * Static value Failed for ProvisioningState. */ public static final ProvisioningState FAILED = fromString("Failed"); /** - * Canceled. + * Static value Canceled for ProvisioningState. */ public static final ProvisioningState CANCELED = fromString("Canceled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ProxyResourceWithWritableName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ProxyResourceWithWritableName.java index 4fa160748b21..b7fd9bfe3874 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ProxyResourceWithWritableName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ProxyResourceWithWritableName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -16,12 +16,12 @@ @Fluent public class ProxyResourceWithWritableName extends ResourceWithWritableName { /* - * Resource type. + * The type of the resource. */ private String type; /* - * Resource ID. + * Fully qualified resource Id for the resource. */ private String id; @@ -32,7 +32,7 @@ public ProxyResourceWithWritableName() { } /** - * Get the type property: Resource type. + * Get the type property: The type of the resource. * * @return the type value. */ @@ -42,7 +42,7 @@ public String type() { } /** - * Get the id property: Resource ID. + * Get the id property: Fully qualified resource Id for the resource. * * @return the id value. */ @@ -67,6 +67,7 @@ public ProxyResourceWithWritableName withName(String name) { */ @Override public void validate() { + super.validate(); } /** @@ -85,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ProxyResourceWithWritableName 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 ProxyResourceWithWritableName. */ public static ProxyResourceWithWritableName fromJson(JsonReader jsonReader) throws IOException { @@ -97,10 +99,10 @@ public static ProxyResourceWithWritableName fromJson(JsonReader jsonReader) thro if ("id".equals(fieldName)) { deserializedProxyResourceWithWritableName.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedProxyResourceWithWritableName.withName(reader.getString()); } else if ("type".equals(fieldName)) { deserializedProxyResourceWithWritableName.type = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedProxyResourceWithWritableName.withName(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryCheck.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryCheck.java deleted file mode 100644 index 23f22333fe79..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryCheck.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; -import java.util.List; - -/** - * SQL Vulnerability Assessment query check object. - */ -@Immutable -public final class QueryCheck implements JsonSerializable { - /* - * SQL Vulnerability Assessment rule query. - */ - private String query; - - /* - * SQL Vulnerability Assessment query expected result. - */ - private List> expectedResult; - - /* - * SQL Vulnerability Assessment column names of query expected result. - */ - private List columnNames; - - /** - * Creates an instance of QueryCheck class. - */ - private QueryCheck() { - } - - /** - * Get the query property: SQL Vulnerability Assessment rule query. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Get the expectedResult property: SQL Vulnerability Assessment query expected result. - * - * @return the expectedResult value. - */ - public List> expectedResult() { - return this.expectedResult; - } - - /** - * Get the columnNames property: SQL Vulnerability Assessment column names of query expected result. - * - * @return the columnNames value. - */ - public List columnNames() { - return this.columnNames; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of QueryCheck from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of QueryCheck 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 QueryCheck. - */ - public static QueryCheck fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - QueryCheck deserializedQueryCheck = new QueryCheck(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("query".equals(fieldName)) { - deserializedQueryCheck.query = reader.getString(); - } else if ("expectedResult".equals(fieldName)) { - List> expectedResult - = reader.readArray(reader1 -> reader1.readArray(reader2 -> reader2.getString())); - deserializedQueryCheck.expectedResult = expectedResult; - } else if ("columnNames".equals(fieldName)) { - List columnNames = reader.readArray(reader1 -> reader1.getString()); - deserializedQueryCheck.columnNames = columnNames; - } else { - reader.skipChildren(); - } - } - - return deserializedQueryCheck; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricInterval.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricInterval.java index 21537c38287b..c71e71af8ae3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricInterval.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricInterval.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -15,7 +15,7 @@ /** * Properties of a query metrics interval. */ -@Immutable +@Fluent public final class QueryMetricInterval implements JsonSerializable { /* * The start time for the metric interval (ISO-8601 format). @@ -40,7 +40,7 @@ public final class QueryMetricInterval implements JsonSerializable metrics() { return this.metrics; } + /** + * Set the metrics property: List of metric objects for this interval. + * + * @param metrics the metrics value to set. + * @return the QueryMetricInterval object itself. + */ + public QueryMetricInterval withMetrics(List metrics) { + this.metrics = metrics; + return this; + } + /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricProperties.java index 87b4548af2a8..3e3bcace4b70 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryMetricProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -64,7 +64,7 @@ public final class QueryMetricProperties implements JsonSerializable { /** - * percentage. + * Static value percentage for QueryMetricUnitType. */ public static final QueryMetricUnitType PERCENTAGE = fromString("percentage"); /** - * KB. + * Static value KB for QueryMetricUnitType. */ public static final QueryMetricUnitType KB = fromString("KB"); /** - * microseconds. + * Static value microseconds for QueryMetricUnitType. */ public static final QueryMetricUnitType MICROSECONDS = fromString("microseconds"); /** - * count. + * Static value count for QueryMetricUnitType. */ public static final QueryMetricUnitType COUNT = fromString("count"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryTimeGrainType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryTimeGrainType.java index 0b1a2e27a3d9..5df962ddc3a8 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryTimeGrainType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/QueryTimeGrainType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,12 +12,12 @@ */ public final class QueryTimeGrainType extends ExpandableStringEnum { /** - * PT1H. + * Static value PT1H for QueryTimeGrainType. */ public static final QueryTimeGrainType PT1H = fromString("PT1H"); /** - * P1D. + * Static value P1D for QueryTimeGrainType. */ public static final QueryTimeGrainType P1D = fromString("P1D"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadOnlyEndpointFailoverPolicy.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadOnlyEndpointFailoverPolicy.java index 3c81d2c984dc..eab3a8cf6c48 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadOnlyEndpointFailoverPolicy.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadOnlyEndpointFailoverPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,12 +12,12 @@ */ public final class ReadOnlyEndpointFailoverPolicy extends ExpandableStringEnum { /** - * Disabled. + * Static value Disabled for ReadOnlyEndpointFailoverPolicy. */ public static final ReadOnlyEndpointFailoverPolicy DISABLED = fromString("Disabled"); /** - * Enabled. + * Static value Enabled for ReadOnlyEndpointFailoverPolicy. */ public static final ReadOnlyEndpointFailoverPolicy ENABLED = fromString("Enabled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadScaleCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadScaleCapability.java index db288b3bb4e8..d2b454804199 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadScaleCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReadScaleCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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,7 +14,7 @@ /** * The read scale capability. */ -@Immutable +@Fluent public final class ReadScaleCapability implements JsonSerializable { /* * The maximum number of read scale replicas. @@ -34,7 +34,7 @@ public final class ReadScaleCapability implements JsonSerializable { /** - * Manual. + * Static value Manual for ReadWriteEndpointFailoverPolicy. */ public static final ReadWriteEndpointFailoverPolicy MANUAL = fromString("Manual"); /** - * Automatic. + * Static value Automatic for ReadWriteEndpointFailoverPolicy. */ public static final ReadWriteEndpointFailoverPolicy AUTOMATIC = fromString("Automatic"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionCurrentState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionCurrentState.java index 176e00aa0d5b..23e95504ad14 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionCurrentState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionCurrentState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -19,72 +19,72 @@ */ public final class RecommendedActionCurrentState extends ExpandableStringEnum { /** - * Active. + * Static value Active for RecommendedActionCurrentState. */ public static final RecommendedActionCurrentState ACTIVE = fromString("Active"); /** - * Pending. + * Static value Pending for RecommendedActionCurrentState. */ public static final RecommendedActionCurrentState PENDING = fromString("Pending"); /** - * Executing. + * Static value Executing for RecommendedActionCurrentState. */ public static final RecommendedActionCurrentState EXECUTING = fromString("Executing"); /** - * Verifying. + * Static value Verifying for RecommendedActionCurrentState. */ public static final RecommendedActionCurrentState VERIFYING = fromString("Verifying"); /** - * PendingRevert. + * Static value PendingRevert for RecommendedActionCurrentState. */ public static final RecommendedActionCurrentState PENDING_REVERT = fromString("PendingRevert"); /** - * RevertCancelled. + * Static value RevertCancelled for RecommendedActionCurrentState. */ public static final RecommendedActionCurrentState REVERT_CANCELLED = fromString("RevertCancelled"); /** - * Reverting. + * Static value Reverting for RecommendedActionCurrentState. */ public static final RecommendedActionCurrentState REVERTING = fromString("Reverting"); /** - * Reverted. + * Static value Reverted for RecommendedActionCurrentState. */ public static final RecommendedActionCurrentState REVERTED = fromString("Reverted"); /** - * Ignored. + * Static value Ignored for RecommendedActionCurrentState. */ public static final RecommendedActionCurrentState IGNORED = fromString("Ignored"); /** - * Expired. + * Static value Expired for RecommendedActionCurrentState. */ public static final RecommendedActionCurrentState EXPIRED = fromString("Expired"); /** - * Monitoring. + * Static value Monitoring for RecommendedActionCurrentState. */ public static final RecommendedActionCurrentState MONITORING = fromString("Monitoring"); /** - * Resolved. + * Static value Resolved for RecommendedActionCurrentState. */ public static final RecommendedActionCurrentState RESOLVED = fromString("Resolved"); /** - * Success. + * Static value Success for RecommendedActionCurrentState. */ public static final RecommendedActionCurrentState SUCCESS = fromString("Success"); /** - * Error. + * Static value Error for RecommendedActionCurrentState. */ public static final RecommendedActionCurrentState ERROR = fromString("Error"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionErrorInfo.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionErrorInfo.java index 7bd14eb16f4a..ff18a865ffa3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionErrorInfo.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionErrorInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -29,7 +29,7 @@ public final class RecommendedActionErrorInfo implements JsonSerializable { /* - * The RecoverableDatabase items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of RecoverableDatabaseListResult class. */ - private RecoverableDatabaseListResult() { + public RecoverableDatabaseListResult() { } /** - * Get the value property: The RecoverableDatabase items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model RecoverableDatabaseListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(RecoverableDatabaseListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of RecoverableDatabaseListResult 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 RecoverableDatabaseListResult. */ public static RecoverableDatabaseListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/RecoverableManagedDatabaseListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecoverableManagedDatabaseListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/RecoverableManagedDatabaseListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecoverableManagedDatabaseListResult.java index abae74e6326a..a4f326b087f3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/RecoverableManagedDatabaseListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RecoverableManagedDatabaseListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a RecoverableManagedDatabase list operation. + * A list of recoverable managed databases. */ @Immutable public final class RecoverableManagedDatabaseListResult implements JsonSerializable { /* - * The RecoverableManagedDatabase items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of RecoverableManagedDatabaseListResult class. */ - private RecoverableManagedDatabaseListResult() { + public RecoverableManagedDatabaseListResult() { } /** - * Get the value property: The RecoverableManagedDatabase items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model RecoverableManagedDatabaseListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(RecoverableManagedDatabaseListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of RecoverableManagedDatabaseListResult 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 RecoverableManagedDatabaseListResult. */ public static RecoverableManagedDatabaseListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Remediation.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Remediation.java deleted file mode 100644 index d4a7ede23d34..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Remediation.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; -import java.util.List; - -/** - * SQL Vulnerability Assessment remediation Details. - */ -@Immutable -public final class Remediation implements JsonSerializable { - /* - * SQL Vulnerability Assessment remediation description. - */ - private String description; - - /* - * SQL Vulnerability Assessment remediation script. - */ - private List scripts; - - /* - * SQL Vulnerability Assessment is remediation automated. - */ - private Boolean automated; - - /* - * SQL Vulnerability Assessment optional link to remediate in Azure Portal. - */ - private String portalLink; - - /** - * Creates an instance of Remediation class. - */ - private Remediation() { - } - - /** - * Get the description property: SQL Vulnerability Assessment remediation description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the scripts property: SQL Vulnerability Assessment remediation script. - * - * @return the scripts value. - */ - public List scripts() { - return this.scripts; - } - - /** - * Get the automated property: SQL Vulnerability Assessment is remediation automated. - * - * @return the automated value. - */ - public Boolean automated() { - return this.automated; - } - - /** - * Get the portalLink property: SQL Vulnerability Assessment optional link to remediate in Azure Portal. - * - * @return the portalLink value. - */ - public String portalLink() { - return this.portalLink; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Remediation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Remediation 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 Remediation. - */ - public static Remediation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Remediation deserializedRemediation = new Remediation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedRemediation.description = reader.getString(); - } else if ("scripts".equals(fieldName)) { - List scripts = reader.readArray(reader1 -> reader1.getString()); - deserializedRemediation.scripts = scripts; - } else if ("automated".equals(fieldName)) { - deserializedRemediation.automated = reader.getNullable(JsonReader::getBoolean); - } else if ("portalLink".equals(fieldName)) { - deserializedRemediation.portalLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRemediation; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicaConnectedState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicaConnectedState.java deleted file mode 100644 index 58d4b8aabdc7..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicaConnectedState.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Link connected state. - */ -public final class ReplicaConnectedState extends ExpandableStringEnum { - /** - * DISCONNECTED. - */ - public static final ReplicaConnectedState DISCONNECTED = fromString("DISCONNECTED"); - - /** - * CONNECTED. - */ - public static final ReplicaConnectedState CONNECTED = fromString("CONNECTED"); - - /** - * Creates a new instance of ReplicaConnectedState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ReplicaConnectedState() { - } - - /** - * Creates or finds a ReplicaConnectedState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ReplicaConnectedState. - */ - public static ReplicaConnectedState fromString(String name) { - return fromString(name, ReplicaConnectedState.class); - } - - /** - * Gets known ReplicaConnectedState values. - * - * @return known ReplicaConnectedState values. - */ - public static Collection values() { - return values(ReplicaConnectedState.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicaSynchronizationHealth.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicaSynchronizationHealth.java deleted file mode 100644 index ba92ba64e388..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicaSynchronizationHealth.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Link health state. - */ -public final class ReplicaSynchronizationHealth extends ExpandableStringEnum { - /** - * NOT_HEALTHY. - */ - public static final ReplicaSynchronizationHealth NOT_HEALTHY = fromString("NOT_HEALTHY"); - - /** - * PARTIALLY_HEALTHY. - */ - public static final ReplicaSynchronizationHealth PARTIALLY_HEALTHY = fromString("PARTIALLY_HEALTHY"); - - /** - * HEALTHY. - */ - public static final ReplicaSynchronizationHealth HEALTHY = fromString("HEALTHY"); - - /** - * Creates a new instance of ReplicaSynchronizationHealth value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ReplicaSynchronizationHealth() { - } - - /** - * Creates or finds a ReplicaSynchronizationHealth from its string representation. - * - * @param name a name to look for. - * @return the corresponding ReplicaSynchronizationHealth. - */ - public static ReplicaSynchronizationHealth fromString(String name) { - return fromString(name, ReplicaSynchronizationHealth.class); - } - - /** - * Gets known ReplicaSynchronizationHealth values. - * - * @return known ReplicaSynchronizationHealth values. - */ - public static Collection values() { - return values(ReplicaSynchronizationHealth.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicaType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicaType.java index 35e36cde21e8..32402d738336 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicaType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicaType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,12 +12,12 @@ */ public final class ReplicaType extends ExpandableStringEnum { /** - * Primary. + * Static value Primary for ReplicaType. */ public static final ReplicaType PRIMARY = fromString("Primary"); /** - * ReadableSecondary. + * Static value ReadableSecondary for ReplicaType. */ public static final ReplicaType READABLE_SECONDARY = fromString("ReadableSecondary"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ReplicationLinkListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ReplicationLinkListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkListResult.java index 0595d3d2b31e..2d80e160ee36 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ReplicationLinkListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a ReplicationLink list operation. + * A list of replication links. */ @Immutable public final class ReplicationLinkListResult implements JsonSerializable { /* - * The ReplicationLink items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ReplicationLinkListResult class. */ - private ReplicationLinkListResult() { + public ReplicationLinkListResult() { } /** - * Get the value property: The ReplicationLink items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property value in model ReplicationLinkListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ReplicationLinkListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ReplicationLinkListResult 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 ReplicationLinkListResult. */ public static ReplicationLinkListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkType.java index e733841fdadf..848c5a6616cb 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -8,21 +8,21 @@ import java.util.Collection; /** - * Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED. + * Link type (GEO, NAMED, STANDBY). */ public final class ReplicationLinkType extends ExpandableStringEnum { /** - * GEO. + * Static value GEO for ReplicationLinkType. */ public static final ReplicationLinkType GEO = fromString("GEO"); /** - * NAMED. + * Static value NAMED for ReplicationLinkType. */ public static final ReplicationLinkType NAMED = fromString("NAMED"); /** - * STANDBY. + * Static value STANDBY for ReplicationLinkType. */ public static final ReplicationLinkType STANDBY = fromString("STANDBY"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkUpdate.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkUpdate.java deleted file mode 100644 index 79c6568b934d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkUpdate.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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.sql.fluent.models.ReplicationLinkUpdateProperties; -import java.io.IOException; - -/** - * A replication link update request. - */ -@Fluent -public final class ReplicationLinkUpdate extends ProxyResource { - /* - * Resource properties. - */ - private ReplicationLinkUpdateProperties 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 ReplicationLinkUpdate class. - */ - public ReplicationLinkUpdate() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private ReplicationLinkUpdateProperties 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 linkType property: Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED. - * - * @return the linkType value. - */ - public ReplicationLinkType linkType() { - return this.innerProperties() == null ? null : this.innerProperties().linkType(); - } - - /** - * Set the linkType property: Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED. - * - * @param linkType the linkType value to set. - * @return the ReplicationLinkUpdate object itself. - */ - public ReplicationLinkUpdate withLinkType(ReplicationLinkType linkType) { - if (this.innerProperties() == null) { - this.innerProperties = new ReplicationLinkUpdateProperties(); - } - this.innerProperties().withLinkType(linkType); - 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicationLinkUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicationLinkUpdate 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 ReplicationLinkUpdate. - */ - public static ReplicationLinkUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicationLinkUpdate deserializedReplicationLinkUpdate = new ReplicationLinkUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedReplicationLinkUpdate.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedReplicationLinkUpdate.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedReplicationLinkUpdate.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedReplicationLinkUpdate.innerProperties - = ReplicationLinkUpdateProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedReplicationLinkUpdate.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicationLinkUpdate; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationMode.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationMode.java index 4f4f615f8cec..04e2e5184d00 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationMode.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -8,16 +8,16 @@ import java.util.Collection; /** - * Replication mode of the link. + * The replication mode of a distributed availability group. Parameter will be ignored during link creation. */ public final class ReplicationMode extends ExpandableStringEnum { /** - * Async. + * Static value Async for ReplicationMode. */ public static final ReplicationMode ASYNC = fromString("Async"); /** - * Sync. + * Static value Sync for ReplicationMode. */ public static final ReplicationMode SYNC = fromString("Sync"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationRole.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationRole.java index 468c0398fefa..0161ba528e73 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationRole.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationRole.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,27 +9,27 @@ */ public enum ReplicationRole { /** - * Primary. + * Enum value Primary. */ PRIMARY("Primary"), /** - * Secondary. + * Enum value Secondary. */ SECONDARY("Secondary"), /** - * NonReadableSecondary. + * Enum value NonReadableSecondary. */ NON_READABLE_SECONDARY("NonReadableSecondary"), /** - * Source. + * Enum value Source. */ SOURCE("Source"), /** - * Copy. + * Enum value Copy. */ COPY("Copy"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationState.java index 43a8d4663518..9ddf5029e717 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ReplicationState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,22 +12,22 @@ */ public final class ReplicationState extends ExpandableStringEnum { /** - * PENDING. + * Static value PENDING for ReplicationState. */ public static final ReplicationState PENDING = fromString("PENDING"); /** - * SEEDING. + * Static value SEEDING for ReplicationState. */ public static final ReplicationState SEEDING = fromString("SEEDING"); /** - * CATCH_UP. + * Static value CATCH_UP for ReplicationState. */ public static final ReplicationState CATCH_UP = fromString("CATCH_UP"); /** - * SUSPENDED. + * Static value SUSPENDED for ReplicationState. */ public static final ReplicationState SUSPENDED = fromString("SUSPENDED"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceIdentity.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceIdentity.java index 6598cec4a4b9..59110061e68d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceIdentity.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceMoveDefinition.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceMoveDefinition.java index a2c00597d6d2..537552069d3f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceMoveDefinition.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceMoveDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceWithWritableName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceWithWritableName.java index f01304f1030a..c4c03ec4671a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceWithWritableName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ResourceWithWritableName.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -15,46 +15,26 @@ * ARM resource. */ @Fluent -public class ResourceWithWritableName implements JsonSerializable { - /* - * Resource ID. - */ - private String id; - +public class ResourceWithWritableName extends ProxyResource { /* * Resource name. */ private String name; /* - * Resource type. + * The type of the resource. */ private String type; - /** - * Creates an instance of ResourceWithWritableName class. - */ - public ResourceWithWritableName() { - } - - /** - * Get the id property: Resource ID. - * - * @return the id value. + /* + * Fully qualified resource Id for the resource. */ - public String id() { - return this.id; - } + private String id; /** - * Set the id property: Resource ID. - * - * @param id the id value to set. - * @return the ResourceWithWritableName object itself. + * Creates an instance of ResourceWithWritableName class. */ - ResourceWithWritableName withId(String id) { - this.id = id; - return this; + public ResourceWithWritableName() { } /** @@ -78,23 +58,23 @@ public ResourceWithWritableName withName(String name) { } /** - * Get the type property: Resource type. + * Get the type property: The type of the resource. * * @return the type value. */ + @Override public String type() { return this.type; } /** - * Set the type property: Resource type. + * Get the id property: Fully qualified resource Id for the resource. * - * @param type the type value to set. - * @return the ResourceWithWritableName object itself. + * @return the id value. */ - ResourceWithWritableName withType(String type) { - this.type = type; - return this; + @Override + public String id() { + return this.id; } /** @@ -121,6 +101,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ResourceWithWritableName 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 ResourceWithWritableName. */ public static ResourceWithWritableName fromJson(JsonReader jsonReader) throws IOException { @@ -132,10 +113,10 @@ public static ResourceWithWritableName fromJson(JsonReader jsonReader) throws IO if ("id".equals(fieldName)) { deserializedResourceWithWritableName.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedResourceWithWritableName.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedResourceWithWritableName.type = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedResourceWithWritableName.name = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/RestorableDroppedDatabaseListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorableDroppedDatabaseListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/RestorableDroppedDatabaseListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorableDroppedDatabaseListResult.java index b274263cbd88..126c7a3b0ae2 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/RestorableDroppedDatabaseListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorableDroppedDatabaseListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a RestorableDroppedDatabase list operation. + * A list of restorable dropped databases. */ @Immutable public final class RestorableDroppedDatabaseListResult implements JsonSerializable { /* - * The RestorableDroppedDatabase items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of RestorableDroppedDatabaseListResult class. */ - private RestorableDroppedDatabaseListResult() { + public RestorableDroppedDatabaseListResult() { } /** - * Get the value property: The RestorableDroppedDatabase items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model RestorableDroppedDatabaseListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(RestorableDroppedDatabaseListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of RestorableDroppedDatabaseListResult 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 RestorableDroppedDatabaseListResult. */ public static RestorableDroppedDatabaseListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/RestorableDroppedManagedDatabaseListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorableDroppedManagedDatabaseListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/RestorableDroppedManagedDatabaseListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorableDroppedManagedDatabaseListResult.java index 079b8d147b50..2fe628b59e10 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/RestorableDroppedManagedDatabaseListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorableDroppedManagedDatabaseListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a RestorableDroppedManagedDatabase list operation. + * A list of restorable dropped managed databases. */ @Immutable public final class RestorableDroppedManagedDatabaseListResult implements JsonSerializable { /* - * The RestorableDroppedManagedDatabase items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of RestorableDroppedManagedDatabaseListResult class. */ - private RestorableDroppedManagedDatabaseListResult() { + public RestorableDroppedManagedDatabaseListResult() { } /** - * Get the value property: The RestorableDroppedManagedDatabase items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model RestorableDroppedManagedDatabaseListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(RestorableDroppedManagedDatabaseListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of RestorableDroppedManagedDatabaseListResult 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 RestorableDroppedManagedDatabaseListResult. */ public static RestorableDroppedManagedDatabaseListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestoreDetailsName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestoreDetailsName.java index 4d9e2ad380eb..0e14df247ffa 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestoreDetailsName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestoreDetailsName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class RestoreDetailsName extends ExpandableStringEnum { /** - * Default. + * Static value Default for RestoreDetailsName. */ public static final RestoreDetailsName DEFAULT = fromString("Default"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/RestorePointListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorePointListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/RestorePointListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorePointListResult.java index 817d828c107f..eb69183dd9e7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/RestorePointListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorePointListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a RestorePoint list operation. + * A list of long term retention backups. */ @Immutable public final class RestorePointListResult implements JsonSerializable { /* - * The RestorePoint items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of RestorePointListResult class. */ - private RestorePointListResult() { + public RestorePointListResult() { } /** - * Get the value property: The RestorePoint items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model RestorePointListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(RestorePointListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of RestorePointListResult 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 RestorePointListResult. */ public static RestorePointListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorePointType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorePointType.java index 1ee43d556031..dd2fa79a190d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorePointType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RestorePointType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,12 +9,12 @@ */ public enum RestorePointType { /** - * CONTINUOUS. + * Enum value CONTINUOUS. */ CONTINUOUS("CONTINUOUS"), /** - * DISCRETE. + * Enum value DISCRETE. */ DISCRETE("DISCRETE"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RoleChangeType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RoleChangeType.java deleted file mode 100644 index 86918dc496a7..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RoleChangeType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of the role change, can be Planned or Forced. - */ -public final class RoleChangeType extends ExpandableStringEnum { - /** - * Forced. - */ - public static final RoleChangeType FORCED = fromString("Forced"); - - /** - * Planned. - */ - public static final RoleChangeType PLANNED = fromString("Planned"); - - /** - * Creates a new instance of RoleChangeType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RoleChangeType() { - } - - /** - * Creates or finds a RoleChangeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding RoleChangeType. - */ - public static RoleChangeType fromString(String name) { - return fromString(name, RoleChangeType.class); - } - - /** - * Gets known RoleChangeType values. - * - * @return known RoleChangeType values. - */ - public static Collection values() { - return values(RoleChangeType.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RuleSeverity.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RuleSeverity.java deleted file mode 100644 index 8b5ae4b6c0d6..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RuleSeverity.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * SQL Vulnerability Assessment rule severity. - */ -public final class RuleSeverity extends ExpandableStringEnum { - /** - * High. - */ - public static final RuleSeverity HIGH = fromString("High"); - - /** - * Medium. - */ - public static final RuleSeverity MEDIUM = fromString("Medium"); - - /** - * Low. - */ - public static final RuleSeverity LOW = fromString("Low"); - - /** - * Informational. - */ - public static final RuleSeverity INFORMATIONAL = fromString("Informational"); - - /** - * Obsolete. - */ - public static final RuleSeverity OBSOLETE = fromString("Obsolete"); - - /** - * Creates a new instance of RuleSeverity value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RuleSeverity() { - } - - /** - * Creates or finds a RuleSeverity from its string representation. - * - * @param name a name to look for. - * @return the corresponding RuleSeverity. - */ - public static RuleSeverity fromString(String name) { - return fromString(name, RuleSeverity.class); - } - - /** - * Gets known RuleSeverity values. - * - * @return known RuleSeverity values. - */ - public static Collection values() { - return values(RuleSeverity.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RuleStatus.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RuleStatus.java deleted file mode 100644 index 285f13c8ffd8..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RuleStatus.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * SQL Vulnerability Assessment baseline status. - */ -public final class RuleStatus extends ExpandableStringEnum { - /** - * NonFinding. - */ - public static final RuleStatus NON_FINDING = fromString("NonFinding"); - - /** - * Finding. - */ - public static final RuleStatus FINDING = fromString("Finding"); - - /** - * InternalError. - */ - public static final RuleStatus INTERNAL_ERROR = fromString("InternalError"); - - /** - * Creates a new instance of RuleStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RuleStatus() { - } - - /** - * Creates or finds a RuleStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding RuleStatus. - */ - public static RuleStatus fromString(String name) { - return fromString(name, RuleStatus.class); - } - - /** - * Gets known RuleStatus values. - * - * @return known RuleStatus values. - */ - public static Collection values() { - return values(RuleStatus.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RuleType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RuleType.java deleted file mode 100644 index 6fb204f4e62d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/RuleType.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * SQL Vulnerability Assessment rule type. - */ -public final class RuleType extends ExpandableStringEnum { - /** - * Binary. - */ - public static final RuleType BINARY = fromString("Binary"); - - /** - * BaselineExpected. - */ - public static final RuleType BASELINE_EXPECTED = fromString("BaselineExpected"); - - /** - * PositiveList. - */ - public static final RuleType POSITIVE_LIST = fromString("PositiveList"); - - /** - * NegativeList. - */ - public static final RuleType NEGATIVE_LIST = fromString("NegativeList"); - - /** - * Creates a new instance of RuleType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RuleType() { - } - - /** - * Creates or finds a RuleType from its string representation. - * - * @param name a name to look for. - * @return the corresponding RuleType. - */ - public static RuleType fromString(String name) { - return fromString(name, RuleType.class); - } - - /** - * Gets known RuleType values. - * - * @return known RuleType values. - */ - public static Collection values() { - return values(RuleType.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SampleName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SampleName.java index d3864ee8a0cc..33d5f26f6f2d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SampleName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SampleName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,17 +12,17 @@ */ public final class SampleName extends ExpandableStringEnum { /** - * AdventureWorksLT. + * Static value AdventureWorksLT for SampleName. */ public static final SampleName ADVENTURE_WORKS_LT = fromString("AdventureWorksLT"); /** - * WideWorldImportersStd. + * Static value WideWorldImportersStd for SampleName. */ public static final SampleName WIDE_WORLD_IMPORTERS_STD = fromString("WideWorldImportersStd"); /** - * WideWorldImportersFull. + * Static value WideWorldImportersFull for SampleName. */ public static final SampleName WIDE_WORLD_IMPORTERS_FULL = fromString("WideWorldImportersFull"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ScheduleItem.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ScheduleItem.java deleted file mode 100644 index 316234fa86df..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ScheduleItem.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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; - -/** - * Schedule info describing when the server should be started or stopped. - */ -@Fluent -public final class ScheduleItem implements JsonSerializable { - /* - * Start day. - */ - private DayOfWeek startDay; - - /* - * Start time. - */ - private String startTime; - - /* - * Stop day. - */ - private DayOfWeek stopDay; - - /* - * Stop time. - */ - private String stopTime; - - /** - * Creates an instance of ScheduleItem class. - */ - public ScheduleItem() { - } - - /** - * Get the startDay property: Start day. - * - * @return the startDay value. - */ - public DayOfWeek startDay() { - return this.startDay; - } - - /** - * Set the startDay property: Start day. - * - * @param startDay the startDay value to set. - * @return the ScheduleItem object itself. - */ - public ScheduleItem withStartDay(DayOfWeek startDay) { - this.startDay = startDay; - return this; - } - - /** - * Get the startTime property: Start time. - * - * @return the startTime value. - */ - public String startTime() { - return this.startTime; - } - - /** - * Set the startTime property: Start time. - * - * @param startTime the startTime value to set. - * @return the ScheduleItem object itself. - */ - public ScheduleItem withStartTime(String startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the stopDay property: Stop day. - * - * @return the stopDay value. - */ - public DayOfWeek stopDay() { - return this.stopDay; - } - - /** - * Set the stopDay property: Stop day. - * - * @param stopDay the stopDay value to set. - * @return the ScheduleItem object itself. - */ - public ScheduleItem withStopDay(DayOfWeek stopDay) { - this.stopDay = stopDay; - return this; - } - - /** - * Get the stopTime property: Stop time. - * - * @return the stopTime value. - */ - public String stopTime() { - return this.stopTime; - } - - /** - * Set the stopTime property: Stop time. - * - * @param stopTime the stopTime value to set. - * @return the ScheduleItem object itself. - */ - public ScheduleItem withStopTime(String stopTime) { - this.stopTime = stopTime; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (startDay() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property startDay in model ScheduleItem")); - } - if (startTime() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property startTime in model ScheduleItem")); - } - if (stopDay() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property stopDay in model ScheduleItem")); - } - if (stopTime() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property stopTime in model ScheduleItem")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScheduleItem.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("startDay", this.startDay == null ? null : this.startDay.toString()); - jsonWriter.writeStringField("startTime", this.startTime); - jsonWriter.writeStringField("stopDay", this.stopDay == null ? null : this.stopDay.toString()); - jsonWriter.writeStringField("stopTime", this.stopTime); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScheduleItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScheduleItem 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 ScheduleItem. - */ - public static ScheduleItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScheduleItem deserializedScheduleItem = new ScheduleItem(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("startDay".equals(fieldName)) { - deserializedScheduleItem.startDay = DayOfWeek.fromString(reader.getString()); - } else if ("startTime".equals(fieldName)) { - deserializedScheduleItem.startTime = reader.getString(); - } else if ("stopDay".equals(fieldName)) { - deserializedScheduleItem.stopDay = DayOfWeek.fromString(reader.getString()); - } else if ("stopTime".equals(fieldName)) { - deserializedScheduleItem.stopTime = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedScheduleItem; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecondaryInstanceType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecondaryInstanceType.java deleted file mode 100644 index 5afeaec1888c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecondaryInstanceType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of the geo-secondary instance. Set 'Standby' if the instance is used as a DR option only. - */ -public final class SecondaryInstanceType extends ExpandableStringEnum { - /** - * Geo. - */ - public static final SecondaryInstanceType GEO = fromString("Geo"); - - /** - * Standby. - */ - public static final SecondaryInstanceType STANDBY = fromString("Standby"); - - /** - * Creates a new instance of SecondaryInstanceType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SecondaryInstanceType() { - } - - /** - * Creates or finds a SecondaryInstanceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SecondaryInstanceType. - */ - public static SecondaryInstanceType fromString(String name) { - return fromString(name, SecondaryInstanceType.class); - } - - /** - * Gets known SecondaryInstanceType values. - * - * @return known SecondaryInstanceType values. - */ - public static Collection values() { - return values(SecondaryInstanceType.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecondaryType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecondaryType.java index 841c1a72e5eb..4bb6a365410c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecondaryType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecondaryType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -8,24 +8,19 @@ import java.util.Collection; /** - * The secondary type of the database if it is a secondary. Valid values are Geo, Named and Standby. + * The secondary type of the database if it is a secondary. Valid values are Geo and Named. */ public final class SecondaryType extends ExpandableStringEnum { /** - * Geo. + * Static value Geo for SecondaryType. */ public static final SecondaryType GEO = fromString("Geo"); /** - * Named. + * Static value Named for SecondaryType. */ public static final SecondaryType NAMED = fromString("Named"); - /** - * Standby. - */ - public static final SecondaryType STANDBY = fromString("Standby"); - /** * Creates a new instance of SecondaryType value. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyName.java index cafb9c797c71..2c32a83e125b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,9 +12,9 @@ */ public final class SecurityAlertPolicyName extends ExpandableStringEnum { /** - * Default. + * Static value default for SecurityAlertPolicyName. */ - public static final SecurityAlertPolicyName DEFAULT = fromString("Default"); + public static final SecurityAlertPolicyName DEFAULT = fromString("default"); /** * Creates a new instance of SecurityAlertPolicyName value. diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyNameAutoGenerated.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyNameAutoGenerated.java new file mode 100644 index 000000000000..ff190f7efb7a --- /dev/null +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyNameAutoGenerated.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.sql.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for SecurityAlertPolicyNameAutoGenerated. + */ +public final class SecurityAlertPolicyNameAutoGenerated + extends ExpandableStringEnum { + /** + * Static value Default for SecurityAlertPolicyNameAutoGenerated. + */ + public static final SecurityAlertPolicyNameAutoGenerated DEFAULT = fromString("Default"); + + /** + * Creates a new instance of SecurityAlertPolicyNameAutoGenerated value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SecurityAlertPolicyNameAutoGenerated() { + } + + /** + * Creates or finds a SecurityAlertPolicyNameAutoGenerated from its string representation. + * + * @param name a name to look for. + * @return the corresponding SecurityAlertPolicyNameAutoGenerated. + */ + public static SecurityAlertPolicyNameAutoGenerated fromString(String name) { + return fromString(name, SecurityAlertPolicyNameAutoGenerated.class); + } + + /** + * Gets known SecurityAlertPolicyNameAutoGenerated values. + * + * @return known SecurityAlertPolicyNameAutoGenerated values. + */ + public static Collection values() { + return values(SecurityAlertPolicyNameAutoGenerated.class); + } +} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyState.java index 3a32dd355eac..12bdc8f78ae2 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -10,17 +10,12 @@ */ public enum SecurityAlertPolicyState { /** - * New. - */ - NEW("New"), - - /** - * Enabled. + * Enum value Enabled. */ ENABLED("Enabled"), /** - * Disabled. + * Enum value Disabled. */ DISABLED("Disabled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SecurityEventCollection.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventCollection.java similarity index 73% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SecurityEventCollection.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventCollection.java index 559b2933d8a9..ce4ba82e2e25 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SecurityEventCollection.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventCollection.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,23 +19,23 @@ @Immutable public final class SecurityEventCollection implements JsonSerializable { /* - * The SecurityEvent items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of SecurityEventCollection class. */ - private SecurityEventCollection() { + public SecurityEventCollection() { } /** - * Get the value property: The SecurityEvent items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model SecurityEventCollection")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(SecurityEventCollection.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SecurityEventCollection 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 SecurityEventCollection. */ public static SecurityEventCollection fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventSqlInjectionAdditionalProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventSqlInjectionAdditionalProperties.java index 91789b09816d..052d78cb1f0f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventSqlInjectionAdditionalProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventSqlInjectionAdditionalProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -55,7 +55,7 @@ public final class SecurityEventSqlInjectionAdditionalProperties /** * Creates an instance of SecurityEventSqlInjectionAdditionalProperties class. */ - private SecurityEventSqlInjectionAdditionalProperties() { + public SecurityEventSqlInjectionAdditionalProperties() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventType.java index e9635b27756f..887fd2040ebd 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SecurityEventType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,17 +9,17 @@ */ public enum SecurityEventType { /** - * Undefined. + * Enum value Undefined. */ UNDEFINED("Undefined"), /** - * SqlInjectionVulnerability. + * Enum value SqlInjectionVulnerability. */ SQL_INJECTION_VULNERABILITY("SqlInjectionVulnerability"), /** - * SqlInjectionExploit. + * Enum value SqlInjectionExploit. */ SQL_INJECTION_EXPLOIT("SqlInjectionExploit"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SeedingModeType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SeedingModeType.java deleted file mode 100644 index d78f7e167d55..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SeedingModeType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Database seeding mode – can be Automatic (default), or Manual for supported scenarios. - */ -public final class SeedingModeType extends ExpandableStringEnum { - /** - * Automatic. - */ - public static final SeedingModeType AUTOMATIC = fromString("Automatic"); - - /** - * Manual. - */ - public static final SeedingModeType MANUAL = fromString("Manual"); - - /** - * Creates a new instance of SeedingModeType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SeedingModeType() { - } - - /** - * Creates or finds a SeedingModeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SeedingModeType. - */ - public static SeedingModeType fromString(String name) { - return fromString(name, SeedingModeType.class); - } - - /** - * Gets known SeedingModeType values. - * - * @return known SeedingModeType values. - */ - public static Collection values() { - return values(SeedingModeType.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SensitivityLabelListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SensitivityLabelListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelListResult.java index 1df91d581f1b..3949a99dcf9f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SensitivityLabelListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a SensitivityLabel list operation. + * A list of sensitivity labels. */ @Immutable public final class SensitivityLabelListResult implements JsonSerializable { /* - * The SensitivityLabel items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of SensitivityLabelListResult class. */ - private SensitivityLabelListResult() { + public SensitivityLabelListResult() { } /** - * Get the value property: The SensitivityLabel items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model SensitivityLabelListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(SensitivityLabelListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SensitivityLabelListResult 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 SensitivityLabelListResult. */ public static SensitivityLabelListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelRank.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelRank.java index d1e99381aa6b..0a020f209ac7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelRank.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelRank.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,27 +9,27 @@ */ public enum SensitivityLabelRank { /** - * None. + * Enum value None. */ NONE("None"), /** - * Low. + * Enum value Low. */ LOW("Low"), /** - * Medium. + * Enum value Medium. */ MEDIUM("Medium"), /** - * High. + * Enum value High. */ HIGH("High"), /** - * Critical. + * Enum value Critical. */ CRITICAL("Critical"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelSource.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelSource.java index 547af4b73be3..d80da1662f8f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelSource.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelSource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,12 +9,12 @@ */ public enum SensitivityLabelSource { /** - * current. + * Enum value current. */ CURRENT("current"), /** - * recommended. + * Enum value recommended. */ RECOMMENDED("recommended"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateKind.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateKind.java index 3c0d3da60556..1121cec89752 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateKind.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateKind.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,12 +9,12 @@ */ public enum SensitivityLabelUpdateKind { /** - * set. + * Enum value set. */ SET("set"), /** - * remove. + * Enum value remove. */ REMOVE("remove"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateList.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateList.java index 07ee41dc136d..8ad58bc20a58 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateList.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateList.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerBlobAuditingPolicyListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerBlobAuditingPolicyListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerBlobAuditingPolicyListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerBlobAuditingPolicyListResult.java index 06edafee2170..39bf268347eb 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerBlobAuditingPolicyListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerBlobAuditingPolicyListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a ServerBlobAuditingPolicy list operation. + * A list of server auditing settings. */ @Immutable public final class ServerBlobAuditingPolicyListResult implements JsonSerializable { /* - * The ServerBlobAuditingPolicy items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ServerBlobAuditingPolicyListResult class. */ - private ServerBlobAuditingPolicyListResult() { + public ServerBlobAuditingPolicyListResult() { } /** - * Get the value property: The ServerBlobAuditingPolicy items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ServerBlobAuditingPolicyListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ServerBlobAuditingPolicyListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ServerBlobAuditingPolicyListResult 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 ServerBlobAuditingPolicyListResult. */ public static ServerBlobAuditingPolicyListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConfigurationOptionName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConfigurationOptionName.java deleted file mode 100644 index eaa79fb153e2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConfigurationOptionName.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for ServerConfigurationOptionName. - */ -public final class ServerConfigurationOptionName extends ExpandableStringEnum { - /** - * allowPolybaseExport. - */ - public static final ServerConfigurationOptionName ALLOW_POLYBASE_EXPORT = fromString("allowPolybaseExport"); - - /** - * Creates a new instance of ServerConfigurationOptionName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ServerConfigurationOptionName() { - } - - /** - * Creates or finds a ServerConfigurationOptionName from its string representation. - * - * @param name a name to look for. - * @return the corresponding ServerConfigurationOptionName. - */ - public static ServerConfigurationOptionName fromString(String name) { - return fromString(name, ServerConfigurationOptionName.class); - } - - /** - * Gets known ServerConfigurationOptionName values. - * - * @return known ServerConfigurationOptionName values. - */ - public static Collection values() { - return values(ServerConfigurationOptionName.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerConnectionPolicyListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConnectionPolicyListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerConnectionPolicyListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConnectionPolicyListResult.java index c89d7e886221..c8ae346d8a83 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerConnectionPolicyListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConnectionPolicyListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a ServerConnectionPolicy list operation. + * A list of server connection policy objects. */ @Immutable public final class ServerConnectionPolicyListResult implements JsonSerializable { /* - * The ServerConnectionPolicy items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ServerConnectionPolicyListResult class. */ - private ServerConnectionPolicyListResult() { + public ServerConnectionPolicyListResult() { } /** - * Get the value property: The ServerConnectionPolicy items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ServerConnectionPolicyListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ServerConnectionPolicyListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ServerConnectionPolicyListResult 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 ServerConnectionPolicyListResult. */ public static ServerConnectionPolicyListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConnectionType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConnectionType.java index 07b9ef19a11b..c2a15c5fa629 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConnectionType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerConnectionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,17 +12,17 @@ */ public final class ServerConnectionType extends ExpandableStringEnum { /** - * Default. + * Static value Default for ServerConnectionType. */ public static final ServerConnectionType DEFAULT = fromString("Default"); /** - * Redirect. + * Static value Redirect for ServerConnectionType. */ public static final ServerConnectionType REDIRECT = fromString("Redirect"); /** - * Proxy. + * Static value Proxy for ServerConnectionType. */ public static final ServerConnectionType PROXY = fromString("Proxy"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerCreateMode.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerCreateMode.java deleted file mode 100644 index 7910d2abfabf..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerCreateMode.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Create mode for server, only valid values for this are Normal and Restore. - */ -public final class ServerCreateMode extends ExpandableStringEnum { - /** - * Normal. - */ - public static final ServerCreateMode NORMAL = fromString("Normal"); - - /** - * Restore. - */ - public static final ServerCreateMode RESTORE = fromString("Restore"); - - /** - * Creates a new instance of ServerCreateMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ServerCreateMode() { - } - - /** - * Creates or finds a ServerCreateMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ServerCreateMode. - */ - public static ServerCreateMode fromString(String name) { - return fromString(name, ServerCreateMode.class); - } - - /** - * Gets known ServerCreateMode values. - * - * @return known ServerCreateMode values. - */ - public static Collection values() { - return values(ServerCreateMode.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerDevOpsAuditSettingsListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDevOpsAuditSettingsListResult.java similarity index 95% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerDevOpsAuditSettingsListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDevOpsAuditSettingsListResult.java index 794700976ff0..2b863dbe4737 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerDevOpsAuditSettingsListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDevOpsAuditSettingsListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -32,7 +32,7 @@ public final class ServerDevOpsAuditSettingsListResult /** * Creates an instance of ServerDevOpsAuditSettingsListResult class. */ - private ServerDevOpsAuditSettingsListResult() { + public ServerDevOpsAuditSettingsListResult() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDnsAliasAcquisition.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDnsAliasAcquisition.java index 2773a1b9c8a5..daf49a1d1bd0 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDnsAliasAcquisition.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDnsAliasAcquisition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerDnsAliasListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDnsAliasListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerDnsAliasListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDnsAliasListResult.java index dde7caa315d1..6c85aa0d816a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerDnsAliasListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerDnsAliasListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a ServerDnsAlias list operation. + * A list of server DNS aliases. */ @Immutable public final class ServerDnsAliasListResult implements JsonSerializable { /* - * The ServerDnsAlias items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ServerDnsAliasListResult class. */ - private ServerDnsAliasListResult() { + public ServerDnsAliasListResult() { } /** - * Get the value property: The ServerDnsAlias items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model ServerDnsAliasListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ServerDnsAliasListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ServerDnsAliasListResult 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 ServerDnsAliasListResult. */ public static ServerDnsAliasListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerExternalAdministrator.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerExternalAdministrator.java index 6eb99df71508..2f1f9e62261a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerExternalAdministrator.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerExternalAdministrator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerInfo.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerInfo.java index f98ea393dbc4..467160dae3f7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerInfo.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerKeyListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerKeyListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerKeyListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerKeyListResult.java index a8a9f3f19ad6..173fb1a14ea1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerKeyListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerKeyListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a ServerKey list operation. + * A list of server keys. */ @Immutable public final class ServerKeyListResult implements JsonSerializable { /* - * The ServerKey items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ServerKeyListResult class. */ - private ServerKeyListResult() { + public ServerKeyListResult() { } /** - * Get the value property: The ServerKey items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model ServerKeyListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ServerKeyListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ServerKeyListResult 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 ServerKeyListResult. */ public static ServerKeyListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerKeyType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerKeyType.java index 70e9a23510a0..1074004dbeef 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerKeyType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerKeyType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,12 +12,12 @@ */ public final class ServerKeyType extends ExpandableStringEnum { /** - * ServiceManaged. + * Static value ServiceManaged for ServerKeyType. */ public static final ServerKeyType SERVICE_MANAGED = fromString("ServiceManaged"); /** - * AzureKeyVault. + * Static value AzureKeyVault for ServerKeyType. */ public static final ServerKeyType AZURE_KEY_VAULT = fromString("AzureKeyVault"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerListResult.java index 8bd51849fc34..73f53cb0fd21 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a Server list operation. + * A list of servers. */ @Immutable public final class ServerListResult implements JsonSerializable { /* - * The Server items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ServerListResult class. */ - private ServerListResult() { + public ServerListResult() { } /** - * Get the value property: The Server items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model ServerListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ServerListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ServerListResult. */ public static ServerListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerNetworkAccessFlag.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerNetworkAccessFlag.java index cea49122e362..a154b25bd225 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerNetworkAccessFlag.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerNetworkAccessFlag.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -8,17 +8,17 @@ import java.util.Collection; /** - * Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be + * Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be * 'Enabled' or 'Disabled'. */ public final class ServerNetworkAccessFlag extends ExpandableStringEnum { /** - * Enabled. + * Static value Enabled for ServerNetworkAccessFlag. */ public static final ServerNetworkAccessFlag ENABLED = fromString("Enabled"); /** - * Disabled. + * Static value Disabled for ServerNetworkAccessFlag. */ public static final ServerNetworkAccessFlag DISABLED = fromString("Disabled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerOperationListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerOperationListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerOperationListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerOperationListResult.java index 43bac1b6f92b..8bcb2e6b6c97 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerOperationListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerOperationListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a ServerOperation list operation. + * The response to a list server operations request. */ @Immutable public final class ServerOperationListResult implements JsonSerializable { /* - * The ServerOperation items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ServerOperationListResult class. */ - private ServerOperationListResult() { + public ServerOperationListResult() { } /** - * Get the value property: The ServerOperation items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property value in model ServerOperationListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ServerOperationListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ServerOperationListResult 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 ServerOperationListResult. */ public static ServerOperationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerPrivateEndpointConnection.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerPrivateEndpointConnection.java index b65725407c86..9a3eceb1761c 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerPrivateEndpointConnection.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerPrivateEndpointConnection.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -30,7 +30,7 @@ public final class ServerPrivateEndpointConnection implements JsonSerializable { /* - * The ServerTrustGroup items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ServerTrustGroupListResult class. */ - private ServerTrustGroupListResult() { + public ServerTrustGroupListResult() { } /** - * Get the value property: The ServerTrustGroup items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ServerTrustGroupListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ServerTrustGroupListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ServerTrustGroupListResult 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 ServerTrustGroupListResult. */ public static ServerTrustGroupListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerTrustGroupPropertiesTrustScopesItem.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerTrustGroupPropertiesTrustScopesItem.java index b500264ed24a..a483c1149895 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerTrustGroupPropertiesTrustScopesItem.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerTrustGroupPropertiesTrustScopesItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -13,13 +13,13 @@ public final class ServerTrustGroupPropertiesTrustScopesItem extends ExpandableStringEnum { /** - * GlobalTransactions. + * Static value GlobalTransactions for ServerTrustGroupPropertiesTrustScopesItem. */ public static final ServerTrustGroupPropertiesTrustScopesItem GLOBAL_TRANSACTIONS = fromString("GlobalTransactions"); /** - * ServiceBroker. + * Static value ServiceBroker for ServerTrustGroupPropertiesTrustScopesItem. */ public static final ServerTrustGroupPropertiesTrustScopesItem SERVICE_BROKER = fromString("ServiceBroker"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerUpdate.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerUpdate.java index 6ee829e92bee..fcf43120ac90 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerUpdate.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -187,7 +187,7 @@ public List privateEndpointConnections() { } /** - * Get the minimalTlsVersion property: Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'. + * Get the minimalTlsVersion property: Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'. * * @return the minimalTlsVersion value. */ @@ -196,7 +196,7 @@ public String minimalTlsVersion() { } /** - * Set the minimalTlsVersion property: Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'. + * Set the minimalTlsVersion property: Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'. * * @param minimalTlsVersion the minimalTlsVersion value to set. * @return the ServerUpdate object itself. @@ -211,7 +211,7 @@ public ServerUpdate withMinimalTlsVersion(String minimalTlsVersion) { /** * Get the publicNetworkAccess property: Whether or not public endpoint access is allowed for this server. Value is - * optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'. + * optional but if passed in, must be 'Enabled' or 'Disabled'. * * @return the publicNetworkAccess value. */ @@ -221,7 +221,7 @@ public ServerNetworkAccessFlag publicNetworkAccess() { /** * Set the publicNetworkAccess property: Whether or not public endpoint access is allowed for this server. Value is - * optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'. + * optional but if passed in, must be 'Enabled' or 'Disabled'. * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the ServerUpdate object itself. @@ -316,9 +316,7 @@ public ServerUpdate withKeyId(String keyId) { } /** - * Get the administrators property: The Azure Active Directory administrator can be utilized during server creation - * and for server updates, except for the azureADOnlyAuthentication property. To update the - * azureADOnlyAuthentication property, individual API must be used. + * Get the administrators property: The Azure Active Directory administrator of the server. * * @return the administrators value. */ @@ -327,9 +325,7 @@ public ServerExternalAdministrator administrators() { } /** - * Set the administrators property: The Azure Active Directory administrator can be utilized during server creation - * and for server updates, except for the azureADOnlyAuthentication property. To update the - * azureADOnlyAuthentication property, individual API must be used. + * Set the administrators property: The Azure Active Directory administrator of the server. * * @param administrators the administrators value to set. * @return the ServerUpdate object itself. @@ -367,86 +363,6 @@ public ServerUpdate withRestrictOutboundNetworkAccess(ServerNetworkAccessFlag re return this; } - /** - * Get the isIPv6Enabled property: Whether or not to enable IPv6 support for this server. Value is optional but if - * passed in, must be 'Enabled' or 'Disabled'. - * - * @return the isIPv6Enabled value. - */ - public ServerNetworkAccessFlag isIPv6Enabled() { - return this.innerProperties() == null ? null : this.innerProperties().isIPv6Enabled(); - } - - /** - * Set the isIPv6Enabled property: Whether or not to enable IPv6 support for this server. Value is optional but if - * passed in, must be 'Enabled' or 'Disabled'. - * - * @param isIPv6Enabled the isIPv6Enabled value to set. - * @return the ServerUpdate object itself. - */ - public ServerUpdate withIsIPv6Enabled(ServerNetworkAccessFlag isIPv6Enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerProperties(); - } - this.innerProperties().withIsIPv6Enabled(isIPv6Enabled); - return this; - } - - /** - * Get the externalGovernanceStatus property: Status of external governance. - * - * @return the externalGovernanceStatus value. - */ - public ExternalGovernanceStatus externalGovernanceStatus() { - return this.innerProperties() == null ? null : this.innerProperties().externalGovernanceStatus(); - } - - /** - * Get the retentionDays property: Number of days this server will stay soft-deleted. - * - * @return the retentionDays value. - */ - public Integer retentionDays() { - return this.innerProperties() == null ? null : this.innerProperties().retentionDays(); - } - - /** - * Set the retentionDays property: Number of days this server will stay soft-deleted. - * - * @param retentionDays the retentionDays value to set. - * @return the ServerUpdate object itself. - */ - public ServerUpdate withRetentionDays(Integer retentionDays) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerProperties(); - } - this.innerProperties().withRetentionDays(retentionDays); - return this; - } - - /** - * Get the createMode property: Create mode for server, only valid values for this are Normal and Restore. - * - * @return the createMode value. - */ - public ServerCreateMode createMode() { - return this.innerProperties() == null ? null : this.innerProperties().createMode(); - } - - /** - * Set the createMode property: Create mode for server, only valid values for this are Normal and Restore. - * - * @param createMode the createMode value to set. - * @return the ServerUpdate object itself. - */ - public ServerUpdate withCreateMode(ServerCreateMode createMode) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerProperties(); - } - this.innerProperties().withCreateMode(createMode); - return this; - } - /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerUsageListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerUsageListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerUsageListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerUsageListResult.java index 647f6c30f0e3..6e96223cd43d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerUsageListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerUsageListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a ServerUsage list operation. + * A list of server usage metrics. */ @Immutable public final class ServerUsageListResult implements JsonSerializable { /* - * The ServerUsage items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ServerUsageListResult class. */ - private ServerUsageListResult() { + public ServerUsageListResult() { } /** - * Get the value property: The ServerUsage items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model ServerUsageListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ServerUsageListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ServerUsageListResult 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 ServerUsageListResult. */ public static ServerUsageListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerVersionCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerVersionCapability.java index 08e1de69d39d..a2dabbd7130d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerVersionCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerVersionCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -15,7 +15,7 @@ /** * The server capability. */ -@Immutable +@Fluent public final class ServerVersionCapability implements JsonSerializable { /* * The server version name. @@ -45,7 +45,7 @@ public final class ServerVersionCapability implements JsonSerializable { /* - * The ServerVulnerabilityAssessment items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of ServerVulnerabilityAssessmentListResult class. */ - private ServerVulnerabilityAssessmentListResult() { + public ServerVulnerabilityAssessmentListResult() { } /** - * Get the value property: The ServerVulnerabilityAssessment items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ServerVulnerabilityAssessmentListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ServerVulnerabilityAssessmentListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ServerVulnerabilityAssessmentListResult 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 ServerVulnerabilityAssessmentListResult. */ public static ServerVulnerabilityAssessmentListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerWorkspaceFeature.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerWorkspaceFeature.java index ee63551fe445..1eca011520d8 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerWorkspaceFeature.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServerWorkspaceFeature.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,12 +12,12 @@ */ public final class ServerWorkspaceFeature extends ExpandableStringEnum { /** - * Connected. + * Static value Connected for ServerWorkspaceFeature. */ public static final ServerWorkspaceFeature CONNECTED = fromString("Connected"); /** - * Disconnected. + * Static value Disconnected for ServerWorkspaceFeature. */ public static final ServerWorkspaceFeature DISCONNECTED = fromString("Disconnected"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServiceObjectiveCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServiceObjectiveCapability.java index 344d965e4f61..960d67e6c96b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServiceObjectiveCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServiceObjectiveCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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,7 +16,7 @@ /** * The service objectives capability. */ -@Immutable +@Fluent public final class ServiceObjectiveCapability implements JsonSerializable { /* * The unique ID of the service objective. @@ -78,21 +78,6 @@ public final class ServiceObjectiveCapability implements JsonSerializable supportedMaintenanceConfigurations; - /* - * Whether or not zone pinning is supported. - */ - private Boolean zonePinning; - - /* - * List of supported availability zones - */ - private List supportedZones; - - /* - * List of supported free limit exhaustion behaviors - */ - private List supportedFreeLimitExhaustionBehaviors; - /* * The status of the capability. */ @@ -106,7 +91,7 @@ public final class ServiceObjectiveCapability implements JsonSerializable supportedMaintenanceConfiguratio return this.supportedMaintenanceConfigurations; } - /** - * Get the zonePinning property: Whether or not zone pinning is supported. - * - * @return the zonePinning value. - */ - public Boolean zonePinning() { - return this.zonePinning; - } - - /** - * Get the supportedZones property: List of supported availability zones. - * - * @return the supportedZones value. - */ - public List supportedZones() { - return this.supportedZones; - } - - /** - * Get the supportedFreeLimitExhaustionBehaviors property: List of supported free limit exhaustion behaviors. - * - * @return the supportedFreeLimitExhaustionBehaviors value. - */ - public List supportedFreeLimitExhaustionBehaviors() { - return this.supportedFreeLimitExhaustionBehaviors; - } - /** * Get the status property: The status of the capability. * @@ -262,6 +220,17 @@ public String reason() { return this.reason; } + /** + * Set the reason property: The reason for the capability not being available. + * + * @param reason the reason value to set. + * @return the ServiceObjectiveCapability object itself. + */ + public ServiceObjectiveCapability withReason(String reason) { + this.reason = reason; + return this; + } + /** * Validates the instance. * @@ -292,12 +261,6 @@ public void validate() { if (supportedMaintenanceConfigurations() != null) { supportedMaintenanceConfigurations().forEach(e -> e.validate()); } - if (supportedZones() != null) { - supportedZones().forEach(e -> e.validate()); - } - if (supportedFreeLimitExhaustionBehaviors() != null) { - supportedFreeLimitExhaustionBehaviors().forEach(e -> e.validate()); - } } /** @@ -361,17 +324,6 @@ public static ServiceObjectiveCapability fromJson(JsonReader jsonReader) throws = reader.readArray(reader1 -> MaintenanceConfigurationCapability.fromJson(reader1)); deserializedServiceObjectiveCapability.supportedMaintenanceConfigurations = supportedMaintenanceConfigurations; - } else if ("zonePinning".equals(fieldName)) { - deserializedServiceObjectiveCapability.zonePinning = reader.getNullable(JsonReader::getBoolean); - } else if ("supportedZones".equals(fieldName)) { - List supportedZones - = reader.readArray(reader1 -> ZonePinningCapability.fromJson(reader1)); - deserializedServiceObjectiveCapability.supportedZones = supportedZones; - } else if ("supportedFreeLimitExhaustionBehaviors".equals(fieldName)) { - List supportedFreeLimitExhaustionBehaviors - = reader.readArray(reader1 -> FreeLimitExhaustionBehaviorCapability.fromJson(reader1)); - deserializedServiceObjectiveCapability.supportedFreeLimitExhaustionBehaviors - = supportedFreeLimitExhaustionBehaviors; } else if ("status".equals(fieldName)) { deserializedServiceObjectiveCapability.status = CapabilityStatus.fromString(reader.getString()); } else if ("reason".equals(fieldName)) { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServicePrincipal.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServicePrincipal.java index 129cabac385d..3ca94cfbd32e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServicePrincipal.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServicePrincipal.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServicePrincipalType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServicePrincipalType.java index ea1483d84d0b..1c784d4e9791 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServicePrincipalType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ServicePrincipalType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,12 +12,12 @@ */ public final class ServicePrincipalType extends ExpandableStringEnum { /** - * None. + * Static value None for ServicePrincipalType. */ public static final ServicePrincipalType NONE = fromString("None"); /** - * SystemAssigned. + * Static value SystemAssigned for ServicePrincipalType. */ public static final ServicePrincipalType SYSTEM_ASSIGNED = fromString("SystemAssigned"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SetLegalHoldImmutability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SetLegalHoldImmutability.java deleted file mode 100644 index 5ddf15e34078..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SetLegalHoldImmutability.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The setting for whether LegalHold is enabled or disabled on the LTR backup. When LegalHold is enabled, the backup - * cannot be deleted until the LegalHold is removed. - */ -public final class SetLegalHoldImmutability extends ExpandableStringEnum { - /** - * Enabled. - */ - public static final SetLegalHoldImmutability ENABLED = fromString("Enabled"); - - /** - * Disabled. - */ - public static final SetLegalHoldImmutability DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of SetLegalHoldImmutability value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SetLegalHoldImmutability() { - } - - /** - * Creates or finds a SetLegalHoldImmutability from its string representation. - * - * @param name a name to look for. - * @return the corresponding SetLegalHoldImmutability. - */ - public static SetLegalHoldImmutability fromString(String name) { - return fromString(name, SetLegalHoldImmutability.class); - } - - /** - * Gets known SetLegalHoldImmutability values. - * - * @return known SetLegalHoldImmutability values. - */ - public static Collection values() { - return values(SetLegalHoldImmutability.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ShortTermRetentionPolicyName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ShortTermRetentionPolicyName.java index e190f8db17b6..2f1341815256 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ShortTermRetentionPolicyName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ShortTermRetentionPolicyName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class ShortTermRetentionPolicyName extends ExpandableStringEnum { /** - * default. + * Static value default for ShortTermRetentionPolicyName. */ public static final ShortTermRetentionPolicyName DEFAULT = fromString("default"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Sku.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Sku.java index d3d8048c232b..a7070ddd4542 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Sku.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Sku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlAgentConfigurationPropertiesState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlAgentConfigurationPropertiesState.java index 84676e4639fe..bd179f834d25 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlAgentConfigurationPropertiesState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlAgentConfigurationPropertiesState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -13,12 +13,12 @@ public final class SqlAgentConfigurationPropertiesState extends ExpandableStringEnum { /** - * Enabled. + * Static value Enabled for SqlAgentConfigurationPropertiesState. */ public static final SqlAgentConfigurationPropertiesState ENABLED = fromString("Enabled"); /** - * Disabled. + * Static value Disabled for SqlAgentConfigurationPropertiesState. */ public static final SqlAgentConfigurationPropertiesState DISABLED = fromString("Disabled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlVulnerabilityAssessmentName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlVulnerabilityAssessmentName.java deleted file mode 100644 index 19d054c08fe2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlVulnerabilityAssessmentName.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for SqlVulnerabilityAssessmentName. - */ -public final class SqlVulnerabilityAssessmentName extends ExpandableStringEnum { - /** - * default. - */ - public static final SqlVulnerabilityAssessmentName DEFAULT = fromString("default"); - - /** - * Creates a new instance of SqlVulnerabilityAssessmentName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SqlVulnerabilityAssessmentName() { - } - - /** - * Creates or finds a SqlVulnerabilityAssessmentName from its string representation. - * - * @param name a name to look for. - * @return the corresponding SqlVulnerabilityAssessmentName. - */ - public static SqlVulnerabilityAssessmentName fromString(String name) { - return fromString(name, SqlVulnerabilityAssessmentName.class); - } - - /** - * Gets known SqlVulnerabilityAssessmentName values. - * - * @return known SqlVulnerabilityAssessmentName values. - */ - public static Collection values() { - return values(SqlVulnerabilityAssessmentName.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlVulnerabilityAssessmentScanError.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlVulnerabilityAssessmentScanError.java deleted file mode 100644 index 6830f2c37718..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlVulnerabilityAssessmentScanError.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; - -/** - * Properties of a vulnerability assessment scan error. - */ -@Immutable -public final class SqlVulnerabilityAssessmentScanError - implements JsonSerializable { - /* - * The error code. - */ - private String code; - - /* - * The error message. - */ - private String message; - - /** - * Creates an instance of SqlVulnerabilityAssessmentScanError class. - */ - private SqlVulnerabilityAssessmentScanError() { - } - - /** - * Get the code property: The error code. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Get the message property: The error message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SqlVulnerabilityAssessmentScanError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SqlVulnerabilityAssessmentScanError 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 SqlVulnerabilityAssessmentScanError. - */ - public static SqlVulnerabilityAssessmentScanError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SqlVulnerabilityAssessmentScanError deserializedSqlVulnerabilityAssessmentScanError - = new SqlVulnerabilityAssessmentScanError(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanError.code = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedSqlVulnerabilityAssessmentScanError.message = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSqlVulnerabilityAssessmentScanError; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlVulnerabilityAssessmentState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlVulnerabilityAssessmentState.java deleted file mode 100644 index 0355ed99ceee..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SqlVulnerabilityAssessmentState.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -/** - * Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been - * applied yet on the specific database or server. - */ -public enum SqlVulnerabilityAssessmentState { - /** - * Enabled. - */ - ENABLED("Enabled"), - - /** - * Disabled. - */ - DISABLED("Disabled"); - - /** - * The actual serialized value for a SqlVulnerabilityAssessmentState instance. - */ - private final String value; - - SqlVulnerabilityAssessmentState(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a SqlVulnerabilityAssessmentState instance. - * - * @param value the serialized value to parse. - * @return the parsed SqlVulnerabilityAssessmentState object, or null if unable to parse. - */ - public static SqlVulnerabilityAssessmentState fromString(String value) { - if (value == null) { - return null; - } - SqlVulnerabilityAssessmentState[] items = SqlVulnerabilityAssessmentState.values(); - for (SqlVulnerabilityAssessmentState item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StartStopScheduleName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StartStopScheduleName.java deleted file mode 100644 index 86e48cce5ee9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StartStopScheduleName.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for StartStopScheduleName. - */ -public final class StartStopScheduleName extends ExpandableStringEnum { - /** - * default. - */ - public static final StartStopScheduleName DEFAULT = fromString("default"); - - /** - * Creates a new instance of StartStopScheduleName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public StartStopScheduleName() { - } - - /** - * Creates or finds a StartStopScheduleName from its string representation. - * - * @param name a name to look for. - * @return the corresponding StartStopScheduleName. - */ - public static StartStopScheduleName fromString(String name) { - return fromString(name, StartStopScheduleName.class); - } - - /** - * Gets known StartStopScheduleName values. - * - * @return known StartStopScheduleName values. - */ - public static Collection values() { - return values(StartStopScheduleName.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Status.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Status.java index cac63dbbb3f3..59a681ff9e3e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Status.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/Status.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,32 +12,32 @@ */ public final class Status extends ExpandableStringEnum { /** - * NotStarted. + * Static value NotStarted for Status. */ public static final Status NOT_STARTED = fromString("NotStarted"); /** - * InProgress. + * Static value InProgress for Status. */ public static final Status IN_PROGRESS = fromString("InProgress"); /** - * SlowedDown. + * Static value SlowedDown for Status. */ public static final Status SLOWED_DOWN = fromString("SlowedDown"); /** - * Completed. + * Static value Completed for Status. */ public static final Status COMPLETED = fromString("Completed"); /** - * Failed. + * Static value Failed for Status. */ public static final Status FAILED = fromString("Failed"); /** - * Canceled. + * Static value Canceled for Status. */ public static final Status CANCELED = fromString("Canceled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageCapability.java index ee3aa938a419..a03cf6dde094 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageCapability.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageCapability.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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,7 +14,7 @@ /** * The storage account type capability. */ -@Immutable +@Fluent public final class StorageCapability implements JsonSerializable { /* * The storage account type for the database's backups. @@ -34,7 +34,7 @@ public final class StorageCapability implements JsonSerializable { /** - * GRS. + * Static value GRS for StorageCapabilityStorageAccountType. */ public static final StorageCapabilityStorageAccountType GRS = fromString("GRS"); /** - * LRS. + * Static value LRS for StorageCapabilityStorageAccountType. */ public static final StorageCapabilityStorageAccountType LRS = fromString("LRS"); /** - * ZRS. + * Static value ZRS for StorageCapabilityStorageAccountType. */ public static final StorageCapabilityStorageAccountType ZRS = fromString("ZRS"); /** - * GZRS. + * Static value GZRS for StorageCapabilityStorageAccountType. */ public static final StorageCapabilityStorageAccountType GZRS = fromString("GZRS"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageKeyType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageKeyType.java index 9f48a0abec4d..54ca2acefd73 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageKeyType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/StorageKeyType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -8,24 +8,19 @@ import java.util.Collection; /** - * Storage key type: StorageAccessKey, SharedAccessKey or ManagedIdentity. + * Storage key type: StorageAccessKey or SharedAccessKey. */ public final class StorageKeyType extends ExpandableStringEnum { /** - * SharedAccessKey. + * Static value SharedAccessKey for StorageKeyType. */ public static final StorageKeyType SHARED_ACCESS_KEY = fromString("SharedAccessKey"); /** - * StorageAccessKey. + * Static value StorageAccessKey for StorageKeyType. */ public static final StorageKeyType STORAGE_ACCESS_KEY = fromString("StorageAccessKey"); - /** - * ManagedIdentity. - */ - public static final StorageKeyType MANAGED_IDENTITY = fromString("ManagedIdentity"); - /** * Creates a new instance of StorageKeyType value. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SubscriptionUsageListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SubscriptionUsageListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SubscriptionUsageListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SubscriptionUsageListResult.java index 00fd6139f247..e79e2886bb12 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SubscriptionUsageListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SubscriptionUsageListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a SubscriptionUsage list operation. + * A list of subscription usage metrics in a location. */ @Immutable public final class SubscriptionUsageListResult implements JsonSerializable { /* - * The SubscriptionUsage items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of SubscriptionUsageListResult class. */ - private SubscriptionUsageListResult() { + public SubscriptionUsageListResult() { } /** - * Get the value property: The SubscriptionUsage items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model SubscriptionUsageListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(SubscriptionUsageListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SubscriptionUsageListResult 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 SubscriptionUsageListResult. */ public static SubscriptionUsageListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SynapseLinkWorkspaceInfoProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SynapseLinkWorkspaceInfoProperties.java deleted file mode 100644 index 553f7b14799a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SynapseLinkWorkspaceInfoProperties.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; - -/** - * Properties of a Synapse link workspaces. - */ -@Immutable -public final class SynapseLinkWorkspaceInfoProperties implements JsonSerializable { - /* - * Synapse link workspace id. - */ - private String workspaceId; - - /* - * Link connection name. - */ - private String linkConnectionName; - - /** - * Creates an instance of SynapseLinkWorkspaceInfoProperties class. - */ - private SynapseLinkWorkspaceInfoProperties() { - } - - /** - * Get the workspaceId property: Synapse link workspace id. - * - * @return the workspaceId value. - */ - public String workspaceId() { - return this.workspaceId; - } - - /** - * Get the linkConnectionName property: Link connection name. - * - * @return the linkConnectionName value. - */ - public String linkConnectionName() { - return this.linkConnectionName; - } - - /** - * 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("workspaceId", this.workspaceId); - jsonWriter.writeStringField("linkConnectionName", this.linkConnectionName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SynapseLinkWorkspaceInfoProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SynapseLinkWorkspaceInfoProperties 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 SynapseLinkWorkspaceInfoProperties. - */ - public static SynapseLinkWorkspaceInfoProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SynapseLinkWorkspaceInfoProperties deserializedSynapseLinkWorkspaceInfoProperties - = new SynapseLinkWorkspaceInfoProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("workspaceId".equals(fieldName)) { - deserializedSynapseLinkWorkspaceInfoProperties.workspaceId = reader.getString(); - } else if ("linkConnectionName".equals(fieldName)) { - deserializedSynapseLinkWorkspaceInfoProperties.linkConnectionName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSynapseLinkWorkspaceInfoProperties; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncAgentLinkedDatabaseListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentLinkedDatabaseListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncAgentLinkedDatabaseListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentLinkedDatabaseListResult.java index db438b390cf2..cb63e07e99f1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncAgentLinkedDatabaseListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentLinkedDatabaseListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a SyncAgentLinkedDatabase list operation. + * A list of sync agent linked databases. */ @Immutable public final class SyncAgentLinkedDatabaseListResult implements JsonSerializable { /* - * The SyncAgentLinkedDatabase items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of SyncAgentLinkedDatabaseListResult class. */ - private SyncAgentLinkedDatabaseListResult() { + public SyncAgentLinkedDatabaseListResult() { } /** - * Get the value property: The SyncAgentLinkedDatabase items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model SyncAgentLinkedDatabaseListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(SyncAgentLinkedDatabaseListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SyncAgentLinkedDatabaseListResult 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 SyncAgentLinkedDatabaseListResult. */ public static SyncAgentLinkedDatabaseListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncAgentListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncAgentListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentListResult.java index fa52e6eccdcd..82077a7598fa 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncAgentListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a SyncAgent list operation. + * A list of sync agents. */ @Immutable public final class SyncAgentListResult implements JsonSerializable { /* - * The SyncAgent items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of SyncAgentListResult class. */ - private SyncAgentListResult() { + public SyncAgentListResult() { } /** - * Get the value property: The SyncAgent items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model SyncAgentListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(SyncAgentListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SyncAgentListResult 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 SyncAgentListResult. */ public static SyncAgentListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentState.java index 26524e178ea3..089bd9740d6d 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncAgentState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,17 +12,17 @@ */ public final class SyncAgentState extends ExpandableStringEnum { /** - * Online. + * Static value Online for SyncAgentState. */ public static final SyncAgentState ONLINE = fromString("Online"); /** - * Offline. + * Static value Offline for SyncAgentState. */ public static final SyncAgentState OFFLINE = fromString("Offline"); /** - * NeverConnected. + * Static value NeverConnected for SyncAgentState. */ public static final SyncAgentState NEVER_CONNECTED = fromString("NeverConnected"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncConflictResolutionPolicy.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncConflictResolutionPolicy.java index ec2d2d9ae6be..d54982a168f7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncConflictResolutionPolicy.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncConflictResolutionPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,12 +12,12 @@ */ public final class SyncConflictResolutionPolicy extends ExpandableStringEnum { /** - * HubWin. + * Static value HubWin for SyncConflictResolutionPolicy. */ public static final SyncConflictResolutionPolicy HUB_WIN = fromString("HubWin"); /** - * MemberWin. + * Static value MemberWin for SyncConflictResolutionPolicy. */ public static final SyncConflictResolutionPolicy MEMBER_WIN = fromString("MemberWin"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncDatabaseIdListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncDatabaseIdListResult.java similarity index 73% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncDatabaseIdListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncDatabaseIdListResult.java index b49c5a4a7649..529ad8be8542 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncDatabaseIdListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncDatabaseIdListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,23 +19,23 @@ @Immutable public final class SyncDatabaseIdListResult implements JsonSerializable { /* - * The SyncDatabaseIdProperties items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of SyncDatabaseIdListResult class. */ - private SyncDatabaseIdListResult() { + public SyncDatabaseIdListResult() { } /** - * Get the value property: The SyncDatabaseIdProperties items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model SyncDatabaseIdListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(SyncDatabaseIdListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SyncDatabaseIdListResult 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 SyncDatabaseIdListResult. */ public static SyncDatabaseIdListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncDirection.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncDirection.java index 43e2efdd1e28..db60ef61d689 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncDirection.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncDirection.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,17 +12,17 @@ */ public final class SyncDirection extends ExpandableStringEnum { /** - * Bidirectional. + * Static value Bidirectional for SyncDirection. */ public static final SyncDirection BIDIRECTIONAL = fromString("Bidirectional"); /** - * OneWayMemberToHub. + * Static value OneWayMemberToHub for SyncDirection. */ public static final SyncDirection ONE_WAY_MEMBER_TO_HUB = fromString("OneWayMemberToHub"); /** - * OneWayHubToMember. + * Static value OneWayHubToMember for SyncDirection. */ public static final SyncDirection ONE_WAY_HUB_TO_MEMBER = fromString("OneWayHubToMember"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncFullSchemaPropertiesListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaPropertiesListResult.java similarity index 73% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncFullSchemaPropertiesListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaPropertiesListResult.java index 1dd6035d3e59..07f54117e560 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncFullSchemaPropertiesListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaPropertiesListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,23 +19,23 @@ @Immutable public final class SyncFullSchemaPropertiesListResult implements JsonSerializable { /* - * The SyncFullSchemaProperties items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of SyncFullSchemaPropertiesListResult class. */ - private SyncFullSchemaPropertiesListResult() { + public SyncFullSchemaPropertiesListResult() { } /** - * Get the value property: The SyncFullSchemaProperties items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model SyncFullSchemaPropertiesListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(SyncFullSchemaPropertiesListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SyncFullSchemaPropertiesListResult 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 SyncFullSchemaPropertiesListResult. */ public static SyncFullSchemaPropertiesListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaTable.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaTable.java index 62efd2ab9f04..c4f2909472db 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaTable.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaTable.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -45,7 +45,7 @@ public final class SyncFullSchemaTable implements JsonSerializable { /* - * The SyncGroup items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of SyncGroupListResult class. */ - private SyncGroupListResult() { + public SyncGroupListResult() { } /** - * Get the value property: The SyncGroup items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model SyncGroupListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(SyncGroupListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SyncGroupListResult 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 SyncGroupListResult. */ public static SyncGroupListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncGroupLogListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupLogListResult.java similarity index 73% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncGroupLogListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupLogListResult.java index f9015b2c0899..b30904836af4 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncGroupLogListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupLogListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,23 +19,23 @@ @Immutable public final class SyncGroupLogListResult implements JsonSerializable { /* - * The SyncGroupLogProperties items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of SyncGroupLogListResult class. */ - private SyncGroupLogListResult() { + public SyncGroupLogListResult() { } /** - * Get the value property: The SyncGroupLogProperties items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model SyncGroupLogListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(SyncGroupLogListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SyncGroupLogListResult 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 SyncGroupLogListResult. */ public static SyncGroupLogListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupLogType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupLogType.java index 1c2b1f40cb72..9e60e11c892b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupLogType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupLogType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,22 +12,22 @@ */ public final class SyncGroupLogType extends ExpandableStringEnum { /** - * All. + * Static value All for SyncGroupLogType. */ public static final SyncGroupLogType ALL = fromString("All"); /** - * Error. + * Static value Error for SyncGroupLogType. */ public static final SyncGroupLogType ERROR = fromString("Error"); /** - * Warning. + * Static value Warning for SyncGroupLogType. */ public static final SyncGroupLogType WARNING = fromString("Warning"); /** - * Success. + * Static value Success for SyncGroupLogType. */ public static final SyncGroupLogType SUCCESS = fromString("Success"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchema.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchema.java index f84607a6482b..f24507878a4a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchema.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchema.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTable.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTable.java index 962be01394c7..3bed16eb5cf5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTable.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTable.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTableColumn.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTableColumn.java index 07c1c0f5633f..da43d79c12fd 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTableColumn.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTableColumn.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupState.java index cadd6bee09f0..7957dd1425cd 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,27 +12,27 @@ */ public final class SyncGroupState extends ExpandableStringEnum { /** - * NotReady. + * Static value NotReady for SyncGroupState. */ public static final SyncGroupState NOT_READY = fromString("NotReady"); /** - * Error. + * Static value Error for SyncGroupState. */ public static final SyncGroupState ERROR = fromString("Error"); /** - * Warning. + * Static value Warning for SyncGroupState. */ public static final SyncGroupState WARNING = fromString("Warning"); /** - * Progressing. + * Static value Progressing for SyncGroupState. */ public static final SyncGroupState PROGRESSING = fromString("Progressing"); /** - * Good. + * Static value Good for SyncGroupState. */ public static final SyncGroupState GOOD = fromString("Good"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupsType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupsType.java index 52f00b35cc00..caf97f0f0f35 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupsType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncGroupsType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,22 +12,22 @@ */ public final class SyncGroupsType extends ExpandableStringEnum { /** - * All. + * Static value All for SyncGroupsType. */ public static final SyncGroupsType ALL = fromString("All"); /** - * Error. + * Static value Error for SyncGroupsType. */ public static final SyncGroupsType ERROR = fromString("Error"); /** - * Warning. + * Static value Warning for SyncGroupsType. */ public static final SyncGroupsType WARNING = fromString("Warning"); /** - * Success. + * Static value Success for SyncGroupsType. */ public static final SyncGroupsType SUCCESS = fromString("Success"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberDbType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberDbType.java index 15b346d4fe64..1e05844090df 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberDbType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberDbType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,12 +12,12 @@ */ public final class SyncMemberDbType extends ExpandableStringEnum { /** - * AzureSqlDatabase. + * Static value AzureSqlDatabase for SyncMemberDbType. */ public static final SyncMemberDbType AZURE_SQL_DATABASE = fromString("AzureSqlDatabase"); /** - * SqlServerDatabase. + * Static value SqlServerDatabase for SyncMemberDbType. */ public static final SyncMemberDbType SQL_SERVER_DATABASE = fromString("SqlServerDatabase"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncMemberListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncMemberListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberListResult.java index 8380adc3576d..1d2248fa40f5 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncMemberListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a SyncMember list operation. + * A list of Azure SQL Database sync members. */ @Immutable public final class SyncMemberListResult implements JsonSerializable { /* - * The SyncMember items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of SyncMemberListResult class. */ - private SyncMemberListResult() { + public SyncMemberListResult() { } /** - * Get the value property: The SyncMember items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model SyncMemberListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(SyncMemberListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SyncMemberListResult 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 SyncMemberListResult. */ public static SyncMemberListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberState.java index 70de63d227b1..744ed1505125 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/SyncMemberState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,92 +12,92 @@ */ public final class SyncMemberState extends ExpandableStringEnum { /** - * SyncInProgress. + * Static value SyncInProgress for SyncMemberState. */ public static final SyncMemberState SYNC_IN_PROGRESS = fromString("SyncInProgress"); /** - * SyncSucceeded. + * Static value SyncSucceeded for SyncMemberState. */ public static final SyncMemberState SYNC_SUCCEEDED = fromString("SyncSucceeded"); /** - * SyncFailed. + * Static value SyncFailed for SyncMemberState. */ public static final SyncMemberState SYNC_FAILED = fromString("SyncFailed"); /** - * DisabledTombstoneCleanup. + * Static value DisabledTombstoneCleanup for SyncMemberState. */ public static final SyncMemberState DISABLED_TOMBSTONE_CLEANUP = fromString("DisabledTombstoneCleanup"); /** - * DisabledBackupRestore. + * Static value DisabledBackupRestore for SyncMemberState. */ public static final SyncMemberState DISABLED_BACKUP_RESTORE = fromString("DisabledBackupRestore"); /** - * SyncSucceededWithWarnings. + * Static value SyncSucceededWithWarnings for SyncMemberState. */ public static final SyncMemberState SYNC_SUCCEEDED_WITH_WARNINGS = fromString("SyncSucceededWithWarnings"); /** - * SyncCancelling. + * Static value SyncCancelling for SyncMemberState. */ public static final SyncMemberState SYNC_CANCELLING = fromString("SyncCancelling"); /** - * SyncCancelled. + * Static value SyncCancelled for SyncMemberState. */ public static final SyncMemberState SYNC_CANCELLED = fromString("SyncCancelled"); /** - * UnProvisioned. + * Static value UnProvisioned for SyncMemberState. */ public static final SyncMemberState UN_PROVISIONED = fromString("UnProvisioned"); /** - * Provisioning. + * Static value Provisioning for SyncMemberState. */ public static final SyncMemberState PROVISIONING = fromString("Provisioning"); /** - * Provisioned. + * Static value Provisioned for SyncMemberState. */ public static final SyncMemberState PROVISIONED = fromString("Provisioned"); /** - * ProvisionFailed. + * Static value ProvisionFailed for SyncMemberState. */ public static final SyncMemberState PROVISION_FAILED = fromString("ProvisionFailed"); /** - * DeProvisioning. + * Static value DeProvisioning for SyncMemberState. */ public static final SyncMemberState DE_PROVISIONING = fromString("DeProvisioning"); /** - * DeProvisioned. + * Static value DeProvisioned for SyncMemberState. */ public static final SyncMemberState DE_PROVISIONED = fromString("DeProvisioned"); /** - * DeProvisionFailed. + * Static value DeProvisionFailed for SyncMemberState. */ public static final SyncMemberState DE_PROVISION_FAILED = fromString("DeProvisionFailed"); /** - * Reprovisioning. + * Static value Reprovisioning for SyncMemberState. */ public static final SyncMemberState REPROVISIONING = fromString("Reprovisioning"); /** - * ReprovisionFailed. + * Static value ReprovisionFailed for SyncMemberState. */ public static final SyncMemberState REPROVISION_FAILED = fromString("ReprovisionFailed"); /** - * UnReprovisioned. + * Static value UnReprovisioned for SyncMemberState. */ public static final SyncMemberState UN_REPROVISIONED = fromString("UnReprovisioned"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TableTemporalType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TableTemporalType.java index 299be93afebf..dbaef53de988 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TableTemporalType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TableTemporalType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,17 +12,17 @@ */ public final class TableTemporalType extends ExpandableStringEnum { /** - * NonTemporalTable. + * Static value NonTemporalTable for TableTemporalType. */ public static final TableTemporalType NON_TEMPORAL_TABLE = fromString("NonTemporalTable"); /** - * HistoryTable. + * Static value HistoryTable for TableTemporalType. */ public static final TableTemporalType HISTORY_TABLE = fromString("HistoryTable"); /** - * SystemVersionedTemporalTable. + * Static value SystemVersionedTemporalTable for TableTemporalType. */ public static final TableTemporalType SYSTEM_VERSIONED_TEMPORAL_TABLE = fromString("SystemVersionedTemporalTable"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TdeCertificate.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TdeCertificate.java index 734e5bc348a0..ad8c69cd47a1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TdeCertificate.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TdeCertificate.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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; @@ -23,11 +22,6 @@ public final class TdeCertificate extends ProxyResource { */ private TdeCertificateProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -58,15 +52,6 @@ private TdeCertificateProperties 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. * @@ -188,8 +173,6 @@ public static TdeCertificate fromJson(JsonReader jsonReader) throws IOException deserializedTdeCertificate.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedTdeCertificate.innerProperties = TdeCertificateProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedTdeCertificate.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TimeBasedImmutability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TimeBasedImmutability.java deleted file mode 100644 index ebd0061e0a1f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TimeBasedImmutability.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The setting for whether or not time-based immutability is enabled for the LTR backup. When time-based immutability is - * enabled and locked, the backup cannot be deleted until BackupExpirationTime. - */ -public final class TimeBasedImmutability extends ExpandableStringEnum { - /** - * Enabled. - */ - public static final TimeBasedImmutability ENABLED = fromString("Enabled"); - - /** - * Disabled. - */ - public static final TimeBasedImmutability DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of TimeBasedImmutability value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TimeBasedImmutability() { - } - - /** - * Creates or finds a TimeBasedImmutability from its string representation. - * - * @param name a name to look for. - * @return the corresponding TimeBasedImmutability. - */ - public static TimeBasedImmutability fromString(String name) { - return fromString(name, TimeBasedImmutability.class); - } - - /** - * Gets known TimeBasedImmutability values. - * - * @return known TimeBasedImmutability values. - */ - public static Collection values() { - return values(TimeBasedImmutability.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TimeBasedImmutabilityMode.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TimeBasedImmutabilityMode.java deleted file mode 100644 index 42474fecf407..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TimeBasedImmutabilityMode.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The time-based immutability mode. Only applicable if time-based immutability is enabled. - */ -public final class TimeBasedImmutabilityMode extends ExpandableStringEnum { - /** - * Locked. - */ - public static final TimeBasedImmutabilityMode LOCKED = fromString("Locked"); - - /** - * Unlocked. - */ - public static final TimeBasedImmutabilityMode UNLOCKED = fromString("Unlocked"); - - /** - * Creates a new instance of TimeBasedImmutabilityMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TimeBasedImmutabilityMode() { - } - - /** - * Creates or finds a TimeBasedImmutabilityMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding TimeBasedImmutabilityMode. - */ - public static TimeBasedImmutabilityMode fromString(String name) { - return fromString(name, TimeBasedImmutabilityMode.class); - } - - /** - * Gets known TimeBasedImmutabilityMode values. - * - * @return known TimeBasedImmutabilityMode values. - */ - public static Collection values() { - return values(TimeBasedImmutabilityMode.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/TimeZoneListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TimeZoneListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/TimeZoneListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TimeZoneListResult.java index 3d8c85b33eb2..3bd8da1e2c7a 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/TimeZoneListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TimeZoneListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a TimeZone list operation. + * A list of time zones. */ @Immutable public final class TimeZoneListResult implements JsonSerializable { /* - * The TimeZone items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of TimeZoneListResult class. */ - private TimeZoneListResult() { + public TimeZoneListResult() { } /** - * Get the value property: The TimeZone items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model TimeZoneListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(TimeZoneListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of TimeZoneListResult 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 TimeZoneListResult. */ public static TimeZoneListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/TopQueriesListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TopQueriesListResult.java similarity index 73% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/TopQueriesListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TopQueriesListResult.java index be6655fab118..b9e94c82f3b3 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/TopQueriesListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TopQueriesListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,23 +19,23 @@ @Immutable public final class TopQueriesListResult implements JsonSerializable { /* - * The TopQueries items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of TopQueriesListResult class. */ - private TopQueriesListResult() { + public TopQueriesListResult() { } /** - * Get the value property: The TopQueries items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model TopQueriesListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(TopQueriesListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of TopQueriesListResult 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 TopQueriesListResult. */ public static TopQueriesListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionName.java index 55db505ea352..afd5dcdfdfbf 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class TransparentDataEncryptionName extends ExpandableStringEnum { /** - * current. + * Static value current for TransparentDataEncryptionName. */ public static final TransparentDataEncryptionName CURRENT = fromString("current"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionScanState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionScanState.java deleted file mode 100644 index 5ec305514852..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionScanState.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies the encryption scan state of the transparent data encryption. - */ -public final class TransparentDataEncryptionScanState extends ExpandableStringEnum { - /** - * None. - */ - public static final TransparentDataEncryptionScanState NONE = fromString("None"); - - /** - * Resume. - */ - public static final TransparentDataEncryptionScanState RESUME = fromString("Resume"); - - /** - * Running. - */ - public static final TransparentDataEncryptionScanState RUNNING = fromString("Running"); - - /** - * Suspend. - */ - public static final TransparentDataEncryptionScanState SUSPEND = fromString("Suspend"); - - /** - * Aborted. - */ - public static final TransparentDataEncryptionScanState ABORTED = fromString("Aborted"); - - /** - * Completed. - */ - public static final TransparentDataEncryptionScanState COMPLETED = fromString("Completed"); - - /** - * Creates a new instance of TransparentDataEncryptionScanState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TransparentDataEncryptionScanState() { - } - - /** - * Creates or finds a TransparentDataEncryptionScanState from its string representation. - * - * @param name a name to look for. - * @return the corresponding TransparentDataEncryptionScanState. - */ - public static TransparentDataEncryptionScanState fromString(String name) { - return fromString(name, TransparentDataEncryptionScanState.class); - } - - /** - * Gets known TransparentDataEncryptionScanState values. - * - * @return known TransparentDataEncryptionScanState values. - */ - public static Collection values() { - return values(TransparentDataEncryptionScanState.class); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionState.java index 4d8fb9d3670f..fb0fc3d6ca6f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,12 +9,12 @@ */ public enum TransparentDataEncryptionState { /** - * Enabled. + * Enum value Enabled. */ ENABLED("Enabled"), /** - * Disabled. + * Enum value Disabled. */ DISABLED("Disabled"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpdateLongTermRetentionBackupParameters.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpdateLongTermRetentionBackupParameters.java index b60a8edd1341..69bd5d33f9eb 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpdateLongTermRetentionBackupParameters.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpdateLongTermRetentionBackupParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationParameters.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationParameters.java index 2456c6a82569..64566cf5ec30 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationParameters.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationParameters.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.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,7 +14,7 @@ /** * The UpsertManagedServerOperationParameters model. */ -@Immutable +@Fluent public final class UpsertManagedServerOperationParameters implements JsonSerializable { /* @@ -40,7 +40,7 @@ public final class UpsertManagedServerOperationParameters /** * Creates an instance of UpsertManagedServerOperationParameters class. */ - private UpsertManagedServerOperationParameters() { + public UpsertManagedServerOperationParameters() { } /** @@ -52,6 +52,17 @@ public String family() { return this.family; } + /** + * Set the family property: The family property. + * + * @param family the family value to set. + * @return the UpsertManagedServerOperationParameters object itself. + */ + public UpsertManagedServerOperationParameters withFamily(String family) { + this.family = family; + return this; + } + /** * Get the tier property: The tier property. * @@ -61,6 +72,17 @@ public String tier() { return this.tier; } + /** + * Set the tier property: The tier property. + * + * @param tier the tier value to set. + * @return the UpsertManagedServerOperationParameters object itself. + */ + public UpsertManagedServerOperationParameters withTier(String tier) { + this.tier = tier; + return this; + } + /** * Get the vCores property: The vCores property. * @@ -70,6 +92,17 @@ public Integer vCores() { return this.vCores; } + /** + * Set the vCores property: The vCores property. + * + * @param vCores the vCores value to set. + * @return the UpsertManagedServerOperationParameters object itself. + */ + public UpsertManagedServerOperationParameters withVCores(Integer vCores) { + this.vCores = vCores; + return this; + } + /** * Get the storageSizeInGB property: The storageSizeInGB property. * @@ -79,6 +112,17 @@ public Integer storageSizeInGB() { return this.storageSizeInGB; } + /** + * Set the storageSizeInGB property: The storageSizeInGB property. + * + * @param storageSizeInGB the storageSizeInGB value to set. + * @return the UpsertManagedServerOperationParameters object itself. + */ + public UpsertManagedServerOperationParameters withStorageSizeInGB(Integer storageSizeInGB) { + this.storageSizeInGB = storageSizeInGB; + return this; + } + /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationStepWithEstimatesAndDuration.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationStepWithEstimatesAndDuration.java index 79d250c3832a..9b244f10ea41 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationStepWithEstimatesAndDuration.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationStepWithEstimatesAndDuration.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The UpsertManagedServerOperationStepWithEstimatesAndDuration model. */ -@Immutable +@Fluent public final class UpsertManagedServerOperationStepWithEstimatesAndDuration implements JsonSerializable { /* @@ -53,7 +53,7 @@ public final class UpsertManagedServerOperationStepWithEstimatesAndDuration /** * Creates an instance of UpsertManagedServerOperationStepWithEstimatesAndDuration class. */ - private UpsertManagedServerOperationStepWithEstimatesAndDuration() { + public UpsertManagedServerOperationStepWithEstimatesAndDuration() { } /** @@ -65,6 +65,17 @@ public OffsetDateTime stepStartTime() { return this.stepStartTime; } + /** + * Set the stepStartTime property: The stepStartTime property. + * + * @param stepStartTime the stepStartTime value to set. + * @return the UpsertManagedServerOperationStepWithEstimatesAndDuration object itself. + */ + public UpsertManagedServerOperationStepWithEstimatesAndDuration withStepStartTime(OffsetDateTime stepStartTime) { + this.stepStartTime = stepStartTime; + return this; + } + /** * Get the stepEndTime property: The stepEndTime property. * @@ -74,6 +85,17 @@ public OffsetDateTime stepEndTime() { return this.stepEndTime; } + /** + * Set the stepEndTime property: The stepEndTime property. + * + * @param stepEndTime the stepEndTime value to set. + * @return the UpsertManagedServerOperationStepWithEstimatesAndDuration object itself. + */ + public UpsertManagedServerOperationStepWithEstimatesAndDuration withStepEndTime(OffsetDateTime stepEndTime) { + this.stepEndTime = stepEndTime; + return this; + } + /** * Get the timeElapsed property: The timeElapsed property. * @@ -83,6 +105,17 @@ public String timeElapsed() { return this.timeElapsed; } + /** + * Set the timeElapsed property: The timeElapsed property. + * + * @param timeElapsed the timeElapsed value to set. + * @return the UpsertManagedServerOperationStepWithEstimatesAndDuration object itself. + */ + public UpsertManagedServerOperationStepWithEstimatesAndDuration withTimeElapsed(String timeElapsed) { + this.timeElapsed = timeElapsed; + return this; + } + /** * Get the order property: The order property. * @@ -92,6 +125,17 @@ public Integer order() { return this.order; } + /** + * Set the order property: The order property. + * + * @param order the order value to set. + * @return the UpsertManagedServerOperationStepWithEstimatesAndDuration object itself. + */ + public UpsertManagedServerOperationStepWithEstimatesAndDuration withOrder(Integer order) { + this.order = order; + return this; + } + /** * Get the name property: The name property. * @@ -101,6 +145,17 @@ public String name() { return this.name; } + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the UpsertManagedServerOperationStepWithEstimatesAndDuration object itself. + */ + public UpsertManagedServerOperationStepWithEstimatesAndDuration withName(String name) { + this.name = name; + return this; + } + /** * Get the status property: The status property. * @@ -110,6 +165,17 @@ public Status status() { return this.status; } + /** + * Set the status property: The status property. + * + * @param status the status value to set. + * @return the UpsertManagedServerOperationStepWithEstimatesAndDuration object itself. + */ + public UpsertManagedServerOperationStepWithEstimatesAndDuration withStatus(Status status) { + this.status = status; + return this; + } + /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/UsageListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UsageListResult.java similarity index 73% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/UsageListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UsageListResult.java index 38f28885e2ae..c27483c82181 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/UsageListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UsageListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,23 +19,23 @@ @Immutable public final class UsageListResult implements JsonSerializable { /* - * The Usage items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of UsageListResult class. */ - private UsageListResult() { + public UsageListResult() { } /** - * Get the value property: The Usage items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model UsageListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(UsageListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of UsageListResult 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 UsageListResult. */ public static UsageListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UserIdentity.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UserIdentity.java index be5264e37c89..3e59b628ec8e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UserIdentity.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/UserIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VaRule.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VaRule.java deleted file mode 100644 index f7af784fc180..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VaRule.java +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; -import java.util.List; - -/** - * SQL Vulnerability Assessment rule metadata details. - */ -@Immutable -public final class VaRule implements JsonSerializable { - /* - * SQL Vulnerability Assessment rule Id. - */ - private String ruleId; - - /* - * SQL Vulnerability Assessment rule severity. - */ - private RuleSeverity severity; - - /* - * SQL Vulnerability Assessment rule category. - */ - private String category; - - /* - * SQL Vulnerability Assessment rule type. - */ - private RuleType ruleType; - - /* - * SQL Vulnerability Assessment rule title. - */ - private String title; - - /* - * SQL Vulnerability Assessment rule description. - */ - private String description; - - /* - * SQL Vulnerability Assessment rule rationale. - */ - private String rationale; - - /* - * SQL Vulnerability Assessment rule query details. - */ - private QueryCheck queryCheck; - - /* - * SQL Vulnerability Assessment benchmark references. - */ - private List benchmarkReferences; - - /** - * Creates an instance of VaRule class. - */ - private VaRule() { - } - - /** - * Get the ruleId property: SQL Vulnerability Assessment rule Id. - * - * @return the ruleId value. - */ - public String ruleId() { - return this.ruleId; - } - - /** - * Get the severity property: SQL Vulnerability Assessment rule severity. - * - * @return the severity value. - */ - public RuleSeverity severity() { - return this.severity; - } - - /** - * Get the category property: SQL Vulnerability Assessment rule category. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Get the ruleType property: SQL Vulnerability Assessment rule type. - * - * @return the ruleType value. - */ - public RuleType ruleType() { - return this.ruleType; - } - - /** - * Get the title property: SQL Vulnerability Assessment rule title. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Get the description property: SQL Vulnerability Assessment rule description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the rationale property: SQL Vulnerability Assessment rule rationale. - * - * @return the rationale value. - */ - public String rationale() { - return this.rationale; - } - - /** - * Get the queryCheck property: SQL Vulnerability Assessment rule query details. - * - * @return the queryCheck value. - */ - public QueryCheck queryCheck() { - return this.queryCheck; - } - - /** - * Get the benchmarkReferences property: SQL Vulnerability Assessment benchmark references. - * - * @return the benchmarkReferences value. - */ - public List benchmarkReferences() { - return this.benchmarkReferences; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (queryCheck() != null) { - queryCheck().validate(); - } - if (benchmarkReferences() != null) { - benchmarkReferences().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VaRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VaRule 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 VaRule. - */ - public static VaRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VaRule deserializedVaRule = new VaRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ruleId".equals(fieldName)) { - deserializedVaRule.ruleId = reader.getString(); - } else if ("severity".equals(fieldName)) { - deserializedVaRule.severity = RuleSeverity.fromString(reader.getString()); - } else if ("category".equals(fieldName)) { - deserializedVaRule.category = reader.getString(); - } else if ("ruleType".equals(fieldName)) { - deserializedVaRule.ruleType = RuleType.fromString(reader.getString()); - } else if ("title".equals(fieldName)) { - deserializedVaRule.title = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedVaRule.description = reader.getString(); - } else if ("rationale".equals(fieldName)) { - deserializedVaRule.rationale = reader.getString(); - } else if ("queryCheck".equals(fieldName)) { - deserializedVaRule.queryCheck = QueryCheck.fromJson(reader); - } else if ("benchmarkReferences".equals(fieldName)) { - List benchmarkReferences - = reader.readArray(reader1 -> BenchmarkReference.fromJson(reader1)); - deserializedVaRule.benchmarkReferences = benchmarkReferences; - } else { - reader.skipChildren(); - } - } - - return deserializedVaRule; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/VirtualClusterListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualClusterListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/VirtualClusterListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualClusterListResult.java index 9836e88dae6a..be4a5e404dc0 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/VirtualClusterListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualClusterListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a VirtualCluster list operation. + * A list of virtual clusters. */ @Immutable public final class VirtualClusterListResult implements JsonSerializable { /* - * The VirtualCluster items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of VirtualClusterListResult class. */ - private VirtualClusterListResult() { + public VirtualClusterListResult() { } /** - * Get the value property: The VirtualCluster items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model VirtualClusterListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(VirtualClusterListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of VirtualClusterListResult 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 VirtualClusterListResult. */ public static VirtualClusterListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualClusterUpdate.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualClusterUpdate.java index 1ef208a165c4..3abbab58535f 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualClusterUpdate.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualClusterUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -15,7 +15,7 @@ import java.util.Map; /** - * An update request for virtual cluster. + * An update request for an Azure SQL Database virtual cluster. */ @Fluent public final class VirtualClusterUpdate implements JsonSerializable { @@ -74,25 +74,27 @@ public String subnetId() { } /** - * Get the version property: Virtual cluster version. + * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be + * captured here. * - * @return the version value. + * @return the family value. */ - public String version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); + public String family() { + return this.innerProperties() == null ? null : this.innerProperties().family(); } /** - * Set the version property: Virtual cluster version. + * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be + * captured here. * - * @param version the version value to set. + * @param family the family value to set. * @return the VirtualClusterUpdate object itself. */ - public VirtualClusterUpdate withVersion(String version) { + public VirtualClusterUpdate withFamily(String family) { if (this.innerProperties() == null) { this.innerProperties = new VirtualClusterProperties(); } - this.innerProperties().withVersion(version); + this.innerProperties().withFamily(family); return this; } @@ -105,6 +107,31 @@ public List childResources() { return this.innerProperties() == null ? null : this.innerProperties().childResources(); } + /** + * Get the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this virtual + * cluster. + * + * @return the maintenanceConfigurationId value. + */ + public String maintenanceConfigurationId() { + return this.innerProperties() == null ? null : this.innerProperties().maintenanceConfigurationId(); + } + + /** + * Set the maintenanceConfigurationId property: Specifies maintenance configuration id to apply to this virtual + * cluster. + * + * @param maintenanceConfigurationId the maintenanceConfigurationId value to set. + * @return the VirtualClusterUpdate object itself. + */ + public VirtualClusterUpdate withMaintenanceConfigurationId(String maintenanceConfigurationId) { + if (this.innerProperties() == null) { + this.innerProperties = new VirtualClusterProperties(); + } + this.innerProperties().withMaintenanceConfigurationId(maintenanceConfigurationId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/VirtualNetworkRuleListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualNetworkRuleListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/VirtualNetworkRuleListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualNetworkRuleListResult.java index 269029b9112a..2d5d4cec41aa 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/VirtualNetworkRuleListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualNetworkRuleListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a VirtualNetworkRule list operation. + * A list of virtual network rules. */ @Immutable public final class VirtualNetworkRuleListResult implements JsonSerializable { /* - * The VirtualNetworkRule items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of VirtualNetworkRuleListResult class. */ - private VirtualNetworkRuleListResult() { + public VirtualNetworkRuleListResult() { } /** - * Get the value property: The VirtualNetworkRule items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model VirtualNetworkRuleListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkRuleListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of VirtualNetworkRuleListResult 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 VirtualNetworkRuleListResult. */ public static VirtualNetworkRuleListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualNetworkRuleState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualNetworkRuleState.java index 977facef09c7..22e79a6126b7 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualNetworkRuleState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VirtualNetworkRuleState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,32 +12,32 @@ */ public final class VirtualNetworkRuleState extends ExpandableStringEnum { /** - * Initializing. + * Static value Initializing for VirtualNetworkRuleState. */ public static final VirtualNetworkRuleState INITIALIZING = fromString("Initializing"); /** - * InProgress. + * Static value InProgress for VirtualNetworkRuleState. */ public static final VirtualNetworkRuleState IN_PROGRESS = fromString("InProgress"); /** - * Ready. + * Static value Ready for VirtualNetworkRuleState. */ public static final VirtualNetworkRuleState READY = fromString("Ready"); /** - * Failed. + * Static value Failed for VirtualNetworkRuleState. */ public static final VirtualNetworkRuleState FAILED = fromString("Failed"); /** - * Deleting. + * Static value Deleting for VirtualNetworkRuleState. */ public static final VirtualNetworkRuleState DELETING = fromString("Deleting"); /** - * Unknown. + * Static value Unknown for VirtualNetworkRuleState. */ public static final VirtualNetworkRuleState UNKNOWN = fromString("Unknown"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentName.java index 04c92a7928b1..1a091ec2ccb1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,7 +12,7 @@ */ public final class VulnerabilityAssessmentName extends ExpandableStringEnum { /** - * default. + * Static value default for VulnerabilityAssessmentName. */ public static final VulnerabilityAssessmentName DEFAULT = fromString("default"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentPolicyBaselineName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentPolicyBaselineName.java index 3d5d95c10eae..c3a9135af66b 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentPolicyBaselineName.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentPolicyBaselineName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -9,12 +9,12 @@ */ public enum VulnerabilityAssessmentPolicyBaselineName { /** - * master. + * Enum value master. */ MASTER("master"), /** - * default. + * Enum value default. */ DEFAULT("default"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentRecurringScansProperties.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentRecurringScansProperties.java index 7f8ca5ac3eba..7a5491955496 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentRecurringScansProperties.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentRecurringScansProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanError.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanError.java index 37416a1c7a07..22ae7fd3150e 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanError.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanError.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -29,7 +29,7 @@ public final class VulnerabilityAssessmentScanError implements JsonSerializable< /** * Creates an instance of VulnerabilityAssessmentScanError class. */ - private VulnerabilityAssessmentScanError() { + public VulnerabilityAssessmentScanError() { } /** diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/VulnerabilityAssessmentScanRecordListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanRecordListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/VulnerabilityAssessmentScanRecordListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanRecordListResult.java index 30c631ccfce0..9918bb9bdada 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/VulnerabilityAssessmentScanRecordListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanRecordListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a VulnerabilityAssessmentScanRecord list operation. + * A list of vulnerability assessment scan records. */ @Immutable public final class VulnerabilityAssessmentScanRecordListResult implements JsonSerializable { /* - * The VulnerabilityAssessmentScanRecord items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of VulnerabilityAssessmentScanRecordListResult class. */ - private VulnerabilityAssessmentScanRecordListResult() { + public VulnerabilityAssessmentScanRecordListResult() { } /** - * Get the value property: The VulnerabilityAssessmentScanRecord items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -60,25 +59,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model VulnerabilityAssessmentScanRecordListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(VulnerabilityAssessmentScanRecordListResult.class); - /** * {@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(); } @@ -88,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of VulnerabilityAssessmentScanRecordListResult 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 VulnerabilityAssessmentScanRecordListResult. */ public static VulnerabilityAssessmentScanRecordListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanState.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanState.java index e512b9aa468c..9e9dc0fc5290 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanState.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -12,22 +12,22 @@ */ public final class VulnerabilityAssessmentScanState extends ExpandableStringEnum { /** - * Passed. + * Static value Passed for VulnerabilityAssessmentScanState. */ public static final VulnerabilityAssessmentScanState PASSED = fromString("Passed"); /** - * Failed. + * Static value Failed for VulnerabilityAssessmentScanState. */ public static final VulnerabilityAssessmentScanState FAILED = fromString("Failed"); /** - * FailedToRun. + * Static value FailedToRun for VulnerabilityAssessmentScanState. */ public static final VulnerabilityAssessmentScanState FAILED_TO_RUN = fromString("FailedToRun"); /** - * InProgress. + * Static value InProgress for VulnerabilityAssessmentScanState. */ public static final VulnerabilityAssessmentScanState IN_PROGRESS = fromString("InProgress"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanTriggerType.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanTriggerType.java index 9a61a320120b..e89fd6d505a6 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanTriggerType.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanTriggerType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.sql.models; @@ -13,12 +13,12 @@ public final class VulnerabilityAssessmentScanTriggerType extends ExpandableStringEnum { /** - * OnDemand. + * Static value OnDemand for VulnerabilityAssessmentScanTriggerType. */ public static final VulnerabilityAssessmentScanTriggerType ON_DEMAND = fromString("OnDemand"); /** - * Recurring. + * Static value Recurring for VulnerabilityAssessmentScanTriggerType. */ public static final VulnerabilityAssessmentScanTriggerType RECURRING = fromString("Recurring"); diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentSystemDatabaseName.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentSystemDatabaseName.java deleted file mode 100644 index c992acb48173..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentSystemDatabaseName.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.models; - -/** - * Defines values for VulnerabilityAssessmentSystemDatabaseName. - */ -public enum VulnerabilityAssessmentSystemDatabaseName { - /** - * master. - */ - MASTER("master"); - - /** - * The actual serialized value for a VulnerabilityAssessmentSystemDatabaseName instance. - */ - private final String value; - - VulnerabilityAssessmentSystemDatabaseName(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a VulnerabilityAssessmentSystemDatabaseName instance. - * - * @param value the serialized value to parse. - * @return the parsed VulnerabilityAssessmentSystemDatabaseName object, or null if unable to parse. - */ - public static VulnerabilityAssessmentSystemDatabaseName fromString(String value) { - if (value == null) { - return null; - } - VulnerabilityAssessmentSystemDatabaseName[] items = VulnerabilityAssessmentSystemDatabaseName.values(); - for (VulnerabilityAssessmentSystemDatabaseName item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/WorkloadClassifierListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/WorkloadClassifierListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/WorkloadClassifierListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/WorkloadClassifierListResult.java index f32e02bd4496..36ca29e98ec1 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/WorkloadClassifierListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/WorkloadClassifierListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a WorkloadClassifier list operation. + * A list of workload classifiers for a workload group. */ @Immutable public final class WorkloadClassifierListResult implements JsonSerializable { /* - * The WorkloadClassifier items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of WorkloadClassifierListResult class. */ - private WorkloadClassifierListResult() { + public WorkloadClassifierListResult() { } /** - * Get the value property: The WorkloadClassifier items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,25 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model WorkloadClassifierListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(WorkloadClassifierListResult.class); - /** * {@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(); } @@ -87,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of WorkloadClassifierListResult 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 WorkloadClassifierListResult. */ public static WorkloadClassifierListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/WorkloadGroupListResult.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/WorkloadGroupListResult.java similarity index 72% rename from sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/WorkloadGroupListResult.java rename to sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/WorkloadGroupListResult.java index 3a0465decb5d..80e92dd534dc 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/models/WorkloadGroupListResult.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/WorkloadGroupListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.sql.implementation.models; +package com.azure.resourcemanager.sql.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a WorkloadGroup list operation. + * A list of workload groups. */ @Immutable public final class WorkloadGroupListResult implements JsonSerializable { /* - * The WorkloadGroup items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of WorkloadGroupListResult class. */ - private WorkloadGroupListResult() { + public WorkloadGroupListResult() { } /** - * Get the value property: The WorkloadGroup items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -59,24 +58,17 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model WorkloadGroupListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(WorkloadGroupListResult.class); - /** * {@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(); } @@ -86,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of WorkloadGroupListResult 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 WorkloadGroupListResult. */ public static WorkloadGroupListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ZonePinningCapability.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ZonePinningCapability.java deleted file mode 100644 index 9f3318a91866..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ZonePinningCapability.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.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 java.io.IOException; - -/** - * The zone pinning capability. - */ -@Immutable -public final class ZonePinningCapability implements JsonSerializable { - /* - * Name of the availability zone - */ - private String availabilityZone; - - /* - * The status of the capability. - */ - private CapabilityStatus status; - - /* - * The reason for the capability not being available. - */ - private String reason; - - /** - * Creates an instance of ZonePinningCapability class. - */ - private ZonePinningCapability() { - } - - /** - * Get the availabilityZone property: Name of the availability zone. - * - * @return the availabilityZone value. - */ - public String availabilityZone() { - return this.availabilityZone; - } - - /** - * Get the status property: The status of the capability. - * - * @return the status value. - */ - public CapabilityStatus status() { - return this.status; - } - - /** - * Get the reason property: The reason for the capability not being available. - * - * @return the reason value. - */ - public String reason() { - return this.reason; - } - - /** - * 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("reason", this.reason); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ZonePinningCapability from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ZonePinningCapability 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 ZonePinningCapability. - */ - public static ZonePinningCapability fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ZonePinningCapability deserializedZonePinningCapability = new ZonePinningCapability(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("availabilityZone".equals(fieldName)) { - deserializedZonePinningCapability.availabilityZone = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedZonePinningCapability.status = CapabilityStatus.fromString(reader.getString()); - } else if ("reason".equals(fieldName)) { - deserializedZonePinningCapability.reason = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedZonePinningCapability; - }); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/package-info.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/package-info.java index 79b05fe20376..46edc41b0cab 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/package-info.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/package-info.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for SqlServer. - * The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database - * services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, - * and other entities. + * Package containing the data models for SqlManagementClient. + * The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database + * services to manage your databases. The API enables you to create, retrieve, update, and delete databases. */ package com.azure.resourcemanager.sql.models; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/package-info.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/package-info.java index 932b0ae3cc74..bbfe86a17c04 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/package-info.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/package-info.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the classes for SqlServer. - * The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database - * services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, - * and other entities. + * Package containing the classes for SqlManagementClient. + * The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database + * services to manage your databases. The API enables you to create, retrieve, update, and delete databases. */ package com.azure.resourcemanager.sql; diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/java/module-info.java b/sdk/sql/azure-resourcemanager-sql/src/main/java/module-info.java index fa6f13e1a6f7..24208566b762 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/java/module-info.java +++ b/sdk/sql/azure-resourcemanager-sql/src/main/java/module-info.java @@ -14,5 +14,4 @@ // open packages specifically for azure core opens com.azure.resourcemanager.sql.fluent.models to com.azure.core; opens com.azure.resourcemanager.sql.models to com.azure.core; - opens com.azure.resourcemanager.sql.implementation.models to com.azure.core; } diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/resources/META-INF/azure-resourcemanager-sql_metadata.json b/sdk/sql/azure-resourcemanager-sql/src/main/resources/META-INF/azure-resourcemanager-sql_metadata.json deleted file mode 100644 index 031e1cc02f29..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/main/resources/META-INF/azure-resourcemanager-sql_metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"flavor":"azure","apiVersions":{"Microsoft.Sql":"2025-02-01-preview"},"generatedFiles":["src/main/java/com/azure/resourcemanager/sql/fluent/BackupShortTermRetentionPoliciesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/CapabilitiesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingPoliciesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DataMaskingRulesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DataWarehouseUserActivitiesOperationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvancedThreatProtectionSettingsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAdvisorsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseAutomaticTuningsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseBlobAuditingPoliciesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseColumnsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseEncryptionProtectorsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseExtensionsOperationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseOperationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseRecommendedActionsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSchemasClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSecurityAlertPoliciesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentBaselinesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentExecuteScansClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentRuleBaselinesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentScanResultsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentScansClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseSqlVulnerabilityAssessmentsSettingsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseTablesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseUsagesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentRuleBaselinesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentScansClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabaseVulnerabilityAssessmentsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DatabasesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DeletedServersClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/DistributedAvailabilityGroupsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolOperationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/EncryptionProtectorsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/EndpointCertificatesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedDatabaseBlobAuditingPoliciesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ExtendedServerBlobAuditingPoliciesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/FailoverGroupsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/FirewallRulesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/GeoBackupPoliciesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/IPv6FirewallRulesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/InstanceFailoverGroupsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolOperationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/InstancePoolsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/JobAgentsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/JobCredentialsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/JobExecutionsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/JobPrivateEndpointsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/JobStepExecutionsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/JobStepsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetExecutionsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetGroupsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/JobVersionsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/JobsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/LedgerDigestUploadsOperationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionBackupsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionManagedInstanceBackupsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/LongTermRetentionPoliciesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowOptionsOperationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/MaintenanceWindowsOperationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedBackupShortTermRetentionPoliciesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseAdvancedThreatProtectionSettingsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseColumnsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseMoveOperationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseQueriesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRecommendedSensitivityLabelsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseRestoreDetailsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSchemasClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityAlertPoliciesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSecurityEventsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseSensitivityLabelsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTablesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseTransparentDataEncryptionsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentScansClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabasesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdministratorsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAdvancedThreatProtectionSettingsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceAzureADOnlyAuthenticationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceDtcsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceEncryptionProtectorsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceKeysClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceLongTermRetentionPoliciesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceOperationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancePrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceTdeCertificatesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstanceVulnerabilityAssessmentsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedInstancesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedLedgerDigestUploadsOperationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerDnsAliasesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ManagedServerSecurityAlertPoliciesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/NetworkSecurityPerimeterConfigurationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/OutboundFirewallRulesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/RecommendedSensitivityLabelsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableDatabasesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/RecoverableManagedDatabasesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ReplicationLinksClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedDatabasesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/RestorableDroppedManagedDatabasesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/RestorePointsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SensitivityLabelsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvancedThreatProtectionSettingsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerAdvisorsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerAutomaticTuningsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADAdministratorsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerAzureADOnlyAuthenticationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerBlobAuditingPoliciesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerConfigurationOptionsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerConnectionPoliciesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerDevOpsAuditSettingsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerDnsAliasesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerKeysClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerOperationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerSecurityAlertPoliciesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustCertificatesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerTrustGroupsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerUsagesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServerVulnerabilityAssessmentsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/ServersClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SqlAgentsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SqlManagementClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentBaselinesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentBaselinesOperationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentExecuteScansClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentRuleBaselinesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentRuleBaselinesOperationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentScanResultOperationsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentScansClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SqlVulnerabilityAssessmentsSettingsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/StartStopManagedInstanceSchedulesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SubscriptionUsagesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SynapseLinkWorkspacesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SyncAgentsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SyncGroupsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/SyncMembersClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/TdeCertificatesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/TimeZonesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/TransparentDataEncryptionsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/UsagesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/VirtualClustersClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/VirtualNetworkRulesClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadClassifiersClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/WorkloadGroupsClient.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/AdministratorProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvancedThreatProtectionProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/AdvisorProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/AutomaticTuningServerProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/AzureADOnlyAuthProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/BackupShortTermRetentionPolicyProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/CheckNameAvailabilityResponseInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/CopyLongTermRetentionBackupParametersProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingPolicyProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DataMaskingRuleProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DataWarehouseUserActivitiesProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAdvancedThreatProtectionInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseAutomaticTuningProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseBlobAuditingPolicyProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseColumnProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseExtensionsProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseOperationProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSchemaInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSecurityAlertPolicyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentBaselineSetInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentBaselineSetProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseTableProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUpdateProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseUsageProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentRuleBaselineProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScanExportProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DatabaseVulnerabilityAssessmentScansExportInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DeletedServerProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DistributedAvailabilityGroupInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/DistributedAvailabilityGroupProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolOperationProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ElasticPoolUpdateProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/EncryptionProtectorInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/EncryptionProtectorProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/EndpointCertificateInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/EndpointCertificateProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedDatabaseBlobAuditingPolicyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedDatabaseBlobAuditingPolicyProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedServerBlobAuditingPolicyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ExtendedServerBlobAuditingPolicyProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/FailoverGroupUpdateProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/FirewallRuleInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/GeoBackupPolicyProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6FirewallRuleInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/IPv6ServerFirewallRuleProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportExtensionsOperationResultProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ImportExportOperationResultProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/InstanceFailoverGroupProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolOperationInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolOperationProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/InstancePoolProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/JobAgentInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/JobAgentProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/JobCredentialProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/JobExecutionProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/JobInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/JobPrivateEndpointInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/JobPrivateEndpointProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/JobProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/JobStepProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/JobTargetGroupProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/JobVersionInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/LedgerDigestUploadsProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/LocationCapabilitiesInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/LogicalDatabaseTransparentDataEncryptionInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupOperationResultInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionBackupProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionOperationResultProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionPolicyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/LongTermRetentionPolicyProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowOptionsProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/MaintenanceWindowsProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedBackupShortTermRetentionPolicyProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseAdvancedThreatProtectionInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseMoveOperationResultInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseMoveOperationResultProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseRestoreDetailsProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseRestoreDetailsResultInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedDatabaseSecurityAlertPolicyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdministratorProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAdvancedThreatProtectionInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceAzureADOnlyAuthenticationInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceDtcInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceDtcProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceEncryptionProtectorProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceKeyProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionBackupProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionPolicyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceLongTermRetentionPolicyProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceOperationProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstancePrivateLinkInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceQueryInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedInstanceVulnerabilityAssessmentProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedLedgerDigestUploadsInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedLedgerDigestUploadsProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerDnsAliasProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedServerSecurityAlertPolicyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ManagedTransparentDataEncryptionProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/NetworkSecurityPerimeterConfigurationInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundEnvironmentEndpointInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/OutboundFirewallRuleProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/QueryStatisticsProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedActionProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RecommendedSensitivityLabelUpdateProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableDatabaseProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RecoverableManagedDatabaseProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultMIInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RefreshExternalGovernanceStatusOperationResultPropertiesMI.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ReplicationLinkUpdateProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedDatabaseProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorableDroppedManagedDatabaseProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/RestorePointProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityAlertPolicyProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityAlertsPolicyProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SecurityEventProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelUpdateInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SensitivityLabelUpdatePropertiesInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAdvancedThreatProtectionInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAutomaticTuningInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAzureADAdministratorInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerAzureADOnlyAuthenticationInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerBlobAuditingPolicyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerBlobAuditingPolicyProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConfigurationOptionInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConfigurationOptionProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerConnectionPolicyProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditSettingsProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDevOpsAuditingSettingsInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerDnsAliasProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerFirewallRuleProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerKeyProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerOperationProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerSecurityAlertPolicyInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustCertificateProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerTrustGroupProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerUsageProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerVulnerabilityAssessmentInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerVulnerabilityAssessmentProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlAgentConfigurationInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlAgentConfigurationProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentPolicyProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanRecordInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanRecordProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanResultProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SqlVulnerabilityAssessmentScanResultsInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/StartStopManagedInstanceScheduleInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/StartStopManagedInstanceScheduleProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SubscriptionUsageProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SynapseLinkWorkspaceInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SynapseLinkWorkspaceProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentKeyPropertiesInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentLinkedDatabaseInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentLinkedDatabaseProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncAgentProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncDatabaseIdPropertiesInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncFullSchemaPropertiesInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncGroupInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncGroupLogPropertiesInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncGroupProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/SyncMemberProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/TdeCertificateProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/TimeZoneProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/TopQueriesInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/TransparentDataEncryptionProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateLongTermRetentionBackupParametersProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/UpdateVirtualClusterDnsServersOperationInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/UsageInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterDnsServersProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualClusterProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/VirtualNetworkRuleProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/VulnerabilityAssessmentScanRecordProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadClassifierProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupInner.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/WorkloadGroupProperties.java","src/main/java/com/azure/resourcemanager/sql/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/sql/fluent/package-info.java","src/main/java/com/azure/resourcemanager/sql/implementation/BackupShortTermRetentionPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/CapabilitiesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DataMaskingRulesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DataWarehouseUserActivitiesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvancedThreatProtectionSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAdvisorsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseAutomaticTuningsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseBlobAuditingPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseColumnsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseEncryptionProtectorsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseExtensionsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseRecommendedActionsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSchemasClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSecurityAlertPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentBaselinesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentExecuteScansClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentRuleBaselinesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentScanResultsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentScansClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseSqlVulnerabilityAssessmentsSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseTablesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseUsagesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentScansClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabaseVulnerabilityAssessmentsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DatabasesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DeletedServersClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/DistributedAvailabilityGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ElasticPoolsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/EncryptionProtectorsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/EndpointCertificatesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedDatabaseBlobAuditingPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ExtendedServerBlobAuditingPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/FailoverGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/FirewallRulesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/GeoBackupPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/IPv6FirewallRulesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/InstanceFailoverGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/InstancePoolOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/InstancePoolsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/JobAgentsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/JobCredentialsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/JobExecutionsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/JobPrivateEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/JobStepExecutionsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/JobStepsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetExecutionsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/JobTargetGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/JobVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/JobsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/LedgerDigestUploadsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionBackupsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionManagedInstanceBackupsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowOptionsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/MaintenanceWindowsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedBackupShortTermRetentionPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseAdvancedThreatProtectionSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseColumnsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseMoveOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseQueriesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRecommendedSensitivityLabelsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseRestoreDetailsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSchemasClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityAlertPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSecurityEventsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseSensitivityLabelsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTablesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseTransparentDataEncryptionsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentScansClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabasesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAdministratorsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAdvancedThreatProtectionSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceAzureADOnlyAuthenticationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceDtcsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceEncryptionProtectorsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceKeysClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceLongTermRetentionPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancePrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceTdeCertificatesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceVulnerabilityAssessmentsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstancesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedLedgerDigestUploadsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerDnsAliasesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ManagedServerSecurityAlertPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/OutboundFirewallRulesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/RecommendedSensitivityLabelsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableDatabasesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/RecoverableManagedDatabasesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ReplicationLinksClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedDatabasesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/RestorableDroppedManagedDatabasesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/RestorePointsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SensitivityLabelsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvancedThreatProtectionSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerAdvisorsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerAutomaticTuningsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADAdministratorsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerAzureADOnlyAuthenticationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerBlobAuditingPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerConfigurationOptionsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerConnectionPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerDevOpsAuditSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerDnsAliasesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerKeysClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerSecurityAlertPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustCertificatesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerTrustGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerUsagesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServerVulnerabilityAssessmentsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/ServersClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SqlAgentsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/sql/implementation/SqlManagementClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentBaselinesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentBaselinesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentExecuteScansClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentRuleBaselinesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentRuleBaselinesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentScanResultOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentScansClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SqlVulnerabilityAssessmentsSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/StartStopManagedInstanceSchedulesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SubscriptionUsagesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SynapseLinkWorkspacesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SyncAgentsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SyncGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/SyncMembersClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/TdeCertificatesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/TimeZonesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/TransparentDataEncryptionsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/UsagesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/VirtualClustersClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/VirtualNetworkRulesClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadClassifiersClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/WorkloadGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/AdministratorListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/AzureADOnlyAuthListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/BackupShortTermRetentionPolicyListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/DataMaskingRuleListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/DataWarehouseUserActivitiesListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseAdvancedThreatProtectionListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseBlobAuditingPolicyListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseColumnListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseOperationListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSchemaListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSecurityAlertListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSqlVulnerabilityAssessmentBaselineSetListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseTableListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseUsageListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/DatabaseVulnerabilityAssessmentListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/DeletedServerListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/DistributedAvailabilityGroupsListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ElasticPoolListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ElasticPoolOperationListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/EncryptionProtectorListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/EndpointCertificateListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ExtendedDatabaseBlobAuditingPolicyListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ExtendedServerBlobAuditingPolicyListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/FailoverGroupListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/FirewallRuleListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/GeoBackupPolicyListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/IPv6FirewallRuleListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ImportExportExtensionsOperationListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/InstanceFailoverGroupListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/InstancePoolListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/InstancePoolOperationListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/JobAgentListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/JobCredentialListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/JobExecutionListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/JobListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/JobPrivateEndpointListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/JobStepListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/JobTargetGroupListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/JobVersionListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/LedgerDigestUploadsListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/LogicalDatabaseTransparentDataEncryptionListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/LogicalServerAdvancedThreatProtectionListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/LogicalServerSecurityAlertPolicyListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/LongTermRetentionBackupListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/LongTermRetentionPolicyListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedBackupShortTermRetentionPolicyListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseAdvancedThreatProtectionListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseMoveOperationListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedDatabaseSecurityAlertPolicyListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceAdministratorListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceAdvancedThreatProtectionListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceAzureADOnlyAuthListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceDtcListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceEncryptionProtectorListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceKeyListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceLongTermRetentionBackupListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceLongTermRetentionPolicyListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceOperationListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstancePrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstancePrivateLinkListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceQueryStatistics.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedInstanceVulnerabilityAssessmentListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedLedgerDigestUploadsListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedServerDnsAliasListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedServerSecurityAlertPolicyListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ManagedTransparentDataEncryptionListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/NetworkSecurityPerimeterConfigurationListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/OutboundEnvironmentEndpointCollection.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/OutboundFirewallRuleListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/PrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/RecoverableDatabaseListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/RecoverableManagedDatabaseListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ReplicationLinkListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/RestorableDroppedDatabaseListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/RestorableDroppedManagedDatabaseListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/RestorePointListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/SQLVulnerabilityAssessmentScanListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/SecurityEventCollection.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/SensitivityLabelListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerBlobAuditingPolicyListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerConfigurationOptionListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerConnectionPolicyListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerDevOpsAuditSettingsListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerDnsAliasListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerKeyListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerOperationListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerTrustCertificatesListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerTrustGroupListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerUsageListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/ServerVulnerabilityAssessmentListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/SqlVulnerabilityAssessmentListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/SqlVulnerabilityAssessmentScanRecordListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/StartStopManagedInstanceScheduleListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/SubscriptionUsageListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/SynapseLinkWorkspaceListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncAgentLinkedDatabaseListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncAgentListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncDatabaseIdListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncFullSchemaPropertiesListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncGroupListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncGroupLogListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/SyncMemberListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/TimeZoneListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/TopQueriesListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/UsageListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/VirtualClusterListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/VirtualNetworkRuleListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/VulnerabilityAssessmentScanRecordListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/WorkloadClassifierListResult.java","src/main/java/com/azure/resourcemanager/sql/implementation/models/WorkloadGroupListResult.java","src/main/java/com/azure/resourcemanager/sql/models/AdministratorName.java","src/main/java/com/azure/resourcemanager/sql/models/AdministratorType.java","src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionName.java","src/main/java/com/azure/resourcemanager/sql/models/AdvancedThreatProtectionState.java","src/main/java/com/azure/resourcemanager/sql/models/AdvisorStatus.java","src/main/java/com/azure/resourcemanager/sql/models/AggregationFunctionType.java","src/main/java/com/azure/resourcemanager/sql/models/AlwaysEncryptedEnclaveType.java","src/main/java/com/azure/resourcemanager/sql/models/AuthMetadataLookupModes.java","src/main/java/com/azure/resourcemanager/sql/models/AuthenticationName.java","src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatus.java","src/main/java/com/azure/resourcemanager/sql/models/AutoExecuteStatusInheritedFrom.java","src/main/java/com/azure/resourcemanager/sql/models/AutoPauseDelayTimeRange.java","src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningDisabledReason.java","src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningMode.java","src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningOptionModeActual.java","src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningOptionModeDesired.java","src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningOptions.java","src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningServerMode.java","src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningServerOptions.java","src/main/java/com/azure/resourcemanager/sql/models/AutomaticTuningServerReason.java","src/main/java/com/azure/resourcemanager/sql/models/AvailabilityZoneType.java","src/main/java/com/azure/resourcemanager/sql/models/BackupStorageAccessTier.java","src/main/java/com/azure/resourcemanager/sql/models/BackupStorageRedundancy.java","src/main/java/com/azure/resourcemanager/sql/models/Baseline.java","src/main/java/com/azure/resourcemanager/sql/models/BaselineAdjustedResult.java","src/main/java/com/azure/resourcemanager/sql/models/BaselineName.java","src/main/java/com/azure/resourcemanager/sql/models/BenchmarkReference.java","src/main/java/com/azure/resourcemanager/sql/models/BlobAuditingPolicyName.java","src/main/java/com/azure/resourcemanager/sql/models/BlobAuditingPolicyState.java","src/main/java/com/azure/resourcemanager/sql/models/CapabilityGroup.java","src/main/java/com/azure/resourcemanager/sql/models/CapabilityStatus.java","src/main/java/com/azure/resourcemanager/sql/models/CatalogCollationType.java","src/main/java/com/azure/resourcemanager/sql/models/CertificateInfo.java","src/main/java/com/azure/resourcemanager/sql/models/ChangeLongTermRetentionBackupAccessTierParameters.java","src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityReason.java","src/main/java/com/azure/resourcemanager/sql/models/CheckNameAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/sql/models/ClientClassificationSource.java","src/main/java/com/azure/resourcemanager/sql/models/ColumnDataType.java","src/main/java/com/azure/resourcemanager/sql/models/CompleteDatabaseRestoreDefinition.java","src/main/java/com/azure/resourcemanager/sql/models/ConnectionPolicyName.java","src/main/java/com/azure/resourcemanager/sql/models/CopyLongTermRetentionBackupParameters.java","src/main/java/com/azure/resourcemanager/sql/models/CreateDatabaseRestorePointDefinition.java","src/main/java/com/azure/resourcemanager/sql/models/CreateMode.java","src/main/java/com/azure/resourcemanager/sql/models/CurrentSensitivityLabelSource.java","src/main/java/com/azure/resourcemanager/sql/models/DataMaskingFunction.java","src/main/java/com/azure/resourcemanager/sql/models/DataMaskingPolicyName.java","src/main/java/com/azure/resourcemanager/sql/models/DataMaskingRuleState.java","src/main/java/com/azure/resourcemanager/sql/models/DataMaskingState.java","src/main/java/com/azure/resourcemanager/sql/models/DataSyncParticipantIdentity.java","src/main/java/com/azure/resourcemanager/sql/models/DataSyncParticipantIdentityType.java","src/main/java/com/azure/resourcemanager/sql/models/DataSyncParticipantUserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/sql/models/DataWarehouseUserActivityName.java","src/main/java/com/azure/resourcemanager/sql/models/DatabaseExtensions.java","src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentity.java","src/main/java/com/azure/resourcemanager/sql/models/DatabaseIdentityType.java","src/main/java/com/azure/resourcemanager/sql/models/DatabaseKey.java","src/main/java/com/azure/resourcemanager/sql/models/DatabaseKeyType.java","src/main/java/com/azure/resourcemanager/sql/models/DatabaseLicenseType.java","src/main/java/com/azure/resourcemanager/sql/models/DatabaseReadScale.java","src/main/java/com/azure/resourcemanager/sql/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineInput.java","src/main/java/com/azure/resourcemanager/sql/models/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput.java","src/main/java/com/azure/resourcemanager/sql/models/DatabaseState.java","src/main/java/com/azure/resourcemanager/sql/models/DatabaseStatus.java","src/main/java/com/azure/resourcemanager/sql/models/DatabaseUpdate.java","src/main/java/com/azure/resourcemanager/sql/models/DatabaseUserIdentity.java","src/main/java/com/azure/resourcemanager/sql/models/DatabaseVulnerabilityAssessmentRuleBaselineItem.java","src/main/java/com/azure/resourcemanager/sql/models/DayOfWeek.java","src/main/java/com/azure/resourcemanager/sql/models/DevOpsAuditingSettingsName.java","src/main/java/com/azure/resourcemanager/sql/models/DiffBackupIntervalInHours.java","src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupDatabase.java","src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupSetRole.java","src/main/java/com/azure/resourcemanager/sql/models/DistributedAvailabilityGroupsFailoverRequest.java","src/main/java/com/azure/resourcemanager/sql/models/DnsRefreshConfigurationPropertiesStatus.java","src/main/java/com/azure/resourcemanager/sql/models/DtcName.java","src/main/java/com/azure/resourcemanager/sql/models/EditionCapability.java","src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolEditionCapability.java","src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolLicenseType.java","src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMaxPerformanceLevelCapability.java","src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseMinPerformanceLevelCapability.java","src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerDatabaseSettings.java","src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolPerformanceLevelCapability.java","src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolState.java","src/main/java/com/azure/resourcemanager/sql/models/ElasticPoolUpdate.java","src/main/java/com/azure/resourcemanager/sql/models/EncryptionProtectorName.java","src/main/java/com/azure/resourcemanager/sql/models/EndpointDependency.java","src/main/java/com/azure/resourcemanager/sql/models/EndpointDetail.java","src/main/java/com/azure/resourcemanager/sql/models/ErrorType.java","src/main/java/com/azure/resourcemanager/sql/models/ExportDatabaseDefinition.java","src/main/java/com/azure/resourcemanager/sql/models/ExternalGovernanceStatus.java","src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupDatabasesSecondaryType.java","src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReadOnlyEndpoint.java","src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReadWriteEndpoint.java","src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupReplicationRole.java","src/main/java/com/azure/resourcemanager/sql/models/FailoverGroupUpdate.java","src/main/java/com/azure/resourcemanager/sql/models/FailoverModeType.java","src/main/java/com/azure/resourcemanager/sql/models/FailoverType.java","src/main/java/com/azure/resourcemanager/sql/models/FirewallRuleList.java","src/main/java/com/azure/resourcemanager/sql/models/FreeLimitExhaustionBehavior.java","src/main/java/com/azure/resourcemanager/sql/models/FreeLimitExhaustionBehaviorCapability.java","src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyName.java","src/main/java/com/azure/resourcemanager/sql/models/GeoBackupPolicyState.java","src/main/java/com/azure/resourcemanager/sql/models/HybridSecondaryUsage.java","src/main/java/com/azure/resourcemanager/sql/models/HybridSecondaryUsageDetected.java","src/main/java/com/azure/resourcemanager/sql/models/IdentityType.java","src/main/java/com/azure/resourcemanager/sql/models/ImplementationMethod.java","src/main/java/com/azure/resourcemanager/sql/models/ImportExistingDatabaseDefinition.java","src/main/java/com/azure/resourcemanager/sql/models/ImportNewDatabaseDefinition.java","src/main/java/com/azure/resourcemanager/sql/models/InaccessibilityReason.java","src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadOnlyEndpoint.java","src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReadWriteEndpoint.java","src/main/java/com/azure/resourcemanager/sql/models/InstanceFailoverGroupReplicationRole.java","src/main/java/com/azure/resourcemanager/sql/models/InstancePoolEditionCapability.java","src/main/java/com/azure/resourcemanager/sql/models/InstancePoolFamilyCapability.java","src/main/java/com/azure/resourcemanager/sql/models/InstancePoolLicenseType.java","src/main/java/com/azure/resourcemanager/sql/models/InstancePoolUpdate.java","src/main/java/com/azure/resourcemanager/sql/models/InstancePoolVcoresCapability.java","src/main/java/com/azure/resourcemanager/sql/models/InstanceRole.java","src/main/java/com/azure/resourcemanager/sql/models/IsRetryable.java","src/main/java/com/azure/resourcemanager/sql/models/JobAgentEditionCapability.java","src/main/java/com/azure/resourcemanager/sql/models/JobAgentIdentity.java","src/main/java/com/azure/resourcemanager/sql/models/JobAgentIdentityType.java","src/main/java/com/azure/resourcemanager/sql/models/JobAgentServiceLevelObjectiveCapability.java","src/main/java/com/azure/resourcemanager/sql/models/JobAgentState.java","src/main/java/com/azure/resourcemanager/sql/models/JobAgentUpdate.java","src/main/java/com/azure/resourcemanager/sql/models/JobAgentUserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/sql/models/JobAgentVersionCapability.java","src/main/java/com/azure/resourcemanager/sql/models/JobExecutionLifecycle.java","src/main/java/com/azure/resourcemanager/sql/models/JobExecutionTarget.java","src/main/java/com/azure/resourcemanager/sql/models/JobSchedule.java","src/main/java/com/azure/resourcemanager/sql/models/JobScheduleType.java","src/main/java/com/azure/resourcemanager/sql/models/JobStepAction.java","src/main/java/com/azure/resourcemanager/sql/models/JobStepActionSource.java","src/main/java/com/azure/resourcemanager/sql/models/JobStepActionType.java","src/main/java/com/azure/resourcemanager/sql/models/JobStepExecutionOptions.java","src/main/java/com/azure/resourcemanager/sql/models/JobStepOutput.java","src/main/java/com/azure/resourcemanager/sql/models/JobStepOutputType.java","src/main/java/com/azure/resourcemanager/sql/models/JobTarget.java","src/main/java/com/azure/resourcemanager/sql/models/JobTargetGroupMembershipType.java","src/main/java/com/azure/resourcemanager/sql/models/JobTargetType.java","src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsName.java","src/main/java/com/azure/resourcemanager/sql/models/LedgerDigestUploadsState.java","src/main/java/com/azure/resourcemanager/sql/models/LicenseTypeCapability.java","src/main/java/com/azure/resourcemanager/sql/models/LinkRole.java","src/main/java/com/azure/resourcemanager/sql/models/LogSizeCapability.java","src/main/java/com/azure/resourcemanager/sql/models/LogSizeUnit.java","src/main/java/com/azure/resourcemanager/sql/models/LongTermRetentionPolicyName.java","src/main/java/com/azure/resourcemanager/sql/models/MaintenanceConfigurationCapability.java","src/main/java/com/azure/resourcemanager/sql/models/MaintenanceWindowTimeRange.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseCreateMode.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseExtendedAccessibilityInfo.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseMoveDefinition.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseRestoreDetailsBackupSetProperties.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseRestoreDetailsUnrestorableFileProperties.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStartMoveDefinition.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseStatus.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseUpdate.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceAdministratorType.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceDatabaseFormat.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceDtcSecuritySettings.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceDtcTransactionManagerCommunicationSettings.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceEditionCapability.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceExternalAdministrator.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceFamilyCapability.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLicenseType.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceLongTermRetentionPolicyName.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceMaintenanceConfigurationCapability.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationParametersPair.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceOperationSteps.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePairInfo.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePecProperty.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateEndpointProperty.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkProperties.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstancePrivateLinkServiceConnectionStateProperty.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceProxyOverride.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceUpdate.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVcoresCapability.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedInstanceVersionCapability.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedLedgerDigestUploadsName.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedLedgerDigestUploadsState.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedServerCreateMode.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasAcquisition.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedServerDnsAliasCreation.java","src/main/java/com/azure/resourcemanager/sql/models/ManagedShortTermRetentionPolicyName.java","src/main/java/com/azure/resourcemanager/sql/models/ManagementOperationState.java","src/main/java/com/azure/resourcemanager/sql/models/MaxLimitRangeCapability.java","src/main/java/com/azure/resourcemanager/sql/models/MaxSizeCapability.java","src/main/java/com/azure/resourcemanager/sql/models/MaxSizeRangeCapability.java","src/main/java/com/azure/resourcemanager/sql/models/MaxSizeUnit.java","src/main/java/com/azure/resourcemanager/sql/models/MetricType.java","src/main/java/com/azure/resourcemanager/sql/models/MinCapacityCapability.java","src/main/java/com/azure/resourcemanager/sql/models/MoveOperationMode.java","src/main/java/com/azure/resourcemanager/sql/models/NSPConfigAccessRule.java","src/main/java/com/azure/resourcemanager/sql/models/NSPConfigAccessRuleProperties.java","src/main/java/com/azure/resourcemanager/sql/models/NSPConfigAssociation.java","src/main/java/com/azure/resourcemanager/sql/models/NSPConfigNetworkSecurityPerimeterRule.java","src/main/java/com/azure/resourcemanager/sql/models/NSPConfigPerimeter.java","src/main/java/com/azure/resourcemanager/sql/models/NSPConfigProfile.java","src/main/java/com/azure/resourcemanager/sql/models/NSPProvisioningIssue.java","src/main/java/com/azure/resourcemanager/sql/models/NSPProvisioningIssueProperties.java","src/main/java/com/azure/resourcemanager/sql/models/Name.java","src/main/java/com/azure/resourcemanager/sql/models/NetworkIsolationSettings.java","src/main/java/com/azure/resourcemanager/sql/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/sql/models/OperationMode.java","src/main/java/com/azure/resourcemanager/sql/models/OperationOrigin.java","src/main/java/com/azure/resourcemanager/sql/models/PartnerInfo.java","src/main/java/com/azure/resourcemanager/sql/models/PartnerRegionInfo.java","src/main/java/com/azure/resourcemanager/sql/models/PauseDelayTimeUnit.java","src/main/java/com/azure/resourcemanager/sql/models/PerDatabaseAutoPauseDelayTimeRange.java","src/main/java/com/azure/resourcemanager/sql/models/PerformanceLevelCapability.java","src/main/java/com/azure/resourcemanager/sql/models/PerformanceLevelUnit.java","src/main/java/com/azure/resourcemanager/sql/models/Phase.java","src/main/java/com/azure/resourcemanager/sql/models/PhaseDetails.java","src/main/java/com/azure/resourcemanager/sql/models/PricingModel.java","src/main/java/com/azure/resourcemanager/sql/models/PrincipalType.java","src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointConnectionRequestStatus.java","src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProperty.java","src/main/java/com/azure/resourcemanager/sql/models/PrivateEndpointProvisioningState.java","src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateActionsRequire.java","src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateProperty.java","src/main/java/com/azure/resourcemanager/sql/models/PrivateLinkServiceConnectionStateStatus.java","src/main/java/com/azure/resourcemanager/sql/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/sql/models/ProxyResourceWithWritableName.java","src/main/java/com/azure/resourcemanager/sql/models/QueryCheck.java","src/main/java/com/azure/resourcemanager/sql/models/QueryMetricInterval.java","src/main/java/com/azure/resourcemanager/sql/models/QueryMetricProperties.java","src/main/java/com/azure/resourcemanager/sql/models/QueryMetricUnitType.java","src/main/java/com/azure/resourcemanager/sql/models/QueryTimeGrainType.java","src/main/java/com/azure/resourcemanager/sql/models/ReadOnlyEndpointFailoverPolicy.java","src/main/java/com/azure/resourcemanager/sql/models/ReadScaleCapability.java","src/main/java/com/azure/resourcemanager/sql/models/ReadWriteEndpointFailoverPolicy.java","src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionCurrentState.java","src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionErrorInfo.java","src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionImpactRecord.java","src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionImplementationInfo.java","src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionInitiatedBy.java","src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionMetricInfo.java","src/main/java/com/azure/resourcemanager/sql/models/RecommendedActionStateInfo.java","src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelSource.java","src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelUpdate.java","src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelUpdateKind.java","src/main/java/com/azure/resourcemanager/sql/models/RecommendedSensitivityLabelUpdateList.java","src/main/java/com/azure/resourcemanager/sql/models/Remediation.java","src/main/java/com/azure/resourcemanager/sql/models/ReplicaConnectedState.java","src/main/java/com/azure/resourcemanager/sql/models/ReplicaSynchronizationHealth.java","src/main/java/com/azure/resourcemanager/sql/models/ReplicaType.java","src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkType.java","src/main/java/com/azure/resourcemanager/sql/models/ReplicationLinkUpdate.java","src/main/java/com/azure/resourcemanager/sql/models/ReplicationMode.java","src/main/java/com/azure/resourcemanager/sql/models/ReplicationRole.java","src/main/java/com/azure/resourcemanager/sql/models/ReplicationState.java","src/main/java/com/azure/resourcemanager/sql/models/ResourceIdentity.java","src/main/java/com/azure/resourcemanager/sql/models/ResourceMoveDefinition.java","src/main/java/com/azure/resourcemanager/sql/models/ResourceWithWritableName.java","src/main/java/com/azure/resourcemanager/sql/models/RestoreDetailsName.java","src/main/java/com/azure/resourcemanager/sql/models/RestorePointType.java","src/main/java/com/azure/resourcemanager/sql/models/RoleChangeType.java","src/main/java/com/azure/resourcemanager/sql/models/RuleSeverity.java","src/main/java/com/azure/resourcemanager/sql/models/RuleStatus.java","src/main/java/com/azure/resourcemanager/sql/models/RuleType.java","src/main/java/com/azure/resourcemanager/sql/models/SampleName.java","src/main/java/com/azure/resourcemanager/sql/models/ScheduleItem.java","src/main/java/com/azure/resourcemanager/sql/models/SecondaryInstanceType.java","src/main/java/com/azure/resourcemanager/sql/models/SecondaryType.java","src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyName.java","src/main/java/com/azure/resourcemanager/sql/models/SecurityAlertPolicyState.java","src/main/java/com/azure/resourcemanager/sql/models/SecurityEventSqlInjectionAdditionalProperties.java","src/main/java/com/azure/resourcemanager/sql/models/SecurityEventType.java","src/main/java/com/azure/resourcemanager/sql/models/SeedingModeType.java","src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelRank.java","src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelSource.java","src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateKind.java","src/main/java/com/azure/resourcemanager/sql/models/SensitivityLabelUpdateList.java","src/main/java/com/azure/resourcemanager/sql/models/ServerConfigurationOptionName.java","src/main/java/com/azure/resourcemanager/sql/models/ServerConnectionType.java","src/main/java/com/azure/resourcemanager/sql/models/ServerCreateMode.java","src/main/java/com/azure/resourcemanager/sql/models/ServerDnsAliasAcquisition.java","src/main/java/com/azure/resourcemanager/sql/models/ServerExternalAdministrator.java","src/main/java/com/azure/resourcemanager/sql/models/ServerInfo.java","src/main/java/com/azure/resourcemanager/sql/models/ServerKeyType.java","src/main/java/com/azure/resourcemanager/sql/models/ServerNetworkAccessFlag.java","src/main/java/com/azure/resourcemanager/sql/models/ServerPrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/sql/models/ServerTrustGroupPropertiesTrustScopesItem.java","src/main/java/com/azure/resourcemanager/sql/models/ServerUpdate.java","src/main/java/com/azure/resourcemanager/sql/models/ServerVersionCapability.java","src/main/java/com/azure/resourcemanager/sql/models/ServerWorkspaceFeature.java","src/main/java/com/azure/resourcemanager/sql/models/ServiceObjectiveCapability.java","src/main/java/com/azure/resourcemanager/sql/models/ServicePrincipal.java","src/main/java/com/azure/resourcemanager/sql/models/ServicePrincipalType.java","src/main/java/com/azure/resourcemanager/sql/models/SetLegalHoldImmutability.java","src/main/java/com/azure/resourcemanager/sql/models/ShortTermRetentionPolicyName.java","src/main/java/com/azure/resourcemanager/sql/models/Sku.java","src/main/java/com/azure/resourcemanager/sql/models/SqlAgentConfigurationPropertiesState.java","src/main/java/com/azure/resourcemanager/sql/models/SqlVulnerabilityAssessmentName.java","src/main/java/com/azure/resourcemanager/sql/models/SqlVulnerabilityAssessmentScanError.java","src/main/java/com/azure/resourcemanager/sql/models/SqlVulnerabilityAssessmentState.java","src/main/java/com/azure/resourcemanager/sql/models/StartStopScheduleName.java","src/main/java/com/azure/resourcemanager/sql/models/Status.java","src/main/java/com/azure/resourcemanager/sql/models/StorageCapability.java","src/main/java/com/azure/resourcemanager/sql/models/StorageCapabilityStorageAccountType.java","src/main/java/com/azure/resourcemanager/sql/models/StorageKeyType.java","src/main/java/com/azure/resourcemanager/sql/models/SynapseLinkWorkspaceInfoProperties.java","src/main/java/com/azure/resourcemanager/sql/models/SyncAgentState.java","src/main/java/com/azure/resourcemanager/sql/models/SyncConflictResolutionPolicy.java","src/main/java/com/azure/resourcemanager/sql/models/SyncDirection.java","src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaTable.java","src/main/java/com/azure/resourcemanager/sql/models/SyncFullSchemaTableColumn.java","src/main/java/com/azure/resourcemanager/sql/models/SyncGroupLogType.java","src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchema.java","src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTable.java","src/main/java/com/azure/resourcemanager/sql/models/SyncGroupSchemaTableColumn.java","src/main/java/com/azure/resourcemanager/sql/models/SyncGroupState.java","src/main/java/com/azure/resourcemanager/sql/models/SyncGroupsType.java","src/main/java/com/azure/resourcemanager/sql/models/SyncMemberDbType.java","src/main/java/com/azure/resourcemanager/sql/models/SyncMemberState.java","src/main/java/com/azure/resourcemanager/sql/models/TableTemporalType.java","src/main/java/com/azure/resourcemanager/sql/models/TdeCertificate.java","src/main/java/com/azure/resourcemanager/sql/models/TimeBasedImmutability.java","src/main/java/com/azure/resourcemanager/sql/models/TimeBasedImmutabilityMode.java","src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionName.java","src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionScanState.java","src/main/java/com/azure/resourcemanager/sql/models/TransparentDataEncryptionState.java","src/main/java/com/azure/resourcemanager/sql/models/UpdateLongTermRetentionBackupParameters.java","src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationParameters.java","src/main/java/com/azure/resourcemanager/sql/models/UpsertManagedServerOperationStepWithEstimatesAndDuration.java","src/main/java/com/azure/resourcemanager/sql/models/UserIdentity.java","src/main/java/com/azure/resourcemanager/sql/models/VaRule.java","src/main/java/com/azure/resourcemanager/sql/models/VirtualClusterUpdate.java","src/main/java/com/azure/resourcemanager/sql/models/VirtualNetworkRuleState.java","src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentName.java","src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentPolicyBaselineName.java","src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentRecurringScansProperties.java","src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanError.java","src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanState.java","src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentScanTriggerType.java","src/main/java/com/azure/resourcemanager/sql/models/VulnerabilityAssessmentSystemDatabaseName.java","src/main/java/com/azure/resourcemanager/sql/models/ZonePinningCapability.java","src/main/java/com/azure/resourcemanager/sql/models/package-info.java","src/main/java/com/azure/resourcemanager/sql/package-info.java"]} \ No newline at end of file diff --git a/sdk/sql/azure-resourcemanager-sql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sql/proxy-config.json b/sdk/sql/azure-resourcemanager-sql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sql/proxy-config.json index c7396aa2a1cd..49208400deb0 100644 --- a/sdk/sql/azure-resourcemanager-sql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sql/proxy-config.json +++ b/sdk/sql/azure-resourcemanager-sql/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-sql/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.sql.implementation.BackupShortTermRetentionPoliciesClientImpl$BackupShortTermRetentionPoliciesService"],["com.azure.resourcemanager.sql.implementation.CapabilitiesClientImpl$CapabilitiesService"],["com.azure.resourcemanager.sql.implementation.DataMaskingPoliciesClientImpl$DataMaskingPoliciesService"],["com.azure.resourcemanager.sql.implementation.DataMaskingRulesClientImpl$DataMaskingRulesService"],["com.azure.resourcemanager.sql.implementation.DataWarehouseUserActivitiesOperationsClientImpl$DataWarehouseUserActivitiesOperationsService"],["com.azure.resourcemanager.sql.implementation.DatabaseAdvancedThreatProtectionSettingsClientImpl$DatabaseAdvancedThreatProtectionSettingsService"],["com.azure.resourcemanager.sql.implementation.DatabaseAdvisorsClientImpl$DatabaseAdvisorsService"],["com.azure.resourcemanager.sql.implementation.DatabaseAutomaticTuningsClientImpl$DatabaseAutomaticTuningsService"],["com.azure.resourcemanager.sql.implementation.DatabaseBlobAuditingPoliciesClientImpl$DatabaseBlobAuditingPoliciesService"],["com.azure.resourcemanager.sql.implementation.DatabaseColumnsClientImpl$DatabaseColumnsService"],["com.azure.resourcemanager.sql.implementation.DatabaseEncryptionProtectorsClientImpl$DatabaseEncryptionProtectorsService"],["com.azure.resourcemanager.sql.implementation.DatabaseExtensionsOperationsClientImpl$DatabaseExtensionsOperationsService"],["com.azure.resourcemanager.sql.implementation.DatabaseOperationsClientImpl$DatabaseOperationsService"],["com.azure.resourcemanager.sql.implementation.DatabaseRecommendedActionsClientImpl$DatabaseRecommendedActionsService"],["com.azure.resourcemanager.sql.implementation.DatabaseSchemasClientImpl$DatabaseSchemasService"],["com.azure.resourcemanager.sql.implementation.DatabaseSecurityAlertPoliciesClientImpl$DatabaseSecurityAlertPoliciesService"],["com.azure.resourcemanager.sql.implementation.DatabaseSqlVulnerabilityAssessmentBaselinesClientImpl$DatabaseSqlVulnerabilityAssessmentBaselinesService"],["com.azure.resourcemanager.sql.implementation.DatabaseSqlVulnerabilityAssessmentExecuteScansClientImpl$DatabaseSqlVulnerabilityAssessmentExecuteScansService"],["com.azure.resourcemanager.sql.implementation.DatabaseSqlVulnerabilityAssessmentRuleBaselinesClientImpl$DatabaseSqlVulnerabilityAssessmentRuleBaselinesService"],["com.azure.resourcemanager.sql.implementation.DatabaseSqlVulnerabilityAssessmentScanResultsClientImpl$DatabaseSqlVulnerabilityAssessmentScanResultsService"],["com.azure.resourcemanager.sql.implementation.DatabaseSqlVulnerabilityAssessmentScansClientImpl$DatabaseSqlVulnerabilityAssessmentScansService"],["com.azure.resourcemanager.sql.implementation.DatabaseSqlVulnerabilityAssessmentsSettingsClientImpl$DatabaseSqlVulnerabilityAssessmentsSettingsService"],["com.azure.resourcemanager.sql.implementation.DatabaseTablesClientImpl$DatabaseTablesService"],["com.azure.resourcemanager.sql.implementation.DatabaseUsagesClientImpl$DatabaseUsagesService"],["com.azure.resourcemanager.sql.implementation.DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl$DatabaseVulnerabilityAssessmentRuleBaselinesService"],["com.azure.resourcemanager.sql.implementation.DatabaseVulnerabilityAssessmentScansClientImpl$DatabaseVulnerabilityAssessmentScansService"],["com.azure.resourcemanager.sql.implementation.DatabaseVulnerabilityAssessmentsClientImpl$DatabaseVulnerabilityAssessmentsService"],["com.azure.resourcemanager.sql.implementation.DatabasesClientImpl$DatabasesService"],["com.azure.resourcemanager.sql.implementation.DeletedServersClientImpl$DeletedServersService"],["com.azure.resourcemanager.sql.implementation.DistributedAvailabilityGroupsClientImpl$DistributedAvailabilityGroupsService"],["com.azure.resourcemanager.sql.implementation.ElasticPoolOperationsClientImpl$ElasticPoolOperationsService"],["com.azure.resourcemanager.sql.implementation.ElasticPoolsClientImpl$ElasticPoolsService"],["com.azure.resourcemanager.sql.implementation.EncryptionProtectorsClientImpl$EncryptionProtectorsService"],["com.azure.resourcemanager.sql.implementation.EndpointCertificatesClientImpl$EndpointCertificatesService"],["com.azure.resourcemanager.sql.implementation.ExtendedDatabaseBlobAuditingPoliciesClientImpl$ExtendedDatabaseBlobAuditingPoliciesService"],["com.azure.resourcemanager.sql.implementation.ExtendedServerBlobAuditingPoliciesClientImpl$ExtendedServerBlobAuditingPoliciesService"],["com.azure.resourcemanager.sql.implementation.FailoverGroupsClientImpl$FailoverGroupsService"],["com.azure.resourcemanager.sql.implementation.FirewallRulesClientImpl$FirewallRulesService"],["com.azure.resourcemanager.sql.implementation.GeoBackupPoliciesClientImpl$GeoBackupPoliciesService"],["com.azure.resourcemanager.sql.implementation.IPv6FirewallRulesClientImpl$IPv6FirewallRulesService"],["com.azure.resourcemanager.sql.implementation.InstanceFailoverGroupsClientImpl$InstanceFailoverGroupsService"],["com.azure.resourcemanager.sql.implementation.InstancePoolOperationsClientImpl$InstancePoolOperationsService"],["com.azure.resourcemanager.sql.implementation.InstancePoolsClientImpl$InstancePoolsService"],["com.azure.resourcemanager.sql.implementation.JobAgentsClientImpl$JobAgentsService"],["com.azure.resourcemanager.sql.implementation.JobCredentialsClientImpl$JobCredentialsService"],["com.azure.resourcemanager.sql.implementation.JobExecutionsClientImpl$JobExecutionsService"],["com.azure.resourcemanager.sql.implementation.JobPrivateEndpointsClientImpl$JobPrivateEndpointsService"],["com.azure.resourcemanager.sql.implementation.JobStepExecutionsClientImpl$JobStepExecutionsService"],["com.azure.resourcemanager.sql.implementation.JobStepsClientImpl$JobStepsService"],["com.azure.resourcemanager.sql.implementation.JobTargetExecutionsClientImpl$JobTargetExecutionsService"],["com.azure.resourcemanager.sql.implementation.JobTargetGroupsClientImpl$JobTargetGroupsService"],["com.azure.resourcemanager.sql.implementation.JobVersionsClientImpl$JobVersionsService"],["com.azure.resourcemanager.sql.implementation.JobsClientImpl$JobsService"],["com.azure.resourcemanager.sql.implementation.LedgerDigestUploadsOperationsClientImpl$LedgerDigestUploadsOperationsService"],["com.azure.resourcemanager.sql.implementation.LongTermRetentionBackupsClientImpl$LongTermRetentionBackupsService"],["com.azure.resourcemanager.sql.implementation.LongTermRetentionManagedInstanceBackupsClientImpl$LongTermRetentionManagedInstanceBackupsService"],["com.azure.resourcemanager.sql.implementation.LongTermRetentionPoliciesClientImpl$LongTermRetentionPoliciesService"],["com.azure.resourcemanager.sql.implementation.MaintenanceWindowOptionsOperationsClientImpl$MaintenanceWindowOptionsOperationsService"],["com.azure.resourcemanager.sql.implementation.MaintenanceWindowsOperationsClientImpl$MaintenanceWindowsOperationsService"],["com.azure.resourcemanager.sql.implementation.ManagedBackupShortTermRetentionPoliciesClientImpl$ManagedBackupShortTermRetentionPoliciesService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseAdvancedThreatProtectionSettingsClientImpl$ManagedDatabaseAdvancedThreatProtectionSettingsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseColumnsClientImpl$ManagedDatabaseColumnsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseMoveOperationsClientImpl$ManagedDatabaseMoveOperationsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseQueriesClientImpl$ManagedDatabaseQueriesService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseRecommendedSensitivityLabelsClientImpl$ManagedDatabaseRecommendedSensitivityLabelsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseRestoreDetailsClientImpl$ManagedDatabaseRestoreDetailsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseSchemasClientImpl$ManagedDatabaseSchemasService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseSecurityAlertPoliciesClientImpl$ManagedDatabaseSecurityAlertPoliciesService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseSecurityEventsClientImpl$ManagedDatabaseSecurityEventsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseSensitivityLabelsClientImpl$ManagedDatabaseSensitivityLabelsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseTablesClientImpl$ManagedDatabaseTablesService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseTransparentDataEncryptionsClientImpl$ManagedDatabaseTransparentDataEncryptionsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl$ManagedDatabaseVulnerabilityAssessmentRuleBaselinesService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseVulnerabilityAssessmentScansClientImpl$ManagedDatabaseVulnerabilityAssessmentScansService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseVulnerabilityAssessmentsClientImpl$ManagedDatabaseVulnerabilityAssessmentsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabasesClientImpl$ManagedDatabasesService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceAdministratorsClientImpl$ManagedInstanceAdministratorsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceAdvancedThreatProtectionSettingsClientImpl$ManagedInstanceAdvancedThreatProtectionSettingsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceAzureADOnlyAuthenticationsClientImpl$ManagedInstanceAzureADOnlyAuthenticationsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceDtcsClientImpl$ManagedInstanceDtcsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceEncryptionProtectorsClientImpl$ManagedInstanceEncryptionProtectorsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceKeysClientImpl$ManagedInstanceKeysService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceLongTermRetentionPoliciesClientImpl$ManagedInstanceLongTermRetentionPoliciesService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceOperationsClientImpl$ManagedInstanceOperationsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstancePrivateEndpointConnectionsClientImpl$ManagedInstancePrivateEndpointConnectionsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstancePrivateLinkResourcesClientImpl$ManagedInstancePrivateLinkResourcesService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceTdeCertificatesClientImpl$ManagedInstanceTdeCertificatesService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceVulnerabilityAssessmentsClientImpl$ManagedInstanceVulnerabilityAssessmentsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstancesClientImpl$ManagedInstancesService"],["com.azure.resourcemanager.sql.implementation.ManagedLedgerDigestUploadsOperationsClientImpl$ManagedLedgerDigestUploadsOperationsService"],["com.azure.resourcemanager.sql.implementation.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl$ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesService"],["com.azure.resourcemanager.sql.implementation.ManagedServerDnsAliasesClientImpl$ManagedServerDnsAliasesService"],["com.azure.resourcemanager.sql.implementation.ManagedServerSecurityAlertPoliciesClientImpl$ManagedServerSecurityAlertPoliciesService"],["com.azure.resourcemanager.sql.implementation.NetworkSecurityPerimeterConfigurationsClientImpl$NetworkSecurityPerimeterConfigurationsService"],["com.azure.resourcemanager.sql.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.sql.implementation.OutboundFirewallRulesClientImpl$OutboundFirewallRulesService"],["com.azure.resourcemanager.sql.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.sql.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.sql.implementation.RecommendedSensitivityLabelsClientImpl$RecommendedSensitivityLabelsService"],["com.azure.resourcemanager.sql.implementation.RecoverableDatabasesClientImpl$RecoverableDatabasesService"],["com.azure.resourcemanager.sql.implementation.RecoverableManagedDatabasesClientImpl$RecoverableManagedDatabasesService"],["com.azure.resourcemanager.sql.implementation.ReplicationLinksClientImpl$ReplicationLinksService"],["com.azure.resourcemanager.sql.implementation.RestorableDroppedDatabasesClientImpl$RestorableDroppedDatabasesService"],["com.azure.resourcemanager.sql.implementation.RestorableDroppedManagedDatabasesClientImpl$RestorableDroppedManagedDatabasesService"],["com.azure.resourcemanager.sql.implementation.RestorePointsClientImpl$RestorePointsService"],["com.azure.resourcemanager.sql.implementation.SensitivityLabelsClientImpl$SensitivityLabelsService"],["com.azure.resourcemanager.sql.implementation.ServerAdvancedThreatProtectionSettingsClientImpl$ServerAdvancedThreatProtectionSettingsService"],["com.azure.resourcemanager.sql.implementation.ServerAdvisorsClientImpl$ServerAdvisorsService"],["com.azure.resourcemanager.sql.implementation.ServerAutomaticTuningsClientImpl$ServerAutomaticTuningsService"],["com.azure.resourcemanager.sql.implementation.ServerAzureADAdministratorsClientImpl$ServerAzureADAdministratorsService"],["com.azure.resourcemanager.sql.implementation.ServerAzureADOnlyAuthenticationsClientImpl$ServerAzureADOnlyAuthenticationsService"],["com.azure.resourcemanager.sql.implementation.ServerBlobAuditingPoliciesClientImpl$ServerBlobAuditingPoliciesService"],["com.azure.resourcemanager.sql.implementation.ServerConfigurationOptionsClientImpl$ServerConfigurationOptionsService"],["com.azure.resourcemanager.sql.implementation.ServerConnectionPoliciesClientImpl$ServerConnectionPoliciesService"],["com.azure.resourcemanager.sql.implementation.ServerDevOpsAuditSettingsClientImpl$ServerDevOpsAuditSettingsService"],["com.azure.resourcemanager.sql.implementation.ServerDnsAliasesClientImpl$ServerDnsAliasesService"],["com.azure.resourcemanager.sql.implementation.ServerKeysClientImpl$ServerKeysService"],["com.azure.resourcemanager.sql.implementation.ServerOperationsClientImpl$ServerOperationsService"],["com.azure.resourcemanager.sql.implementation.ServerSecurityAlertPoliciesClientImpl$ServerSecurityAlertPoliciesService"],["com.azure.resourcemanager.sql.implementation.ServerTrustCertificatesClientImpl$ServerTrustCertificatesService"],["com.azure.resourcemanager.sql.implementation.ServerTrustGroupsClientImpl$ServerTrustGroupsService"],["com.azure.resourcemanager.sql.implementation.ServerUsagesClientImpl$ServerUsagesService"],["com.azure.resourcemanager.sql.implementation.ServerVulnerabilityAssessmentsClientImpl$ServerVulnerabilityAssessmentsService"],["com.azure.resourcemanager.sql.implementation.ServersClientImpl$ServersService"],["com.azure.resourcemanager.sql.implementation.SqlAgentsClientImpl$SqlAgentsService"],["com.azure.resourcemanager.sql.implementation.SqlVulnerabilityAssessmentBaselinesClientImpl$SqlVulnerabilityAssessmentBaselinesService"],["com.azure.resourcemanager.sql.implementation.SqlVulnerabilityAssessmentBaselinesOperationsClientImpl$SqlVulnerabilityAssessmentBaselinesOperationsService"],["com.azure.resourcemanager.sql.implementation.SqlVulnerabilityAssessmentExecuteScansClientImpl$SqlVulnerabilityAssessmentExecuteScansService"],["com.azure.resourcemanager.sql.implementation.SqlVulnerabilityAssessmentRuleBaselinesClientImpl$SqlVulnerabilityAssessmentRuleBaselinesService"],["com.azure.resourcemanager.sql.implementation.SqlVulnerabilityAssessmentRuleBaselinesOperationsClientImpl$SqlVulnerabilityAssessmentRuleBaselinesOperationsService"],["com.azure.resourcemanager.sql.implementation.SqlVulnerabilityAssessmentScanResultOperationsClientImpl$SqlVulnerabilityAssessmentScanResultOperationsService"],["com.azure.resourcemanager.sql.implementation.SqlVulnerabilityAssessmentScansClientImpl$SqlVulnerabilityAssessmentScansService"],["com.azure.resourcemanager.sql.implementation.SqlVulnerabilityAssessmentsClientImpl$SqlVulnerabilityAssessmentsService"],["com.azure.resourcemanager.sql.implementation.SqlVulnerabilityAssessmentsSettingsClientImpl$SqlVulnerabilityAssessmentsSettingsService"],["com.azure.resourcemanager.sql.implementation.StartStopManagedInstanceSchedulesClientImpl$StartStopManagedInstanceSchedulesService"],["com.azure.resourcemanager.sql.implementation.SubscriptionUsagesClientImpl$SubscriptionUsagesService"],["com.azure.resourcemanager.sql.implementation.SynapseLinkWorkspacesClientImpl$SynapseLinkWorkspacesService"],["com.azure.resourcemanager.sql.implementation.SyncAgentsClientImpl$SyncAgentsService"],["com.azure.resourcemanager.sql.implementation.SyncGroupsClientImpl$SyncGroupsService"],["com.azure.resourcemanager.sql.implementation.SyncMembersClientImpl$SyncMembersService"],["com.azure.resourcemanager.sql.implementation.TdeCertificatesClientImpl$TdeCertificatesService"],["com.azure.resourcemanager.sql.implementation.TimeZonesClientImpl$TimeZonesService"],["com.azure.resourcemanager.sql.implementation.TransparentDataEncryptionsClientImpl$TransparentDataEncryptionsService"],["com.azure.resourcemanager.sql.implementation.UsagesClientImpl$UsagesService"],["com.azure.resourcemanager.sql.implementation.VirtualClustersClientImpl$VirtualClustersService"],["com.azure.resourcemanager.sql.implementation.VirtualNetworkRulesClientImpl$VirtualNetworkRulesService"],["com.azure.resourcemanager.sql.implementation.WorkloadClassifiersClientImpl$WorkloadClassifiersService"],["com.azure.resourcemanager.sql.implementation.WorkloadGroupsClientImpl$WorkloadGroupsService"]] \ No newline at end of file +[["com.azure.resourcemanager.sql.implementation.BackupShortTermRetentionPoliciesClientImpl$BackupShortTermRetentionPoliciesService"],["com.azure.resourcemanager.sql.implementation.CapabilitiesClientImpl$CapabilitiesService"],["com.azure.resourcemanager.sql.implementation.DataMaskingPoliciesClientImpl$DataMaskingPoliciesService"],["com.azure.resourcemanager.sql.implementation.DataMaskingRulesClientImpl$DataMaskingRulesService"],["com.azure.resourcemanager.sql.implementation.DataWarehouseUserActivitiesOperationsClientImpl$DataWarehouseUserActivitiesOperationsService"],["com.azure.resourcemanager.sql.implementation.DatabaseAdvancedThreatProtectionSettingsClientImpl$DatabaseAdvancedThreatProtectionSettingsService"],["com.azure.resourcemanager.sql.implementation.DatabaseAdvisorsClientImpl$DatabaseAdvisorsService"],["com.azure.resourcemanager.sql.implementation.DatabaseAutomaticTuningsClientImpl$DatabaseAutomaticTuningsService"],["com.azure.resourcemanager.sql.implementation.DatabaseBlobAuditingPoliciesClientImpl$DatabaseBlobAuditingPoliciesService"],["com.azure.resourcemanager.sql.implementation.DatabaseColumnsClientImpl$DatabaseColumnsService"],["com.azure.resourcemanager.sql.implementation.DatabaseExtensionsOperationsClientImpl$DatabaseExtensionsOperationsService"],["com.azure.resourcemanager.sql.implementation.DatabaseOperationsClientImpl$DatabaseOperationsService"],["com.azure.resourcemanager.sql.implementation.DatabaseRecommendedActionsClientImpl$DatabaseRecommendedActionsService"],["com.azure.resourcemanager.sql.implementation.DatabaseSchemasClientImpl$DatabaseSchemasService"],["com.azure.resourcemanager.sql.implementation.DatabaseSecurityAlertPoliciesClientImpl$DatabaseSecurityAlertPoliciesService"],["com.azure.resourcemanager.sql.implementation.DatabaseTablesClientImpl$DatabaseTablesService"],["com.azure.resourcemanager.sql.implementation.DatabaseUsagesClientImpl$DatabaseUsagesService"],["com.azure.resourcemanager.sql.implementation.DatabaseVulnerabilityAssessmentRuleBaselinesClientImpl$DatabaseVulnerabilityAssessmentRuleBaselinesService"],["com.azure.resourcemanager.sql.implementation.DatabaseVulnerabilityAssessmentScansClientImpl$DatabaseVulnerabilityAssessmentScansService"],["com.azure.resourcemanager.sql.implementation.DatabaseVulnerabilityAssessmentsClientImpl$DatabaseVulnerabilityAssessmentsService"],["com.azure.resourcemanager.sql.implementation.DatabasesClientImpl$DatabasesService"],["com.azure.resourcemanager.sql.implementation.DeletedServersClientImpl$DeletedServersService"],["com.azure.resourcemanager.sql.implementation.DistributedAvailabilityGroupsClientImpl$DistributedAvailabilityGroupsService"],["com.azure.resourcemanager.sql.implementation.ElasticPoolOperationsClientImpl$ElasticPoolOperationsService"],["com.azure.resourcemanager.sql.implementation.ElasticPoolsClientImpl$ElasticPoolsService"],["com.azure.resourcemanager.sql.implementation.EncryptionProtectorsClientImpl$EncryptionProtectorsService"],["com.azure.resourcemanager.sql.implementation.EndpointCertificatesClientImpl$EndpointCertificatesService"],["com.azure.resourcemanager.sql.implementation.ExtendedDatabaseBlobAuditingPoliciesClientImpl$ExtendedDatabaseBlobAuditingPoliciesService"],["com.azure.resourcemanager.sql.implementation.ExtendedServerBlobAuditingPoliciesClientImpl$ExtendedServerBlobAuditingPoliciesService"],["com.azure.resourcemanager.sql.implementation.FailoverGroupsClientImpl$FailoverGroupsService"],["com.azure.resourcemanager.sql.implementation.FirewallRulesClientImpl$FirewallRulesService"],["com.azure.resourcemanager.sql.implementation.GeoBackupPoliciesClientImpl$GeoBackupPoliciesService"],["com.azure.resourcemanager.sql.implementation.IPv6FirewallRulesClientImpl$IPv6FirewallRulesService"],["com.azure.resourcemanager.sql.implementation.InstanceFailoverGroupsClientImpl$InstanceFailoverGroupsService"],["com.azure.resourcemanager.sql.implementation.InstancePoolsClientImpl$InstancePoolsService"],["com.azure.resourcemanager.sql.implementation.JobAgentsClientImpl$JobAgentsService"],["com.azure.resourcemanager.sql.implementation.JobCredentialsClientImpl$JobCredentialsService"],["com.azure.resourcemanager.sql.implementation.JobExecutionsClientImpl$JobExecutionsService"],["com.azure.resourcemanager.sql.implementation.JobStepExecutionsClientImpl$JobStepExecutionsService"],["com.azure.resourcemanager.sql.implementation.JobStepsClientImpl$JobStepsService"],["com.azure.resourcemanager.sql.implementation.JobTargetExecutionsClientImpl$JobTargetExecutionsService"],["com.azure.resourcemanager.sql.implementation.JobTargetGroupsClientImpl$JobTargetGroupsService"],["com.azure.resourcemanager.sql.implementation.JobVersionsClientImpl$JobVersionsService"],["com.azure.resourcemanager.sql.implementation.JobsClientImpl$JobsService"],["com.azure.resourcemanager.sql.implementation.LedgerDigestUploadsOperationsClientImpl$LedgerDigestUploadsOperationsService"],["com.azure.resourcemanager.sql.implementation.LongTermRetentionBackupsClientImpl$LongTermRetentionBackupsService"],["com.azure.resourcemanager.sql.implementation.LongTermRetentionManagedInstanceBackupsClientImpl$LongTermRetentionManagedInstanceBackupsService"],["com.azure.resourcemanager.sql.implementation.LongTermRetentionPoliciesClientImpl$LongTermRetentionPoliciesService"],["com.azure.resourcemanager.sql.implementation.MaintenanceWindowOptionsOperationsClientImpl$MaintenanceWindowOptionsOperationsService"],["com.azure.resourcemanager.sql.implementation.MaintenanceWindowsOperationsClientImpl$MaintenanceWindowsOperationsService"],["com.azure.resourcemanager.sql.implementation.ManagedBackupShortTermRetentionPoliciesClientImpl$ManagedBackupShortTermRetentionPoliciesService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseColumnsClientImpl$ManagedDatabaseColumnsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseQueriesClientImpl$ManagedDatabaseQueriesService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseRecommendedSensitivityLabelsClientImpl$ManagedDatabaseRecommendedSensitivityLabelsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseRestoreDetailsClientImpl$ManagedDatabaseRestoreDetailsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseSchemasClientImpl$ManagedDatabaseSchemasService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseSecurityAlertPoliciesClientImpl$ManagedDatabaseSecurityAlertPoliciesService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseSecurityEventsClientImpl$ManagedDatabaseSecurityEventsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseSensitivityLabelsClientImpl$ManagedDatabaseSensitivityLabelsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseTablesClientImpl$ManagedDatabaseTablesService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseTransparentDataEncryptionsClientImpl$ManagedDatabaseTransparentDataEncryptionsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientImpl$ManagedDatabaseVulnerabilityAssessmentRuleBaselinesService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseVulnerabilityAssessmentScansClientImpl$ManagedDatabaseVulnerabilityAssessmentScansService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabaseVulnerabilityAssessmentsClientImpl$ManagedDatabaseVulnerabilityAssessmentsService"],["com.azure.resourcemanager.sql.implementation.ManagedDatabasesClientImpl$ManagedDatabasesService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceAdministratorsClientImpl$ManagedInstanceAdministratorsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceAzureADOnlyAuthenticationsClientImpl$ManagedInstanceAzureADOnlyAuthenticationsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceEncryptionProtectorsClientImpl$ManagedInstanceEncryptionProtectorsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceKeysClientImpl$ManagedInstanceKeysService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceLongTermRetentionPoliciesClientImpl$ManagedInstanceLongTermRetentionPoliciesService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceOperationsClientImpl$ManagedInstanceOperationsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstancePrivateEndpointConnectionsClientImpl$ManagedInstancePrivateEndpointConnectionsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstancePrivateLinkResourcesClientImpl$ManagedInstancePrivateLinkResourcesService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceTdeCertificatesClientImpl$ManagedInstanceTdeCertificatesService"],["com.azure.resourcemanager.sql.implementation.ManagedInstanceVulnerabilityAssessmentsClientImpl$ManagedInstanceVulnerabilityAssessmentsService"],["com.azure.resourcemanager.sql.implementation.ManagedInstancesClientImpl$ManagedInstancesService"],["com.azure.resourcemanager.sql.implementation.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientImpl$ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesService"],["com.azure.resourcemanager.sql.implementation.ManagedServerDnsAliasesClientImpl$ManagedServerDnsAliasesService"],["com.azure.resourcemanager.sql.implementation.ManagedServerSecurityAlertPoliciesClientImpl$ManagedServerSecurityAlertPoliciesService"],["com.azure.resourcemanager.sql.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.sql.implementation.OutboundFirewallRulesClientImpl$OutboundFirewallRulesService"],["com.azure.resourcemanager.sql.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.sql.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.sql.implementation.RecommendedSensitivityLabelsClientImpl$RecommendedSensitivityLabelsService"],["com.azure.resourcemanager.sql.implementation.RecoverableDatabasesClientImpl$RecoverableDatabasesService"],["com.azure.resourcemanager.sql.implementation.RecoverableManagedDatabasesClientImpl$RecoverableManagedDatabasesService"],["com.azure.resourcemanager.sql.implementation.ReplicationLinksClientImpl$ReplicationLinksService"],["com.azure.resourcemanager.sql.implementation.RestorableDroppedDatabasesClientImpl$RestorableDroppedDatabasesService"],["com.azure.resourcemanager.sql.implementation.RestorableDroppedManagedDatabasesClientImpl$RestorableDroppedManagedDatabasesService"],["com.azure.resourcemanager.sql.implementation.RestorePointsClientImpl$RestorePointsService"],["com.azure.resourcemanager.sql.implementation.SensitivityLabelsClientImpl$SensitivityLabelsService"],["com.azure.resourcemanager.sql.implementation.ServerAdvancedThreatProtectionSettingsClientImpl$ServerAdvancedThreatProtectionSettingsService"],["com.azure.resourcemanager.sql.implementation.ServerAdvisorsClientImpl$ServerAdvisorsService"],["com.azure.resourcemanager.sql.implementation.ServerAutomaticTuningsClientImpl$ServerAutomaticTuningsService"],["com.azure.resourcemanager.sql.implementation.ServerAzureADAdministratorsClientImpl$ServerAzureADAdministratorsService"],["com.azure.resourcemanager.sql.implementation.ServerAzureADOnlyAuthenticationsClientImpl$ServerAzureADOnlyAuthenticationsService"],["com.azure.resourcemanager.sql.implementation.ServerBlobAuditingPoliciesClientImpl$ServerBlobAuditingPoliciesService"],["com.azure.resourcemanager.sql.implementation.ServerConnectionPoliciesClientImpl$ServerConnectionPoliciesService"],["com.azure.resourcemanager.sql.implementation.ServerDevOpsAuditSettingsClientImpl$ServerDevOpsAuditSettingsService"],["com.azure.resourcemanager.sql.implementation.ServerDnsAliasesClientImpl$ServerDnsAliasesService"],["com.azure.resourcemanager.sql.implementation.ServerKeysClientImpl$ServerKeysService"],["com.azure.resourcemanager.sql.implementation.ServerOperationsClientImpl$ServerOperationsService"],["com.azure.resourcemanager.sql.implementation.ServerSecurityAlertPoliciesClientImpl$ServerSecurityAlertPoliciesService"],["com.azure.resourcemanager.sql.implementation.ServerTrustCertificatesClientImpl$ServerTrustCertificatesService"],["com.azure.resourcemanager.sql.implementation.ServerTrustGroupsClientImpl$ServerTrustGroupsService"],["com.azure.resourcemanager.sql.implementation.ServerUsagesClientImpl$ServerUsagesService"],["com.azure.resourcemanager.sql.implementation.ServerVulnerabilityAssessmentsClientImpl$ServerVulnerabilityAssessmentsService"],["com.azure.resourcemanager.sql.implementation.ServersClientImpl$ServersService"],["com.azure.resourcemanager.sql.implementation.SqlAgentsClientImpl$SqlAgentsService"],["com.azure.resourcemanager.sql.implementation.SubscriptionUsagesClientImpl$SubscriptionUsagesService"],["com.azure.resourcemanager.sql.implementation.SyncAgentsClientImpl$SyncAgentsService"],["com.azure.resourcemanager.sql.implementation.SyncGroupsClientImpl$SyncGroupsService"],["com.azure.resourcemanager.sql.implementation.SyncMembersClientImpl$SyncMembersService"],["com.azure.resourcemanager.sql.implementation.TdeCertificatesClientImpl$TdeCertificatesService"],["com.azure.resourcemanager.sql.implementation.TimeZonesClientImpl$TimeZonesService"],["com.azure.resourcemanager.sql.implementation.TransparentDataEncryptionsClientImpl$TransparentDataEncryptionsService"],["com.azure.resourcemanager.sql.implementation.UsagesClientImpl$UsagesService"],["com.azure.resourcemanager.sql.implementation.VirtualClustersClientImpl$VirtualClustersService"],["com.azure.resourcemanager.sql.implementation.VirtualNetworkRulesClientImpl$VirtualNetworkRulesService"],["com.azure.resourcemanager.sql.implementation.WorkloadClassifiersClientImpl$WorkloadClassifiersService"],["com.azure.resourcemanager.sql.implementation.WorkloadGroupsClientImpl$WorkloadGroupsService"]] \ No newline at end of file diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 2b6d10fdbb81..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.BackupShortTermRetentionPolicyInner; -import com.azure.resourcemanager.sql.models.DiffBackupIntervalInHours; -import com.azure.resourcemanager.sql.models.ShortTermRetentionPolicyName; - -/** - * Samples for BackupShortTermRetentionPolicies CreateOrUpdate. - */ -public final class BackupShortTermRetentionPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateShortTermRetentionPolicy.json - */ - /** - * Sample code: Update the short term retention policy for the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateTheShortTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getBackupShortTermRetentionPolicies() - .createOrUpdate("resourceGroup", "testsvr", "testdb", ShortTermRetentionPolicyName.DEFAULT, - new BackupShortTermRetentionPolicyInner().withRetentionDays(7) - .withDiffBackupIntervalInHours(DiffBackupIntervalInHours.TWO_FOUR), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesGetSamples.java deleted file mode 100644 index 5f2721f0f8b3..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ShortTermRetentionPolicyName; - -/** - * Samples for BackupShortTermRetentionPolicies Get. - */ -public final class BackupShortTermRetentionPoliciesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetShortTermRetentionPolicy.json - */ - /** - * Sample code: Get the short term retention policy for the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheShortTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getBackupShortTermRetentionPolicies() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", ShortTermRetentionPolicyName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesListByDatabaseSamples.java deleted file mode 100644 index 4898805960e8..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for BackupShortTermRetentionPolicies ListByDatabase. - */ -public final class BackupShortTermRetentionPoliciesListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListShortTermRetentionPoliciesByDatabase.json - */ - /** - * Sample code: Get the short term retention policy for the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheShortTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getBackupShortTermRetentionPolicies() - .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesUpdateSamples.java deleted file mode 100644 index 0e1ab8184cb3..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/BackupShortTermRetentionPoliciesUpdateSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.BackupShortTermRetentionPolicyInner; -import com.azure.resourcemanager.sql.models.DiffBackupIntervalInHours; -import com.azure.resourcemanager.sql.models.ShortTermRetentionPolicyName; - -/** - * Samples for BackupShortTermRetentionPolicies Update. - */ -public final class BackupShortTermRetentionPoliciesUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/UpdateShortTermRetentionPolicy.json - */ - /** - * Sample code: Update the short term retention policy for the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateTheShortTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getBackupShortTermRetentionPolicies() - .update("resourceGroup", "testsvr", "testdb", ShortTermRetentionPolicyName.DEFAULT, - new BackupShortTermRetentionPolicyInner().withRetentionDays(7) - .withDiffBackupIntervalInHours(DiffBackupIntervalInHours.TWO_FOUR), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/CapabilitiesListByLocationSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/CapabilitiesListByLocationSamples.java deleted file mode 100644 index e22ce7a5d5d8..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/CapabilitiesListByLocationSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Capabilities ListByLocation. - */ -public final class CapabilitiesListByLocationSamples { - /* - * x-ms-original-file: 2025-02-01-preview/LocationCapabilityListByLocation.json - */ - /** - * Sample code: List subscription capabilities in the given location. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listSubscriptionCapabilitiesInTheGivenLocation(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getCapabilities() - .listByLocationWithResponse("eastus", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingPoliciesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index eed26dee85d8..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.DataMaskingPolicyInner; -import com.azure.resourcemanager.sql.models.DataMaskingPolicyName; -import com.azure.resourcemanager.sql.models.DataMaskingState; - -/** - * Samples for DataMaskingPolicies CreateOrUpdate. - */ -public final class DataMaskingPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DataMaskingPolicyCreateOrUpdateMin.json - */ - /** - * Sample code: Create or update data masking policy min. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateDataMaskingPolicyMin(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDataMaskingPolicies() - .createOrUpdateWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", - DataMaskingPolicyName.DEFAULT, - new DataMaskingPolicyInner().withDataMaskingState(DataMaskingState.ENABLED), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/DataMaskingPolicyCreateOrUpdateMax.json - */ - /** - * Sample code: Create or update data masking policy max. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateDataMaskingPolicyMax(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDataMaskingPolicies() - .createOrUpdateWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", - DataMaskingPolicyName.DEFAULT, - new DataMaskingPolicyInner().withDataMaskingState(DataMaskingState.ENABLED) - .withExemptPrincipals("testuser;"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingPoliciesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingPoliciesGetSamples.java deleted file mode 100644 index c9bc326f5628..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingPoliciesGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.DataMaskingPolicyName; - -/** - * Samples for DataMaskingPolicies Get. - */ -public final class DataMaskingPoliciesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DataMaskingPolicyGet.json - */ - /** - * Sample code: Gets the database data masking policies. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheDatabaseDataMaskingPolicies(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDataMaskingPolicies() - .getWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", DataMaskingPolicyName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingRulesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingRulesCreateOrUpdateSamples.java deleted file mode 100644 index a168a5407e8c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingRulesCreateOrUpdateSamples.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.DataMaskingRuleInner; -import com.azure.resourcemanager.sql.models.DataMaskingFunction; -import com.azure.resourcemanager.sql.models.DataMaskingPolicyName; -import com.azure.resourcemanager.sql.models.DataMaskingRuleState; - -/** - * Samples for DataMaskingRules CreateOrUpdate. - */ -public final class DataMaskingRulesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DataMaskingRuleCreateOrUpdateNumber.json - */ - /** - * Sample code: Create/Update data masking rule for numbers. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createUpdateDataMaskingRuleForNumbers(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDataMaskingRules() - .createOrUpdateWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", - DataMaskingPolicyName.DEFAULT, "rule1", - new DataMaskingRuleInner().withSchemaName("dbo") - .withTableName("Table_1") - .withColumnName("test1") - .withMaskingFunction(DataMaskingFunction.NUMBER) - .withNumberFrom("0") - .withNumberTo("2"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/DataMaskingRuleCreateOrUpdateText.json - */ - /** - * Sample code: Create/Update data masking rule for text. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createUpdateDataMaskingRuleForText(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDataMaskingRules() - .createOrUpdateWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", - DataMaskingPolicyName.DEFAULT, "rule1", - new DataMaskingRuleInner().withSchemaName("dbo") - .withTableName("Table_1") - .withColumnName("test1") - .withMaskingFunction(DataMaskingFunction.TEXT) - .withPrefixSize("1") - .withSuffixSize("0") - .withReplacementString("asdf"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/DataMaskingRuleCreateOrUpdateDefaultMin.json - */ - /** - * Sample code: Create/Update data masking rule for default min. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createUpdateDataMaskingRuleForDefaultMin(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDataMaskingRules() - .createOrUpdateWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", - DataMaskingPolicyName.DEFAULT, "rule1", - new DataMaskingRuleInner().withSchemaName("dbo") - .withTableName("Table_1") - .withColumnName("test1") - .withMaskingFunction(DataMaskingFunction.DEFAULT), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/DataMaskingRuleCreateOrUpdateDefaultMax.json - */ - /** - * Sample code: Create/Update data masking rule for default max. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createUpdateDataMaskingRuleForDefaultMax(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDataMaskingRules() - .createOrUpdateWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", - DataMaskingPolicyName.DEFAULT, "rule1", - new DataMaskingRuleInner().withRuleState(DataMaskingRuleState.ENABLED) - .withSchemaName("dbo") - .withTableName("Table_1") - .withColumnName("test1") - .withAliasName("nickname") - .withMaskingFunction(DataMaskingFunction.DEFAULT), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingRulesListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingRulesListByDatabaseSamples.java deleted file mode 100644 index 274ca9154e78..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataMaskingRulesListByDatabaseSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.DataMaskingPolicyName; - -/** - * Samples for DataMaskingRules ListByDatabase. - */ -public final class DataMaskingRulesListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DataMaskingRuleListByDatabase.json - */ - /** - * Sample code: Gets a list of database data masking rules. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAListOfDatabaseDataMaskingRules(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDataMaskingRules() - .listByDatabase("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", DataMaskingPolicyName.DEFAULT, - null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataWarehouseUserActivitiesOperationGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataWarehouseUserActivitiesOperationGetSamples.java deleted file mode 100644 index e53135162ee5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataWarehouseUserActivitiesOperationGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.DataWarehouseUserActivityName; - -/** - * Samples for DataWarehouseUserActivitiesOperation Get. - */ -public final class DataWarehouseUserActivitiesOperationGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetDataWarehouseUserActivities.json - */ - /** - * Sample code: Get the list of the user activities of a data warehouse. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheListOfTheUserActivitiesOfADataWarehouse(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDataWarehouseUserActivitiesOperations() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", DataWarehouseUserActivityName.CURRENT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataWarehouseUserActivitiesOperationListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataWarehouseUserActivitiesOperationListByDatabaseSamples.java deleted file mode 100644 index f1243e27b336..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DataWarehouseUserActivitiesOperationListByDatabaseSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DataWarehouseUserActivitiesOperation ListByDatabase. - */ -public final class DataWarehouseUserActivitiesOperationListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListDataWarehouseUserActivities.json - */ - /** - * Sample code: List of the user activities of a data warehouse. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listOfTheUserActivitiesOfADataWarehouse(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDataWarehouseUserActivitiesOperations() - .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java deleted file mode 100644 index 913e9edcb71e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.DatabaseAdvancedThreatProtectionInner; -import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; -import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionState; - -/** - * Samples for DatabaseAdvancedThreatProtectionSettings CreateOrUpdate. - */ -public final class DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseAdvancedThreatProtectionSettingsCreateMin.json - */ - /** - * Sample code: Update a database's Advanced Threat Protection settings with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateADatabaseSAdvancedThreatProtectionSettingsWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseAdvancedThreatProtectionSettings() - .createOrUpdateWithResponse("threatprotection-4799", "threatprotection-6440", "testdb", - AdvancedThreatProtectionName.DEFAULT, - new DatabaseAdvancedThreatProtectionInner().withState(AdvancedThreatProtectionState.DISABLED), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseAdvancedThreatProtectionSettingsCreateMax.json - */ - /** - * Sample code: Update a database's Advanced Threat Protection settings with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateADatabaseSAdvancedThreatProtectionSettingsWithAllParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseAdvancedThreatProtectionSettings() - .createOrUpdateWithResponse("threatprotection-4799", "threatprotection-6440", "testdb", - AdvancedThreatProtectionName.DEFAULT, - new DatabaseAdvancedThreatProtectionInner().withState(AdvancedThreatProtectionState.ENABLED), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsGetSamples.java deleted file mode 100644 index 31670588d572..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; - -/** - * Samples for DatabaseAdvancedThreatProtectionSettings Get. - */ -public final class DatabaseAdvancedThreatProtectionSettingsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseAdvancedThreatProtectionSettingsGet.json - */ - /** - * Sample code: Get a database's Advanced Threat Protection settings. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getADatabaseSAdvancedThreatProtectionSettings(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseAdvancedThreatProtectionSettings() - .getWithResponse("threatprotection-6852", "threatprotection-2080", "testdb", - AdvancedThreatProtectionName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsListByDatabaseSamples.java deleted file mode 100644 index 7bc914fc9348..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvancedThreatProtectionSettingsListByDatabaseSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseAdvancedThreatProtectionSettings ListByDatabase. - */ -public final class DatabaseAdvancedThreatProtectionSettingsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseAdvancedThreatProtectionSettingsListByDatabase.json - */ - /** - * Sample code: Lists the database's Advanced Threat Protection settings. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listsTheDatabaseSAdvancedThreatProtectionSettings(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseAdvancedThreatProtectionSettings() - .listByDatabase("threatprotection-6852", "threatprotection-2080", "testdb", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsGetSamples.java deleted file mode 100644 index 8096de590bf4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseAdvisors Get. - */ -public final class DatabaseAdvisorsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseAdvisorGet.json - */ - /** - * Sample code: Get database advisor. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getDatabaseAdvisor(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseAdvisors() - .getWithResponse("workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsListByDatabaseSamples.java deleted file mode 100644 index 5f9d6d5911d9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsListByDatabaseSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseAdvisors ListByDatabase. - */ -public final class DatabaseAdvisorsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseAdvisorList.json - */ - /** - * Sample code: List of database advisors. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listOfDatabaseAdvisors(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseAdvisors() - .listByDatabaseWithResponse("workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseRecommendedActionListExpand.json - */ - /** - * Sample code: List of database recommended actions for all advisors. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listOfDatabaseRecommendedActionsForAllAdvisors(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseAdvisors() - .listByDatabaseWithResponse("workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", - "recommendedActions", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsUpdateSamples.java deleted file mode 100644 index cf849e396e9f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAdvisorsUpdateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.AdvisorInner; -import com.azure.resourcemanager.sql.models.AutoExecuteStatus; - -/** - * Samples for DatabaseAdvisors Update. - */ -public final class DatabaseAdvisorsUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseAdvisorUpdate.json - */ - /** - * Sample code: Update database advisor. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateDatabaseAdvisor(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseAdvisors() - .updateWithResponse("workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", - new AdvisorInner().withAutoExecuteStatus(AutoExecuteStatus.DISABLED), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAutomaticTuningGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAutomaticTuningGetSamples.java deleted file mode 100644 index 1515a33ec7b5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAutomaticTuningGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseAutomaticTuning Get. - */ -public final class DatabaseAutomaticTuningGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseAutomaticTuningGet.json - */ - /** - * Sample code: Get a database's automatic tuning settings. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getADatabaseSAutomaticTuningSettings(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseAutomaticTunings() - .getWithResponse("default-sql-onebox", "testsvr11", "db1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAutomaticTuningUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAutomaticTuningUpdateSamples.java deleted file mode 100644 index 3917dd4c6730..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseAutomaticTuningUpdateSamples.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.DatabaseAutomaticTuningInner; -import com.azure.resourcemanager.sql.models.AutomaticTuningMode; -import com.azure.resourcemanager.sql.models.AutomaticTuningOptionModeDesired; -import com.azure.resourcemanager.sql.models.AutomaticTuningOptions; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DatabaseAutomaticTuning Update. - */ -public final class DatabaseAutomaticTuningUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseAutomaticTuningUpdateMax.json - */ - /** - * Sample code: Updates database automatic tuning settings with all properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updatesDatabaseAutomaticTuningSettingsWithAllProperties( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseAutomaticTunings() - .updateWithResponse("default-sql-onebox", "testsvr11", "db1", - new DatabaseAutomaticTuningInner().withDesiredState(AutomaticTuningMode.AUTO) - .withOptions(mapOf("createIndex", - new AutomaticTuningOptions().withDesiredState(AutomaticTuningOptionModeDesired.OFF), - "dropIndex", new AutomaticTuningOptions().withDesiredState(AutomaticTuningOptionModeDesired.ON), - "forceLastGoodPlan", - new AutomaticTuningOptions().withDesiredState(AutomaticTuningOptionModeDesired.DEFAULT))), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseAutomaticTuningUpdateMin.json - */ - /** - * Sample code: Updates database automatic tuning settings with minimal properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updatesDatabaseAutomaticTuningSettingsWithMinimalProperties( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseAutomaticTunings() - .updateWithResponse("default-sql-onebox", "testsvr11", "db1", - new DatabaseAutomaticTuningInner().withDesiredState(AutomaticTuningMode.AUTO), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index e526bc463bff..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.DatabaseBlobAuditingPolicyInner; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyName; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; -import java.util.Arrays; -import java.util.UUID; - -/** - * Samples for DatabaseBlobAuditingPolicies CreateOrUpdate. - */ -public final class DatabaseBlobAuditingPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseAzureMonitorAuditingCreateMin.json - */ - /** - * Sample code: Create or update a database's azure monitor auditing policy with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateADatabaseSAzureMonitorAuditingPolicyWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseBlobAuditingPolicies() - .createOrUpdateWithResponse("blobauditingtest-4799", "blobauditingtest-6440", "testdb", - BlobAuditingPolicyName.DEFAULT, - new DatabaseBlobAuditingPolicyInner().withIsAzureMonitorTargetEnabled(true) - .withState(BlobAuditingPolicyState.ENABLED), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseBlobAuditingCreateMax.json - */ - /** - * Sample code: Create or update a database's blob auditing policy with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateADatabaseSBlobAuditingPolicyWithAllParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseBlobAuditingPolicies() - .createOrUpdateWithResponse("blobauditingtest-4799", "blobauditingtest-6440", "testdb", - BlobAuditingPolicyName.DEFAULT, - new DatabaseBlobAuditingPolicyInner().withRetentionDays(6) - .withAuditActionsAndGroups(Arrays.asList("DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", "UPDATE on database::TestDatabaseName by public")) - .withIsStorageSecondaryKeyInUse(false) - .withIsAzureMonitorTargetEnabled(true) - .withQueueDelayMs(4000) - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey("fakeTokenPlaceholder") - .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseBlobAuditingCreateMin.json - */ - /** - * Sample code: Create or update a database's blob auditing policy with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateADatabaseSBlobAuditingPolicyWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseBlobAuditingPolicies() - .createOrUpdateWithResponse("blobauditingtest-4799", "blobauditingtest-6440", "testdb", - BlobAuditingPolicyName.DEFAULT, - new DatabaseBlobAuditingPolicyInner().withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesGetSamples.java deleted file mode 100644 index d79c3a5fd3e5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyName; - -/** - * Samples for DatabaseBlobAuditingPolicies Get. - */ -public final class DatabaseBlobAuditingPoliciesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseBlobAuditingGet.json - */ - /** - * Sample code: Get a database's blob auditing policy. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getADatabaseSBlobAuditingPolicy(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseBlobAuditingPolicies() - .getWithResponse("blobauditingtest-6852", "blobauditingtest-2080", "testdb", BlobAuditingPolicyName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesListByDatabaseSamples.java deleted file mode 100644 index b2a18eac5dec..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseBlobAuditingPoliciesListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseBlobAuditingPolicies ListByDatabase. - */ -public final class DatabaseBlobAuditingPoliciesListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseAuditingSettingsList.json - */ - /** - * Sample code: List audit settings of a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listAuditSettingsOfADatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseBlobAuditingPolicies() - .listByDatabase("blobauditingtest-6852", "blobauditingtest-2080", "testdb", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsGetSamples.java deleted file mode 100644 index 82651fbd0840..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseColumns Get. - */ -public final class DatabaseColumnsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseColumnGet.json - */ - /** - * Sample code: Get database column. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getDatabaseColumn(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseColumns() - .getWithResponse("myRG", "serverName", "myDatabase", "dbo", "table1", "column1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsListByDatabaseSamples.java deleted file mode 100644 index 00740983d82e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsListByDatabaseSamples.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import java.util.Arrays; - -/** - * Samples for DatabaseColumns ListByDatabase. - */ -public final class DatabaseColumnsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ColumnsListByDatabaseMax.json - */ - /** - * Sample code: Filter database columns. - * - * @param manager Entry point to SqlServerManager. - */ - public static void filterDatabaseColumns(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseColumns() - .listByDatabase("myRG", "serverName", "myDatabase", Arrays.asList("dbo"), - Arrays.asList("customer", "address"), Arrays.asList("username"), - Arrays.asList("schema asc", "table", "column desc"), null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ColumnsListByDatabaseMin.json - */ - /** - * Sample code: List database columns. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listDatabaseColumns(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseColumns() - .listByDatabase("myRG", "serverName", "myDatabase", null, null, null, null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsListByTableSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsListByTableSamples.java deleted file mode 100644 index 8a67049c2ac1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseColumnsListByTableSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseColumns ListByTable. - */ -public final class DatabaseColumnsListByTableSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseColumnListByTable.json - */ - /** - * Sample code: List database columns. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listDatabaseColumns(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseColumns() - .listByTable("myRG", "serverName", "myDatabase", "dbo", "table1", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseEncryptionProtectorsRevalidateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseEncryptionProtectorsRevalidateSamples.java deleted file mode 100644 index c558f252e12b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseEncryptionProtectorsRevalidateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.EncryptionProtectorName; - -/** - * Samples for DatabaseEncryptionProtectors Revalidate. - */ -public final class DatabaseEncryptionProtectorsRevalidateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseEncryptionProtectorRevalidate.json - */ - /** - * Sample code: Revalidates the encryption protector for a particular database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void revalidatesTheEncryptionProtectorForAParticularDatabase( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseEncryptionProtectors() - .revalidate("sqlcrudtest-7398", "sqlcrudtest-4645", "sqlcrudtestdb-2342", EncryptionProtectorName.CURRENT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseEncryptionProtectorsRevertSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseEncryptionProtectorsRevertSamples.java deleted file mode 100644 index 9cdc331e77fb..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseEncryptionProtectorsRevertSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.EncryptionProtectorName; - -/** - * Samples for DatabaseEncryptionProtectors Revert. - */ -public final class DatabaseEncryptionProtectorsRevertSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseEncryptionProtectorRevert.json - */ - /** - * Sample code: Reverts the encryption protector for a particular database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - revertsTheEncryptionProtectorForAParticularDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseEncryptionProtectors() - .revert("sqlcrudtest-7398", "sqlcrudtest-4645", "sqlcrudtestdb-2342", EncryptionProtectorName.CURRENT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationCreateOrUpdateSamples.java deleted file mode 100644 index 417cd8358a8b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationCreateOrUpdateSamples.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.DatabaseExtensions; -import com.azure.resourcemanager.sql.models.OperationMode; -import com.azure.resourcemanager.sql.models.StorageKeyType; - -/** - * Samples for DatabaseExtensionsOperation CreateOrUpdate. - */ -public final class DatabaseExtensionsOperationCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ExportDatabaseUsingDatabaseExtensionsWithManagedIdentity.json - */ - /** - * Sample code: Export database using database extension with Managed Identity. - * - * @param manager Entry point to SqlServerManager. - */ - public static void exportDatabaseUsingDatabaseExtensionWithManagedIdentity( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseExtensionsOperations() - .createOrUpdate("rg_d1ef9eae-044d-4710-ba59-b82e84ad3157", "srv_9243d320-ac4e-4f97-8e06-b1167dae5f4c", - "db_7fe424c8-23cf-4ac3-bdc3-e21f424bdb68", "Export", - new DatabaseExtensions().withOperationMode(OperationMode.EXPORT) - .withStorageKeyType(StorageKeyType.MANAGED_IDENTITY) - .withStorageKey("fakeTokenPlaceholder") - .withStorageUri("https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml") - .withAdministratorLogin( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName") - .withAuthenticationType("ManagedIdentity"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ImportDatabaseUsingDatabaseExtensions.json - */ - /** - * Sample code: Import database using database extension. - * - * @param manager Entry point to SqlServerManager. - */ - public static void importDatabaseUsingDatabaseExtension(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseExtensionsOperations() - .createOrUpdate("rg_062866bf-c4f4-41f9-abf0-b59132ca7924", "srv_2d6be2d2-26c8-4930-8fb6-82a5e95e0e82", - "db_2a47e946-e414-4c00-94ac-ed886bb78302", "Import", - new DatabaseExtensions().withOperationMode(OperationMode.IMPORT) - .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) - .withStorageKey("fakeTokenPlaceholder") - .withStorageUri("https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml") - .withAdministratorLogin("login") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withAuthenticationType("Sql"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ExportDatabaseUsingDatabaseExtensions.json - */ - /** - * Sample code: Export database using database extension. - * - * @param manager Entry point to SqlServerManager. - */ - public static void exportDatabaseUsingDatabaseExtension(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseExtensionsOperations() - .createOrUpdate("rg_d1ef9eae-044d-4710-ba59-b82e84ad3157", "srv_9243d320-ac4e-4f97-8e06-b1167dae5f4c", - "db_7fe424c8-23cf-4ac3-bdc3-e21f424bdb68", "Export", - new DatabaseExtensions().withOperationMode(OperationMode.EXPORT) - .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) - .withStorageKey("fakeTokenPlaceholder") - .withStorageUri("https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml") - .withAdministratorLogin("login") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withAuthenticationType("Sql"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateDatabaseExtensions.json - */ - /** - * Sample code: Create or Update database extensions. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateDatabaseExtensions(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseExtensionsOperations() - .createOrUpdate("rg_20cbe0f0-c2d9-4522-9177-5469aad53029", "srv_1ffd1cf8-9951-47fb-807d-a9c384763849", - "878e303f-1ea0-4f17-aa3d-a22ac5e9da08", "polybaseimport", - new DatabaseExtensions().withOperationMode(OperationMode.POLYBASE_IMPORT) - .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) - .withStorageKey("fakeTokenPlaceholder") - .withStorageUri("https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationGetSamples.java deleted file mode 100644 index 84147d7c84ec..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseExtensionsOperation Get. - */ -public final class DatabaseExtensionsOperationGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetDatabaseExtensions.json - */ - /** - * Sample code: Get database extensions. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getDatabaseExtensions(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseExtensionsOperations() - .getWithResponse("rg_a1f9d6f8-30d5-4228-9504-8a364361bca3", "srv_65858e0f-b1d1-4bdc-8351-a7da86ca4939", - "11aa6c5e-58ed-4693-b303-3b8e3131deaa", "polybaseimport", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationListByDatabaseSamples.java deleted file mode 100644 index bd982d9cca8c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseExtensionsOperationListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseExtensionsOperation ListByDatabase. - */ -public final class DatabaseExtensionsOperationListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListDatabaseExtensions.json - */ - /** - * Sample code: List database extensions. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listDatabaseExtensions(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseExtensionsOperations() - .listByDatabase("rg_4007c5a9-b3b0-41e1-bd46-9eef38768a4a", "srv_3b67ec2a-519b-43a7-8533-fb62dce3431e", - "719d8fa4-bf0f-48fc-8cd3-ef40fe6ba1fe", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseOperationsCancelSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseOperationsCancelSamples.java deleted file mode 100644 index 2f48a5bbd1fa..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseOperationsCancelSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import java.util.UUID; - -/** - * Samples for DatabaseOperations Cancel. - */ -public final class DatabaseOperationsCancelSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CancelDatabaseOperation.json - */ - /** - * Sample code: Cancel the database management operation. - * - * @param manager Entry point to SqlServerManager. - */ - public static void cancelTheDatabaseManagementOperation(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseOperations() - .cancelWithResponse("sqlcrudtest-7398", "sqlcrudtest-6661", "testdb", - UUID.fromString("f779414b-e748-4925-8cfe-c8598f7660ae"), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseOperationsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseOperationsListByDatabaseSamples.java deleted file mode 100644 index e5a1cf90d318..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseOperationsListByDatabaseSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseOperations ListByDatabase. - */ -public final class DatabaseOperationsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListDatabaseOperations.json - */ - /** - * Sample code: List the database management operations. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listTheDatabaseManagementOperations(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseOperations() - .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsGetSamples.java deleted file mode 100644 index 9b9c80fc2648..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseRecommendedActions Get. - */ -public final class DatabaseRecommendedActionsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseRecommendedActionGet.json - */ - /** - * Sample code: Get database recommended action. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getDatabaseRecommendedAction(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseRecommendedActions() - .getWithResponse("workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", - "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsListByDatabaseAdvisorSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsListByDatabaseAdvisorSamples.java deleted file mode 100644 index ab84d99b832b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsListByDatabaseAdvisorSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseRecommendedActions ListByDatabaseAdvisor. - */ -public final class DatabaseRecommendedActionsListByDatabaseAdvisorSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseRecommendedActionList.json - */ - /** - * Sample code: List of database recommended actions. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listOfDatabaseRecommendedActions(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseRecommendedActions() - .listByDatabaseAdvisorWithResponse("workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", - "CreateIndex", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsUpdateSamples.java deleted file mode 100644 index 13dfff422f71..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseRecommendedActionsUpdateSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.RecommendedActionInner; -import com.azure.resourcemanager.sql.models.RecommendedActionCurrentState; -import com.azure.resourcemanager.sql.models.RecommendedActionStateInfo; - -/** - * Samples for DatabaseRecommendedActions Update. - */ -public final class DatabaseRecommendedActionsUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseRecommendedActionUpdate.json - */ - /** - * Sample code: Update database recommended action. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateDatabaseRecommendedAction(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseRecommendedActions() - .updateWithResponse("workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", - "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", - new RecommendedActionInner().withState( - new RecommendedActionStateInfo().withCurrentValue(RecommendedActionCurrentState.PENDING)), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSchemasGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSchemasGetSamples.java deleted file mode 100644 index 9a35b787a3fa..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSchemasGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseSchemas Get. - */ -public final class DatabaseSchemasGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSchemaGet.json - */ - /** - * Sample code: Get database schema. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getDatabaseSchema(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSchemas() - .getWithResponse("myRG", "serverName", "myDatabase", "dbo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSchemasListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSchemasListByDatabaseSamples.java deleted file mode 100644 index c6d4c9b2c556..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSchemasListByDatabaseSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseSchemas ListByDatabase. - */ -public final class DatabaseSchemasListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSchemaListByDatabase.json - */ - /** - * Sample code: List database schemas. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listDatabaseSchemas(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSchemas() - .listByDatabase("myRG", "serverName", "myDatabase", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index bf22c1af9723..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.DatabaseSecurityAlertPolicyInner; -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; -import java.util.Arrays; - -/** - * Samples for DatabaseSecurityAlertPolicies CreateOrUpdate. - */ -public final class DatabaseSecurityAlertPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSecurityAlertCreateMax.json - */ - /** - * Sample code: Update a database's threat detection policy with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateADatabaseSThreatDetectionPolicyWithAllParameters(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSecurityAlertPolicies() - .createOrUpdateWithResponse("securityalert-4799", "securityalert-6440", "testdb", - SecurityAlertPolicyName.DEFAULT, - new DatabaseSecurityAlertPolicyInner().withState(SecurityAlertPolicyState.ENABLED) - .withDisabledAlerts(Arrays.asList("Sql_Injection", "Usage_Anomaly")) - .withEmailAddresses(Arrays.asList("test@microsoft.com", "user@microsoft.com")) - .withEmailAccountAdmins(true) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey("fakeTokenPlaceholder") - .withRetentionDays(6), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSecurityAlertCreateMin.json - */ - /** - * Sample code: Update a database's threat detection policy with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateADatabaseSThreatDetectionPolicyWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSecurityAlertPolicies() - .createOrUpdateWithResponse("securityalert-4799", "securityalert-6440", "testdb", - SecurityAlertPolicyName.DEFAULT, - new DatabaseSecurityAlertPolicyInner().withState(SecurityAlertPolicyState.ENABLED), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesGetSamples.java deleted file mode 100644 index 56b07d39089f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; - -/** - * Samples for DatabaseSecurityAlertPolicies Get. - */ -public final class DatabaseSecurityAlertPoliciesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSecurityAlertGet.json - */ - /** - * Sample code: Get a database's threat detection policy. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getADatabaseSThreatDetectionPolicy(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSecurityAlertPolicies() - .getWithResponse("securityalert-6852", "securityalert-2080", "testdb", SecurityAlertPolicyName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesListByDatabaseSamples.java deleted file mode 100644 index 7a425cbb8054..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSecurityAlertPoliciesListByDatabaseSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseSecurityAlertPolicies ListByDatabase. - */ -public final class DatabaseSecurityAlertPoliciesListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSecurityAlertListByDatabase.json - */ - /** - * Sample code: Get the database's threat detection policies. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getTheDatabaseSThreatDetectionPolicies(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSecurityAlertPolicies() - .listByDatabase("securityalert-6852", "securityalert-2080", "testdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateSamples.java deleted file mode 100644 index 3a8c1b1eb304..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateSamples.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DatabaseSqlVulnerabilityAssessmentBaselines CreateOrUpdate. - */ -public final class DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json - */ - /** - * Sample code: Add a database's vulnerability assessment rule baseline from the latest scan result. - * - * @param manager Entry point to SqlServerManager. - */ - public static void addADatabaseSVulnerabilityAssessmentRuleBaselineFromTheLatestScanResult( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSqlVulnerabilityAssessmentBaselines() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - "testdb", VulnerabilityAssessmentName.DEFAULT, BaselineName.DEFAULT, - new DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput().withLatestScan(true).withResults(mapOf()), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json - */ - /** - * Sample code: Add a database's vulnerability assessment rule baseline list. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - addADatabaseSVulnerabilityAssessmentRuleBaselineList(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSqlVulnerabilityAssessmentBaselines() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - "testdb", VulnerabilityAssessmentName.DEFAULT, BaselineName.DEFAULT, - new DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput().withLatestScan(false) - .withResults(mapOf("VA2063", Arrays.asList(Arrays.asList("AllowAll", "0.0.0.0", "255.255.255.255")), - "VA2065", Arrays.asList(Arrays.asList("AllowAll", "0.0.0.0", "255.255.255.255")))), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentBaselinesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentBaselinesGetSamples.java deleted file mode 100644 index 4959e8c2947f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentBaselinesGetSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for DatabaseSqlVulnerabilityAssessmentBaselines Get. - */ -public final class DatabaseSqlVulnerabilityAssessmentBaselinesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSqlVulnerabilityAssessmentBaselineGet.json - */ - /** - * Sample code: Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSqlVulnerabilityAssessmentBaselines() - .getWithResponse("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", "testdb", - VulnerabilityAssessmentName.DEFAULT, BaselineName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentSamples.java deleted file mode 100644 index 159847e0f1a7..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for DatabaseSqlVulnerabilityAssessmentBaselines ListBySqlVulnerabilityAssessment. - */ -public final class DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentSamples { - /* - * x-ms-original-file: - * 2025-02-01-preview/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json - */ - /** - * Sample code: Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSqlVulnerabilityAssessmentBaselines() - .listBySqlVulnerabilityAssessment("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", - "testdb", VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentExecuteScanExecuteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentExecuteScanExecuteSamples.java deleted file mode 100644 index 3eeadef9f134..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentExecuteScanExecuteSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for DatabaseSqlVulnerabilityAssessmentExecuteScan Execute. - */ -public final class DatabaseSqlVulnerabilityAssessmentExecuteScanExecuteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSqlVulnerabilityAssessmentScansExecute.json - */ - /** - * Sample code: Executes a database's vulnerability assessment scan. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - executesADatabaseSVulnerabilityAssessmentScan(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSqlVulnerabilityAssessmentExecuteScans() - .execute("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", - VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java deleted file mode 100644 index 29ea1ac4f184..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInput; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import java.util.Arrays; - -/** - * Samples for DatabaseSqlVulnerabilityAssessmentRuleBaselines CreateOrUpdate. - */ -public final class DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json - */ - /** - * Sample code: Creates or updates a database's vulnerability assessment rule baseline. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSqlVulnerabilityAssessmentRuleBaselines() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - "testdb", VulnerabilityAssessmentName.DEFAULT, BaselineName.DEFAULT, "VA1001", - new DatabaseSqlVulnerabilityAssessmentRuleBaselineInput().withLatestScan(false) - .withResults(Arrays.asList(Arrays.asList("userA", "SELECT"), Arrays.asList("userB", "SELECT"), - Arrays.asList("userC", "SELECT"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentRuleBaselinesDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentRuleBaselinesDeleteSamples.java deleted file mode 100644 index 4b84c1bb53fd..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentRuleBaselinesDeleteSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for DatabaseSqlVulnerabilityAssessmentRuleBaselines Delete. - */ -public final class DatabaseSqlVulnerabilityAssessmentRuleBaselinesDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json - */ - /** - * Sample code: Removes a database's vulnerability assessment rule baseline. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - removesADatabaseSVulnerabilityAssessmentRuleBaseline(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSqlVulnerabilityAssessmentRuleBaselines() - .deleteWithResponse("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", "testdb", - VulnerabilityAssessmentName.DEFAULT, BaselineName.DEFAULT, "VA1001", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetSamples.java deleted file mode 100644 index 32b658335dda..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for DatabaseSqlVulnerabilityAssessmentRuleBaselines Get. - */ -public final class DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json - */ - /** - * Sample code: Gets a database's sql vulnerability assessment rule baseline. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsADatabaseSSqlVulnerabilityAssessmentRuleBaseline(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSqlVulnerabilityAssessmentRuleBaselines() - .getWithResponse("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", "testdb", - VulnerabilityAssessmentName.DEFAULT, BaselineName.DEFAULT, "VA1001", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineSamples.java deleted file mode 100644 index 193ec83951b1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for DatabaseSqlVulnerabilityAssessmentRuleBaselines ListByBaseline. - */ -public final class DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json - */ - /** - * Sample code: Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSqlVulnerabilityAssessmentRuleBaselines() - .listByBaseline("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", "testdb", - VulnerabilityAssessmentName.DEFAULT, BaselineName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentScanResultGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentScanResultGetSamples.java deleted file mode 100644 index 3536e0accc0e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentScanResultGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.SqlVulnerabilityAssessmentName; - -/** - * Samples for DatabaseSqlVulnerabilityAssessmentScanResult Get. - */ -public final class DatabaseSqlVulnerabilityAssessmentScanResultGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSqlVulnerabilityAssessmentScansResults.json - */ - /** - * Sample code: Get a database SQL Vulnerability Assessment scan result for scan id and scan result id. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getADatabaseSQLVulnerabilityAssessmentScanResultForScanIdAndScanResultId( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSqlVulnerabilityAssessmentScanResults() - .getWithResponse("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "master", - SqlVulnerabilityAssessmentName.DEFAULT, "scanId1", "VA1234", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentScanResultListByScanSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentScanResultListByScanSamples.java deleted file mode 100644 index cd08977f57ac..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentScanResultListByScanSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.SqlVulnerabilityAssessmentName; - -/** - * Samples for DatabaseSqlVulnerabilityAssessmentScanResult ListByScan. - */ -public final class DatabaseSqlVulnerabilityAssessmentScanResultListByScanSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSqlVulnerabilityAssessmentListScansResults.json - */ - /** - * Sample code: List database SQL Vulnerability Assessment scan results for scan id. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listDatabaseSQLVulnerabilityAssessmentScanResultsForScanId( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSqlVulnerabilityAssessmentScanResults() - .listByScan("vulnerabilityassessmenttest-4711", "testsvr", "master", SqlVulnerabilityAssessmentName.DEFAULT, - "scanId1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentScansGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentScansGetSamples.java deleted file mode 100644 index ec5658fc9d06..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentScansGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for DatabaseSqlVulnerabilityAssessmentScans Get. - */ -public final class DatabaseSqlVulnerabilityAssessmentScansGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSqlVulnerabilityAssessmentScan.json - */ - /** - * Sample code: Get a database's vulnerability assessment scan. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getADatabaseSVulnerabilityAssessmentScan(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSqlVulnerabilityAssessmentScans() - .getWithResponse("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", - VulnerabilityAssessmentName.DEFAULT, "scan001", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsSamples.java deleted file mode 100644 index f1ebe398c8f5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for DatabaseSqlVulnerabilityAssessmentScans ListBySqlVulnerabilityAssessments. - */ -public final class DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanRecordsListByDatabase.json - */ - /** - * Sample code: Gets the list of a database vulnerability assessment scan records. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheListOfADatabaseVulnerabilityAssessmentScanRecords( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSqlVulnerabilityAssessmentScans() - .listBySqlVulnerabilityAssessments("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", - "testdb", VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentsSettingsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentsSettingsGetSamples.java deleted file mode 100644 index 39f8fba0e9db..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentsSettingsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.SqlVulnerabilityAssessmentName; - -/** - * Samples for DatabaseSqlVulnerabilityAssessmentsSettings Get. - */ -public final class DatabaseSqlVulnerabilityAssessmentsSettingsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSqlVulnerabilityAssessmentGet.json - */ - /** - * Sample code: Get SQL Vulnerability Assessment policy for database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getSQLVulnerabilityAssessmentPolicyForDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSqlVulnerabilityAssessmentsSettings() - .getWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", - SqlVulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseSamples.java deleted file mode 100644 index bb6813fc7ec5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseSqlVulnerabilityAssessmentsSettings ListByDatabase. - */ -public final class DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseSqlVulnerabilityAssessmentListByDatabase.json - */ - /** - * Sample code: Get SQL Vulnerability Assessment policies on a given database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getSQLVulnerabilityAssessmentPoliciesOnAGivenDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseSqlVulnerabilityAssessmentsSettings() - .listByDatabase("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseTablesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseTablesGetSamples.java deleted file mode 100644 index bc32a9eeaede..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseTablesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseTables Get. - */ -public final class DatabaseTablesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseTableGet.json - */ - /** - * Sample code: Get database table. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getDatabaseTable(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseTables() - .getWithResponse("myRG", "serverName", "myDatabase", "dbo", "table1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseTablesListBySchemaSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseTablesListBySchemaSamples.java deleted file mode 100644 index a6f6e12f5c3d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseTablesListBySchemaSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseTables ListBySchema. - */ -public final class DatabaseTablesListBySchemaSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseTableListBySchema.json - */ - /** - * Sample code: List database tables. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listDatabaseTables(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseTables() - .listBySchema("myRG", "serverName", "myDatabase", "dbo", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseUsagesListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseUsagesListByDatabaseSamples.java deleted file mode 100644 index 984b40ca97d3..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseUsagesListByDatabaseSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseUsages ListByDatabase. - */ -public final class DatabaseUsagesListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetDatabaseUsages.json - */ - /** - * Sample code: Gets database usages. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsDatabaseUsages(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseUsages() - .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java deleted file mode 100644 index 2770f86e162d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentRuleBaselineInner; -import com.azure.resourcemanager.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentPolicyBaselineName; -import java.util.Arrays; - -/** - * Samples for DatabaseVulnerabilityAssessmentRuleBaselines CreateOrUpdate. - */ -public final class DatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json - */ - /** - * Sample code: Creates or updates a database's vulnerability assessment rule baseline. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseVulnerabilityAssessmentRuleBaselines() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - "testdb", VulnerabilityAssessmentName.DEFAULT, "VA1001", - VulnerabilityAssessmentPolicyBaselineName.DEFAULT, - new DatabaseVulnerabilityAssessmentRuleBaselineInner().withBaselineResults(Arrays.asList( - new DatabaseVulnerabilityAssessmentRuleBaselineItem().withResult(Arrays.asList("userA", "SELECT")), - new DatabaseVulnerabilityAssessmentRuleBaselineItem().withResult(Arrays.asList("userB", "SELECT")), - new DatabaseVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("userC", "SELECT", "tableId_4")))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples.java deleted file mode 100644 index 475116b377d6..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentPolicyBaselineName; - -/** - * Samples for DatabaseVulnerabilityAssessmentRuleBaselines Delete. - */ -public final class DatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json - */ - /** - * Sample code: Removes a database's vulnerability assessment rule baseline. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - removesADatabaseSVulnerabilityAssessmentRuleBaseline(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseVulnerabilityAssessmentRuleBaselines() - .deleteWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", - VulnerabilityAssessmentName.DEFAULT, "VA1001", VulnerabilityAssessmentPolicyBaselineName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesGetSamples.java deleted file mode 100644 index a2c8ba490c3c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentRuleBaselinesGetSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentPolicyBaselineName; - -/** - * Samples for DatabaseVulnerabilityAssessmentRuleBaselines Get. - */ -public final class DatabaseVulnerabilityAssessmentRuleBaselinesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseVulnerabilityAssessmentRuleBaselineGet.json - */ - /** - * Sample code: Gets a database's vulnerability assessment rule baseline. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsADatabaseSVulnerabilityAssessmentRuleBaseline(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseVulnerabilityAssessmentRuleBaselines() - .getWithResponse("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", "testdb", - VulnerabilityAssessmentName.DEFAULT, "VA1001", VulnerabilityAssessmentPolicyBaselineName.MASTER, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansExportSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansExportSamples.java deleted file mode 100644 index 7abc234bccd6..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansExportSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for DatabaseVulnerabilityAssessmentScans Export. - */ -public final class DatabaseVulnerabilityAssessmentScansExportSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseVulnerabilityAssessmentScanExport.json - */ - /** - * Sample code: Export a database's vulnerability assessment scan results. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - exportADatabaseSVulnerabilityAssessmentScanResults(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseVulnerabilityAssessmentScans() - .exportWithResponse("vulnerabilityassessmenttest-4799", "vulnerabilityassessmenttest-6440", "testdb", - VulnerabilityAssessmentName.DEFAULT, "scan001", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansGetSamples.java deleted file mode 100644 index d55d2843326e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for DatabaseVulnerabilityAssessmentScans Get. - */ -public final class DatabaseVulnerabilityAssessmentScansGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseVulnerabilityAssessmentScanRecordsGet.json - */ - /** - * Sample code: Gets a database vulnerability assessment scan record by scan ID. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsADatabaseVulnerabilityAssessmentScanRecordByScanID(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseVulnerabilityAssessmentScans() - .getWithResponse("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", - VulnerabilityAssessmentName.DEFAULT, "scan001", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansInitiateScanSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansInitiateScanSamples.java deleted file mode 100644 index e49fd6d59ae2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansInitiateScanSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for DatabaseVulnerabilityAssessmentScans InitiateScan. - */ -public final class DatabaseVulnerabilityAssessmentScansInitiateScanSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseVulnerabilityAssessmentScansExecute.json - */ - /** - * Sample code: Executes a database's vulnerability assessment scan. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - executesADatabaseSVulnerabilityAssessmentScan(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseVulnerabilityAssessmentScans() - .initiateScan("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", - VulnerabilityAssessmentName.DEFAULT, "scan01", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansListByDatabaseSamples.java deleted file mode 100644 index f843c8f0bc7f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentScansListByDatabaseSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for DatabaseVulnerabilityAssessmentScans ListByDatabase. - */ -public final class DatabaseVulnerabilityAssessmentScansListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json - */ - /** - * Sample code: Gets the list of a database vulnerability assessment scan records. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheListOfADatabaseVulnerabilityAssessmentScanRecords( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseVulnerabilityAssessmentScans() - .listByDatabase("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", - VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsCreateOrUpdateSamples.java deleted file mode 100644 index d787805115ff..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentInner; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties; -import java.util.Arrays; - -/** - * Samples for DatabaseVulnerabilityAssessments CreateOrUpdate. - */ -public final class DatabaseVulnerabilityAssessmentsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json - */ - /** - * Sample code: Create a database's vulnerability assessment with minimal parameters, when storageContainerSasKey is - * specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createADatabaseSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseVulnerabilityAssessments() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - "testdb", VulnerabilityAssessmentName.DEFAULT, - new DatabaseVulnerabilityAssessmentInner() - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageContainerSasKey("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseVulnerabilityAssessmentCreateMax.json - */ - /** - * Sample code: Create a database's vulnerability assessment with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createADatabaseSVulnerabilityAssessmentWithAllParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseVulnerabilityAssessments() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - "testdb", VulnerabilityAssessmentName.DEFAULT, - new DatabaseVulnerabilityAssessmentInner() - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageContainerSasKey("fakeTokenPlaceholder") - .withStorageAccountAccessKey("fakeTokenPlaceholder") - .withRecurringScans(new VulnerabilityAssessmentRecurringScansProperties().withIsEnabled(true) - .withEmailSubscriptionAdmins(true) - .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json - */ - /** - * Sample code: Create a database's vulnerability assessment with minimal parameters, when storageAccountAccessKey - * is specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createADatabaseSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseVulnerabilityAssessments() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - "testdb", VulnerabilityAssessmentName.DEFAULT, - new DatabaseVulnerabilityAssessmentInner() - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageAccountAccessKey("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsDeleteSamples.java deleted file mode 100644 index ab5f165334d4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsDeleteSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for DatabaseVulnerabilityAssessments Delete. - */ -public final class DatabaseVulnerabilityAssessmentsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseVulnerabilityAssessmentDelete.json - */ - /** - * Sample code: Remove a database's vulnerability assessment. - * - * @param manager Entry point to SqlServerManager. - */ - public static void removeADatabaseSVulnerabilityAssessment(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseVulnerabilityAssessments() - .deleteWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", - VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsGetSamples.java deleted file mode 100644 index 5cc376f8212f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for DatabaseVulnerabilityAssessments Get. - */ -public final class DatabaseVulnerabilityAssessmentsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseVulnerabilityAssessmentGet.json - */ - /** - * Sample code: Get a database's vulnerability assessment. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getADatabaseSVulnerabilityAssessment(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseVulnerabilityAssessments() - .getWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", - VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsListByDatabaseSamples.java deleted file mode 100644 index e723c65c9702..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabaseVulnerabilityAssessmentsListByDatabaseSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DatabaseVulnerabilityAssessments ListByDatabase. - */ -public final class DatabaseVulnerabilityAssessmentsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseVulnerabilityAssessmentListByDatabase.json - */ - /** - * Sample code: Get the database's vulnerability assessment policies. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheDatabaseSVulnerabilityAssessmentPolicies(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabaseVulnerabilityAssessments() - .listByDatabase("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesCreateOrUpdateSamples.java deleted file mode 100644 index 7053f5712e59..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesCreateOrUpdateSamples.java +++ /dev/null @@ -1,514 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.DatabaseInner; -import com.azure.resourcemanager.sql.models.AlwaysEncryptedEnclaveType; -import com.azure.resourcemanager.sql.models.AvailabilityZoneType; -import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.azure.resourcemanager.sql.models.CreateMode; -import com.azure.resourcemanager.sql.models.DatabaseIdentity; -import com.azure.resourcemanager.sql.models.DatabaseIdentityType; -import com.azure.resourcemanager.sql.models.DatabaseKey; -import com.azure.resourcemanager.sql.models.DatabaseUserIdentity; -import com.azure.resourcemanager.sql.models.SecondaryType; -import com.azure.resourcemanager.sql.models.Sku; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Databases CreateOrUpdate. - */ -public final class DatabasesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateDatabaseConfiguredBackupStorageRedundancy.json - */ - /** - * Sample code: Creates a database with specified backup storage redundancy. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createsADatabaseWithSpecifiedBackupStorageRedundancy(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", - new DatabaseInner().withLocation("southeastasia") - .withRequestedBackupStorageRedundancy(BackupStorageRedundancy.ZONE), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDatabaseWithEncryptionProtectorAutoRotation.json - */ - /** - * Sample code: Creates a database with encryption protector auto rotation. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createsADatabaseWithEncryptionProtectorAutoRotation(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseInner() - .withLocation("southeastasia") - .withSku(new Sku().withName("S0").withTier("Standard")) - .withIdentity(new DatabaseIdentity().withType(DatabaseIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi", - new DatabaseUserIdentity()))) - .withCreateMode(CreateMode.DEFAULT) - .withCollation("SQL_Latin1_General_CP1_CI_AS") - .withMaxSizeBytes(1073741824L) - .withEncryptionProtector("https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion") - .withEncryptionProtectorAutoRotation(true), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDatabaseVBSEnclave.json - */ - /** - * Sample code: Creates a database with VBS enclave type. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsADatabaseWithVBSEnclaveType(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", - new DatabaseInner().withLocation("southeastasia") - .withPreferredEnclaveType(AlwaysEncryptedEnclaveType.VBS), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDatabaseDefaultMode.json - */ - /** - * Sample code: Creates a database with default mode. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsADatabaseWithDefaultMode(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", - new DatabaseInner().withLocation("southeastasia") - .withSku(new Sku().withName("S0").withTier("Standard")) - .withCreateMode(CreateMode.DEFAULT) - .withCollation("SQL_Latin1_General_CP1_CI_AS") - .withMaxSizeBytes(1073741824L), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDatabaseMin.json - */ - /** - * Sample code: Creates a database with minimum number of parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createsADatabaseWithMinimumNumberOfParameters(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", - new DatabaseInner().withLocation("southeastasia"), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateVCoreDatabaseByServiceObjective.json - */ - /** - * Sample code: Creates a VCore database by specifying service objective name. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createsAVCoreDatabaseBySpecifyingServiceObjectiveName(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", - new DatabaseInner().withLocation("southeastasia") - .withSku(new Sku().withName("BC").withFamily("Gen4").withCapacity(2)), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDatabaseStandbyMode.json - */ - /** - * Sample code: Creates a database as a standby secondary. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsADatabaseAsAStandbySecondary(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseInner() - .withLocation("southeastasia") - .withSku(new Sku().withName("S0").withTier("Standard")) - .withCreateMode(CreateMode.SECONDARY) - .withSourceDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/testdb") - .withSecondaryType(SecondaryType.STANDBY), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDwDatabaseCrossSubscriptionRecovery.json - */ - /** - * Sample code: Creates a data warehouse database as a cross-subscription restore from a geo-backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsADataWarehouseDatabaseAsACrossSubscriptionRestoreFromAGeoBackup( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-WestUS", "testsvr", "testdw", new DatabaseInner().withLocation("westus") - .withCreateMode(CreateMode.RECOVERY) - .withSourceResourceId( - "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-EastUS/providers/Microsoft.Sql/servers/srcsvr/recoverabledatabases/srcdw"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * 2025-02-01-preview/CreateDatabaseDefaultModeWithVersionlessKeysAndVersionlessEncryptionProtector.json - */ - /** - * Sample code: Creates a database with database-level versionless customer managed keys. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsADatabaseWithDatabaseLevelVersionlessCustomerManagedKeys( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseInner() - .withLocation("southeastasia") - .withSku(new Sku().withName("S0").withTier("Standard")) - .withIdentity(new DatabaseIdentity().withType(DatabaseIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi", - new DatabaseUserIdentity()))) - .withCreateMode(CreateMode.DEFAULT) - .withCollation("SQL_Latin1_General_CP1_CI_AS") - .withMaxSizeBytes(1073741824L) - .withKeys(mapOf("https://your-key-vault-name.vault.azure.net/yourKey", new DatabaseKey(), - "https://your-key-vault-name.vault.azure.net/yourKey2", new DatabaseKey())) - .withEncryptionProtector("https://your-key-vault-name.vault.azure.net/yourKey"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/UpdateDatabaseHyperscaleMigrationPerformCutover.json - */ - /** - * Sample code: Updates a database to Hyperscale tier by triggering manual cutover during Migration workflow. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updatesADatabaseToHyperscaleTierByTriggeringManualCutoverDuringMigrationWorkflow( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseInner() - .withLocation("southeastasia") - .withIdentity(new DatabaseIdentity().withType(DatabaseIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/userAssignedIdentities/umi", - new DatabaseUserIdentity(), - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/userAssignedIdentities/umiToDelete", - null))) - .withPerformCutover(true), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDatabaseMaintenanceConfiguration.json - */ - /** - * Sample code: Creates a database with preferred maintenance window. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createsADatabaseWithPreferredMaintenanceWindow(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseInner() - .withLocation("southeastasia") - .withSku(new Sku().withName("S2").withTier("Standard")) - .withCreateMode(CreateMode.DEFAULT) - .withCollation("SQL_Latin1_General_CP1_CI_AS") - .withMaxSizeBytes(1073741824L) - .withMaintenanceConfigurationId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDatabaseCopyMode.json - */ - /** - * Sample code: Creates a database as a copy. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsADatabaseAsACopy(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "dbcopy", new DatabaseInner() - .withLocation("southeastasia") - .withSku(new Sku().withName("S0").withTier("Standard")) - .withCreateMode(CreateMode.COPY) - .withSourceDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDatabaseLedger.json - */ - /** - * Sample code: Creates a database with ledger on. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsADatabaseWithLedgerOn(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", - new DatabaseInner().withLocation("southeastasia").withIsLedgerOn(true), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDatabasePITRMode.json - */ - /** - * Sample code: Creates a database from PointInTimeRestore. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsADatabaseFromPointInTimeRestore(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "dbpitr", new DatabaseInner() - .withLocation("southeastasia") - .withCreateMode(CreateMode.POINT_IN_TIME_RESTORE) - .withSourceDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb") - .withRestorePointInTime(OffsetDateTime.parse("2020-10-22T05:35:31.503Z")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDatabaseWithAvailabilityZone.json - */ - /** - * Sample code: Creates a database with availability zone specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createsADatabaseWithAvailabilityZoneSpecified(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", - new DatabaseInner().withLocation("southeastasia") - .withSku(new Sku().withName("S0").withTier("Standard")) - .withCreateMode(CreateMode.DEFAULT) - .withCollation("SQL_Latin1_General_CP1_CI_AS") - .withMaxSizeBytes(1073741824L) - .withAvailabilityZone(AvailabilityZoneType.ONE), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDatabaseDefaultEnclave.json - */ - /** - * Sample code: Creates a database with Default enclave type. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsADatabaseWithDefaultEnclaveType(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", - new DatabaseInner().withLocation("southeastasia") - .withPreferredEnclaveType(AlwaysEncryptedEnclaveType.DEFAULT), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/UpdateDatabaseHyperscaleMigrationWithManualCutover.json - */ - /** - * Sample code: Updates a database to Hyperscale SLO with manual cutover. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updatesADatabaseToHyperscaleSLOWithManualCutover(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseInner() - .withLocation("southeastasia") - .withSku(new Sku().withName("HS_Gen5_2").withTier("Hyperscale")) - .withIdentity(new DatabaseIdentity().withType(DatabaseIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/userAssignedIdentities/umi", - new DatabaseUserIdentity(), - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/userAssignedIdentities/umiToDelete", - null))) - .withManualCutover(true), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDwDatabaseCrossSubscriptionPITR.json - */ - /** - * Sample code: Creates a data warehouse database as a cross-subscription restore from a restore point of an - * existing database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsADataWarehouseDatabaseAsACrossSubscriptionRestoreFromARestorePointOfAnExistingDatabase( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdw", new DatabaseInner() - .withLocation("southeastasia") - .withCreateMode(CreateMode.POINT_IN_TIME_RESTORE) - .withRestorePointInTime(OffsetDateTime.parse("2022-01-22T05:35:31.503Z")) - .withSourceResourceId( - "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/databases/srcdw"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDatabaseDefaultModeWithKeysAndEncryptionProtector.json - */ - /** - * Sample code: Creates a database with database-level customer managed keys. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createsADatabaseWithDatabaseLevelCustomerManagedKeys(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseInner() - .withLocation("southeastasia") - .withSku(new Sku().withName("S0").withTier("Standard")) - .withIdentity(new DatabaseIdentity().withType(DatabaseIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi", - new DatabaseUserIdentity()))) - .withCreateMode(CreateMode.DEFAULT) - .withCollation("SQL_Latin1_General_CP1_CI_AS") - .withMaxSizeBytes(1073741824L) - .withKeys(mapOf("https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion", new DatabaseKey(), - "https://your-key-vault-name.vault.azure.net/yourKey2/yourKey2Version", new DatabaseKey())) - .withEncryptionProtector("https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDatabaseNamedReplica.json - */ - /** - * Sample code: Creates a database as named replica secondary. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsADatabaseAsNamedReplicaSecondary(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseInner() - .withLocation("southeastasia") - .withSku(new Sku().withName("HS_Gen4").withTier("Hyperscale").withCapacity(2)) - .withCreateMode(CreateMode.SECONDARY) - .withSourceDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/primarydb") - .withSecondaryType(SecondaryType.NAMED), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDwDatabaseCrossSubscriptionRestore.json - */ - /** - * Sample code: Creates a data warehouse database as a cross-subscription restore from a backup of a dropped - * database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsADataWarehouseDatabaseAsACrossSubscriptionRestoreFromABackupOfADroppedDatabase( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdw", new DatabaseInner() - .withLocation("southeastasia") - .withCreateMode(CreateMode.RESTORE) - .withSourceResourceId( - "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/restorableDroppedDatabases/srcdw,131403269876900000"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateVCoreDatabaseBySkuNameCapacity.json - */ - /** - * Sample code: Creates a VCore database by specifying sku name and capacity. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createsAVCoreDatabaseBySpecifyingSkuNameAndCapacity(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", - new DatabaseInner().withLocation("southeastasia") - .withSku(new Sku().withName("BC_Gen4").withCapacity(2)), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateDatabaseSecondaryMode.json - */ - /** - * Sample code: Creates a database as an on-line secondary. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsADatabaseAsAnOnLineSecondary(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseInner() - .withLocation("southeastasia") - .withSku(new Sku().withName("S0").withTier("Standard")) - .withCreateMode(CreateMode.SECONDARY) - .withSourceDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/testdb") - .withSecondaryType(SecondaryType.GEO), 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesDeleteSamples.java deleted file mode 100644 index 7722ce53ad11..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Databases Delete. - */ -public final class DatabasesDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DeleteDatabase.json - */ - /** - * Sample code: Deletes a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deletesADatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .delete("Default-SQL-SouthEastAsia", "testsvr", "testdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesExportSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesExportSamples.java deleted file mode 100644 index ae4e147a3225..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesExportSamples.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ExportDatabaseDefinition; -import com.azure.resourcemanager.sql.models.NetworkIsolationSettings; -import com.azure.resourcemanager.sql.models.StorageKeyType; - -/** - * Samples for Databases Export. - */ -public final class DatabasesExportSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ExportDatabase.json - */ - /** - * Sample code: Exports a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void exportsADatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .export("Default-SQL-SouthEastAsia", "testsvr", "testdb", - new ExportDatabaseDefinition().withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) - .withStorageKey("fakeTokenPlaceholder") - .withStorageUri("https://test.blob.core.windows.net/test.bacpac") - .withAdministratorLogin("login") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withAuthenticationType("Sql"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ExportDatabaseWithManagedIdentity.json - */ - /** - * Sample code: Exports a database, using Managed Identity to communicate with SQL server and storage account. - * - * @param manager Entry point to SqlServerManager. - */ - public static void exportsADatabaseUsingManagedIdentityToCommunicateWithSQLServerAndStorageAccount( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .export("Default-SQL-SouthEastAsia", "testsvr", "testdb", new ExportDatabaseDefinition() - .withStorageKeyType(StorageKeyType.MANAGED_IDENTITY) - .withStorageKey("fakeTokenPlaceholder") - .withStorageUri("https://test.blob.core.windows.net/test.bacpac") - .withAdministratorLogin( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName") - .withAuthenticationType("ManagedIdentity"), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ExportDatabaseWithNetworkIsolation.json - */ - /** - * Sample code: Exports a database, using private link to communicate with SQL server and storage account. - * - * @param manager Entry point to SqlServerManager. - */ - public static void exportsADatabaseUsingPrivateLinkToCommunicateWithSQLServerAndStorageAccount( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .export("Default-SQL-SouthEastAsia", "testsvr", "testdb", new ExportDatabaseDefinition() - .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) - .withStorageKey("fakeTokenPlaceholder") - .withStorageUri("https://test.blob.core.windows.net/test.bacpac") - .withAdministratorLogin("login") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withAuthenticationType("Sql") - .withNetworkIsolation(new NetworkIsolationSettings().withStorageAccountResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink") - .withSqlServerResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesFailoverSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesFailoverSamples.java deleted file mode 100644 index e1a83913fc85..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesFailoverSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ReplicaType; - -/** - * Samples for Databases Failover. - */ -public final class DatabasesFailoverSamples { - /* - * x-ms-original-file: 2025-02-01-preview/FailoverDatabase.json - */ - /** - * Sample code: Failover an database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void failoverAnDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .failover("group1", "testServer", "testDatabase", ReplicaType.PRIMARY, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesGetSamples.java deleted file mode 100644 index 55de1f34a81f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesGetSamples.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Databases Get. - */ -public final class DatabasesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetDatabaseWithAvailabilityZone.json - */ - /** - * Sample code: Gets a database with Availability zone specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsADatabaseWithAvailabilityZoneSpecified(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", null, null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/GetVCoreDatabaseWithExpandEqualsKeysWithVersionlessKeys.json - */ - /** - * Sample code: Gets a database with database level keys expanded using versionless keys. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsADatabaseWithDatabaseLevelKeysExpandedUsingVersionlessKeys( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", "keys", null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/GetVCoreDatabase.json - */ - /** - * Sample code: Gets a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsADatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", null, null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/GetVCoreDatabaseWithExpandEqualsKeys.json - */ - /** - * Sample code: Gets a database with database level keys expanded. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsADatabaseWithDatabaseLevelKeysExpanded(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", "keys", null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/GetVCoreDatabaseDefaultEnclave.json - */ - /** - * Sample code: Gets a database configured with Default enclave type. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsADatabaseConfiguredWithDefaultEnclaveType(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", null, null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/GetVCoreDatabaseVBSEnclave.json - */ - /** - * Sample code: Gets a database configured with VBS enclave type. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsADatabaseConfiguredWithVBSEnclaveType(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesImportMethodSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesImportMethodSamples.java deleted file mode 100644 index 94ea8065a3cd..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesImportMethodSamples.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ImportExistingDatabaseDefinition; -import com.azure.resourcemanager.sql.models.NetworkIsolationSettings; -import com.azure.resourcemanager.sql.models.StorageKeyType; - -/** - * Samples for Databases ImportMethod. - */ -public final class DatabasesImportMethodSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ImportDatabaseWithManagedIdentity.json - */ - /** - * Sample code: Imports to an existing empty database, using Managed Identity to communicate with SQL server and - * storage account. - * - * @param manager Entry point to SqlServerManager. - */ - public static void importsToAnExistingEmptyDatabaseUsingManagedIdentityToCommunicateWithSQLServerAndStorageAccount( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .importMethod("Default-SQL-SouthEastAsia", "testsvr", "testdb", new ImportExistingDatabaseDefinition() - .withStorageKeyType(StorageKeyType.MANAGED_IDENTITY) - .withStorageKey("fakeTokenPlaceholder") - .withStorageUri("https://test.blob.core.windows.net/test.bacpac") - .withAdministratorLogin( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName") - .withAuthenticationType("ManagedIdentity"), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ImportDatabase.json - */ - /** - * Sample code: Imports to an existing empty database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void importsToAnExistingEmptyDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .importMethod("Default-SQL-SouthEastAsia", "testsvr", "testdb", - new ImportExistingDatabaseDefinition().withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) - .withStorageKey("fakeTokenPlaceholder") - .withStorageUri("https://test.blob.core.windows.net/test.bacpac") - .withAdministratorLogin("login") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withAuthenticationType("Sql"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ImportDatabaseWithNetworkIsolation.json - */ - /** - * Sample code: Imports to an existing empty database, using private link to communicate with SQL server and storage - * account. - * - * @param manager Entry point to SqlServerManager. - */ - public static void importsToAnExistingEmptyDatabaseUsingPrivateLinkToCommunicateWithSQLServerAndStorageAccount( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .importMethod("Default-SQL-SouthEastAsia", "testsvr", "testdb", new ImportExistingDatabaseDefinition() - .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) - .withStorageKey("fakeTokenPlaceholder") - .withStorageUri("https://test.blob.core.windows.net/test.bacpac") - .withAdministratorLogin("login") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withAuthenticationType("Sql") - .withNetworkIsolation(new NetworkIsolationSettings().withStorageAccountResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink") - .withSqlServerResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListByElasticPoolSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListByElasticPoolSamples.java deleted file mode 100644 index c25cbc11cee7..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListByElasticPoolSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Databases ListByElasticPool. - */ -public final class DatabasesListByElasticPoolSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListDatabasesByElasticPool.json - */ - /** - * Sample code: Gets a list of databases in an elastic pool. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAListOfDatabasesInAnElasticPool(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .listByElasticPool("Default-SQL-SouthEastAsia", "testsvr", "pool1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListByServerSamples.java deleted file mode 100644 index 270c81211d31..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListByServerSamples.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Databases ListByServer. - */ -public final class DatabasesListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListVCoreDatabasesByServerWithOdata.json - */ - /** - * Sample code: Gets a list of databases with OData filtering. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAListOfDatabasesWithODataFiltering(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .listByServer("Default-SQL-SouthEastAsia", "testsvr", null, null, null, null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ListVCoreDatabasesEnclaveTypeByServer.json - */ - /** - * Sample code: Gets a list of databases configured with enclave type. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsAListOfDatabasesConfiguredWithEnclaveType(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .listByServer("Default-SQL-SouthEastAsia", "testsvr", null, null, null, null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ListVCoreDatabasesByServer.json - */ - /** - * Sample code: Gets a list of databases. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAListOfDatabases(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .listByServer("Default-SQL-SouthEastAsia", "testsvr", null, null, null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListInaccessibleByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListInaccessibleByServerSamples.java deleted file mode 100644 index 5cc74b4f3dd5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesListInaccessibleByServerSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Databases ListInaccessibleByServer. - */ -public final class DatabasesListInaccessibleByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListVCoreInaccessibleDatabasesByServer.json - */ - /** - * Sample code: Gets a list of inaccessible databases in a logical server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsAListOfInaccessibleDatabasesInALogicalServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .listInaccessibleByServer("Default-SQL-SouthEastAsia", "testsvr", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesPauseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesPauseSamples.java deleted file mode 100644 index 67a47060feab..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesPauseSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Databases Pause. - */ -public final class DatabasesPauseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/PauseDatabase.json - */ - /** - * Sample code: Pauses a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void pausesADatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .pause("Default-SQL-SouthEastAsia", "testsvr", "testdwdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesRenameSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesRenameSamples.java deleted file mode 100644 index 61cf829afc5f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesRenameSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ResourceMoveDefinition; - -/** - * Samples for Databases Rename. - */ -public final class DatabasesRenameSamples { - /* - * x-ms-original-file: 2025-02-01-preview/RenameDatabase.json - */ - /** - * Sample code: Renames a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void renamesADatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .renameWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", new ResourceMoveDefinition().withId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/newtestdb"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesResumeSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesResumeSamples.java deleted file mode 100644 index 83f9c8cc9e0c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesResumeSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Databases Resume. - */ -public final class DatabasesResumeSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ResumeDatabase.json - */ - /** - * Sample code: Resumes a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void resumesADatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .resume("Default-SQL-SouthEastAsia", "testsvr", "testdwdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesUpdateSamples.java deleted file mode 100644 index e9582610b0d3..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesUpdateSamples.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.AlwaysEncryptedEnclaveType; -import com.azure.resourcemanager.sql.models.DatabaseIdentity; -import com.azure.resourcemanager.sql.models.DatabaseIdentityType; -import com.azure.resourcemanager.sql.models.DatabaseKey; -import com.azure.resourcemanager.sql.models.DatabaseLicenseType; -import com.azure.resourcemanager.sql.models.DatabaseUpdate; -import com.azure.resourcemanager.sql.models.DatabaseUserIdentity; -import com.azure.resourcemanager.sql.models.Sku; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Databases Update. - */ -public final class DatabasesUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/PatchVCoreDatabaseAssignMaintenanceConfiguration.json - */ - /** - * Sample code: Assigns maintenance window to a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void assignsMaintenanceWindowToADatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .update("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseUpdate() - .withSku(new Sku().withName("BC_Gen5_4")) - .withMaintenanceConfigurationId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/PatchVCoreDatabaseResetMaintenanceConfiguration.json - */ - /** - * Sample code: Resets maintenance window of a database to default. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - resetsMaintenanceWindowOfADatabaseToDefault(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .update("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseUpdate() - .withSku(new Sku().withName("BC_Gen5_4")) - .withMaintenanceConfigurationId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/PatchDatabaseVBSEnclave.json - */ - /** - * Sample code: Updates a database with VBS enclave type. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updatesADatabaseWithVBSEnclaveType(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .update("Default-SQL-SouthEastAsia", "testsvr", "testdb", - new DatabaseUpdate().withPreferredEnclaveType(AlwaysEncryptedEnclaveType.VBS), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/PatchDatabaseDefaultEnclave.json - */ - /** - * Sample code: Updates a database with Default enclave type. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updatesADatabaseWithDefaultEnclaveType(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .update("Default-SQL-SouthEastAsia", "testsvr", "testdb", - new DatabaseUpdate().withPreferredEnclaveType(AlwaysEncryptedEnclaveType.DEFAULT), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/PatchVCoreDatabaseWithKeysAndEncryptionProtector.json - */ - /** - * Sample code: Patch a database with database-level customer managed keys. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - patchADatabaseWithDatabaseLevelCustomerManagedKeys(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .update("Default-SQL-SouthEastAsia", "testsvr", "testdb", new DatabaseUpdate() - .withSku(new Sku().withName("S0").withTier("Standard")) - .withIdentity(new DatabaseIdentity().withType(DatabaseIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi", - new DatabaseUserIdentity(), - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umiToDelete", - null))) - .withKeys(mapOf("https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion", new DatabaseKey(), - "https://your-key-vault-name.vault.azure.net/yourKey2/yourKey2VersionToDelete", null)) - .withEncryptionProtector("https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/PatchVCoreDatabase.json - */ - /** - * Sample code: Updates a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updatesADatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .update("Default-SQL-SouthEastAsia", "testsvr", "testdb", - new DatabaseUpdate().withSku(new Sku().withName("BC_Gen4_4")) - .withMaxSizeBytes(1073741824L) - .withLicenseType(DatabaseLicenseType.LICENSE_INCLUDED), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesUpgradeDataWarehouseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesUpgradeDataWarehouseSamples.java deleted file mode 100644 index 2d9cb9c8b51b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DatabasesUpgradeDataWarehouseSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Databases UpgradeDataWarehouse. - */ -public final class DatabasesUpgradeDataWarehouseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/UpgradeDataWarehouse.json - */ - /** - * Sample code: Upgrades a data warehouse. - * - * @param manager Entry point to SqlServerManager. - */ - public static void upgradesADataWarehouse(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDatabases() - .upgradeDataWarehouse("Default-SQL-SouthEastAsia", "testsvr", "testdwdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersGetSamples.java deleted file mode 100644 index 0ff850a19123..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DeletedServers Get. - */ -public final class DeletedServersGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DeletedServerGet.json - */ - /** - * Sample code: Get deleted server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getDeletedServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDeletedServers() - .getWithResponse("japaneast", "sqlcrudtest-d-1414", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersListByLocationSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersListByLocationSamples.java deleted file mode 100644 index ac1c04f70188..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersListByLocationSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DeletedServers ListByLocation. - */ -public final class DeletedServersListByLocationSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DeletedServerList.json - */ - /** - * Sample code: List deleted servers. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listDeletedServers(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getDeletedServers().listByLocation("japaneast", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersListSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersListSamples.java deleted file mode 100644 index e913d5b352cb..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DeletedServers List. - */ -public final class DeletedServersListSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DeletedServerListBySubscription.json - */ - /** - * Sample code: List deleted servers in a subscription. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listDeletedServersInASubscription(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getDeletedServers().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersRecoverSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersRecoverSamples.java deleted file mode 100644 index 71087786cffb..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DeletedServersRecoverSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DeletedServers Recover. - */ -public final class DeletedServersRecoverSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DeletedServerRecover.json - */ - /** - * Sample code: Recover deleted server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void recoverDeletedServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDeletedServers() - .recover("japaneast", "sqlcrudtest-d-1414", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsCreateOrUpdateSamples.java deleted file mode 100644 index 51a9d1e02d13..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsCreateOrUpdateSamples.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.DistributedAvailabilityGroupInner; -import com.azure.resourcemanager.sql.models.DistributedAvailabilityGroupDatabase; -import com.azure.resourcemanager.sql.models.FailoverModeType; -import com.azure.resourcemanager.sql.models.LinkRole; -import com.azure.resourcemanager.sql.models.SeedingModeType; -import java.util.Arrays; - -/** - * Samples for DistributedAvailabilityGroups CreateOrUpdate. - */ -public final class DistributedAvailabilityGroupsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DistributedAvailabilityGroupsCreateMin.json - */ - /** - * Sample code: Create a distributed availability group with minimal properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createADistributedAvailabilityGroupWithMinimalProperties( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDistributedAvailabilityGroups() - .createOrUpdate("testrg", "testcl", "dag", - new DistributedAvailabilityGroupInner().withPartnerAvailabilityGroupName("BoxLocalAg1") - .withPartnerEndpoint("TCP://SERVER:7022") - .withInstanceAvailabilityGroupName("testcl") - .withDatabases( - Arrays.asList(new DistributedAvailabilityGroupDatabase().withDatabaseName("testdb"))), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/DistributedAvailabilityGroupsCreateMax.json - */ - /** - * Sample code: Create a distributed availability group with all properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createADistributedAvailabilityGroupWithAllProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDistributedAvailabilityGroups() - .createOrUpdate("testrg", "testcl", "dag", - new DistributedAvailabilityGroupInner().withPartnerAvailabilityGroupName("BoxLocalAg1") - .withPartnerEndpoint("TCP://SERVER:7022") - .withInstanceLinkRole(LinkRole.PRIMARY) - .withInstanceAvailabilityGroupName("testcl") - .withFailoverMode(FailoverModeType.NONE) - .withSeedingMode(SeedingModeType.AUTOMATIC) - .withDatabases( - Arrays.asList(new DistributedAvailabilityGroupDatabase().withDatabaseName("testdb"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsDeleteSamples.java deleted file mode 100644 index 0952931a65cf..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DistributedAvailabilityGroups Delete. - */ -public final class DistributedAvailabilityGroupsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DistributedAvailabilityGroupsDelete.json - */ - /** - * Sample code: Initiate a distributed availability group drop. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - initiateADistributedAvailabilityGroupDrop(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDistributedAvailabilityGroups() - .delete("testrg", "testcl", "dag", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsFailoverSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsFailoverSamples.java deleted file mode 100644 index b40056623a7f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsFailoverSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.DistributedAvailabilityGroupsFailoverRequest; -import com.azure.resourcemanager.sql.models.FailoverType; - -/** - * Samples for DistributedAvailabilityGroups Failover. - */ -public final class DistributedAvailabilityGroupsFailoverSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DistributedAvailabilityGroupsFailover.json - */ - /** - * Sample code: Failover a distributed availability group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void failoverADistributedAvailabilityGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDistributedAvailabilityGroups() - .failover("testrg", "testcl", "dag", new DistributedAvailabilityGroupsFailoverRequest() - .withFailoverType(FailoverType.FORCED_ALLOW_DATA_LOSS), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsGetSamples.java deleted file mode 100644 index b2316a636942..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DistributedAvailabilityGroups Get. - */ -public final class DistributedAvailabilityGroupsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DistributedAvailabilityGroupsGet.json - */ - /** - * Sample code: Gets the distributed availability group info. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheDistributedAvailabilityGroupInfo(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDistributedAvailabilityGroups() - .getWithResponse("testrg", "testcl", "dag", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsListByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsListByInstanceSamples.java deleted file mode 100644 index 3b0405c576f5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsListByInstanceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for DistributedAvailabilityGroups ListByInstance. - */ -public final class DistributedAvailabilityGroupsListByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DistributedAvailabilityGroupsListByInstance.json - */ - /** - * Sample code: Lists all distributed availability groups in instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listsAllDistributedAvailabilityGroupsInInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDistributedAvailabilityGroups() - .listByInstance("testrg", "testcl", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsSetRoleSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsSetRoleSamples.java deleted file mode 100644 index e1f80fe93a5d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsSetRoleSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.DistributedAvailabilityGroupSetRole; -import com.azure.resourcemanager.sql.models.InstanceRole; -import com.azure.resourcemanager.sql.models.RoleChangeType; - -/** - * Samples for DistributedAvailabilityGroups SetRole. - */ -public final class DistributedAvailabilityGroupsSetRoleSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DistributedAvailabilityGroupsSetRole.json - */ - /** - * Sample code: Set distributed availability group primary replica to managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void setDistributedAvailabilityGroupPrimaryReplicaToManagedInstance( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDistributedAvailabilityGroups() - .setRole("testrg", "testcl", "dag", - new DistributedAvailabilityGroupSetRole().withInstanceRole(InstanceRole.PRIMARY) - .withRoleChangeType(RoleChangeType.FORCED), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsUpdateSamples.java deleted file mode 100644 index 1a1451eaaa08..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/DistributedAvailabilityGroupsUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.DistributedAvailabilityGroupInner; -import com.azure.resourcemanager.sql.models.ReplicationMode; - -/** - * Samples for DistributedAvailabilityGroups Update. - */ -public final class DistributedAvailabilityGroupsUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DistributedAvailabilityGroupsUpdate.json - */ - /** - * Sample code: Update the distributed availability group replication mode before deleting it. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateTheDistributedAvailabilityGroupReplicationModeBeforeDeletingIt( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getDistributedAvailabilityGroups() - .update("testrg", "testcl", "dag", - new DistributedAvailabilityGroupInner().withReplicationMode(ReplicationMode.SYNC), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolOperationsCancelSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolOperationsCancelSamples.java deleted file mode 100644 index 8d40548ea350..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolOperationsCancelSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import java.util.UUID; - -/** - * Samples for ElasticPoolOperations Cancel. - */ -public final class ElasticPoolOperationsCancelSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CancelElasticPoolOperation.json - */ - /** - * Sample code: Cancel the elastic pool management operation. - * - * @param manager Entry point to SqlServerManager. - */ - public static void cancelTheElasticPoolManagementOperation(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPoolOperations() - .cancelWithResponse("sqlcrudtest-7398", "sqlcrudtest-6661", "testpool", - UUID.fromString("f779414b-e748-4925-8cfe-c8598f7660ae"), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolOperationsListByElasticPoolSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolOperationsListByElasticPoolSamples.java deleted file mode 100644 index 1f1feddf4c3f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolOperationsListByElasticPoolSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ElasticPoolOperations ListByElasticPool. - */ -public final class ElasticPoolOperationsListByElasticPoolSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListElasticPoolOperations.json - */ - /** - * Sample code: List the elastic pool management operations. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listTheElasticPoolManagementOperations(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPoolOperations() - .listByElasticPool("sqlcrudtestgroup", "sqlcrudtestserver", "testpool", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsCreateOrUpdateSamples.java deleted file mode 100644 index 65f25c4ed570..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsCreateOrUpdateSamples.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ElasticPoolInner; -import com.azure.resourcemanager.sql.models.AlwaysEncryptedEnclaveType; -import com.azure.resourcemanager.sql.models.AvailabilityZoneType; -import com.azure.resourcemanager.sql.models.ElasticPoolPerDatabaseSettings; -import com.azure.resourcemanager.sql.models.Sku; - -/** - * Samples for ElasticPools CreateOrUpdate. - */ -public final class ElasticPoolsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateElasticPoolWithAvailabilityZone.json - */ - /** - * Sample code: Create or Update an elastic pool with Availability Zone. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createOrUpdateAnElasticPoolWithAvailabilityZone(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - new ElasticPoolInner().withLocation("Japan East") - .withSku(new Sku().withName("HS_Gen5_4")) - .withPerDatabaseSettings( - new ElasticPoolPerDatabaseSettings().withMinCapacity(0.25D).withMaxCapacity(2.0D)) - .withZoneRedundant(true) - .withAvailabilityZone(AvailabilityZoneType.ONE), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolCreateOrUpdateServerlessProperties.json - */ - /** - * Sample code: Create or Update an elastic pool with serverless properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createOrUpdateAnElasticPoolWithServerlessProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - new ElasticPoolInner().withLocation("Japan East") - .withSku(new Sku().withName("GP_S_Gen5_2").withTier("GeneralPurpose").withCapacity(2)) - .withMinCapacity(0.5D) - .withPerDatabaseSettings(new ElasticPoolPerDatabaseSettings().withMinCapacity(0.0D) - .withMaxCapacity(2.0D) - .withAutoPauseDelay(80)) - .withAutoPauseDelay(60), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolCreateOrUpdateMax.json - */ - /** - * Sample code: Create or update elastic pool with all parameter. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createOrUpdateElasticPoolWithAllParameter(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - new ElasticPoolInner().withLocation("Japan East") - .withSku(new Sku().withName("GP_Gen4_2").withTier("GeneralPurpose").withCapacity(2)) - .withPerDatabaseSettings( - new ElasticPoolPerDatabaseSettings().withMinCapacity(0.25D).withMaxCapacity(2.0D)), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json - */ - /** - * Sample code: Create or update Hyperscale elastic pool with high availability replica count parameter. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateHyperscaleElasticPoolWithHighAvailabilityReplicaCountParameter( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - new ElasticPoolInner().withLocation("Japan East") - .withSku(new Sku().withName("HS_Gen5_4")) - .withHighAvailabilityReplicaCount(2), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolCreateWithDefaultPreferredEnclaveType.json - */ - /** - * Sample code: Create or update elastic pool with preferred enclave type parameter as Default. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsDefault( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - new ElasticPoolInner().withLocation("Japan East") - .withSku(new Sku().withName("GP_Gen5_4")) - .withPreferredEnclaveType(AlwaysEncryptedEnclaveType.DEFAULT), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json - */ - /** - * Sample code: Create or update elastic pool with maintenance configuration parameter. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateElasticPoolWithMaintenanceConfigurationParameter( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", new ElasticPoolInner() - .withLocation("Japan East") - .withMaintenanceConfigurationId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolCreateOrUpdateMin.json - */ - /** - * Sample code: Create or update elastic pool with minimum parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createOrUpdateElasticPoolWithMinimumParameters(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - new ElasticPoolInner().withLocation("Japan East"), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolCreateWithVBSPreferredEnclaveType.json - */ - /** - * Sample code: Create or update elastic pool with preferred enclave type parameter as VBS. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsVBS( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - new ElasticPoolInner().withLocation("Japan East") - .withSku(new Sku().withName("GP_Gen5_4")) - .withPreferredEnclaveType(AlwaysEncryptedEnclaveType.VBS), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsDeleteSamples.java deleted file mode 100644 index fda9cc71bbe3..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ElasticPools Delete. - */ -public final class ElasticPoolsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolDelete.json - */ - /** - * Sample code: Delete an elastic pool. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteAnElasticPool(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .delete("sqlcrudtest-3129", "sqlcrudtest-228", "sqlcrudtest-3851", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsFailoverSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsFailoverSamples.java deleted file mode 100644 index e3a34858a523..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsFailoverSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ElasticPools Failover. - */ -public final class ElasticPoolsFailoverSamples { - /* - * x-ms-original-file: 2025-02-01-preview/FailoverElasticPool.json - */ - /** - * Sample code: Failover an elastic pool. - * - * @param manager Entry point to SqlServerManager. - */ - public static void failoverAnElasticPool(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .failover("group1", "testServer", "testElasticPool", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsGetSamples.java deleted file mode 100644 index 3f41b478a8ab..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsGetSamples.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ElasticPools Get. - */ -public final class ElasticPoolsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/HyperscaleElasticPoolGet.json - */ - /** - * Sample code: Get a Hyperscale elastic pool. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAHyperscaleElasticPool(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolGet.json - */ - /** - * Sample code: Get an elastic pool. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAnElasticPool(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolGetWithPreferredEnclaveType.json - */ - /** - * Sample code: Get an elastic pool with preferred enclave type parameter. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAnElasticPoolWithPreferredEnclaveTypeParameter(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/GetElasticPoolWithAvailabilityZone.json - */ - /** - * Sample code: Get an elastic pool with Availability Zone. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAnElasticPoolWithAvailabilityZone(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/GetElasticPoolWithServerlessProperties.json - */ - /** - * Sample code: Get an elastic pool with serverless properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAnElasticPoolWithServerlessProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsListByServerSamples.java deleted file mode 100644 index 11624e5ffd9f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ElasticPools ListByServer. - */ -public final class ElasticPoolsListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolListByServer.json - */ - /** - * Sample code: Get all elastic pools in a server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAllElasticPoolsInAServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .listByServer("sqlcrudtest-2369", "sqlcrudtest-8069", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsUpdateSamples.java deleted file mode 100644 index 1c69fceca786..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ElasticPoolsUpdateSamples.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.AlwaysEncryptedEnclaveType; -import com.azure.resourcemanager.sql.models.ElasticPoolLicenseType; -import com.azure.resourcemanager.sql.models.ElasticPoolPerDatabaseSettings; -import com.azure.resourcemanager.sql.models.ElasticPoolUpdate; -import com.azure.resourcemanager.sql.models.Sku; - -/** - * Samples for ElasticPools Update. - */ -public final class ElasticPoolsUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolUpdateMax.json - */ - /** - * Sample code: Update an elastic pool with all parameter. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAnElasticPoolWithAllParameter(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .update("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - new ElasticPoolUpdate() - .withSku(new Sku().withName("BC_Gen4").withTier("BusinessCritical").withCapacity(2)) - .withPerDatabaseSettings( - new ElasticPoolPerDatabaseSettings().withMinCapacity(0.25D).withMaxCapacity(1.0D)) - .withZoneRedundant(true) - .withLicenseType(ElasticPoolLicenseType.LICENSE_INCLUDED), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/HyperscaleElasticPoolUpdateSetHighAvailabilityReplicaCount.json - */ - /** - * Sample code: Update high availability replica count of a Hyperscale elastic pool. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateHighAvailabilityReplicaCountOfAHyperscaleElasticPool( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .update("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - new ElasticPoolUpdate().withHighAvailabilityReplicaCount(2), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolUpdateWithVBSPreferredEnclaveType.json - */ - /** - * Sample code: Update an elastic pool with preferred enclave type parameter as VBS. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAnElasticPoolWithPreferredEnclaveTypeParameterAsVBS( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .update("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - new ElasticPoolUpdate().withSku(new Sku().withName("GP_Gen5_4")) - .withPreferredEnclaveType(AlwaysEncryptedEnclaveType.VBS), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolUpdateMin.json - */ - /** - * Sample code: Update an elastic pool with minimum parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateAnElasticPoolWithMinimumParameters(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .update("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", new ElasticPoolUpdate(), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolUpdateAssignMaintenanceConfiguration.json - */ - /** - * Sample code: Assigns maintenance configuration to an elastic pool. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - assignsMaintenanceConfigurationToAnElasticPool(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .update("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - new ElasticPoolUpdate().withMaintenanceConfigurationId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolUpdateWithDefaultPreferredEnclaveType.json - */ - /** - * Sample code: Update an elastic pool with preferred enclave type parameter as Default. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAnElasticPoolWithPreferredEnclaveTypeParameterAsDefault( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .update("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - new ElasticPoolUpdate().withSku(new Sku().withName("GP_Gen5_4")) - .withPreferredEnclaveType(AlwaysEncryptedEnclaveType.DEFAULT), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolUpdateResetMaintenanceConfiguration.json - */ - /** - * Sample code: Resets maintenance configuration of an elastic pool to default. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - resetsMaintenanceConfigurationOfAnElasticPoolToDefault(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .update("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - new ElasticPoolUpdate().withMaintenanceConfigurationId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ElasticPoolUpdateServerlessProperties.json - */ - /** - * Sample code: Update an elastic pool with serverless properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateAnElasticPoolWithServerlessProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getElasticPools() - .update("sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", - new ElasticPoolUpdate() - .withSku(new Sku().withName("GP_S_Gen5_2").withTier("GeneralPurpose").withCapacity(2)) - .withMinCapacity(0.5D) - .withPerDatabaseSettings(new ElasticPoolPerDatabaseSettings().withMinCapacity(0.0D) - .withMaxCapacity(2.0D) - .withAutoPauseDelay(80)) - .withAutoPauseDelay(60), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsCreateOrUpdateSamples.java deleted file mode 100644 index eefbd6fd74bb..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsCreateOrUpdateSamples.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.EncryptionProtectorInner; -import com.azure.resourcemanager.sql.models.EncryptionProtectorName; -import com.azure.resourcemanager.sql.models.ServerKeyType; - -/** - * Samples for EncryptionProtectors CreateOrUpdate. - */ -public final class EncryptionProtectorsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/EncryptionProtectorCreateOrUpdateKeyVaultWithVersionlessKey.json - */ - /** - * Sample code: Update the encryption protector to key vault with versionless key. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateTheEncryptionProtectorToKeyVaultWithVersionlessKey( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getEncryptionProtectors() - .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, - new EncryptionProtectorInner().withServerKeyName("fakeTokenPlaceholder") - .withServerKeyType(ServerKeyType.AZURE_KEY_VAULT) - .withAutoRotationEnabled(false), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/EncryptionProtectorCreateOrUpdateKeyVault.json - */ - /** - * Sample code: Update the encryption protector to key vault. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateTheEncryptionProtectorToKeyVault(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getEncryptionProtectors() - .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, - new EncryptionProtectorInner().withServerKeyName("fakeTokenPlaceholder") - .withServerKeyType(ServerKeyType.AZURE_KEY_VAULT) - .withAutoRotationEnabled(false), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/EncryptionProtectorCreateOrUpdateServiceManaged.json - */ - /** - * Sample code: Update the encryption protector to service managed. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateTheEncryptionProtectorToServiceManaged(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getEncryptionProtectors() - .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, - new EncryptionProtectorInner().withServerKeyName("fakeTokenPlaceholder") - .withServerKeyType(ServerKeyType.SERVICE_MANAGED), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsGetSamples.java deleted file mode 100644 index de474ca314ca..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsGetSamples.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.EncryptionProtectorName; - -/** - * Samples for EncryptionProtectors Get. - */ -public final class EncryptionProtectorsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/EncryptionProtectorGetWithVersionlessKey.json - */ - /** - * Sample code: Get the encryption protector with versionless key. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheEncryptionProtectorWithVersionlessKey(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getEncryptionProtectors() - .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/EncryptionProtectorGet.json - */ - /** - * Sample code: Get the encryption protector. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getTheEncryptionProtector(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getEncryptionProtectors() - .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsListByServerSamples.java deleted file mode 100644 index 2d38a08bd62c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for EncryptionProtectors ListByServer. - */ -public final class EncryptionProtectorsListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/EncryptionProtectorList.json - */ - /** - * Sample code: List encryption protectors by server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listEncryptionProtectorsByServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getEncryptionProtectors() - .listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsRevalidateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsRevalidateSamples.java deleted file mode 100644 index fad5c4e15913..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EncryptionProtectorsRevalidateSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.EncryptionProtectorName; - -/** - * Samples for EncryptionProtectors Revalidate. - */ -public final class EncryptionProtectorsRevalidateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/EncryptionProtectorRevalidate.json - */ - /** - * Sample code: Revalidates the encryption protector. - * - * @param manager Entry point to SqlServerManager. - */ - public static void revalidatesTheEncryptionProtector(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getEncryptionProtectors() - .revalidate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EndpointCertificatesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EndpointCertificatesGetSamples.java deleted file mode 100644 index 5cd8a9ecf88d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EndpointCertificatesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for EndpointCertificates Get. - */ -public final class EndpointCertificatesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/EndpointCertificatesGet.json - */ - /** - * Sample code: Gets an endpoint certificate. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAnEndpointCertificate(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getEndpointCertificates() - .getWithResponse("testrg", "testcl", "DATABASE_MIRRORING", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EndpointCertificatesListByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EndpointCertificatesListByInstanceSamples.java deleted file mode 100644 index 191558c555cf..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/EndpointCertificatesListByInstanceSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for EndpointCertificates ListByInstance. - */ -public final class EndpointCertificatesListByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/EndpointCertificatesListByInstance.json - */ - /** - * Sample code: Get a list of endpoint certificates. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAListOfEndpointCertificates(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getEndpointCertificates() - .listByInstance("testrg", "testcl", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 599e3efa8cb0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ExtendedDatabaseBlobAuditingPolicyInner; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyName; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; -import java.util.Arrays; -import java.util.UUID; - -/** - * Samples for ExtendedDatabaseBlobAuditingPolicies CreateOrUpdate. - */ -public final class ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ExtendedDatabaseBlobAuditingCreateMin.json - */ - /** - * Sample code: Create or update an extended database's blob auditing policy with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateAnExtendedDatabaseSBlobAuditingPolicyWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getExtendedDatabaseBlobAuditingPolicies() - .createOrUpdateWithResponse("blobauditingtest-4799", "blobauditingtest-6440", "testdb", - BlobAuditingPolicyName.DEFAULT, - new ExtendedDatabaseBlobAuditingPolicyInner().withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ExtendedDatabaseBlobAuditingCreateMax.json - */ - /** - * Sample code: Create or update an extended database's blob auditing policy with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateAnExtendedDatabaseSBlobAuditingPolicyWithAllParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getExtendedDatabaseBlobAuditingPolicies() - .createOrUpdateWithResponse("blobauditingtest-4799", "blobauditingtest-6440", "testdb", - BlobAuditingPolicyName.DEFAULT, - new ExtendedDatabaseBlobAuditingPolicyInner().withPredicateExpression("statement = 'select 1'") - .withRetentionDays(6) - .withAuditActionsAndGroups(Arrays.asList("DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", "UPDATE on database::TestDatabaseName by public")) - .withIsStorageSecondaryKeyInUse(false) - .withIsAzureMonitorTargetEnabled(true) - .withQueueDelayMs(4000) - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey("fakeTokenPlaceholder") - .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ExtendedDatabaseAzureMonitorAuditingCreateMin.json - */ - /** - * Sample code: Create or update an extended database's azure monitor auditing policy with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateAnExtendedDatabaseSAzureMonitorAuditingPolicyWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getExtendedDatabaseBlobAuditingPolicies() - .createOrUpdateWithResponse("blobauditingtest-4799", "blobauditingtest-6440", "testdb", - BlobAuditingPolicyName.DEFAULT, - new ExtendedDatabaseBlobAuditingPolicyInner().withIsAzureMonitorTargetEnabled(true) - .withState(BlobAuditingPolicyState.ENABLED), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesGetSamples.java deleted file mode 100644 index 91efb7fd8afa..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyName; - -/** - * Samples for ExtendedDatabaseBlobAuditingPolicies Get. - */ -public final class ExtendedDatabaseBlobAuditingPoliciesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ExtendedDatabaseBlobAuditingGet.json - */ - /** - * Sample code: Get an extended database's blob auditing policy. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAnExtendedDatabaseSBlobAuditingPolicy(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getExtendedDatabaseBlobAuditingPolicies() - .getWithResponse("blobauditingtest-6852", "blobauditingtest-2080", "testdb", BlobAuditingPolicyName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesListByDatabaseSamples.java deleted file mode 100644 index 9dac1f058ae1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedDatabaseBlobAuditingPoliciesListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ExtendedDatabaseBlobAuditingPolicies ListByDatabase. - */ -public final class ExtendedDatabaseBlobAuditingPoliciesListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseExtendedAuditingSettingsList.json - */ - /** - * Sample code: List extended auditing settings of a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listExtendedAuditingSettingsOfADatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getExtendedDatabaseBlobAuditingPolicies() - .listByDatabase("blobauditingtest-6852", "blobauditingtest-2080", "testdb", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 2ea80256854c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ExtendedServerBlobAuditingPolicyInner; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyName; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; -import java.util.Arrays; -import java.util.UUID; - -/** - * Samples for ExtendedServerBlobAuditingPolicies CreateOrUpdate. - */ -public final class ExtendedServerBlobAuditingPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ExtendedServerBlobAuditingCreateMin.json - */ - /** - * Sample code: Update a server's extended blob auditing policy with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAServerSExtendedBlobAuditingPolicyWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getExtendedServerBlobAuditingPolicies() - .createOrUpdate("blobauditingtest-4799", "blobauditingtest-6440", BlobAuditingPolicyName.DEFAULT, - new ExtendedServerBlobAuditingPolicyInner().withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ExtendedServerBlobAuditingCreateMax.json - */ - /** - * Sample code: Update a server's extended blob auditing policy with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAServerSExtendedBlobAuditingPolicyWithAllParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getExtendedServerBlobAuditingPolicies() - .createOrUpdate("blobauditingtest-4799", "blobauditingtest-6440", BlobAuditingPolicyName.DEFAULT, - new ExtendedServerBlobAuditingPolicyInner().withPredicateExpression("object_name = 'SensitiveData'") - .withRetentionDays(6) - .withAuditActionsAndGroups(Arrays.asList("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP")) - .withIsStorageSecondaryKeyInUse(false) - .withIsAzureMonitorTargetEnabled(true) - .withQueueDelayMs(4000) - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey("fakeTokenPlaceholder") - .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesGetSamples.java deleted file mode 100644 index d6df42e97bd1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyName; - -/** - * Samples for ExtendedServerBlobAuditingPolicies Get. - */ -public final class ExtendedServerBlobAuditingPoliciesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ExtendedServerBlobAuditingGet.json - */ - /** - * Sample code: Get a server's blob extended auditing policy. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAServerSBlobExtendedAuditingPolicy(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getExtendedServerBlobAuditingPolicies() - .getWithResponse("blobauditingtest-4799", "blobauditingtest-6440", BlobAuditingPolicyName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesListByServerSamples.java deleted file mode 100644 index ee91804ea8e9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ExtendedServerBlobAuditingPoliciesListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ExtendedServerBlobAuditingPolicies ListByServer. - */ -public final class ExtendedServerBlobAuditingPoliciesListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerExtendedAuditingSettingsList.json - */ - /** - * Sample code: List extended auditing settings of a server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listExtendedAuditingSettingsOfAServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getExtendedServerBlobAuditingPolicies() - .listByServer("blobauditingtest-4799", "blobauditingtest-6440", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsCreateOrUpdateSamples.java deleted file mode 100644 index 45c682b77500..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsCreateOrUpdateSamples.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.FailoverGroupInner; -import com.azure.resourcemanager.sql.models.FailoverGroupDatabasesSecondaryType; -import com.azure.resourcemanager.sql.models.FailoverGroupReadOnlyEndpoint; -import com.azure.resourcemanager.sql.models.FailoverGroupReadWriteEndpoint; -import com.azure.resourcemanager.sql.models.PartnerInfo; -import com.azure.resourcemanager.sql.models.ReadOnlyEndpointFailoverPolicy; -import com.azure.resourcemanager.sql.models.ReadWriteEndpointFailoverPolicy; -import java.util.Arrays; - -/** - * Samples for FailoverGroups CreateOrUpdate. - */ -public final class FailoverGroupsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/FailoverGroupCreateOrUpdateStandbySecondary.json - */ - /** - * Sample code: Create failover group with standby secondary database on partner server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createFailoverGroupWithStandbySecondaryDatabaseOnPartnerServer( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getFailoverGroups() - .createOrUpdate("Default", "failover-group-primary-server", "failover-group-test-3", - new FailoverGroupInner() - .withReadWriteEndpoint(new FailoverGroupReadWriteEndpoint() - .withFailoverPolicy(ReadWriteEndpointFailoverPolicy.AUTOMATIC) - .withFailoverWithDataLossGracePeriodMinutes(480)) - .withReadOnlyEndpoint( - new FailoverGroupReadOnlyEndpoint().withFailoverPolicy(ReadOnlyEndpointFailoverPolicy.DISABLED)) - .withPartnerServers(Arrays.asList(new PartnerInfo().withId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"))) - .withDatabases(Arrays.asList( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1", - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2")) - .withSecondaryType(FailoverGroupDatabasesSecondaryType.STANDBY), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/FailoverGroupCreateOrUpdate.json - */ - /** - * Sample code: Create failover group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createFailoverGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getFailoverGroups() - .createOrUpdate("Default", "failover-group-primary-server", "failover-group-test-3", - new FailoverGroupInner() - .withReadWriteEndpoint(new FailoverGroupReadWriteEndpoint() - .withFailoverPolicy(ReadWriteEndpointFailoverPolicy.AUTOMATIC) - .withFailoverWithDataLossGracePeriodMinutes(480)) - .withReadOnlyEndpoint( - new FailoverGroupReadOnlyEndpoint().withFailoverPolicy(ReadOnlyEndpointFailoverPolicy.DISABLED)) - .withPartnerServers(Arrays.asList(new PartnerInfo().withId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"))) - .withDatabases(Arrays.asList( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1", - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsDeleteSamples.java deleted file mode 100644 index e35316cf7d5e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for FailoverGroups Delete. - */ -public final class FailoverGroupsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/FailoverGroupDelete.json - */ - /** - * Sample code: Delete failover group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteFailoverGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getFailoverGroups() - .delete("Default", "failover-group-primary-server", "failover-group-test-1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsFailoverSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsFailoverSamples.java deleted file mode 100644 index 757700af74ad..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsFailoverSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for FailoverGroups Failover. - */ -public final class FailoverGroupsFailoverSamples { - /* - * x-ms-original-file: 2025-02-01-preview/FailoverGroupFailover.json - */ - /** - * Sample code: Planned failover of a failover group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void plannedFailoverOfAFailoverGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getFailoverGroups() - .failover("Default", "failover-group-secondary-server", "failover-group-test-3", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsForceFailoverAllowDataLossSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsForceFailoverAllowDataLossSamples.java deleted file mode 100644 index 8fa252911661..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsForceFailoverAllowDataLossSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for FailoverGroups ForceFailoverAllowDataLoss. - */ -public final class FailoverGroupsForceFailoverAllowDataLossSamples { - /* - * x-ms-original-file: 2025-02-01-preview/FailoverGroupForceFailoverAllowDataLoss.json - */ - /** - * Sample code: Forced failover of a failover group allowing data loss. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - forcedFailoverOfAFailoverGroupAllowingDataLoss(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getFailoverGroups() - .forceFailoverAllowDataLoss("Default", "failover-group-secondary-server", "failover-group-test-3", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsGetSamples.java deleted file mode 100644 index 848d0233e291..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for FailoverGroups Get. - */ -public final class FailoverGroupsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/FailoverGroupGet.json - */ - /** - * Sample code: Get failover group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getFailoverGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getFailoverGroups() - .getWithResponse("Default", "failovergroupprimaryserver", "failovergrouptest3", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsListByServerSamples.java deleted file mode 100644 index 7b76a8a6ff75..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for FailoverGroups ListByServer. - */ -public final class FailoverGroupsListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/FailoverGroupList.json - */ - /** - * Sample code: List failover group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listFailoverGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getFailoverGroups() - .listByServer("Default", "failover-group-primary-server", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsTryPlannedBeforeForcedFailoverSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsTryPlannedBeforeForcedFailoverSamples.java deleted file mode 100644 index 063294a2659d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsTryPlannedBeforeForcedFailoverSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for FailoverGroups TryPlannedBeforeForcedFailover. - */ -public final class FailoverGroupsTryPlannedBeforeForcedFailoverSamples { - /* - * x-ms-original-file: 2025-02-01-preview/FailoverGroupTryPlannedBeforeForcedFailover.json - */ - /** - * Sample code: Try planned before forced failover of a failover group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - tryPlannedBeforeForcedFailoverOfAFailoverGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getFailoverGroups() - .tryPlannedBeforeForcedFailover("Default", "failovergroupsecondaryserver", "failovergrouptest3", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsUpdateSamples.java deleted file mode 100644 index 4af24c572a95..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FailoverGroupsUpdateSamples.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.FailoverGroupDatabasesSecondaryType; -import com.azure.resourcemanager.sql.models.FailoverGroupReadWriteEndpoint; -import com.azure.resourcemanager.sql.models.FailoverGroupUpdate; -import com.azure.resourcemanager.sql.models.ReadWriteEndpointFailoverPolicy; -import java.util.Arrays; - -/** - * Samples for FailoverGroups Update. - */ -public final class FailoverGroupsUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/FailoverGroupUpdateStandbySecondary.json - */ - /** - * Sample code: Add database to failover group with standby secondary on partner server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void addDatabaseToFailoverGroupWithStandbySecondaryOnPartnerServer( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getFailoverGroups() - .update("Default", "failover-group-primary-server", "failover-group-test-1", new FailoverGroupUpdate() - .withReadWriteEndpoint( - new FailoverGroupReadWriteEndpoint().withFailoverPolicy(ReadWriteEndpointFailoverPolicy.AUTOMATIC) - .withFailoverWithDataLossGracePeriodMinutes(120)) - .withDatabases(Arrays.asList( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1")) - .withSecondaryType(FailoverGroupDatabasesSecondaryType.STANDBY), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/FailoverGroupUpdate.json - */ - /** - * Sample code: Update failover group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateFailoverGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getFailoverGroups() - .update("Default", "failover-group-primary-server", "failover-group-test-1", new FailoverGroupUpdate() - .withReadWriteEndpoint( - new FailoverGroupReadWriteEndpoint().withFailoverPolicy(ReadWriteEndpointFailoverPolicy.AUTOMATIC) - .withFailoverWithDataLossGracePeriodMinutes(120)) - .withDatabases(Arrays.asList( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesCreateOrUpdateSamples.java deleted file mode 100644 index 9aae2de061bd..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesCreateOrUpdateSamples.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.FirewallRuleInner; - -/** - * Samples for FirewallRules CreateOrUpdate. - */ -public final class FirewallRulesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/FirewallRuleCreate.json - */ - /** - * Sample code: Create a firewall rule max/min. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createAFirewallRuleMaxMin(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getFirewallRules() - .createOrUpdateWithResponse("firewallrulecrudtest-12", "firewallrulecrudtest-6285", - "firewallrulecrudtest-5370", - new FirewallRuleInner().withStartIpAddress("0.0.0.3").withEndIpAddress("0.0.0.3"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/FirewallRuleUpdate.json - */ - /** - * Sample code: Update a firewall rule max/min. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAFirewallRuleMaxMin(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getFirewallRules() - .createOrUpdateWithResponse("firewallrulecrudtest-12", "firewallrulecrudtest-6285", - "firewallrulecrudtest-3927", - new FirewallRuleInner().withStartIpAddress("0.0.0.1").withEndIpAddress("0.0.0.1"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesDeleteSamples.java deleted file mode 100644 index ee46baa82c19..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for FirewallRules Delete. - */ -public final class FirewallRulesDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/FirewallRuleDelete.json - */ - /** - * Sample code: Delete a firewall rule. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteAFirewallRule(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getFirewallRules() - .deleteWithResponse("firewallrulecrudtest-9886", "firewallrulecrudtest-2368", "firewallrulecrudtest-7011", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesGetSamples.java deleted file mode 100644 index 656fc4df68b9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for FirewallRules Get. - */ -public final class FirewallRulesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/FirewallRuleGet.json - */ - /** - * Sample code: Get Firewall Rule. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getFirewallRule(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getFirewallRules() - .getWithResponse("firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-2304", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesListByServerSamples.java deleted file mode 100644 index 6f7d6c8e7369..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for FirewallRules ListByServer. - */ -public final class FirewallRulesListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/FirewallRuleList.json - */ - /** - * Sample code: List Firewall Rules. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listFirewallRules(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getFirewallRules() - .listByServer("firewallrulecrudtest-12", "firewallrulecrudtest-6285", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesReplaceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesReplaceSamples.java deleted file mode 100644 index c0a706196b78..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/FirewallRulesReplaceSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.FirewallRuleInner; -import com.azure.resourcemanager.sql.models.FirewallRuleList; -import java.util.Arrays; - -/** - * Samples for FirewallRules Replace. - */ -public final class FirewallRulesReplaceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/FirewallRuleReplace.json - */ - /** - * Sample code: Replace firewall rules. - * - * @param manager Entry point to SqlServerManager. - */ - public static void replaceFirewallRules(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getFirewallRules() - .replaceWithResponse("firewallrulecrudtest-12", "firewallrulecrudtest-6285", - new FirewallRuleList() - .withValues(Arrays.asList(new FirewallRuleInner().withName("firewallrulecrudtest-5370 ") - .withStartIpAddress("0.0.0.0") - .withEndIpAddress("100.0.0.0"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index d998ea0d398b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.GeoBackupPolicyInner; -import com.azure.resourcemanager.sql.models.GeoBackupPolicyName; -import com.azure.resourcemanager.sql.models.GeoBackupPolicyState; - -/** - * Samples for GeoBackupPolicies CreateOrUpdate. - */ -public final class GeoBackupPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GeoBackupPoliciesCreateOrUpdate.json - */ - /** - * Sample code: Create or update a database default Geo backup policy. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createOrUpdateADatabaseDefaultGeoBackupPolicy(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getGeoBackupPolicies() - .createOrUpdateWithResponse("sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", GeoBackupPolicyName.DEFAULT, - new GeoBackupPolicyInner().withState(GeoBackupPolicyState.ENABLED), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesGetSamples.java deleted file mode 100644 index fb9944f9be57..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.GeoBackupPolicyName; - -/** - * Samples for GeoBackupPolicies Get. - */ -public final class GeoBackupPoliciesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GeoBackupPoliciesGet.json - */ - /** - * Sample code: Gets the specified Geo backup policy. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheSpecifiedGeoBackupPolicy(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getGeoBackupPolicies() - .getWithResponse("sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", GeoBackupPolicyName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesListSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesListSamples.java deleted file mode 100644 index 7585192eed7a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/GeoBackupPoliciesListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for GeoBackupPolicies List. - */ -public final class GeoBackupPoliciesListSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GeoBackupPoliciesList.json - */ - /** - * Sample code: List Geo backup policies for the given database resource. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listGeoBackupPoliciesForTheGivenDatabaseResource(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getGeoBackupPolicies() - .list("sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesCreateOrUpdateSamples.java deleted file mode 100644 index d506048a450f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesCreateOrUpdateSamples.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.IPv6FirewallRuleInner; - -/** - * Samples for IPv6FirewallRules CreateOrUpdate. - */ -public final class IPv6FirewallRulesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/IPv6FirewallRuleUpdate.json - */ - /** - * Sample code: Update an IPv6 firewall rule max/min. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAnIPv6FirewallRuleMaxMin(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getIPv6FirewallRules() - .createOrUpdateWithResponse("firewallrulecrudtest-12", "firewallrulecrudtest-6285", - "firewallrulecrudtest-3927", - new IPv6FirewallRuleInner().withStartIPv6Address("0000:0000:0000:0000:0000:ffff:0000:0001") - .withEndIPv6Address("0000:0000:0000:0000:0000:ffff:0000:0001"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/IPv6FirewallRuleCreate.json - */ - /** - * Sample code: Create an IPv6 firewall rule max/min. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createAnIPv6FirewallRuleMaxMin(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getIPv6FirewallRules() - .createOrUpdateWithResponse("firewallrulecrudtest-12", "firewallrulecrudtest-6285", - "firewallrulecrudtest-5370", - new IPv6FirewallRuleInner().withStartIPv6Address("0000:0000:0000:0000:0000:ffff:0000:0003") - .withEndIPv6Address("0000:0000:0000:0000:0000:ffff:0000:0003"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesDeleteSamples.java deleted file mode 100644 index a472ca3571cc..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for IPv6FirewallRules Delete. - */ -public final class IPv6FirewallRulesDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/IPv6FirewallRuleDelete.json - */ - /** - * Sample code: Delete an IPv6 firewall rule. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteAnIPv6FirewallRule(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getIPv6FirewallRules() - .deleteWithResponse("firewallrulecrudtest-9886", "firewallrulecrudtest-2368", "firewallrulecrudtest-7011", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesGetSamples.java deleted file mode 100644 index 8aed9f0207e1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for IPv6FirewallRules Get. - */ -public final class IPv6FirewallRulesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/IPv6FirewallRuleGet.json - */ - /** - * Sample code: Get IPv6 Firewall Rule. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getIPv6FirewallRule(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getIPv6FirewallRules() - .getWithResponse("firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-2304", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesListByServerSamples.java deleted file mode 100644 index 9e4f2ad9109e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/IPv6FirewallRulesListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for IPv6FirewallRules ListByServer. - */ -public final class IPv6FirewallRulesListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/IPv6FirewallRuleList.json - */ - /** - * Sample code: List IPv6 Firewall Rules. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listIPv6FirewallRules(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getIPv6FirewallRules() - .listByServer("firewallrulecrudtest-12", "firewallrulecrudtest-6285", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsCreateOrUpdateSamples.java deleted file mode 100644 index 6ea572a55e10..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsCreateOrUpdateSamples.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.InstanceFailoverGroupInner; -import com.azure.resourcemanager.sql.models.InstanceFailoverGroupReadOnlyEndpoint; -import com.azure.resourcemanager.sql.models.InstanceFailoverGroupReadWriteEndpoint; -import com.azure.resourcemanager.sql.models.ManagedInstancePairInfo; -import com.azure.resourcemanager.sql.models.PartnerRegionInfo; -import com.azure.resourcemanager.sql.models.ReadOnlyEndpointFailoverPolicy; -import com.azure.resourcemanager.sql.models.ReadWriteEndpointFailoverPolicy; -import com.azure.resourcemanager.sql.models.SecondaryInstanceType; -import java.util.Arrays; - -/** - * Samples for InstanceFailoverGroups CreateOrUpdate. - */ -public final class InstanceFailoverGroupsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/InstanceFailoverGroupCreateOrUpdate.json - */ - /** - * Sample code: Create failover group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createFailoverGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getInstanceFailoverGroups() - .createOrUpdate("Default", "Japan East", "failover-group-test-3", new InstanceFailoverGroupInner() - .withSecondaryType(SecondaryInstanceType.GEO) - .withReadWriteEndpoint(new InstanceFailoverGroupReadWriteEndpoint() - .withFailoverPolicy(ReadWriteEndpointFailoverPolicy.AUTOMATIC) - .withFailoverWithDataLossGracePeriodMinutes(480)) - .withReadOnlyEndpoint(new InstanceFailoverGroupReadOnlyEndpoint() - .withFailoverPolicy(ReadOnlyEndpointFailoverPolicy.DISABLED)) - .withPartnerRegions(Arrays.asList(new PartnerRegionInfo().withLocation("Japan West"))) - .withManagedInstancePairs(Arrays.asList(new ManagedInstancePairInfo().withPrimaryManagedInstanceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance") - .withPartnerManagedInstanceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsDeleteSamples.java deleted file mode 100644 index 3d5ee963d6f9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for InstanceFailoverGroups Delete. - */ -public final class InstanceFailoverGroupsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/InstanceFailoverGroupDelete.json - */ - /** - * Sample code: Delete failover group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteFailoverGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getInstanceFailoverGroups() - .delete("Default", "Japan East", "failover-group-test-1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsFailoverSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsFailoverSamples.java deleted file mode 100644 index 369ee39073e0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsFailoverSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for InstanceFailoverGroups Failover. - */ -public final class InstanceFailoverGroupsFailoverSamples { - /* - * x-ms-original-file: 2025-02-01-preview/InstanceFailoverGroupFailover.json - */ - /** - * Sample code: Planned failover of a failover group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void plannedFailoverOfAFailoverGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getInstanceFailoverGroups() - .failover("Default", "Japan West", "failover-group-test-3", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsForceFailoverAllowDataLossSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsForceFailoverAllowDataLossSamples.java deleted file mode 100644 index b636bcb36609..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsForceFailoverAllowDataLossSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for InstanceFailoverGroups ForceFailoverAllowDataLoss. - */ -public final class InstanceFailoverGroupsForceFailoverAllowDataLossSamples { - /* - * x-ms-original-file: 2025-02-01-preview/InstanceFailoverGroupForceFailoverAllowDataLoss.json - */ - /** - * Sample code: Forced failover of a failover group allowing data loss. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - forcedFailoverOfAFailoverGroupAllowingDataLoss(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getInstanceFailoverGroups() - .forceFailoverAllowDataLoss("Default", "Japan West", "failover-group-test-3", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsGetSamples.java deleted file mode 100644 index f5599dbc44ec..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for InstanceFailoverGroups Get. - */ -public final class InstanceFailoverGroupsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/InstanceFailoverGroupGet.json - */ - /** - * Sample code: Get failover group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getFailoverGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getInstanceFailoverGroups() - .getWithResponse("Default", "Japan East", "failover-group-test", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsListByLocationSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsListByLocationSamples.java deleted file mode 100644 index 4e4657b0c375..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstanceFailoverGroupsListByLocationSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for InstanceFailoverGroups ListByLocation. - */ -public final class InstanceFailoverGroupsListByLocationSamples { - /* - * x-ms-original-file: 2025-02-01-preview/InstanceFailoverGroupList.json - */ - /** - * Sample code: List failover group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listFailoverGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getInstanceFailoverGroups() - .listByLocation("Default", "Japan East", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolOperationsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolOperationsGetSamples.java deleted file mode 100644 index 6bc83c90b6eb..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolOperationsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for InstancePoolOperations Get. - */ -public final class InstancePoolOperationsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetInstancePoolOperation.json - */ - /** - * Sample code: Gets the instance pool management operation. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheInstancePoolManagementOperation(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getInstancePoolOperations() - .getWithResponse("resource-group", "test-instance-pool", "c218773b-203f-4c7a-b174-6bd71fe20f72", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolOperationsListByInstancePoolSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolOperationsListByInstancePoolSamples.java deleted file mode 100644 index a804bd3f9540..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolOperationsListByInstancePoolSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for InstancePoolOperations ListByInstancePool. - */ -public final class InstancePoolOperationsListByInstancePoolSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListInstancePoolOperations.json - */ - /** - * Sample code: List the instance pool management operations with some results. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listTheInstancePoolManagementOperationsWithSomeResults(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getInstancePoolOperations() - .listByInstancePool("resource-group", "test-instance-pool", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ListInstancePoolOperationsEmpty.json - */ - /** - * Sample code: List the instance pool management operations with no results. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listTheInstancePoolManagementOperationsWithNoResults(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getInstancePoolOperations() - .listByInstancePool("resource-group", "test-instance-pool", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsCreateOrUpdateSamples.java deleted file mode 100644 index c8f38a555887..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsCreateOrUpdateSamples.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.InstancePoolInner; -import com.azure.resourcemanager.sql.models.InstancePoolLicenseType; -import com.azure.resourcemanager.sql.models.Sku; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for InstancePools CreateOrUpdate. - */ -public final class InstancePoolsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateInstancePoolMax.json - */ - /** - * Sample code: Create an instance pool with all properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createAnInstancePoolWithAllProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getInstancePools() - .createOrUpdate("group1", "testIP", new InstancePoolInner().withLocation("japaneast") - .withTags(mapOf("a", "b")) - .withSku(new Sku().withName("GP_Gen5").withTier("GeneralPurpose").withFamily("Gen5")) - .withSubnetId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1") - .withVCores(8) - .withLicenseType(InstancePoolLicenseType.LICENSE_INCLUDED) - .withMaintenanceConfigurationId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateInstancePoolMin.json - */ - /** - * Sample code: Create an instance pool with min properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createAnInstancePoolWithMinProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getInstancePools() - .createOrUpdate("group1", "testIP", new InstancePoolInner().withLocation("japaneast") - .withSku(new Sku().withName("GP_Gen5").withTier("GeneralPurpose").withFamily("Gen5")) - .withSubnetId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1") - .withVCores(8) - .withLicenseType(InstancePoolLicenseType.LICENSE_INCLUDED), 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsDeleteSamples.java deleted file mode 100644 index 460a95e1720d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for InstancePools Delete. - */ -public final class InstancePoolsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DeleteInstancePool.json - */ - /** - * Sample code: Delete an instance pool. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteAnInstancePool(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getInstancePools().delete("group1", "testIP", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsGetByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsGetByResourceGroupSamples.java deleted file mode 100644 index f1b6b5dfd4ee..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsGetByResourceGroupSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for InstancePools GetByResourceGroup. - */ -public final class InstancePoolsGetByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetInstancePool.json - */ - /** - * Sample code: Get an instance pool. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAnInstancePool(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getInstancePools() - .getByResourceGroupWithResponse("group1", "testIP", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsListByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsListByResourceGroupSamples.java deleted file mode 100644 index cb443cdfd180..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsListByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for InstancePools ListByResourceGroup. - */ -public final class InstancePoolsListByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListInstancePoolsByResourceGroup.json - */ - /** - * Sample code: List instance pools by resource group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listInstancePoolsByResourceGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getInstancePools().listByResourceGroup("group1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsListSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsListSamples.java deleted file mode 100644 index 98560573b2c6..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for InstancePools List. - */ -public final class InstancePoolsListSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListInstancePoolsBySubscriptionId.json - */ - /** - * Sample code: List instance pools in the subscription. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listInstancePoolsInTheSubscription(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getInstancePools().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsUpdateSamples.java deleted file mode 100644 index 715b5f374754..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/InstancePoolsUpdateSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.InstancePoolUpdate; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for InstancePools Update. - */ -public final class InstancePoolsUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/PatchInstancePool.json - */ - /** - * Sample code: Patch an instance pool. - * - * @param manager Entry point to SqlServerManager. - */ - public static void patchAnInstancePool(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getInstancePools() - .update("group1", "testIP", new InstancePoolUpdate().withTags(mapOf("x", "y")), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsCreateOrUpdateSamples.java deleted file mode 100644 index 372526bbdc82..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.JobAgentInner; -import com.azure.resourcemanager.sql.models.JobAgentIdentity; -import com.azure.resourcemanager.sql.models.JobAgentIdentityType; -import com.azure.resourcemanager.sql.models.JobAgentUserAssignedIdentity; -import com.azure.resourcemanager.sql.models.Sku; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for JobAgents CreateOrUpdate. - */ -public final class JobAgentsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateJobAgentWithIdentity.json - */ - /** - * Sample code: Create or update a job agent with identity. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateAJobAgentWithIdentity(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobAgents() - .createOrUpdate("group1", "server1", "agent1", new JobAgentInner().withLocation("southeastasia") - .withIdentity(new JobAgentIdentity().withType(JobAgentIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi", - new JobAgentUserAssignedIdentity()))) - .withDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateJobAgentWithSku.json - */ - /** - * Sample code: Create or update a job agent with sku. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateAJobAgentWithSku(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobAgents() - .createOrUpdate("group1", "server1", "agent1", new JobAgentInner().withLocation("southeastasia") - .withSku(new Sku().withName("JA400")) - .withDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateJobAgent.json - */ - /** - * Sample code: Create or update a job agent. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateAJobAgent(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobAgents() - .createOrUpdate("group1", "server1", "agent1", new JobAgentInner().withLocation("southeastasia") - .withDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsDeleteSamples.java deleted file mode 100644 index 4bb6b44003d1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobAgents Delete. - */ -public final class JobAgentsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DeleteJobAgent.json - */ - /** - * Sample code: Delete a job agent. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteAJobAgent(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getJobAgents().delete("group1", "server1", "agent1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsGetSamples.java deleted file mode 100644 index 33de582f30c0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobAgents Get. - */ -public final class JobAgentsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetJobAgent.json - */ - /** - * Sample code: Get a job agent. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAJobAgent(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobAgents() - .getWithResponse("group1", "server1", "agent1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsListByServerSamples.java deleted file mode 100644 index a1d2ad36e209..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsListByServerSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobAgents ListByServer. - */ -public final class JobAgentsListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListJobAgentsByServer.json - */ - /** - * Sample code: List job agents in a server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listJobAgentsInAServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getJobAgents().listByServer("group1", "server1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsUpdateSamples.java deleted file mode 100644 index 359a5d102a4d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobAgentsUpdateSamples.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.JobAgentIdentity; -import com.azure.resourcemanager.sql.models.JobAgentIdentityType; -import com.azure.resourcemanager.sql.models.JobAgentUpdate; -import com.azure.resourcemanager.sql.models.JobAgentUserAssignedIdentity; -import com.azure.resourcemanager.sql.models.Sku; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for JobAgents Update. - */ -public final class JobAgentsUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/UpdateJobAgent.json - */ - /** - * Sample code: Update a job agent's tags. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAJobAgentSTags(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobAgents() - .update("group1", "server1", "agent1", new JobAgentUpdate().withTags(mapOf("mytag1", "myvalue1")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/UpdateJobAgentWithSku.json - */ - /** - * Sample code: Update a job agent's sku. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAJobAgentSSku(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobAgents() - .update("group1", "server1", "agent1", new JobAgentUpdate().withSku(new Sku().withName("JA200")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/UpdateJobAgentWithIdentity.json - */ - /** - * Sample code: Update a job agent's identity. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAJobAgentSIdentity(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobAgents() - .update("group1", "server1", "agent1", new JobAgentUpdate().withIdentity(new JobAgentIdentity() - .withType(JobAgentIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi", - new JobAgentUserAssignedIdentity()))), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsCreateOrUpdateSamples.java deleted file mode 100644 index a06d7b33231d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsCreateOrUpdateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.JobCredentialInner; - -/** - * Samples for JobCredentials CreateOrUpdate. - */ -public final class JobCredentialsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateJobCredential.json - */ - /** - * Sample code: Create or update a credential. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateACredential(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobCredentials() - .createOrUpdateWithResponse("group1", "server1", "agent1", "cred1", - new JobCredentialInner().withUsername("myuser").withPassword("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsDeleteSamples.java deleted file mode 100644 index 7b30023ed039..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobCredentials Delete. - */ -public final class JobCredentialsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DeleteJobCredential.json - */ - /** - * Sample code: Delete a credential. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteACredential(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobCredentials() - .deleteWithResponse("group1", "server1", "agent1", "cred1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsGetSamples.java deleted file mode 100644 index 08e459129774..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobCredentials Get. - */ -public final class JobCredentialsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetJobCredential.json - */ - /** - * Sample code: Get a credential. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getACredential(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobCredentials() - .getWithResponse("group1", "server1", "agent1", "cred1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsListByAgentSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsListByAgentSamples.java deleted file mode 100644 index 54e117ae610e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobCredentialsListByAgentSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobCredentials ListByAgent. - */ -public final class JobCredentialsListByAgentSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListJobCredentialsByAgent.json - */ - /** - * Sample code: List credentials in a job agent. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listCredentialsInAJobAgent(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobCredentials() - .listByAgent("group1", "server1", "agent1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCancelSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCancelSamples.java deleted file mode 100644 index 7e36e4368f1a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCancelSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import java.util.UUID; - -/** - * Samples for JobExecutions Cancel. - */ -public final class JobExecutionsCancelSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CancelJobExecution.json - */ - /** - * Sample code: Cancel a job execution. - * - * @param manager Entry point to SqlServerManager. - */ - public static void cancelAJobExecution(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobExecutions() - .cancelWithResponse("group1", "server1", "agent1", "job1", - UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCreateOrUpdateSamples.java deleted file mode 100644 index bd926a6e24ab..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import java.util.UUID; - -/** - * Samples for JobExecutions CreateOrUpdate. - */ -public final class JobExecutionsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateJobExecution.json - */ - /** - * Sample code: Create job execution. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createJobExecution(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobExecutions() - .createOrUpdate("group1", "server1", "agent1", "job1", - UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCreateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCreateSamples.java deleted file mode 100644 index 9ef9702380a6..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsCreateSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobExecutions Create. - */ -public final class JobExecutionsCreateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateJobExecution.json - */ - /** - * Sample code: Start a job execution. - * - * @param manager Entry point to SqlServerManager. - */ - public static void startAJobExecution(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobExecutions() - .create("group1", "server1", "agent1", "job1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsGetSamples.java deleted file mode 100644 index f07bd094892b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import java.util.UUID; - -/** - * Samples for JobExecutions Get. - */ -public final class JobExecutionsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetJobExecution.json - */ - /** - * Sample code: Get a job execution. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAJobExecution(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobExecutions() - .getWithResponse("group1", "server1", "agent1", "job1", - UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsListByAgentSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsListByAgentSamples.java deleted file mode 100644 index 463a277e1856..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsListByAgentSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import java.time.OffsetDateTime; - -/** - * Samples for JobExecutions ListByAgent. - */ -public final class JobExecutionsListByAgentSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListJobExecutionsByAgent.json - */ - /** - * Sample code: List all job executions in a job agent. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listAllJobExecutionsInAJobAgent(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobExecutions() - .listByAgent("group1", "server1", "agent1", null, null, null, null, null, null, null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ListJobExecutionsByAgentWithFilter.json - */ - /** - * Sample code: List all job executions in a job agent with filtering. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listAllJobExecutionsInAJobAgentWithFiltering(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobExecutions() - .listByAgent("group1", "server1", "agent1", OffsetDateTime.parse("2017-03-21T19:00:00Z"), - OffsetDateTime.parse("2017-03-21T19:05:00Z"), OffsetDateTime.parse("2017-03-21T19:20:00Z"), - OffsetDateTime.parse("2017-03-21T19:25:00Z"), false, null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsListByJobSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsListByJobSamples.java deleted file mode 100644 index a97d23a5344a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobExecutionsListByJobSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobExecutions ListByJob. - */ -public final class JobExecutionsListByJobSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListJobExecutionsByJob.json - */ - /** - * Sample code: List a job's executions. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listAJobSExecutions(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobExecutions() - .listByJob("group1", "server1", "agent1", "job1", null, null, null, null, null, null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobPrivateEndpointsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobPrivateEndpointsCreateOrUpdateSamples.java deleted file mode 100644 index 53a6c8e41e4c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobPrivateEndpointsCreateOrUpdateSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.JobPrivateEndpointInner; - -/** - * Samples for JobPrivateEndpoints CreateOrUpdate. - */ -public final class JobPrivateEndpointsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateJobPrivateEndpoint.json - */ - /** - * Sample code: Create a private endpoint. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createAPrivateEndpoint(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobPrivateEndpoints() - .createOrUpdate("group1", "server1", "agent1", "endpoint1", - new JobPrivateEndpointInner().withTargetServerAzureResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver1"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobPrivateEndpointsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobPrivateEndpointsDeleteSamples.java deleted file mode 100644 index 7443c124e4fe..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobPrivateEndpointsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobPrivateEndpoints Delete. - */ -public final class JobPrivateEndpointsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DeleteJobPrivateEndpoint.json - */ - /** - * Sample code: Delete a private endpoint. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteAPrivateEndpoint(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobPrivateEndpoints() - .delete("group1", "server1", "agent1", "endpoint1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobPrivateEndpointsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobPrivateEndpointsGetSamples.java deleted file mode 100644 index 4ad1aac279c5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobPrivateEndpointsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobPrivateEndpoints Get. - */ -public final class JobPrivateEndpointsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetJobPrivateEndpoint.json - */ - /** - * Sample code: Get a private endpoint. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAPrivateEndpoint(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobPrivateEndpoints() - .getWithResponse("group1", "server1", "agent1", "endpoint1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobPrivateEndpointsListByAgentSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobPrivateEndpointsListByAgentSamples.java deleted file mode 100644 index fecd2c94f9e3..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobPrivateEndpointsListByAgentSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobPrivateEndpoints ListByAgent. - */ -public final class JobPrivateEndpointsListByAgentSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListJobPrivateEndpointsByAgent.json - */ - /** - * Sample code: List private endpoints in a job agent. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listPrivateEndpointsInAJobAgent(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobPrivateEndpoints() - .listByAgent("group1", "server1", "agent1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepExecutionsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepExecutionsGetSamples.java deleted file mode 100644 index 91ea0204492b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepExecutionsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import java.util.UUID; - -/** - * Samples for JobStepExecutions Get. - */ -public final class JobStepExecutionsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetJobExecutionStep.json - */ - /** - * Sample code: Get a job step execution. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAJobStepExecution(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobStepExecutions() - .getWithResponse("group1", "server1", "agent1", "job1", - UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), "step1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepExecutionsListByJobExecutionSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepExecutionsListByJobExecutionSamples.java deleted file mode 100644 index 92296712c9e6..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepExecutionsListByJobExecutionSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import java.util.UUID; - -/** - * Samples for JobStepExecutions ListByJobExecution. - */ -public final class JobStepExecutionsListByJobExecutionSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListJobExecutionSteps.json - */ - /** - * Sample code: List job step executions. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listJobStepExecutions(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobStepExecutions() - .listByJobExecution("group1", "server1", "agent1", "job1", - UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), null, null, null, null, null, null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsCreateOrUpdateSamples.java deleted file mode 100644 index 8f921957e509..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsCreateOrUpdateSamples.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.JobStepInner; -import com.azure.resourcemanager.sql.models.JobStepAction; -import com.azure.resourcemanager.sql.models.JobStepActionSource; -import com.azure.resourcemanager.sql.models.JobStepActionType; -import com.azure.resourcemanager.sql.models.JobStepExecutionOptions; -import com.azure.resourcemanager.sql.models.JobStepOutput; -import com.azure.resourcemanager.sql.models.JobStepOutputType; -import java.util.UUID; - -/** - * Samples for JobSteps CreateOrUpdate. - */ -public final class JobStepsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateJobStepMin.json - */ - /** - * Sample code: Create or update a job step with minimal properties specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createOrUpdateAJobStepWithMinimalPropertiesSpecified(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobSteps() - .createOrUpdateWithResponse("group1", "server1", "agent1", "job1", "step1", - new JobStepInner().withTargetGroup( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0") - .withAction(new JobStepAction().withValue("select 1")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateJobStepMax.json - */ - /** - * Sample code: Create or update a job step with all properties specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createOrUpdateAJobStepWithAllPropertiesSpecified(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobSteps() - .createOrUpdateWithResponse("group1", "server1", "agent1", "job1", "step1", new JobStepInner().withStepId(1) - .withTargetGroup( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1") - .withCredential("fakeTokenPlaceholder") - .withAction(new JobStepAction().withType(JobStepActionType.TSQL) - .withSource(JobStepActionSource.INLINE) - .withValue("select 2")) - .withOutput(new JobStepOutput().withType(JobStepOutputType.SQL_DATABASE) - .withSubscriptionId(UUID.fromString("3501b905-a848-4b5d-96e8-b253f62d735a")) - .withResourceGroupName("group3") - .withServerName("server3") - .withDatabaseName("database3") - .withSchemaName("myschema1234") - .withTableName("mytable5678") - .withCredential("fakeTokenPlaceholder")) - .withExecutionOptions(new JobStepExecutionOptions().withTimeoutSeconds(1234) - .withRetryAttempts(42) - .withInitialRetryIntervalSeconds(11) - .withMaximumRetryIntervalSeconds(222) - .withRetryIntervalBackoffMultiplier(3.0F)), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsDeleteSamples.java deleted file mode 100644 index 405bab277c7a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobSteps Delete. - */ -public final class JobStepsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DeleteJobStep.json - */ - /** - * Sample code: Delete a job step. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteAJobStep(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobSteps() - .deleteWithResponse("group1", "server1", "agent1", "job1", "step1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsGetByVersionSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsGetByVersionSamples.java deleted file mode 100644 index 0c3de7fde637..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsGetByVersionSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobSteps GetByVersion. - */ -public final class JobStepsGetByVersionSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetJobStepByVersion.json - */ - /** - * Sample code: Get the specified version of a job step. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getTheSpecifiedVersionOfAJobStep(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobSteps() - .getByVersionWithResponse("group1", "server1", "agent1", "job1", 1, "step1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsGetSamples.java deleted file mode 100644 index ab3c7f42e39f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobSteps Get. - */ -public final class JobStepsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetJobStepByJob.json - */ - /** - * Sample code: Get the latest version of a job step. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getTheLatestVersionOfAJobStep(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobSteps() - .getWithResponse("group1", "server1", "agent1", "job1", "step1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsListByJobSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsListByJobSamples.java deleted file mode 100644 index 5f8571716c7a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsListByJobSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobSteps ListByJob. - */ -public final class JobStepsListByJobSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListJobStepsByJob.json - */ - /** - * Sample code: List job steps for the latest version of a job. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listJobStepsForTheLatestVersionOfAJob(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobSteps() - .listByJob("group1", "server1", "agent1", "job1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsListByVersionSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsListByVersionSamples.java deleted file mode 100644 index c3775c17156e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobStepsListByVersionSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobSteps ListByVersion. - */ -public final class JobStepsListByVersionSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListJobStepsByVersion.json - */ - /** - * Sample code: List job steps for the specified version of a job. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listJobStepsForTheSpecifiedVersionOfAJob(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobSteps() - .listByVersion("group1", "server1", "agent1", "job1", 1, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsGetSamples.java deleted file mode 100644 index 05330caf5d09..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import java.util.UUID; - -/** - * Samples for JobTargetExecutions Get. - */ -public final class JobTargetExecutionsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetJobExecutionTarget.json - */ - /** - * Sample code: Get a job step target execution. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAJobStepTargetExecution(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobTargetExecutions() - .getWithResponse("group1", "server1", "agent1", "job1", - UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), "step1", - UUID.fromString("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsListByJobExecutionSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsListByJobExecutionSamples.java deleted file mode 100644 index 92fb7a8e1216..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsListByJobExecutionSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import java.util.UUID; - -/** - * Samples for JobTargetExecutions ListByJobExecution. - */ -public final class JobTargetExecutionsListByJobExecutionSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListJobExecutionTargetsByExecution.json - */ - /** - * Sample code: List job step target executions. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listJobStepTargetExecutions(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobTargetExecutions() - .listByJobExecution("group1", "server1", "agent1", "job1", - UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), null, null, null, null, null, null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsListByStepSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsListByStepSamples.java deleted file mode 100644 index 8bc9961b00dd..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetExecutionsListByStepSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import java.util.UUID; - -/** - * Samples for JobTargetExecutions ListByStep. - */ -public final class JobTargetExecutionsListByStepSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListJobExecutionTargetsByStep.json - */ - /** - * Sample code: List job step target executions. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listJobStepTargetExecutions(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobTargetExecutions() - .listByStep("group1", "server1", "agent1", "job1", UUID.fromString("5A86BF65-43AC-F258-2524-9E92992F97CA"), - "step1", null, null, null, null, null, null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsCreateOrUpdateSamples.java deleted file mode 100644 index 33935dc8b4b9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsCreateOrUpdateSamples.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.JobTargetGroupInner; -import com.azure.resourcemanager.sql.models.JobTarget; -import com.azure.resourcemanager.sql.models.JobTargetGroupMembershipType; -import com.azure.resourcemanager.sql.models.JobTargetType; -import java.util.Arrays; - -/** - * Samples for JobTargetGroups CreateOrUpdate. - */ -public final class JobTargetGroupsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateJobTargetGroupMin.json - */ - /** - * Sample code: Create or update a target group with minimal properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createOrUpdateATargetGroupWithMinimalProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobTargetGroups() - .createOrUpdateWithResponse("group1", "server1", "agent1", "targetGroup1", - new JobTargetGroupInner().withMembers(Arrays.asList()), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateJobTargetGroupMax.json - */ - /** - * Sample code: Create or update a target group with all properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createOrUpdateATargetGroupWithAllProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobTargetGroups() - .createOrUpdateWithResponse("group1", "server1", "agent1", "targetGroup1", - new JobTargetGroupInner().withMembers(Arrays.asList( - new JobTarget().withMembershipType(JobTargetGroupMembershipType.EXCLUDE) - .withType(JobTargetType.SQL_DATABASE) - .withServerName("server1") - .withDatabaseName("database1"), - new JobTarget().withMembershipType(JobTargetGroupMembershipType.INCLUDE) - .withType(JobTargetType.SQL_SERVER) - .withServerName("server1") - .withRefreshCredential("fakeTokenPlaceholder"), - new JobTarget().withMembershipType(JobTargetGroupMembershipType.INCLUDE) - .withType(JobTargetType.SQL_ELASTIC_POOL) - .withServerName("server2") - .withElasticPoolName("pool1") - .withRefreshCredential("fakeTokenPlaceholder"), - new JobTarget().withMembershipType(JobTargetGroupMembershipType.INCLUDE) - .withType(JobTargetType.SQL_SHARD_MAP) - .withServerName("server3") - .withShardMapName("shardMap1") - .withRefreshCredential("fakeTokenPlaceholder"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsDeleteSamples.java deleted file mode 100644 index 3332e281e54c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobTargetGroups Delete. - */ -public final class JobTargetGroupsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DeleteJobTargetGroup.json - */ - /** - * Sample code: Delete a target group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteATargetGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobTargetGroups() - .deleteWithResponse("group1", "server1", "agent1", "targetGroup1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsGetSamples.java deleted file mode 100644 index 53b4c6b6893a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobTargetGroups Get. - */ -public final class JobTargetGroupsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetJobTargetGroup.json - */ - /** - * Sample code: Get a target group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getATargetGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobTargetGroups() - .getWithResponse("group1", "server1", "agent1", "targetGroup1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsListByAgentSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsListByAgentSamples.java deleted file mode 100644 index 907fa8190103..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobTargetGroupsListByAgentSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobTargetGroups ListByAgent. - */ -public final class JobTargetGroupsListByAgentSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListJobTargetGroups.json - */ - /** - * Sample code: Get all target groups in an agent. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAllTargetGroupsInAnAgent(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobTargetGroups() - .listByAgent("group1", "server1", "agent1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobVersionsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobVersionsGetSamples.java deleted file mode 100644 index d2733befd5ce..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobVersionsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobVersions Get. - */ -public final class JobVersionsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetJobVersion.json - */ - /** - * Sample code: Get a version of a job. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAVersionOfAJob(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobVersions() - .getWithResponse("group1", "server1", "agent1", "job1", 1, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobVersionsListByJobSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobVersionsListByJobSamples.java deleted file mode 100644 index 7a20e5ce10e1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobVersionsListByJobSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for JobVersions ListByJob. - */ -public final class JobVersionsListByJobSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListJobVersions.json - */ - /** - * Sample code: Get all versions of a job. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAllVersionsOfAJob(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobVersions() - .listByJob("group1", "server1", "agent1", "job1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobsCreateOrUpdateSamples.java deleted file mode 100644 index 3ca7d156fb54..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobsCreateOrUpdateSamples.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.JobInner; -import com.azure.resourcemanager.sql.models.JobSchedule; -import com.azure.resourcemanager.sql.models.JobScheduleType; -import java.time.OffsetDateTime; - -/** - * Samples for Jobs CreateOrUpdate. - */ -public final class JobsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateJobMin.json - */ - /** - * Sample code: Create a job with default properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createAJobWithDefaultProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobs() - .createOrUpdateWithResponse("group1", "server1", "agent1", "job1", new JobInner(), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateJobMax.json - */ - /** - * Sample code: Create a job with all properties specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createAJobWithAllPropertiesSpecified(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobs() - .createOrUpdateWithResponse("group1", "server1", "agent1", "job1", - new JobInner().withDescription("my favourite job") - .withSchedule(new JobSchedule().withStartTime(OffsetDateTime.parse("2015-09-24T18:30:01Z")) - .withEndTime(OffsetDateTime.parse("2015-09-24T23:59:59Z")) - .withType(JobScheduleType.RECURRING) - .withEnabled(true) - .withInterval("PT5M")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobsDeleteSamples.java deleted file mode 100644 index 184c48e1575b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Jobs Delete. - */ -public final class JobsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DeleteJob.json - */ - /** - * Sample code: Delete a job. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteAJob(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobs() - .deleteWithResponse("group1", "server1", "agent1", "job1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobsGetSamples.java deleted file mode 100644 index 1166ffb37c2c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Jobs Get. - */ -public final class JobsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetJob.json - */ - /** - * Sample code: Get a job. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAJob(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getJobs() - .getWithResponse("group1", "server1", "agent1", "job1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobsListByAgentSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobsListByAgentSamples.java deleted file mode 100644 index 6b6cb3ad3730..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/JobsListByAgentSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Jobs ListByAgent. - */ -public final class JobsListByAgentSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListJobsByAgent.json - */ - /** - * Sample code: List jobs in a job agent. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listJobsInAJobAgent(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getJobs().listByAgent("group1", "server1", "agent1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationCreateOrUpdateSamples.java deleted file mode 100644 index 51ca090c5a97..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationCreateOrUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.LedgerDigestUploadsInner; -import com.azure.resourcemanager.sql.models.LedgerDigestUploadsName; - -/** - * Samples for LedgerDigestUploadsOperation CreateOrUpdate. - */ -public final class LedgerDigestUploadsOperationCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/LedgerDigestUploadsEnable.json - */ - /** - * Sample code: Enables ledger digest upload configuration for a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - enablesLedgerDigestUploadConfigurationForADatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLedgerDigestUploadsOperations() - .createOrUpdate("ledgertestrg", "ledgertestserver", "testdb", LedgerDigestUploadsName.CURRENT, - new LedgerDigestUploadsInner().withDigestStorageEndpoint("https://MyAccount.blob.core.windows.net"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationDisableSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationDisableSamples.java deleted file mode 100644 index 866b4a396c58..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationDisableSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.LedgerDigestUploadsName; - -/** - * Samples for LedgerDigestUploadsOperation Disable. - */ -public final class LedgerDigestUploadsOperationDisableSamples { - /* - * x-ms-original-file: 2025-02-01-preview/LedgerDigestUploadsDisable.json - */ - /** - * Sample code: Disables uploading ledger digests for a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - disablesUploadingLedgerDigestsForADatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLedgerDigestUploadsOperations() - .disable("ledgertestrg", "ledgertestserver", "testdb", LedgerDigestUploadsName.CURRENT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationGetSamples.java deleted file mode 100644 index 58ddb27c1e8c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.LedgerDigestUploadsName; - -/** - * Samples for LedgerDigestUploadsOperation Get. - */ -public final class LedgerDigestUploadsOperationGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/LedgerDigestUploadsGet.json - */ - /** - * Sample code: Gets the current ledger digest upload configuration for a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheCurrentLedgerDigestUploadConfigurationForADatabase( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLedgerDigestUploadsOperations() - .getWithResponse("ledgertestrg", "ledgertestserver", "testdb", LedgerDigestUploadsName.CURRENT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationListByDatabaseSamples.java deleted file mode 100644 index 7708bba44056..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LedgerDigestUploadsOperationListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LedgerDigestUploadsOperation ListByDatabase. - */ -public final class LedgerDigestUploadsOperationListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/LedgerDigestUploadsList.json - */ - /** - * Sample code: Gets list of ledger digest upload settings on a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsListOfLedgerDigestUploadSettingsOnADatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLedgerDigestUploadsOperations() - .listByDatabase("ledgertestrg", "ledgertestserver", "testdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsChangeAccessTierByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsChangeAccessTierByResourceGroupSamples.java deleted file mode 100644 index 7ba0324ac897..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsChangeAccessTierByResourceGroupSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ChangeLongTermRetentionBackupAccessTierParameters; - -/** - * Samples for LongTermRetentionBackups ChangeAccessTierByResourceGroup. - */ -public final class LongTermRetentionBackupsChangeAccessTierByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ResourceGroupBasedChangeLongTermRetentionBackupAccessTier.json - */ - /** - * Sample code: Change the long term retention backup storage access tier for a resource group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void changeTheLongTermRetentionBackupStorageAccessTierForAResourceGroup( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .changeAccessTierByResourceGroup("resourceGroupName", "japaneast", "serverName", "databaseName", - "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", - new ChangeLongTermRetentionBackupAccessTierParameters().withBackupStorageAccessTier("Hot") - .withOperationMode("Copy"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsChangeAccessTierSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsChangeAccessTierSamples.java deleted file mode 100644 index ea6821d7eafb..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsChangeAccessTierSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ChangeLongTermRetentionBackupAccessTierParameters; - -/** - * Samples for LongTermRetentionBackups ChangeAccessTier. - */ -public final class LongTermRetentionBackupsChangeAccessTierSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ChangeLongTermRetentionBackupAccessTier.json - */ - /** - * Sample code: Change the long term retention backup storage access tier. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - changeTheLongTermRetentionBackupStorageAccessTier(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .changeAccessTier("japaneast", "serverName", "databaseName", - "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", - new ChangeLongTermRetentionBackupAccessTierParameters().withBackupStorageAccessTier("Hot") - .withOperationMode("Copy"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsCopyByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsCopyByResourceGroupSamples.java deleted file mode 100644 index e9f3fe73d079..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsCopyByResourceGroupSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.azure.resourcemanager.sql.models.CopyLongTermRetentionBackupParameters; - -/** - * Samples for LongTermRetentionBackups CopyByResourceGroup. - */ -public final class LongTermRetentionBackupsCopyByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ResourceGroupBasedLongTermRetentionBackupCopy.json - */ - /** - * Sample code: Copy the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void copyTheLongTermRetentionBackup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .copyByResourceGroup("testResourceGroup", "japaneast", "testserver", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000", - new CopyLongTermRetentionBackupParameters().withTargetServerResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver2") - .withTargetDatabaseName("testDatabase2") - .withTargetBackupStorageRedundancy(BackupStorageRedundancy.GEO), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsCopySamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsCopySamples.java deleted file mode 100644 index 4ac37c2e34ae..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsCopySamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.azure.resourcemanager.sql.models.CopyLongTermRetentionBackupParameters; - -/** - * Samples for LongTermRetentionBackups Copy. - */ -public final class LongTermRetentionBackupsCopySamples { - /* - * x-ms-original-file: 2025-02-01-preview/LongTermRetentionBackupCopy.json - */ - /** - * Sample code: Copy the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void copyTheLongTermRetentionBackup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .copy("japaneast", "testserver", "testDatabase", "55555555-6666-7777-8888-999999999999;131637960820000000", - new CopyLongTermRetentionBackupParameters().withTargetServerResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver2") - .withTargetDatabaseName("testDatabase2") - .withTargetBackupStorageRedundancy(BackupStorageRedundancy.GEO), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsDeleteByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsDeleteByResourceGroupSamples.java deleted file mode 100644 index 2646df17c499..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsDeleteByResourceGroupSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups DeleteByResourceGroup. - */ -public final class LongTermRetentionBackupsDeleteByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ResourceGroupBasedLongTermRetentionBackupDelete.json - */ - /** - * Sample code: Delete the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteTheLongTermRetentionBackup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .deleteByResourceGroup("testResourceGroup", "japaneast", "testserver", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsDeleteSamples.java deleted file mode 100644 index b55eec9a8a1f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups Delete. - */ -public final class LongTermRetentionBackupsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/LongTermRetentionBackupDelete.json - */ - /** - * Sample code: Delete the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteTheLongTermRetentionBackup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .delete("japaneast", "testserver", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsGetByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsGetByResourceGroupSamples.java deleted file mode 100644 index 470328f2432a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsGetByResourceGroupSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups GetByResourceGroup. - */ -public final class LongTermRetentionBackupsGetByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ResourceGroupBasedLongTermRetentionBackupGet.json - */ - /** - * Sample code: Get the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getTheLongTermRetentionBackup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .getByResourceGroupWithResponse("testResourceGroup", "japaneast", "testserver", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsGetSamples.java deleted file mode 100644 index bedded6e3dda..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups Get. - */ -public final class LongTermRetentionBackupsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/LongTermRetentionBackupGet.json - */ - /** - * Sample code: Get the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getTheLongTermRetentionBackup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .getWithResponse("japaneast", "testserver", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByDatabaseSamples.java deleted file mode 100644 index f2e3c82aa071..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups ListByDatabase. - */ -public final class LongTermRetentionBackupsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/LongTermRetentionBackupListByDatabase.json - */ - /** - * Sample code: Get all long term retention backups under the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAllLongTermRetentionBackupsUnderTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .listByDatabase("japaneast", "testserver", "testDatabase", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByLocationSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByLocationSamples.java deleted file mode 100644 index d3d524f21376..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByLocationSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups ListByLocation. - */ -public final class LongTermRetentionBackupsListByLocationSamples { - /* - * x-ms-original-file: 2025-02-01-preview/LongTermRetentionBackupListByLocation.json - */ - /** - * Sample code: Get all long term retention backups under the location. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAllLongTermRetentionBackupsUnderTheLocation(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .listByLocation("japaneast", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupDatabaseSamples.java deleted file mode 100644 index 7716ef89784d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupDatabaseSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups ListByResourceGroupDatabase. - */ -public final class LongTermRetentionBackupsListByResourceGroupDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json - */ - /** - * Sample code: Get all long term retention backups under the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAllLongTermRetentionBackupsUnderTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .listByResourceGroupDatabase("testResourceGroup", "japaneast", "testserver", "testDatabase", null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupLocationSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupLocationSamples.java deleted file mode 100644 index 00ae89f30fcc..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupLocationSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups ListByResourceGroupLocation. - */ -public final class LongTermRetentionBackupsListByResourceGroupLocationSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ResourceGroupBasedLongTermRetentionBackupListByLocation.json - */ - /** - * Sample code: Get all long term retention backups under the location based on resource group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAllLongTermRetentionBackupsUnderTheLocationBasedOnResourceGroup( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .listByResourceGroupLocation("testResourceGroup", "japaneast", null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupServerSamples.java deleted file mode 100644 index 5ef7c4056be3..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByResourceGroupServerSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups ListByResourceGroupServer. - */ -public final class LongTermRetentionBackupsListByResourceGroupServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ResourceGroupBasedLongTermRetentionBackupListByServer.json - */ - /** - * Sample code: Get all long term retention backups under the server based on resource group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAllLongTermRetentionBackupsUnderTheServerBasedOnResourceGroup( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .listByResourceGroupServer("testResourceGroup", "japaneast", "testserver", null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByServerSamples.java deleted file mode 100644 index bca42a9fa87e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsListByServerSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups ListByServer. - */ -public final class LongTermRetentionBackupsListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/LongTermRetentionBackupListByServer.json - */ - /** - * Sample code: Get all long term retention backups under the server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAllLongTermRetentionBackupsUnderTheServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .listByServer("japaneast", "testserver", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsLockTimeBasedImmutabilityByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsLockTimeBasedImmutabilityByResourceGroupSamples.java deleted file mode 100644 index 520e6caa7758..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsLockTimeBasedImmutabilityByResourceGroupSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups LockTimeBasedImmutabilityByResourceGroup. - */ -public final class LongTermRetentionBackupsLockTimeBasedImmutabilityByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ResourceGroupBasedLockTimeBasedImmutabilityLongTermRetentionBackup.json - */ - /** - * Sample code: Lock time based immutability of the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - lockTimeBasedImmutabilityOfTheLongTermRetentionBackup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .lockTimeBasedImmutabilityByResourceGroup("resourceGroupName", "japaneast", "testserver", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsLockTimeBasedImmutabilitySamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsLockTimeBasedImmutabilitySamples.java deleted file mode 100644 index 3e7154466f39..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsLockTimeBasedImmutabilitySamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups LockTimeBasedImmutability. - */ -public final class LongTermRetentionBackupsLockTimeBasedImmutabilitySamples { - /* - * x-ms-original-file: 2025-02-01-preview/LockTimeBasedImmutabilityLongTermRetentionBackup.json - */ - /** - * Sample code: Lock time based immutability of the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - lockTimeBasedImmutabilityOfTheLongTermRetentionBackup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .lockTimeBasedImmutability("japaneast", "testserver", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsRemoveLegalHoldImmutabilityByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsRemoveLegalHoldImmutabilityByResourceGroupSamples.java deleted file mode 100644 index 5f4012917566..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsRemoveLegalHoldImmutabilityByResourceGroupSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups RemoveLegalHoldImmutabilityByResourceGroup. - */ -public final class LongTermRetentionBackupsRemoveLegalHoldImmutabilityByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ResourceGroupBasedRemoveLegalHoldImmutabilityLongTermRetentionBackup.json - */ - /** - * Sample code: Remove legal hold immutability of the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void removeLegalHoldImmutabilityOfTheLongTermRetentionBackup( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .removeLegalHoldImmutabilityByResourceGroup("resourceGroupName", "japaneast", "testserver", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsRemoveLegalHoldImmutabilitySamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsRemoveLegalHoldImmutabilitySamples.java deleted file mode 100644 index 04a440dfa992..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsRemoveLegalHoldImmutabilitySamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups RemoveLegalHoldImmutability. - */ -public final class LongTermRetentionBackupsRemoveLegalHoldImmutabilitySamples { - /* - * x-ms-original-file: 2025-02-01-preview/RemoveLegalHoldImmutabilityLongTermRetentionBackup.json - */ - /** - * Sample code: Remove legal hold immutability of the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void removeLegalHoldImmutabilityOfTheLongTermRetentionBackup( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .removeLegalHoldImmutability("japaneast", "testserver", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsRemoveTimeBasedImmutabilityByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsRemoveTimeBasedImmutabilityByResourceGroupSamples.java deleted file mode 100644 index d854f8ecdf89..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsRemoveTimeBasedImmutabilityByResourceGroupSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups RemoveTimeBasedImmutabilityByResourceGroup. - */ -public final class LongTermRetentionBackupsRemoveTimeBasedImmutabilityByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ResourceGroupBasedRemoveTimeBasedImmutabilityLongTermRetentionBackup.json - */ - /** - * Sample code: Remove time based immutability of the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void removeTimeBasedImmutabilityOfTheLongTermRetentionBackup( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .removeTimeBasedImmutabilityByResourceGroup("resourceGroupName", "japaneast", "testserver", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsRemoveTimeBasedImmutabilitySamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsRemoveTimeBasedImmutabilitySamples.java deleted file mode 100644 index e4d02f9ba814..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsRemoveTimeBasedImmutabilitySamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups RemoveTimeBasedImmutability. - */ -public final class LongTermRetentionBackupsRemoveTimeBasedImmutabilitySamples { - /* - * x-ms-original-file: 2025-02-01-preview/RemoveTimeBasedImmutabilityLongTermRetentionBackup.json - */ - /** - * Sample code: Remove time based immutability of the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void removeTimeBasedImmutabilityOfTheLongTermRetentionBackup( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .removeTimeBasedImmutability("japaneast", "testserver", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsSetLegalHoldImmutabilityByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsSetLegalHoldImmutabilityByResourceGroupSamples.java deleted file mode 100644 index 21b865752c71..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsSetLegalHoldImmutabilityByResourceGroupSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups SetLegalHoldImmutabilityByResourceGroup. - */ -public final class LongTermRetentionBackupsSetLegalHoldImmutabilityByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ResourceGroupBasedSetLegalHoldImmutabilityLongTermRetentionBackup.json - */ - /** - * Sample code: Set legal hold immutability of the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - setLegalHoldImmutabilityOfTheLongTermRetentionBackup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .setLegalHoldImmutabilityByResourceGroup("resourceGroupName", "japaneast", "testserver", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsSetLegalHoldImmutabilitySamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsSetLegalHoldImmutabilitySamples.java deleted file mode 100644 index 634cc983d868..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsSetLegalHoldImmutabilitySamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionBackups SetLegalHoldImmutability. - */ -public final class LongTermRetentionBackupsSetLegalHoldImmutabilitySamples { - /* - * x-ms-original-file: 2025-02-01-preview/SetLegalHoldImmutabilityLongTermRetentionBackup.json - */ - /** - * Sample code: Set legal hold immutability of the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - setLegalHoldImmutabilityOfTheLongTermRetentionBackup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .setLegalHoldImmutability("japaneast", "testserver", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsUpdateByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsUpdateByResourceGroupSamples.java deleted file mode 100644 index e3436f9e0c33..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsUpdateByResourceGroupSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.azure.resourcemanager.sql.models.UpdateLongTermRetentionBackupParameters; - -/** - * Samples for LongTermRetentionBackups UpdateByResourceGroup. - */ -public final class LongTermRetentionBackupsUpdateByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ResourceGroupBasedLongTermRetentionBackupUpdate.json - */ - /** - * Sample code: Update the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateTheLongTermRetentionBackup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .updateByResourceGroup("testResourceGroup", "japaneast", "testserver", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000", new UpdateLongTermRetentionBackupParameters() - .withRequestedBackupStorageRedundancy(BackupStorageRedundancy.GEO), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsUpdateSamples.java deleted file mode 100644 index 6b4c3a4f4e46..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionBackupsUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.azure.resourcemanager.sql.models.UpdateLongTermRetentionBackupParameters; - -/** - * Samples for LongTermRetentionBackups Update. - */ -public final class LongTermRetentionBackupsUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/LongTermRetentionBackupUpdate.json - */ - /** - * Sample code: Update the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateTheLongTermRetentionBackup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionBackups() - .update("japaneast", "testserver", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000", new UpdateLongTermRetentionBackupParameters() - .withRequestedBackupStorageRedundancy(BackupStorageRedundancy.GEO), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupSamples.java deleted file mode 100644 index f21935ce70c1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionManagedInstanceBackups DeleteByResourceGroup. - */ -public final class LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json - */ - /** - * Sample code: Delete the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteTheLongTermRetentionBackup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionManagedInstanceBackups() - .deleteByResourceGroup("testResourceGroup", "japaneast", "testInstance", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsDeleteSamples.java deleted file mode 100644 index f016e3d4db67..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionManagedInstanceBackups Delete. - */ -public final class LongTermRetentionManagedInstanceBackupsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceLongTermRetentionBackupDelete.json - */ - /** - * Sample code: Delete the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteTheLongTermRetentionBackup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionManagedInstanceBackups() - .delete("japaneast", "testInstance", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000;Hot", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsGetByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsGetByResourceGroupSamples.java deleted file mode 100644 index 9098a66f7234..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsGetByResourceGroupSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionManagedInstanceBackups GetByResourceGroup. - */ -public final class LongTermRetentionManagedInstanceBackupsGetByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json - */ - /** - * Sample code: Get the long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getTheLongTermRetentionBackup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionManagedInstanceBackups() - .getByResourceGroupWithResponse("testResourceGroup", "japaneast", "testInstance", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsGetSamples.java deleted file mode 100644 index 7cb4fa2515fd..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionManagedInstanceBackups Get. - */ -public final class LongTermRetentionManagedInstanceBackupsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceLongTermRetentionBackupGet.json - */ - /** - * Sample code: Get the long term retention backup of a managed database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheLongTermRetentionBackupOfAManagedDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionManagedInstanceBackups() - .getWithResponse("japaneast", "testInstance", "testDatabase", - "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByDatabaseSamples.java deleted file mode 100644 index ec3e44a5a006..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionManagedInstanceBackups ListByDatabase. - */ -public final class LongTermRetentionManagedInstanceBackupsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceLongTermRetentionBackupListByDatabase.json - */ - /** - * Sample code: Get all long term retention backups under the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAllLongTermRetentionBackupsUnderTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionManagedInstanceBackups() - .listByDatabase("japaneast", "testInstance", "testDatabase", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByInstanceSamples.java deleted file mode 100644 index 25b4de24b8c1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByInstanceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionManagedInstanceBackups ListByInstance. - */ -public final class LongTermRetentionManagedInstanceBackupsListByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceLongTermRetentionBackupListByInstance.json - */ - /** - * Sample code: Get all long term retention backups under the managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAllLongTermRetentionBackupsUnderTheManagedInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionManagedInstanceBackups() - .listByInstance("japaneast", "testInstance", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByLocationSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByLocationSamples.java deleted file mode 100644 index 5009fd372fa2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByLocationSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionManagedInstanceBackups ListByLocation. - */ -public final class LongTermRetentionManagedInstanceBackupsListByLocationSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceLongTermRetentionBackupListByLocation.json - */ - /** - * Sample code: Get all long term retention backups under the location. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAllLongTermRetentionBackupsUnderTheLocation(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionManagedInstanceBackups() - .listByLocation("japaneast", null, null, null, null, null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceLongTermRetentionBackupListByLocationMax.json - */ - /** - * Sample code: Get all long term retention backups under the location with maximal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAllLongTermRetentionBackupsUnderTheLocationWithMaximalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionManagedInstanceBackups() - .listByLocation("japaneast", null, null, 0L, 2L, "Properties/ManagedInstanceName eq 'testInstance1'", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseSamples.java deleted file mode 100644 index 63c1e505ac3c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionManagedInstanceBackups ListByResourceGroupDatabase. - */ -public final class LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseSamples { - /* - * x-ms-original-file: - * 2025-02-01-preview/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json - */ - /** - * Sample code: Get all long term retention backups under the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAllLongTermRetentionBackupsUnderTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionManagedInstanceBackups() - .listByResourceGroupDatabase("testResourceGroup", "japaneast", "testInstance", "testDatabase", null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceSamples.java deleted file mode 100644 index 9d438052ba42..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionManagedInstanceBackups ListByResourceGroupInstance. - */ -public final class LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceSamples { - /* - * x-ms-original-file: - * 2025-02-01-preview/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json - */ - /** - * Sample code: Get all long term retention backups under the managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAllLongTermRetentionBackupsUnderTheManagedInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionManagedInstanceBackups() - .listByResourceGroupInstance("testResourceGroup", "japaneast", "testInstance", null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationSamples.java deleted file mode 100644 index be15dc48e725..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionManagedInstanceBackups ListByResourceGroupLocation. - */ -public final class LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationSamples { - /* - * x-ms-original-file: - * 2025-02-01-preview/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json - */ - /** - * Sample code: Get all long term retention backups under the location. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAllLongTermRetentionBackupsUnderTheLocation(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionManagedInstanceBackups() - .listByResourceGroupLocation("testResourceGroup", "japaneast", null, null, null, null, null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * 2025-02-01-preview/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocationMax.json - */ - /** - * Sample code: Get all long term retention backups under the location with maximal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAllLongTermRetentionBackupsUnderTheLocationWithMaximalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionManagedInstanceBackups() - .listByResourceGroupLocation("testResourceGroup", "japaneast", null, null, 0L, 2L, - "Properties/ManagedInstanceName eq 'testInstance1'", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index da16db83f6f0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.LongTermRetentionPolicyInner; -import com.azure.resourcemanager.sql.models.LongTermRetentionPolicyName; -import com.azure.resourcemanager.sql.models.TimeBasedImmutability; -import com.azure.resourcemanager.sql.models.TimeBasedImmutabilityMode; - -/** - * Samples for LongTermRetentionPolicies CreateOrUpdate. - */ -public final class LongTermRetentionPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/LongTermRetentionPolicyCreateOrUpdate.json - */ - /** - * Sample code: Create or update the long term retention policy for the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createOrUpdateTheLongTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionPolicies() - .createOrUpdate("resourceGroup", "testserver", "testDatabase", LongTermRetentionPolicyName.DEFAULT, - new LongTermRetentionPolicyInner().withTimeBasedImmutability(TimeBasedImmutability.ENABLED) - .withTimeBasedImmutabilityMode(TimeBasedImmutabilityMode.UNLOCKED) - .withWeeklyRetention("P1M") - .withMonthlyRetention("P1Y") - .withYearlyRetention("P5Y") - .withWeekOfYear(5), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesGetSamples.java deleted file mode 100644 index cba659c683e7..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.LongTermRetentionPolicyName; - -/** - * Samples for LongTermRetentionPolicies Get. - */ -public final class LongTermRetentionPoliciesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/LongTermRetentionPolicyGet.json - */ - /** - * Sample code: Get the long term retention policy for the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheLongTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionPolicies() - .getWithResponse("resourceGroup", "testserver", "testDatabase", LongTermRetentionPolicyName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesListByDatabaseSamples.java deleted file mode 100644 index 5124f99df8bb..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/LongTermRetentionPoliciesListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for LongTermRetentionPolicies ListByDatabase. - */ -public final class LongTermRetentionPoliciesListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/LongTermRetentionPolicyListByDatabase.json - */ - /** - * Sample code: Get the long term retention policy for the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheLongTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getLongTermRetentionPolicies() - .listByDatabase("resourceGroup", "testserver", "testDatabase", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowOptionsOperationGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowOptionsOperationGetSamples.java deleted file mode 100644 index 51789eee26e9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowOptionsOperationGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for MaintenanceWindowOptionsOperation Get. - */ -public final class MaintenanceWindowOptionsOperationGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetMaintenanceWindowOptions.json - */ - /** - * Sample code: Gets a list of available maintenance windows for a selected database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAListOfAvailableMaintenanceWindowsForASelectedDatabase( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getMaintenanceWindowOptionsOperations() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", "current", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowsOperationCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowsOperationCreateOrUpdateSamples.java deleted file mode 100644 index 210fe8c725c5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowsOperationCreateOrUpdateSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.MaintenanceWindowsInner; -import com.azure.resourcemanager.sql.models.DayOfWeek; -import com.azure.resourcemanager.sql.models.MaintenanceWindowTimeRange; -import java.util.Arrays; - -/** - * Samples for MaintenanceWindowsOperation CreateOrUpdate. - */ -public final class MaintenanceWindowsOperationCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateMaintenanceWindows.json - */ - /** - * Sample code: Sets maintenance window settings for a selected database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - setsMaintenanceWindowSettingsForASelectedDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getMaintenanceWindowsOperations() - .createOrUpdateWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdwdb", "current", - new MaintenanceWindowsInner() - .withTimeRanges(Arrays.asList(new MaintenanceWindowTimeRange().withDayOfWeek(DayOfWeek.SATURDAY) - .withStartTime("00:00:00") - .withDuration("PT60M"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowsOperationGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowsOperationGetSamples.java deleted file mode 100644 index e32dc7e1b93e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/MaintenanceWindowsOperationGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for MaintenanceWindowsOperation Get. - */ -public final class MaintenanceWindowsOperationGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetMaintenanceWindows.json - */ - /** - * Sample code: Gets maintenance window settings for a selected database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsMaintenanceWindowSettingsForASelectedDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getMaintenanceWindowsOperations() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", "current", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 4eee27e741f9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedBackupShortTermRetentionPolicyInner; -import com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName; - -/** - * Samples for ManagedBackupShortTermRetentionPolicies CreateOrUpdate. - */ -public final class ManagedBackupShortTermRetentionPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateManagedShortTermRetentionPolicy.json - */ - /** - * Sample code: Update the short term retention policy for the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateTheShortTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedBackupShortTermRetentionPolicies() - .createOrUpdate("resourceGroup", "testsvr", "testdb", ManagedShortTermRetentionPolicyName.DEFAULT, - new ManagedBackupShortTermRetentionPolicyInner().withRetentionDays(14), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesGetSamples.java deleted file mode 100644 index df7e4c096740..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName; - -/** - * Samples for ManagedBackupShortTermRetentionPolicies Get. - */ -public final class ManagedBackupShortTermRetentionPoliciesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetManagedShortTermRetentionPolicy.json - */ - /** - * Sample code: Get the short term retention policy for the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheShortTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedBackupShortTermRetentionPolicies() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", - ManagedShortTermRetentionPolicyName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesListByDatabaseSamples.java deleted file mode 100644 index 75812acdfec8..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedBackupShortTermRetentionPolicies ListByDatabase. - */ -public final class ManagedBackupShortTermRetentionPoliciesListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetListManagedShortTermRetentionPolicy.json - */ - /** - * Sample code: Get the short term retention policy list for the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheShortTermRetentionPolicyListForTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedBackupShortTermRetentionPolicies() - .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesUpdateSamples.java deleted file mode 100644 index 471f231cc92f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedBackupShortTermRetentionPoliciesUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedBackupShortTermRetentionPolicyInner; -import com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName; - -/** - * Samples for ManagedBackupShortTermRetentionPolicies Update. - */ -public final class ManagedBackupShortTermRetentionPoliciesUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/UpdateManagedShortTermRetentionPolicy.json - */ - /** - * Sample code: Update the short term retention policy for the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateTheShortTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedBackupShortTermRetentionPolicies() - .update("resourceGroup", "testsvr", "testdb", ManagedShortTermRetentionPolicyName.DEFAULT, - new ManagedBackupShortTermRetentionPolicyInner().withRetentionDays(14), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java deleted file mode 100644 index 21a69bf0badb..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseAdvancedThreatProtectionInner; -import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; -import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionState; - -/** - * Samples for ManagedDatabaseAdvancedThreatProtectionSettings CreateOrUpdate. - */ -public final class ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMax.json - */ - /** - * Sample code: Update a managed database's Advanced Threat Protection settings with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAManagedDatabaseSAdvancedThreatProtectionSettingsWithAllParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseAdvancedThreatProtectionSettings() - .createOrUpdateWithResponse("threatprotection-4799", "threatprotection-6440", "testdb", - AdvancedThreatProtectionName.DEFAULT, - new ManagedDatabaseAdvancedThreatProtectionInner().withState(AdvancedThreatProtectionState.ENABLED), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMin.json - */ - /** - * Sample code: Update a managed database's Advanced Threat Protection settings with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAManagedDatabaseSAdvancedThreatProtectionSettingsWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseAdvancedThreatProtectionSettings() - .createOrUpdateWithResponse("threatprotection-4799", "threatprotection-6440", "testdb", - AdvancedThreatProtectionName.DEFAULT, - new ManagedDatabaseAdvancedThreatProtectionInner().withState(AdvancedThreatProtectionState.DISABLED), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseAdvancedThreatProtectionSettingsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseAdvancedThreatProtectionSettingsGetSamples.java deleted file mode 100644 index ee5a7d3eca6d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseAdvancedThreatProtectionSettingsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; - -/** - * Samples for ManagedDatabaseAdvancedThreatProtectionSettings Get. - */ -public final class ManagedDatabaseAdvancedThreatProtectionSettingsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseAdvancedThreatProtectionSettingsGet.json - */ - /** - * Sample code: Get a managed database's Advanced Threat Protection settings. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAManagedDatabaseSAdvancedThreatProtectionSettings(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseAdvancedThreatProtectionSettings() - .getWithResponse("threatprotection-6852", "threatprotection-2080", "testdb", - AdvancedThreatProtectionName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseSamples.java deleted file mode 100644 index 2c131b28e4df..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabaseAdvancedThreatProtectionSettings ListByDatabase. - */ -public final class ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabase.json - */ - /** - * Sample code: Get a list of the managed database's Advanced Threat Protection settings. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAListOfTheManagedDatabaseSAdvancedThreatProtectionSettings( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseAdvancedThreatProtectionSettings() - .listByDatabase("threatprotection-6852", "threatprotection-2080", "testdb", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsGetSamples.java deleted file mode 100644 index b728a4f44fd4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabaseColumns Get. - */ -public final class ManagedDatabaseColumnsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseColumnGet.json - */ - /** - * Sample code: Get managed database column. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getManagedDatabaseColumn(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseColumns() - .getWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "table1", "column1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsListByDatabaseSamples.java deleted file mode 100644 index 8be96be5708f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsListByDatabaseSamples.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import java.util.Arrays; - -/** - * Samples for ManagedDatabaseColumns ListByDatabase. - */ -public final class ManagedDatabaseColumnsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedColumnsListByDatabaseMin.json - */ - /** - * Sample code: List managed database columns. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listManagedDatabaseColumns(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseColumns() - .listByDatabase("myRG", "serverName", "myDatabase", null, null, null, null, null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedColumnsListByDatabaseMax.json - */ - /** - * Sample code: Filter managed database columns. - * - * @param manager Entry point to SqlServerManager. - */ - public static void filterManagedDatabaseColumns(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseColumns() - .listByDatabase("myRG", "serverName", "myDatabase", Arrays.asList("dbo"), - Arrays.asList("customer", "address"), Arrays.asList("username"), - Arrays.asList("schema asc", "table", "column desc"), null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsListByTableSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsListByTableSamples.java deleted file mode 100644 index 2e4ad7e6cd1a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseColumnsListByTableSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabaseColumns ListByTable. - */ -public final class ManagedDatabaseColumnsListByTableSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseColumnListByTable.json - */ - /** - * Sample code: List managed database columns. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listManagedDatabaseColumns(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseColumns() - .listByTable("myRG", "myManagedInstanceName", "myDatabase", "dbo", "table1", null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseMoveOperationsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseMoveOperationsGetSamples.java deleted file mode 100644 index ae4c268211c7..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseMoveOperationsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import java.util.UUID; - -/** - * Samples for ManagedDatabaseMoveOperations Get. - */ -public final class ManagedDatabaseMoveOperationsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseMoveOperationResultGet.json - */ - /** - * Sample code: Gets a managed database move operation. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAManagedDatabaseMoveOperation(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseMoveOperations() - .getWithResponse("rg1", "westeurope", UUID.fromString("15961324-d809-46ed-86b9-d786953140e2"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseMoveOperationsListByLocationSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseMoveOperationsListByLocationSamples.java deleted file mode 100644 index 92cc5c9ac0aa..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseMoveOperationsListByLocationSamples.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabaseMoveOperations ListByLocation. - */ -public final class ManagedDatabaseMoveOperationsListByLocationSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseMoveOperationResultList.json - */ - /** - * Sample code: Gets all managed database move operations for specified subscription, resource group and location. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAllManagedDatabaseMoveOperationsForSpecifiedSubscriptionResourceGroupAndLocation( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseMoveOperations() - .listByLocation("rg1", "westeurope", null, null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseMoveOperationResultListLastOperations.json - */ - /** - * Sample code: Gets the latest managed database move operations for each database under specified subscription, - * resource group and location. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsTheLatestManagedDatabaseMoveOperationsForEachDatabaseUnderSpecifiedSubscriptionResourceGroupAndLocation( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseMoveOperations() - .listByLocation("rg1", "westeurope", null, null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseMoveOperationResultListMax.json - */ - /** - * Sample code: Gets the latest managed database move operations for each database under specified subscription, - * resource group and location, filtered by operation type. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsTheLatestManagedDatabaseMoveOperationsForEachDatabaseUnderSpecifiedSubscriptionResourceGroupAndLocationFilteredByOperationType( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseMoveOperations() - .listByLocation("rg1", "westeurope", null, "Properties/Operation eq 'StartManagedInstanceDatabaseMove'", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseQueriesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseQueriesGetSamples.java deleted file mode 100644 index 491bba666ab6..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseQueriesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabaseQueries Get. - */ -public final class ManagedDatabaseQueriesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceQueryGet.json - */ - /** - * Sample code: Obtain query properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void obtainQueryProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseQueries() - .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", "database_1", "42", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseQueriesListByQuerySamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseQueriesListByQuerySamples.java deleted file mode 100644 index 00fa2bc34179..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseQueriesListByQuerySamples.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.QueryTimeGrainType; - -/** - * Samples for ManagedDatabaseQueries ListByQuery. - */ -public final class ManagedDatabaseQueriesListByQuerySamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceQueryStatisticsListMax.json - */ - /** - * Sample code: Obtain query execution statistics. Example with all request parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void obtainQueryExecutionStatisticsExampleWithAllRequestParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseQueries() - .listByQuery("sqlcrudtest-7398", "sqlcrudtest-4645", "database_1", "42", "03/01/2020 16:23:09", - "03/11/2020 14:00:00", QueryTimeGrainType.P1D, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceQueryStatisticsList.json - */ - /** - * Sample code: Obtain query execution statistics. - * - * @param manager Entry point to SqlServerManager. - */ - public static void obtainQueryExecutionStatistics(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseQueries() - .listByQuery("sqlcrudtest-7398", "sqlcrudtest-4645", "database_1", "42", null, null, null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceQueryStatisticsListMin.json - */ - /** - * Sample code: Obtain query execution statistics. Minimal example with only mandatory request parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void obtainQueryExecutionStatisticsMinimalExampleWithOnlyMandatoryRequestParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseQueries() - .listByQuery("sqlcrudtest-7398", "sqlcrudtest-4645", "database_1", "42", null, null, - QueryTimeGrainType.PT1H, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseRecommendedSensitivityLabelsUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseRecommendedSensitivityLabelsUpdateSamples.java deleted file mode 100644 index 81024005bae4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseRecommendedSensitivityLabelsUpdateSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdate; -import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdateKind; -import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdateList; -import java.util.Arrays; - -/** - * Samples for ManagedDatabaseRecommendedSensitivityLabels Update. - */ -public final class ManagedDatabaseRecommendedSensitivityLabelsUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json - */ - /** - * Sample code: Update recommended sensitivity labels of a given database using an operations batch. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateRecommendedSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseRecommendedSensitivityLabels() - .updateWithResponse("myRG", "myManagedInstanceName", "myDatabase", - new RecommendedSensitivityLabelUpdateList().withOperations(Arrays.asList( - new RecommendedSensitivityLabelUpdate().withOp(RecommendedSensitivityLabelUpdateKind.ENABLE) - .withSchema("dbo") - .withTable("table1") - .withColumn("column1"), - new RecommendedSensitivityLabelUpdate().withOp(RecommendedSensitivityLabelUpdateKind.DISABLE) - .withSchema("dbo") - .withTable("table2") - .withColumn("column2"), - new RecommendedSensitivityLabelUpdate().withOp(RecommendedSensitivityLabelUpdateKind.DISABLE) - .withSchema("dbo") - .withTable("Table1") - .withColumn("Column3"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseRestoreDetailsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseRestoreDetailsGetSamples.java deleted file mode 100644 index b1b55aed279f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseRestoreDetailsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.RestoreDetailsName; - -/** - * Samples for ManagedDatabaseRestoreDetails Get. - */ -public final class ManagedDatabaseRestoreDetailsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseRestoreDetails.json - */ - /** - * Sample code: Managed database restore details. - * - * @param manager Entry point to SqlServerManager. - */ - public static void managedDatabaseRestoreDetails(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseRestoreDetails() - .getWithResponse("Default-SQL-SouthEastAsia", "managedInstance", "testdb", RestoreDetailsName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSchemasGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSchemasGetSamples.java deleted file mode 100644 index 6c6f8fa21b83..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSchemasGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabaseSchemas Get. - */ -public final class ManagedDatabaseSchemasGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseSchemaGet.json - */ - /** - * Sample code: Get managed database schema. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getManagedDatabaseSchema(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSchemas() - .getWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSchemasListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSchemasListByDatabaseSamples.java deleted file mode 100644 index e438a0d5e049..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSchemasListByDatabaseSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabaseSchemas ListByDatabase. - */ -public final class ManagedDatabaseSchemasListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseSchemaListByDatabase.json - */ - /** - * Sample code: List managed database schemas. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listManagedDatabaseSchemas(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSchemas() - .listByDatabase("myRG", "myManagedInstanceName", "myDatabase", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index d815a58edbfe..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseSecurityAlertPolicyInner; -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; -import java.util.Arrays; - -/** - * Samples for ManagedDatabaseSecurityAlertPolicies CreateOrUpdate. - */ -public final class ManagedDatabaseSecurityAlertPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseSecurityAlertCreateMax.json - */ - /** - * Sample code: Update a database's threat detection policy with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateADatabaseSThreatDetectionPolicyWithAllParameters(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSecurityAlertPolicies() - .createOrUpdateWithResponse("securityalert-4799", "securityalert-6440", "testdb", - SecurityAlertPolicyName.DEFAULT, - new ManagedDatabaseSecurityAlertPolicyInner().withState(SecurityAlertPolicyState.ENABLED) - .withDisabledAlerts(Arrays.asList("Sql_Injection", "Usage_Anomaly")) - .withEmailAddresses(Arrays.asList("test@contoso.com", "user@contoso.com")) - .withEmailAccountAdmins(true) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey("fakeTokenPlaceholder") - .withRetentionDays(6), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseSecurityAlertCreateMin.json - */ - /** - * Sample code: Update a database's threat detection policy with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateADatabaseSThreatDetectionPolicyWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSecurityAlertPolicies() - .createOrUpdateWithResponse("securityalert-4799", "securityalert-6440", "testdb", - SecurityAlertPolicyName.DEFAULT, - new ManagedDatabaseSecurityAlertPolicyInner().withState(SecurityAlertPolicyState.ENABLED), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesGetSamples.java deleted file mode 100644 index c78f92713cf3..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; - -/** - * Samples for ManagedDatabaseSecurityAlertPolicies Get. - */ -public final class ManagedDatabaseSecurityAlertPoliciesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseSecurityAlertGet.json - */ - /** - * Sample code: Get a database's threat detection policy. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getADatabaseSThreatDetectionPolicy(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSecurityAlertPolicies() - .getWithResponse("securityalert-6852", "securityalert-2080", "testdb", SecurityAlertPolicyName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesListByDatabaseSamples.java deleted file mode 100644 index 85d026501826..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityAlertPoliciesListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabaseSecurityAlertPolicies ListByDatabase. - */ -public final class ManagedDatabaseSecurityAlertPoliciesListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseSecurityAlertListByDatabase.json - */ - /** - * Sample code: Get a list of the database's threat detection policies. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAListOfTheDatabaseSThreatDetectionPolicies(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSecurityAlertPolicies() - .listByDatabase("securityalert-6852", "securityalert-2080", "testdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityEventsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityEventsListByDatabaseSamples.java deleted file mode 100644 index 9b38a5bea6ea..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSecurityEventsListByDatabaseSamples.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabaseSecurityEvents ListByDatabase. - */ -public final class ManagedDatabaseSecurityEventsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseSecurityEventsGetMin.json - */ - /** - * Sample code: Get the managed database's security events with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getTheManagedDatabaseSSecurityEventsWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSecurityEvents() - .listByDatabase("testrg", "testcl", "database1", null, null, null, null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseSecurityEventsGetMax.json - */ - /** - * Sample code: Get the managed database's security events with maximal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getTheManagedDatabaseSSecurityEventsWithMaximalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSecurityEvents() - .listByDatabase("testrg", "testcl", "database1", "ShowServerRecords eq true", 0L, 1L, - "eyJCbG9iTmFtZURhdGVUaW1lIjoiXC9EYXRlKDE1MTIyODg4MTIwMTArMDIwMClcLyIsIkJsb2JOYW1lUm9sbG92ZXJJbmRleCI6IjAiLCJFbmREYXRlIjoiXC9EYXRlKDE1MTI0NjYyMDA1MjkpXC8iLCJJc1NraXBUb2tlblNldCI6ZmFsc2UsIklzVjJCbG9iVGltZUZvcm1hdCI6dHJ1ZSwiU2hvd1NlcnZlclJlY29yZHMiOmZhbHNlLCJTa2lwVmFsdWUiOjAsIlRha2VWYWx1ZSI6MTB9", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsCreateOrUpdateSamples.java deleted file mode 100644 index 1c5a26422f07..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsCreateOrUpdateSamples.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelInner; -import com.azure.resourcemanager.sql.models.ClientClassificationSource; -import com.azure.resourcemanager.sql.models.CurrentSensitivityLabelSource; -import com.azure.resourcemanager.sql.models.SensitivityLabelRank; - -/** - * Samples for ManagedDatabaseSensitivityLabels CreateOrUpdate. - */ -public final class ManagedDatabaseSensitivityLabelsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseColumnSensitivityLabelCreate.json - */ - /** - * Sample code: Updates or creates a sensitivity label of a given column with all parameters in a managed database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updatesOrCreatesASensitivityLabelOfAGivenColumnWithAllParametersInAManagedDatabase( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSensitivityLabels() - .createOrUpdateWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", - CurrentSensitivityLabelSource.CURRENT, - new SensitivityLabelInner().withLabelName("PII") - .withLabelId("bf91e08c-f4f0-478a-b016-25164b2a65ff") - .withInformationType("PhoneNumber") - .withInformationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646") - .withRank(SensitivityLabelRank.HIGH) - .withClientClassificationSource(ClientClassificationSource.NATIVE), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsDeleteSamples.java deleted file mode 100644 index e47c8a1e4471..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsDeleteSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.CurrentSensitivityLabelSource; - -/** - * Samples for ManagedDatabaseSensitivityLabels Delete. - */ -public final class ManagedDatabaseSensitivityLabelsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseColumnSensitivityLabelDelete.json - */ - /** - * Sample code: Deletes the sensitivity label of a given column in a managed database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deletesTheSensitivityLabelOfAGivenColumnInAManagedDatabase( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSensitivityLabels() - .deleteWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", - CurrentSensitivityLabelSource.CURRENT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsDisableRecommendationSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsDisableRecommendationSamples.java deleted file mode 100644 index 6d0cd54337af..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsDisableRecommendationSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelSource; - -/** - * Samples for ManagedDatabaseSensitivityLabels DisableRecommendation. - */ -public final class ManagedDatabaseSensitivityLabelsDisableRecommendationSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json - */ - /** - * Sample code: Disables the sensitivity recommendations on a given column. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - disablesTheSensitivityRecommendationsOnAGivenColumn(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSensitivityLabels() - .disableRecommendationWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", - "myColumn", RecommendedSensitivityLabelSource.RECOMMENDED, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsEnableRecommendationSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsEnableRecommendationSamples.java deleted file mode 100644 index 1170658c3ec1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsEnableRecommendationSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelSource; - -/** - * Samples for ManagedDatabaseSensitivityLabels EnableRecommendation. - */ -public final class ManagedDatabaseSensitivityLabelsEnableRecommendationSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json - */ - /** - * Sample code: Enables the sensitivity recommendations on a given column. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - enablesTheSensitivityRecommendationsOnAGivenColumn(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSensitivityLabels() - .enableRecommendationWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", - "myColumn", RecommendedSensitivityLabelSource.RECOMMENDED, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsGetSamples.java deleted file mode 100644 index 7c1f7f77e241..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.SensitivityLabelSource; - -/** - * Samples for ManagedDatabaseSensitivityLabels Get. - */ -public final class ManagedDatabaseSensitivityLabelsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseColumnSensitivityLabelGet.json - */ - /** - * Sample code: Gets the sensitivity label of a given column in a managed database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheSensitivityLabelOfAGivenColumnInAManagedDatabase( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSensitivityLabels() - .getWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", - SensitivityLabelSource.CURRENT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListByDatabaseSamples.java deleted file mode 100644 index 4d462ce58520..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabaseSensitivityLabels ListByDatabase. - */ -public final class ManagedDatabaseSensitivityLabelsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseSensitivityLabelsListByDatabase.json - */ - /** - * Sample code: Gets the current and recommended sensitivity labels of a given database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheCurrentAndRecommendedSensitivityLabelsOfAGivenDatabase( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSensitivityLabels() - .listByDatabase("myRG", "myManagedInstanceName", "myDatabase", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListCurrentByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListCurrentByDatabaseSamples.java deleted file mode 100644 index 3c81d22a4d2c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListCurrentByDatabaseSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabaseSensitivityLabels ListCurrentByDatabase. - */ -public final class ManagedDatabaseSensitivityLabelsListCurrentByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json - */ - /** - * Sample code: Gets the current sensitivity labels of a given database in a managed database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheCurrentSensitivityLabelsOfAGivenDatabaseInAManagedDatabase( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSensitivityLabels() - .listCurrentByDatabase("myRG", "myManagedInstanceName", "myDatabase", null, null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseSamples.java deleted file mode 100644 index e86df4854e21..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabaseSensitivityLabels ListRecommendedByDatabase. - */ -public final class ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json - */ - /** - * Sample code: Gets the recommended sensitivity labels of a given database in a managed database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheRecommendedSensitivityLabelsOfAGivenDatabaseInAManagedDatabase( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSensitivityLabels() - .listRecommendedByDatabase("myRG", "myManagedInstanceName", "myDatabase", null, null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsUpdateSamples.java deleted file mode 100644 index 46f8db0eb38e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseSensitivityLabelsUpdateSamples.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelInner; -import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelUpdateInner; -import com.azure.resourcemanager.sql.models.SensitivityLabelUpdateKind; -import com.azure.resourcemanager.sql.models.SensitivityLabelUpdateList; -import java.util.Arrays; - -/** - * Samples for ManagedDatabaseSensitivityLabels Update. - */ -public final class ManagedDatabaseSensitivityLabelsUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseSensitivityLabelsCurrentUpdate.json - */ - /** - * Sample code: Update sensitivity labels of a given database using an operations batch. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseSensitivityLabels() - .updateWithResponse("myRG", "myManagedInstanceName", "myDatabase", - new SensitivityLabelUpdateList().withOperations(Arrays.asList( - new SensitivityLabelUpdateInner().withOp(SensitivityLabelUpdateKind.SET) - .withSchema("dbo") - .withTable("table1") - .withColumn("column1") - .withSensitivityLabel(new SensitivityLabelInner().withLabelName("Highly Confidential") - .withLabelId("3A477B16-9423-432B-AA97-6069B481CEC3") - .withInformationType("Financial") - .withInformationTypeId("1D3652D6-422C-4115-82F1-65DAEBC665C8")), - new SensitivityLabelUpdateInner().withOp(SensitivityLabelUpdateKind.SET) - .withSchema("dbo") - .withTable("table2") - .withColumn("column2") - .withSensitivityLabel(new SensitivityLabelInner().withLabelName("PII") - .withLabelId("bf91e08c-f4f0-478a-b016-25164b2a65ff") - .withInformationType("PhoneNumber") - .withInformationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646")), - new SensitivityLabelUpdateInner().withOp(SensitivityLabelUpdateKind.REMOVE) - .withSchema("dbo") - .withTable("Table1") - .withColumn("Column3"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTablesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTablesGetSamples.java deleted file mode 100644 index 784e1cccf40c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTablesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabaseTables Get. - */ -public final class ManagedDatabaseTablesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseTableGet.json - */ - /** - * Sample code: Get managed database table. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getManagedDatabaseTable(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseTables() - .getWithResponse("myRG", "myManagedInstanceName", "myDatabase", "dbo", "table1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTablesListBySchemaSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTablesListBySchemaSamples.java deleted file mode 100644 index 11da01a374a2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTablesListBySchemaSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabaseTables ListBySchema. - */ -public final class ManagedDatabaseTablesListBySchemaSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseTableListBySchema.json - */ - /** - * Sample code: List managed database tables. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listManagedDatabaseTables(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseTables() - .listBySchema("myRG", "myManagedInstanceName", "myDatabase", "dbo", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionCreateOrUpdateSamples.java deleted file mode 100644 index 2df958c34761..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionCreateOrUpdateSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedTransparentDataEncryptionInner; -import com.azure.resourcemanager.sql.models.TransparentDataEncryptionName; -import com.azure.resourcemanager.sql.models.TransparentDataEncryptionState; - -/** - * Samples for ManagedDatabaseTransparentDataEncryption CreateOrUpdate. - */ -public final class ManagedDatabaseTransparentDataEncryptionCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedTransparentDataEncryptionUpdate.json - */ - /** - * Sample code: Update a database's Transparent Data Encryption state with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateADatabaseSTransparentDataEncryptionStateWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseTransparentDataEncryptions() - .createOrUpdateWithResponse("securitytde-42-rg", "securitytde-42", "testdb", - TransparentDataEncryptionName.CURRENT, - new ManagedTransparentDataEncryptionInner().withState(TransparentDataEncryptionState.ENABLED), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionGetSamples.java deleted file mode 100644 index 92f5bd28cbe4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.TransparentDataEncryptionName; - -/** - * Samples for ManagedDatabaseTransparentDataEncryption Get. - */ -public final class ManagedDatabaseTransparentDataEncryptionGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedTransparentDataEncryptionGet.json - */ - /** - * Sample code: Get a database's transparent data encryption. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getADatabaseSTransparentDataEncryption(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseTransparentDataEncryptions() - .getWithResponse("security-tde-resourcegroup", "securitytde", "testdb", - TransparentDataEncryptionName.CURRENT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionListByDatabaseSamples.java deleted file mode 100644 index b1a6c53dc02d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseTransparentDataEncryptionListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabaseTransparentDataEncryption ListByDatabase. - */ -public final class ManagedDatabaseTransparentDataEncryptionListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedTransparentDataEncryptionList.json - */ - /** - * Sample code: Get a list of the database's transparent data encryptions. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAListOfTheDatabaseSTransparentDataEncryptions(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseTransparentDataEncryptions() - .listByDatabase("security-tde-resourcegroup", "securitytde", "testdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java deleted file mode 100644 index ee6020d7f248..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentRuleBaselineInner; -import com.azure.resourcemanager.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentPolicyBaselineName; -import java.util.Arrays; - -/** - * Samples for ManagedDatabaseVulnerabilityAssessmentRuleBaselines CreateOrUpdate. - */ -public final class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json - */ - /** - * Sample code: Creates or updates a database's vulnerability assessment rule baseline. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseVulnerabilityAssessmentRuleBaselines() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - "testdb", VulnerabilityAssessmentName.DEFAULT, "VA1001", - VulnerabilityAssessmentPolicyBaselineName.DEFAULT, - new DatabaseVulnerabilityAssessmentRuleBaselineInner().withBaselineResults(Arrays.asList( - new DatabaseVulnerabilityAssessmentRuleBaselineItem().withResult(Arrays.asList("userA", "SELECT")), - new DatabaseVulnerabilityAssessmentRuleBaselineItem().withResult(Arrays.asList("userB", "SELECT")), - new DatabaseVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("userC", "SELECT", "tableId_4")))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples.java deleted file mode 100644 index 08a0d7e144e1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentPolicyBaselineName; - -/** - * Samples for ManagedDatabaseVulnerabilityAssessmentRuleBaselines Delete. - */ -public final class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json - */ - /** - * Sample code: Removes a database's vulnerability assessment rule baseline. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - removesADatabaseSVulnerabilityAssessmentRuleBaseline(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseVulnerabilityAssessmentRuleBaselines() - .deleteWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", - VulnerabilityAssessmentName.DEFAULT, "VA1001", VulnerabilityAssessmentPolicyBaselineName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesGetSamples.java deleted file mode 100644 index 451e6fa86420..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesGetSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentPolicyBaselineName; - -/** - * Samples for ManagedDatabaseVulnerabilityAssessmentRuleBaselines Get. - */ -public final class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json - */ - /** - * Sample code: Gets a database's vulnerability assessment rule baseline. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsADatabaseSVulnerabilityAssessmentRuleBaseline(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseVulnerabilityAssessmentRuleBaselines() - .getWithResponse("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", "testdb", - VulnerabilityAssessmentName.DEFAULT, "VA1001", VulnerabilityAssessmentPolicyBaselineName.MASTER, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansExportSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansExportSamples.java deleted file mode 100644 index ffea3ccaf84b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansExportSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for ManagedDatabaseVulnerabilityAssessmentScans Export. - */ -public final class ManagedDatabaseVulnerabilityAssessmentScansExportSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseVulnerabilityAssessmentScanExport.json - */ - /** - * Sample code: Export a database's vulnerability assessment scan results. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - exportADatabaseSVulnerabilityAssessmentScanResults(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseVulnerabilityAssessmentScans() - .exportWithResponse("vulnerabilityassessmenttest-4799", "vulnerabilityassessmenttest-6440", "testdb", - VulnerabilityAssessmentName.DEFAULT, "scan001", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansGetSamples.java deleted file mode 100644 index 83ddaa5af73d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for ManagedDatabaseVulnerabilityAssessmentScans Get. - */ -public final class ManagedDatabaseVulnerabilityAssessmentScansGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json - */ - /** - * Sample code: Gets a database vulnerability assessment scan record by scan ID. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsADatabaseVulnerabilityAssessmentScanRecordByScanID(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseVulnerabilityAssessmentScans() - .getWithResponse("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", - VulnerabilityAssessmentName.DEFAULT, "scan001", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansInitiateScanSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansInitiateScanSamples.java deleted file mode 100644 index 55d10eae7473..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansInitiateScanSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for ManagedDatabaseVulnerabilityAssessmentScans InitiateScan. - */ -public final class ManagedDatabaseVulnerabilityAssessmentScansInitiateScanSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseVulnerabilityAssessmentScansExecute.json - */ - /** - * Sample code: Executes a database's vulnerability assessment scan. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - executesADatabaseSVulnerabilityAssessmentScan(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseVulnerabilityAssessmentScans() - .initiateScan("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", - VulnerabilityAssessmentName.DEFAULT, "scan01", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseSamples.java deleted file mode 100644 index 5471647b2de4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for ManagedDatabaseVulnerabilityAssessmentScans ListByDatabase. - */ -public final class ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json - */ - /** - * Sample code: Gets the list of a database vulnerability assessment scan records. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheListOfADatabaseVulnerabilityAssessmentScanRecords( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseVulnerabilityAssessmentScans() - .listByDatabase("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", - VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsCreateOrUpdateSamples.java deleted file mode 100644 index 597671c92b98..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentInner; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties; -import java.util.Arrays; - -/** - * Samples for ManagedDatabaseVulnerabilityAssessments CreateOrUpdate. - */ -public final class ManagedDatabaseVulnerabilityAssessmentsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseVulnerabilityAssessmentCreateMax.json - */ - /** - * Sample code: Create a database's vulnerability assessment with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createADatabaseSVulnerabilityAssessmentWithAllParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseVulnerabilityAssessments() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - "testdb", VulnerabilityAssessmentName.DEFAULT, - new DatabaseVulnerabilityAssessmentInner() - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageContainerSasKey("fakeTokenPlaceholder") - .withRecurringScans(new VulnerabilityAssessmentRecurringScansProperties().withIsEnabled(true) - .withEmailSubscriptionAdmins(true) - .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseVulnerabilityAssessmentCreateMin.json - */ - /** - * Sample code: Create a database's vulnerability assessment with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createADatabaseSVulnerabilityAssessmentWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseVulnerabilityAssessments() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - "testdb", VulnerabilityAssessmentName.DEFAULT, - new DatabaseVulnerabilityAssessmentInner() - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageContainerSasKey("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsDeleteSamples.java deleted file mode 100644 index e9b92769489e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsDeleteSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for ManagedDatabaseVulnerabilityAssessments Delete. - */ -public final class ManagedDatabaseVulnerabilityAssessmentsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseVulnerabilityAssessmentDelete.json - */ - /** - * Sample code: Remove a database's vulnerability assessment. - * - * @param manager Entry point to SqlServerManager. - */ - public static void removeADatabaseSVulnerabilityAssessment(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseVulnerabilityAssessments() - .deleteWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", - VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsGetSamples.java deleted file mode 100644 index 079f692350f2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for ManagedDatabaseVulnerabilityAssessments Get. - */ -public final class ManagedDatabaseVulnerabilityAssessmentsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseVulnerabilityAssessmentGet.json - */ - /** - * Sample code: Get a database's vulnerability assessment. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getADatabaseSVulnerabilityAssessment(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseVulnerabilityAssessments() - .getWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", - VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsListByDatabaseSamples.java deleted file mode 100644 index c55ec5512d7f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabaseVulnerabilityAssessmentsListByDatabaseSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabaseVulnerabilityAssessments ListByDatabase. - */ -public final class ManagedDatabaseVulnerabilityAssessmentsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json - */ - /** - * Sample code: Get a database's vulnerability assessments list. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getADatabaseSVulnerabilityAssessmentsList(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabaseVulnerabilityAssessments() - .listByDatabase("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCancelMoveSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCancelMoveSamples.java deleted file mode 100644 index e7cc321434f4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCancelMoveSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ManagedDatabaseMoveDefinition; - -/** - * Samples for ManagedDatabases CancelMove. - */ -public final class ManagedDatabasesCancelMoveSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseCancelMove.json - */ - /** - * Sample code: Cancels a managed database move. - * - * @param manager Entry point to SqlServerManager. - */ - public static void cancelsAManagedDatabaseMove(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .cancelMove("group1", "testInstanceSrc", "testDatabase", - new ManagedDatabaseMoveDefinition().withDestinationManagedDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCompleteMoveSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCompleteMoveSamples.java deleted file mode 100644 index 9e5804e36e9a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCompleteMoveSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ManagedDatabaseMoveDefinition; - -/** - * Samples for ManagedDatabases CompleteMove. - */ -public final class ManagedDatabasesCompleteMoveSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseCompleteMove.json - */ - /** - * Sample code: Completes a managed database move. - * - * @param manager Entry point to SqlServerManager. - */ - public static void completesAManagedDatabaseMove(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .completeMove("group1", "testInstanceSrc", "testDatabase", - new ManagedDatabaseMoveDefinition().withDestinationManagedDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCompleteRestoreSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCompleteRestoreSamples.java deleted file mode 100644 index c3af5308f250..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCompleteRestoreSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.CompleteDatabaseRestoreDefinition; - -/** - * Samples for ManagedDatabases CompleteRestore. - */ -public final class ManagedDatabasesCompleteRestoreSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseCompleteExternalRestore.json - */ - /** - * Sample code: Completes a managed database external backup restore. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - completesAManagedDatabaseExternalBackupRestore(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .completeRestore("myRG", "myManagedInstanceName", "myDatabase", - new CompleteDatabaseRestoreDefinition().withLastBackupName("testdb1_log4"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCreateOrUpdateSamples.java deleted file mode 100644 index 3e75f96bd158..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesCreateOrUpdateSamples.java +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseInner; -import com.azure.resourcemanager.sql.models.ManagedDatabaseCreateMode; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ManagedDatabases CreateOrUpdate. - */ -public final class ManagedDatabasesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseCreateRecovery.json - */ - /** - * Sample code: Creates a new managed database from restoring a geo-replicated backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsANewManagedDatabaseFromRestoringAGeoReplicatedBackup( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "server1", "testdb_recovered", new ManagedDatabaseInner() - .withLocation("southeastasia") - .withCreateMode(ManagedDatabaseCreateMode.RECOVERY) - .withRecoverableDatabaseId( - "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-WestEurope/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseCreateRestoreExternalBackupManagedIdentity.json - */ - /** - * Sample code: Creates a new managed database by restoring from an external backup using managed identity. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsANewManagedDatabaseByRestoringFromAnExternalBackupUsingManagedIdentity( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", - new ManagedDatabaseInner().withLocation("southeastasia") - .withCollation("SQL_Latin1_General_CP1_CI_AS") - .withCreateMode(ManagedDatabaseCreateMode.RESTORE_EXTERNAL_BACKUP) - .withStorageContainerUri("https://myaccountname.blob.core.windows.net/backups") - .withStorageContainerIdentity("ManagedIdentity") - .withAutoCompleteRestore(true) - .withLastBackupName("last_backup_name"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateManagedDatabaseLedger.json - */ - /** - * Sample code: Creates a new managed database with ledger on. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsANewManagedDatabaseWithLedgerOn(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", - new ManagedDatabaseInner().withLocation("southeastasia").withIsLedgerOn(true), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseCreateCrossSubscriptionPointInTimeRestore.json - */ - /** - * Sample code: Creates a new managed database using cross subscription point in time restore. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsANewManagedDatabaseUsingCrossSubscriptionPointInTimeRestore( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", - new ManagedDatabaseInner().withLocation("southeastasia") - .withRestorePointInTime(OffsetDateTime.parse("2017-07-14T05:35:31.503Z")) - .withCreateMode(ManagedDatabaseCreateMode.POINT_IN_TIME_RESTORE) - .withCrossSubscriptionSourceDatabaseId( - "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr2/databases/testdb") - .withCrossSubscriptionTargetManagedInstanceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseCreateMax.json - */ - /** - * Sample code: Creates a new managed database with maximal properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createsANewManagedDatabaseWithMaximalProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", - new ManagedDatabaseInner().withLocation("southeastasia") - .withTags(mapOf("tagKey1", "fakeTokenPlaceholder")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseCreateRestoreExternalBackup.json - */ - /** - * Sample code: Creates a new managed database by restoring from an external backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsANewManagedDatabaseByRestoringFromAnExternalBackup( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", - new ManagedDatabaseInner().withLocation("southeastasia") - .withCollation("SQL_Latin1_General_CP1_CI_AS") - .withCreateMode(ManagedDatabaseCreateMode.RESTORE_EXTERNAL_BACKUP) - .withStorageContainerUri("https://myaccountname.blob.core.windows.net/backups") - .withStorageContainerSasToken("fakeTokenPlaceholder") - .withAutoCompleteRestore(true) - .withLastBackupName("last_backup_name"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseCreateMin.json - */ - /** - * Sample code: Creates a new managed database with minimal properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createsANewManagedDatabaseWithMinimalProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", - new ManagedDatabaseInner().withLocation("southeastasia"), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseCreatePointInTimeRestore.json - */ - /** - * Sample code: Creates a new managed database using point in time restore. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createsANewManagedDatabaseUsingPointInTimeRestore(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", - new ManagedDatabaseInner().withLocation("southeastasia") - .withRestorePointInTime(OffsetDateTime.parse("2017-07-14T05:35:31.503Z")) - .withCreateMode(ManagedDatabaseCreateMode.POINT_IN_TIME_RESTORE) - .withSourceDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseCreateRestoreLtrBackup.json - */ - /** - * Sample code: Creates a new managed database from restoring a long term retention backup. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsANewManagedDatabaseFromRestoringALongTermRetentionBackup( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", - new ManagedDatabaseInner().withLocation("southeastasia") - .withCollation("SQL_Latin1_General_CP1_CI_AS") - .withCreateMode(ManagedDatabaseCreateMode.RESTORE_EXTERNAL_BACKUP) - .withStorageContainerUri("https://myaccountname.blob.core.windows.net/backups") - .withStorageContainerSasToken("fakeTokenPlaceholder"), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesDeleteSamples.java deleted file mode 100644 index 450f91660d12..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabases Delete. - */ -public final class ManagedDatabasesDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseDelete.json - */ - /** - * Sample code: Delete managed database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteManagedDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .delete("Default-SQL-SouthEastAsia", "managedInstance", "testdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesGetSamples.java deleted file mode 100644 index 3ef4a52459d2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabases Get. - */ -public final class ManagedDatabasesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseGet.json - */ - /** - * Sample code: Gets a managed database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAManagedDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .getWithResponse("Test1", "managedInstance", "managedDatabase", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesListByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesListByInstanceSamples.java deleted file mode 100644 index 579c978b5ccf..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesListByInstanceSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabases ListByInstance. - */ -public final class ManagedDatabasesListByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseListByManagedInstance.json - */ - /** - * Sample code: List databases by managed instances. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listDatabasesByManagedInstances(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .listByInstance("Test1", "managedInstance", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesListInaccessibleByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesListInaccessibleByInstanceSamples.java deleted file mode 100644 index accdd4122925..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesListInaccessibleByInstanceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabases ListInaccessibleByInstance. - */ -public final class ManagedDatabasesListInaccessibleByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/InaccessibleManagedDatabaseListByManagedInstance.json - */ - /** - * Sample code: List inaccessible managed databases by managed instances. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listInaccessibleManagedDatabasesByManagedInstances(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .listInaccessibleByInstance("testrg", "testcl", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesReevaluateInaccessibleDatabaseStateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesReevaluateInaccessibleDatabaseStateSamples.java deleted file mode 100644 index 94f3cec821ab..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesReevaluateInaccessibleDatabaseStateSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedDatabases ReevaluateInaccessibleDatabaseState. - */ -public final class ManagedDatabasesReevaluateInaccessibleDatabaseStateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseReevaluateInaccessibleDatabaseState.json - */ - /** - * Sample code: Reevaluate the inaccessibility state of a managed database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - reevaluateTheInaccessibilityStateOfAManagedDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .reevaluateInaccessibleDatabaseState("Test1", "managedInstance", "managedDatabase", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesStartMoveSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesStartMoveSamples.java deleted file mode 100644 index ba884805e682..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesStartMoveSamples.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ManagedDatabaseStartMoveDefinition; -import com.azure.resourcemanager.sql.models.MoveOperationMode; - -/** - * Samples for ManagedDatabases StartMove. - */ -public final class ManagedDatabasesStartMoveSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseStartMoveMax.json - */ - /** - * Sample code: Starts a managed database move with all optional parameters specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void startsAManagedDatabaseMoveWithAllOptionalParametersSpecified( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .startMove("group1", "testInstanceSrc", "testDatabase", - new ManagedDatabaseStartMoveDefinition().withDestinationManagedDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase") - .withOperationMode(MoveOperationMode.COPY), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseStartMoveMin.json - */ - /** - * Sample code: Starts a managed database move with no optional parameters specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void startsAManagedDatabaseMoveWithNoOptionalParametersSpecified( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .startMove("group1", "testInstanceSrc", "testDatabase", - new ManagedDatabaseStartMoveDefinition().withDestinationManagedDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesUpdateSamples.java deleted file mode 100644 index 1c7c868ca398..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedDatabasesUpdateSamples.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ManagedDatabaseUpdate; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ManagedDatabases Update. - */ -public final class ManagedDatabasesUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseUpdateMax.json - */ - /** - * Sample code: Updates a managed database with maximal properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updatesAManagedDatabaseWithMaximalProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .update("Default-SQL-SouthEastAsia", "managedInstance", "testdb", - new ManagedDatabaseUpdate().withTags(mapOf("tagKey1", "fakeTokenPlaceholder")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedDatabaseUpdateMin.json - */ - /** - * Sample code: Updates a managed database with minimal properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updatesAManagedDatabaseWithMinimalProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedDatabases() - .update("Default-SQL-SouthEastAsia", "managedInstance", "testdb", - new ManagedDatabaseUpdate().withTags(mapOf("tagKey1", "fakeTokenPlaceholder")), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsCreateOrUpdateSamples.java deleted file mode 100644 index 76bea5923c46..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsCreateOrUpdateSamples.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceAdministratorInner; -import com.azure.resourcemanager.sql.models.AdministratorName; -import com.azure.resourcemanager.sql.models.ManagedInstanceAdministratorType; -import java.util.UUID; - -/** - * Samples for ManagedInstanceAdministrators CreateOrUpdate. - */ -public final class ManagedInstanceAdministratorsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceAdministratorCreate.json - */ - /** - * Sample code: Create administrator of managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createAdministratorOfManagedInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceAdministrators() - .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", AdministratorName.ACTIVE_DIRECTORY, - new ManagedInstanceAdministratorInner() - .withAdministratorType(ManagedInstanceAdministratorType.ACTIVE_DIRECTORY) - .withLogin("bob@contoso.com") - .withSid(UUID.fromString("44444444-3333-2222-1111-000000000000")) - .withTenantId(UUID.fromString("55555555-4444-3333-2222-111111111111")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceAdministratorUpdate.json - */ - /** - * Sample code: Update administrator of managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAdministratorOfManagedInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceAdministrators() - .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", AdministratorName.ACTIVE_DIRECTORY, - new ManagedInstanceAdministratorInner() - .withAdministratorType(ManagedInstanceAdministratorType.ACTIVE_DIRECTORY) - .withLogin("bob@contoso.com") - .withSid(UUID.fromString("44444444-3333-2222-1111-000000000000")) - .withTenantId(UUID.fromString("55555555-4444-3333-2222-111111111111")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsDeleteSamples.java deleted file mode 100644 index 5d39daab09c0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsDeleteSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.AdministratorName; - -/** - * Samples for ManagedInstanceAdministrators Delete. - */ -public final class ManagedInstanceAdministratorsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceAdministratorDelete.json - */ - /** - * Sample code: Delete administrator of managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteAdministratorOfManagedInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceAdministrators() - .delete("Default-SQL-SouthEastAsia", "managedInstance", AdministratorName.ACTIVE_DIRECTORY, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsGetSamples.java deleted file mode 100644 index 49fd2a471138..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.AdministratorName; - -/** - * Samples for ManagedInstanceAdministrators Get. - */ -public final class ManagedInstanceAdministratorsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceAdministratorGet.json - */ - /** - * Sample code: Get administrator of managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAdministratorOfManagedInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceAdministrators() - .getWithResponse("Default-SQL-SouthEastAsia", "managedInstance", AdministratorName.ACTIVE_DIRECTORY, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsListByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsListByInstanceSamples.java deleted file mode 100644 index ff81030c129e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdministratorsListByInstanceSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstanceAdministrators ListByInstance. - */ -public final class ManagedInstanceAdministratorsListByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceAdministratorListByInstance.json - */ - /** - * Sample code: List administrators of managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listAdministratorsOfManagedInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceAdministrators() - .listByInstance("Default-SQL-SouthEastAsia", "managedInstance", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java deleted file mode 100644 index 835ccf674535..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceAdvancedThreatProtectionInner; -import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; -import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionState; - -/** - * Samples for ManagedInstanceAdvancedThreatProtectionSettings CreateOrUpdate. - */ -public final class ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceAdvancedThreatProtectionSettingsCreateMin.json - */ - /** - * Sample code: Update a managed instance's Advanced Threat Protection settings with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAManagedInstanceSAdvancedThreatProtectionSettingsWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceAdvancedThreatProtectionSettings() - .createOrUpdate("threatprotection-4799", "threatprotection-6440", AdvancedThreatProtectionName.DEFAULT, - new ManagedInstanceAdvancedThreatProtectionInner().withState(AdvancedThreatProtectionState.DISABLED), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceAdvancedThreatProtectionSettingsCreateMax.json - */ - /** - * Sample code: Update a managed instance's Advanced Threat Protection settings with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAManagedInstanceSAdvancedThreatProtectionSettingsWithAllParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceAdvancedThreatProtectionSettings() - .createOrUpdate("threatprotection-4799", "threatprotection-6440", AdvancedThreatProtectionName.DEFAULT, - new ManagedInstanceAdvancedThreatProtectionInner().withState(AdvancedThreatProtectionState.ENABLED), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdvancedThreatProtectionSettingsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdvancedThreatProtectionSettingsGetSamples.java deleted file mode 100644 index 4ac8e66397b8..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdvancedThreatProtectionSettingsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; - -/** - * Samples for ManagedInstanceAdvancedThreatProtectionSettings Get. - */ -public final class ManagedInstanceAdvancedThreatProtectionSettingsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceAdvancedThreatProtectionSettingsGet.json - */ - /** - * Sample code: Get a managed instance's Advanced Threat Protection settings. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAManagedInstanceSAdvancedThreatProtectionSettings(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceAdvancedThreatProtectionSettings() - .getWithResponse("threatprotection-4799", "threatprotection-6440", AdvancedThreatProtectionName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceSamples.java deleted file mode 100644 index 477908f42efb..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstanceAdvancedThreatProtectionSettings ListByInstance. - */ -public final class ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceAdvancedThreatProtectionSettingsListByInstance.json - */ - /** - * Sample code: List the managed instance's Advanced Threat Protection settings. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listTheManagedInstanceSAdvancedThreatProtectionSettings( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceAdvancedThreatProtectionSettings() - .listByInstance("threatprotection-4799", "threatprotection-6440", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsCreateOrUpdateSamples.java deleted file mode 100644 index d623adf5cfee..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsCreateOrUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceAzureADOnlyAuthenticationInner; -import com.azure.resourcemanager.sql.models.AuthenticationName; - -/** - * Samples for ManagedInstanceAzureADOnlyAuthentications CreateOrUpdate. - */ -public final class ManagedInstanceAzureADOnlyAuthenticationsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json - */ - /** - * Sample code: Creates or updates Azure Active Directory only authentication object. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsOrUpdatesAzureActiveDirectoryOnlyAuthenticationObject( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceAzureADOnlyAuthentications() - .createOrUpdate("Default-SQL-SouthEastAsia", "managedInstance", AuthenticationName.DEFAULT, - new ManagedInstanceAzureADOnlyAuthenticationInner().withAzureADOnlyAuthentication(false), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsDeleteSamples.java deleted file mode 100644 index b7853d26a358..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsDeleteSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.AuthenticationName; - -/** - * Samples for ManagedInstanceAzureADOnlyAuthentications Delete. - */ -public final class ManagedInstanceAzureADOnlyAuthenticationsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceAzureADOnlyAuthDelete.json - */ - /** - * Sample code: Deletes Azure Active Directory only authentication object. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - deletesAzureActiveDirectoryOnlyAuthenticationObject(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceAzureADOnlyAuthentications() - .delete("Default-SQL-SouthEastAsia", "managedInstance", AuthenticationName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsGetSamples.java deleted file mode 100644 index fbef4eac104b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.AuthenticationName; - -/** - * Samples for ManagedInstanceAzureADOnlyAuthentications Get. - */ -public final class ManagedInstanceAzureADOnlyAuthenticationsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceAzureADOnlyAuthGet.json - */ - /** - * Sample code: Gets a Azure Active Directory only authentication property. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsAAzureActiveDirectoryOnlyAuthenticationProperty(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceAzureADOnlyAuthentications() - .getWithResponse("Default-SQL-SouthEastAsia", "managedInstance", AuthenticationName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsListByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsListByInstanceSamples.java deleted file mode 100644 index c2cf361263fe..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceAzureADOnlyAuthenticationsListByInstanceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstanceAzureADOnlyAuthentications ListByInstance. - */ -public final class ManagedInstanceAzureADOnlyAuthenticationsListByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceAzureADOnlyAuthListByInstance.json - */ - /** - * Sample code: Gets a list of Azure Active Directory only authentication object. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAListOfAzureActiveDirectoryOnlyAuthenticationObject( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceAzureADOnlyAuthentications() - .listByInstance("Default-SQL-SouthEastAsia", "managedInstance", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceDtcsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceDtcsCreateOrUpdateSamples.java deleted file mode 100644 index 2f7884dc57c1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceDtcsCreateOrUpdateSamples.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceDtcInner; -import com.azure.resourcemanager.sql.models.DtcName; -import com.azure.resourcemanager.sql.models.ManagedInstanceDtcSecuritySettings; -import com.azure.resourcemanager.sql.models.ManagedInstanceDtcTransactionManagerCommunicationSettings; -import java.util.Arrays; - -/** - * Samples for ManagedInstanceDtcs CreateOrUpdate. - */ -public final class ManagedInstanceDtcsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceDtcUpdateEnableDtc.json - */ - /** - * Sample code: Updates managed instance DTC settings by enabling DTC. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updatesManagedInstanceDTCSettingsByEnablingDTC(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceDtcs() - .createOrUpdate("testrg", "testinstance", DtcName.CURRENT, - new ManagedInstanceDtcInner().withDtcEnabled(true), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceDtcUpdateMax.json - */ - /** - * Sample code: Updates managed instance DTC settings with all optional parameters specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updatesManagedInstanceDTCSettingsWithAllOptionalParametersSpecified( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceDtcs() - .createOrUpdate("testrg", "testinstance", DtcName.CURRENT, new ManagedInstanceDtcInner() - .withDtcEnabled(true) - .withSecuritySettings(new ManagedInstanceDtcSecuritySettings() - .withTransactionManagerCommunicationSettings( - new ManagedInstanceDtcTransactionManagerCommunicationSettings().withAllowInboundEnabled(false) - .withAllowOutboundEnabled(true) - .withAuthentication("NoAuth")) - .withXaTransactionsEnabled(false) - .withSnaLu6point2TransactionsEnabled(false) - .withXaTransactionsDefaultTimeout(1000) - .withXaTransactionsMaximumTimeout(3000)) - .withExternalDnsSuffixSearchList(Arrays.asList("dns.example1.com", "dns.example2.com")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceDtcsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceDtcsGetSamples.java deleted file mode 100644 index dd1c7ec94d8c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceDtcsGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.DtcName; - -/** - * Samples for ManagedInstanceDtcs Get. - */ -public final class ManagedInstanceDtcsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceDtcGet.json - */ - /** - * Sample code: Gets managed instance DTC settings. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsManagedInstanceDTCSettings(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceDtcs() - .getWithResponse("testrg", "testinstance", DtcName.CURRENT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceDtcsListByManagedInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceDtcsListByManagedInstanceSamples.java deleted file mode 100644 index 5e562b550303..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceDtcsListByManagedInstanceSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstanceDtcs ListByManagedInstance. - */ -public final class ManagedInstanceDtcsListByManagedInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceDtcList.json - */ - /** - * Sample code: Gets a list of managed instance DTC settings. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAListOfManagedInstanceDTCSettings(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceDtcs() - .listByManagedInstance("testrg", "testinstance", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsCreateOrUpdateSamples.java deleted file mode 100644 index 683efd845af5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsCreateOrUpdateSamples.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceEncryptionProtectorInner; -import com.azure.resourcemanager.sql.models.EncryptionProtectorName; -import com.azure.resourcemanager.sql.models.ServerKeyType; - -/** - * Samples for ManagedInstanceEncryptionProtectors CreateOrUpdate. - */ -public final class ManagedInstanceEncryptionProtectorsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json - */ - /** - * Sample code: Update the encryption protector to key vault. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateTheEncryptionProtectorToKeyVault(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceEncryptionProtectors() - .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, - new ManagedInstanceEncryptionProtectorInner().withServerKeyName("fakeTokenPlaceholder") - .withServerKeyType(ServerKeyType.AZURE_KEY_VAULT) - .withAutoRotationEnabled(false), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json - */ - /** - * Sample code: Update the encryption protector to service managed. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateTheEncryptionProtectorToServiceManaged(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceEncryptionProtectors() - .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, - new ManagedInstanceEncryptionProtectorInner().withServerKeyName("fakeTokenPlaceholder") - .withServerKeyType(ServerKeyType.SERVICE_MANAGED), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsGetSamples.java deleted file mode 100644 index 5cfc0653a8b6..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.EncryptionProtectorName; - -/** - * Samples for ManagedInstanceEncryptionProtectors Get. - */ -public final class ManagedInstanceEncryptionProtectorsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceEncryptionProtectorGet.json - */ - /** - * Sample code: Get the encryption protector. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getTheEncryptionProtector(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceEncryptionProtectors() - .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsListByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsListByInstanceSamples.java deleted file mode 100644 index 668af86eca15..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsListByInstanceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstanceEncryptionProtectors ListByInstance. - */ -public final class ManagedInstanceEncryptionProtectorsListByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceEncryptionProtectorList.json - */ - /** - * Sample code: List encryption protectors by managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listEncryptionProtectorsByManagedInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceEncryptionProtectors() - .listByInstance("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsRevalidateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsRevalidateSamples.java deleted file mode 100644 index 7a7e92ff77da..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceEncryptionProtectorsRevalidateSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.EncryptionProtectorName; - -/** - * Samples for ManagedInstanceEncryptionProtectors Revalidate. - */ -public final class ManagedInstanceEncryptionProtectorsRevalidateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceEncryptionProtectorRevalidate.json - */ - /** - * Sample code: Revalidates the encryption protector. - * - * @param manager Entry point to SqlServerManager. - */ - public static void revalidatesTheEncryptionProtector(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceEncryptionProtectors() - .revalidate("sqlcrudtest-7398", "sqlcrudtest-4645", EncryptionProtectorName.CURRENT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysCreateOrUpdateSamples.java deleted file mode 100644 index dc7508ab2c04..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysCreateOrUpdateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceKeyInner; -import com.azure.resourcemanager.sql.models.ServerKeyType; - -/** - * Samples for ManagedInstanceKeys CreateOrUpdate. - */ -public final class ManagedInstanceKeysCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceKeyCreateOrUpdate.json - */ - /** - * Sample code: Creates or updates a managed instance key. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsOrUpdatesAManagedInstanceKey(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceKeys() - .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", - "someVault_someKey_01234567890123456789012345678901", - new ManagedInstanceKeyInner().withServerKeyType(ServerKeyType.AZURE_KEY_VAULT) - .withUri("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysDeleteSamples.java deleted file mode 100644 index 427c232206d4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstanceKeys Delete. - */ -public final class ManagedInstanceKeysDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceKeyDelete.json - */ - /** - * Sample code: Delete the managed instance key. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteTheManagedInstanceKey(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceKeys() - .delete("sqlcrudtest-7398", "sqlcrudtest-4645", "someVault_someKey_01234567890123456789012345678901", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysGetSamples.java deleted file mode 100644 index 7eaba151c9f9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstanceKeys Get. - */ -public final class ManagedInstanceKeysGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceKeyGet.json - */ - /** - * Sample code: Get the managed instance key. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getTheManagedInstanceKey(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceKeys() - .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", - "someVault_someKey_01234567890123456789012345678901", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysListByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysListByInstanceSamples.java deleted file mode 100644 index 186cafd33e18..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceKeysListByInstanceSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstanceKeys ListByInstance. - */ -public final class ManagedInstanceKeysListByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceKeyList.json - */ - /** - * Sample code: List the keys for a managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listTheKeysForAManagedInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceKeys() - .listByInstance("sqlcrudtest-7398", "sqlcrudtest-4645", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 018669e8e29d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceLongTermRetentionPolicyInner; -import com.azure.resourcemanager.sql.models.BackupStorageAccessTier; -import com.azure.resourcemanager.sql.models.ManagedInstanceLongTermRetentionPolicyName; - -/** - * Samples for ManagedInstanceLongTermRetentionPolicies CreateOrUpdate. - */ -public final class ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json - */ - /** - * Sample code: Create or update the LTR policy for the managed database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createOrUpdateTheLTRPolicyForTheManagedDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceLongTermRetentionPolicies() - .createOrUpdate("testResourceGroup", "testInstance", "testDatabase", - ManagedInstanceLongTermRetentionPolicyName.DEFAULT, - new ManagedInstanceLongTermRetentionPolicyInner() - .withBackupStorageAccessTier(BackupStorageAccessTier.HOT) - .withWeeklyRetention("P1M") - .withMonthlyRetention("P1Y") - .withYearlyRetention("P5Y") - .withWeekOfYear(5), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesDeleteSamples.java deleted file mode 100644 index 7121513766ca..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesDeleteSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ManagedInstanceLongTermRetentionPolicyName; - -/** - * Samples for ManagedInstanceLongTermRetentionPolicies Delete. - */ -public final class ManagedInstanceLongTermRetentionPoliciesDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceLongTermRetentionPolicyDelete.json - */ - /** - * Sample code: Deletes the LTR policy for the managed database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - deletesTheLTRPolicyForTheManagedDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceLongTermRetentionPolicies() - .delete("testResourceGroup", "testInstance", "testDatabase", - ManagedInstanceLongTermRetentionPolicyName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesGetSamples.java deleted file mode 100644 index 2be1fe5d7b8d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ManagedInstanceLongTermRetentionPolicyName; - -/** - * Samples for ManagedInstanceLongTermRetentionPolicies Get. - */ -public final class ManagedInstanceLongTermRetentionPoliciesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceLongTermRetentionPolicyGet.json - */ - /** - * Sample code: Get the long term retention policy for the managed database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheLongTermRetentionPolicyForTheManagedDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceLongTermRetentionPolicies() - .getWithResponse("testResourceGroup", "testInstance", "testDatabase", - ManagedInstanceLongTermRetentionPolicyName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesListByDatabaseSamples.java deleted file mode 100644 index fa136aee5141..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceLongTermRetentionPoliciesListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstanceLongTermRetentionPolicies ListByDatabase. - */ -public final class ManagedInstanceLongTermRetentionPoliciesListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceLongTermRetentionPolicyListByDatabase.json - */ - /** - * Sample code: Get the long term retention policies for the managed database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheLongTermRetentionPoliciesForTheManagedDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceLongTermRetentionPolicies() - .listByDatabase("testResourceGroup", "testInstance", "testDatabase", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsCancelSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsCancelSamples.java deleted file mode 100644 index 1caf2f7dd56d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsCancelSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstanceOperations Cancel. - */ -public final class ManagedInstanceOperationsCancelSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CancelManagedInstanceOperation.json - */ - /** - * Sample code: Cancel the managed instance management operation. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - cancelTheManagedInstanceManagementOperation(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceOperations() - .cancelWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", "11111111-1111-1111-1111-111111111111", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsGetSamples.java deleted file mode 100644 index 2b4f6608dbef..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstanceOperations Get. - */ -public final class ManagedInstanceOperationsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetManagedInstanceOperation.json - */ - /** - * Sample code: Gets the managed instance management operation. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsTheManagedInstanceManagementOperation(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceOperations() - .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", "00000000-1111-2222-3333-444444444444", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsListByManagedInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsListByManagedInstanceSamples.java deleted file mode 100644 index 2315d8e9fa25..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceOperationsListByManagedInstanceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstanceOperations ListByManagedInstance. - */ -public final class ManagedInstanceOperationsListByManagedInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListManagedInstanceOperations.json - */ - /** - * Sample code: List the managed instance management operations. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listTheManagedInstanceManagementOperations(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceOperations() - .listByManagedInstance("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsCreateOrUpdateSamples.java deleted file mode 100644 index dca77b57491f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedInstancePrivateEndpointConnectionInner; -import com.azure.resourcemanager.sql.models.ManagedInstancePrivateLinkServiceConnectionStateProperty; - -/** - * Samples for ManagedInstancePrivateEndpointConnections CreateOrUpdate. - */ -public final class ManagedInstancePrivateEndpointConnectionsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstancePrivateEndpointConnectionUpdate.json - */ - /** - * Sample code: Approve or reject a private endpoint connection with a given name. - * - * @param manager Entry point to SqlServerManager. - */ - public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstancePrivateEndpointConnections() - .createOrUpdate("Default", "test-cl", "private-endpoint-connection-name", - new ManagedInstancePrivateEndpointConnectionInner().withPrivateLinkServiceConnectionState( - new ManagedInstancePrivateLinkServiceConnectionStateProperty().withStatus("Approved") - .withDescription("Approved by johndoe@contoso.com")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsDeleteSamples.java deleted file mode 100644 index 4db3d07d1a11..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstancePrivateEndpointConnections Delete. - */ -public final class ManagedInstancePrivateEndpointConnectionsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstancePrivateEndpointConnectionDelete.json - */ - /** - * Sample code: Deletes a private endpoint connection with a given name. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - deletesAPrivateEndpointConnectionWithAGivenName(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstancePrivateEndpointConnections() - .delete("Default", "test-cl", "private-endpoint-connection-name", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsGetSamples.java deleted file mode 100644 index acc1253de8c2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstancePrivateEndpointConnections Get. - */ -public final class ManagedInstancePrivateEndpointConnectionsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstancePrivateEndpointConnectionGet.json - */ - /** - * Sample code: Gets private endpoint connection. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsPrivateEndpointConnection(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstancePrivateEndpointConnections() - .getWithResponse("Default", "test-cl", "private-endpoint-connection-name", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsListByManagedInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsListByManagedInstanceSamples.java deleted file mode 100644 index 2c3f95668933..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateEndpointConnectionsListByManagedInstanceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstancePrivateEndpointConnections ListByManagedInstance. - */ -public final class ManagedInstancePrivateEndpointConnectionsListByManagedInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstancePrivateEndpointConnectionList.json - */ - /** - * Sample code: Gets list of private endpoint connections on a server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsListOfPrivateEndpointConnectionsOnAServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstancePrivateEndpointConnections() - .listByManagedInstance("Default", "test-cl", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateLinkResourcesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateLinkResourcesGetSamples.java deleted file mode 100644 index 34692ceb948d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateLinkResourcesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstancePrivateLinkResources Get. - */ -public final class ManagedInstancePrivateLinkResourcesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstancePrivateLinkResourcesGet.json - */ - /** - * Sample code: Gets a private link resource for SQL. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAPrivateLinkResourceForSQL(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstancePrivateLinkResources() - .getWithResponse("Default", "test-cl", "plr", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateLinkResourcesListByManagedInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateLinkResourcesListByManagedInstanceSamples.java deleted file mode 100644 index cea9a77adb96..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancePrivateLinkResourcesListByManagedInstanceSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstancePrivateLinkResources ListByManagedInstance. - */ -public final class ManagedInstancePrivateLinkResourcesListByManagedInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstancePrivateLinkResourcesList.json - */ - /** - * Sample code: Gets private link resources for SQL. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsPrivateLinkResourcesForSQL(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstancePrivateLinkResources() - .listByManagedInstance("Default", "test-cl", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceTdeCertificatesCreateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceTdeCertificatesCreateSamples.java deleted file mode 100644 index 746e050fa4e9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceTdeCertificatesCreateSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.TdeCertificate; - -/** - * Samples for ManagedInstanceTdeCertificates Create. - */ -public final class ManagedInstanceTdeCertificatesCreateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceTdeCertificate.json - */ - /** - * Sample code: Upload a TDE certificate. - * - * @param manager Entry point to SqlServerManager. - */ - public static void uploadATDECertificate(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceTdeCertificates() - .create("testtdecert", "testtdecert", new TdeCertificate().withPrivateBlob("MIIXXXXXXXX"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsCreateOrUpdateSamples.java deleted file mode 100644 index 35067f741c63..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceVulnerabilityAssessmentInner; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties; -import java.util.Arrays; - -/** - * Samples for ManagedInstanceVulnerabilityAssessments CreateOrUpdate. - */ -public final class ManagedInstanceVulnerabilityAssessmentsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json - */ - /** - * Sample code: Create a managed instance's vulnerability assessment with minimal parameters, when - * storageAccountAccessKey is specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createAManagedInstanceSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceVulnerabilityAssessments() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, - new ManagedInstanceVulnerabilityAssessmentInner() - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageAccountAccessKey("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json - */ - /** - * Sample code: Create a managed instance's vulnerability assessment with minimal parameters, when - * storageContainerSasKey is specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createAManagedInstanceSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceVulnerabilityAssessments() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, - new ManagedInstanceVulnerabilityAssessmentInner() - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageContainerSasKey("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceVulnerabilityAssessmentCreateMax.json - */ - /** - * Sample code: Create a managed instance's vulnerability assessment with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createAManagedInstanceSVulnerabilityAssessmentWithAllParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceVulnerabilityAssessments() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, - new ManagedInstanceVulnerabilityAssessmentInner() - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageContainerSasKey("fakeTokenPlaceholder") - .withStorageAccountAccessKey("fakeTokenPlaceholder") - .withRecurringScans(new VulnerabilityAssessmentRecurringScansProperties().withIsEnabled(true) - .withEmailSubscriptionAdmins(true) - .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsDeleteSamples.java deleted file mode 100644 index 21174c4001a4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsDeleteSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for ManagedInstanceVulnerabilityAssessments Delete. - */ -public final class ManagedInstanceVulnerabilityAssessmentsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceVulnerabilityAssessmentDelete.json - */ - /** - * Sample code: Remove a managed instance's vulnerability assessment. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - removeAManagedInstanceSVulnerabilityAssessment(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceVulnerabilityAssessments() - .deleteWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsGetSamples.java deleted file mode 100644 index f1d297da3c93..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for ManagedInstanceVulnerabilityAssessments Get. - */ -public final class ManagedInstanceVulnerabilityAssessmentsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceVulnerabilityAssessmentGet.json - */ - /** - * Sample code: Get a managed instance's vulnerability assessment. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAManagedInstanceSVulnerabilityAssessment(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceVulnerabilityAssessments() - .getWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsListByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsListByInstanceSamples.java deleted file mode 100644 index 8b1facac5265..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstanceVulnerabilityAssessmentsListByInstanceSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstanceVulnerabilityAssessments ListByInstance. - */ -public final class ManagedInstanceVulnerabilityAssessmentsListByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceVulnerabilityAssessmentListByInstance.json - */ - /** - * Sample code: Get a managed instance's vulnerability assessment policies. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAManagedInstanceSVulnerabilityAssessmentPolicies(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstanceVulnerabilityAssessments() - .listByInstance("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesCreateOrUpdateSamples.java deleted file mode 100644 index c15cd745b393..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesCreateOrUpdateSamples.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceInner; -import com.azure.resourcemanager.sql.models.AuthMetadataLookupModes; -import com.azure.resourcemanager.sql.models.AvailabilityZoneType; -import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.azure.resourcemanager.sql.models.HybridSecondaryUsage; -import com.azure.resourcemanager.sql.models.ManagedInstanceDatabaseFormat; -import com.azure.resourcemanager.sql.models.ManagedInstanceExternalAdministrator; -import com.azure.resourcemanager.sql.models.ManagedInstanceLicenseType; -import com.azure.resourcemanager.sql.models.ManagedInstanceProxyOverride; -import com.azure.resourcemanager.sql.models.PrincipalType; -import com.azure.resourcemanager.sql.models.ServicePrincipal; -import com.azure.resourcemanager.sql.models.ServicePrincipalType; -import com.azure.resourcemanager.sql.models.Sku; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -/** - * Samples for ManagedInstances CreateOrUpdate. - */ -public final class ManagedInstancesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceCreateMin.json - */ - /** - * Sample code: Create managed instance with minimal properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createManagedInstanceWithMinimalProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .createOrUpdate("testrg", "testinstance", new ManagedInstanceInner().withLocation("Japan East") - .withSku(new Sku().withName("GP_Gen5").withTier("GeneralPurpose")) - .withAdministratorLogin("dummylogin") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withSubnetId( - "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withLicenseType(ManagedInstanceLicenseType.LICENSE_INCLUDED) - .withVCores(8) - .withStorageSizeInGB(1024), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceCreateMax.json - */ - /** - * Sample code: Create managed instance with all properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createManagedInstanceWithAllProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .createOrUpdate("testrg", "testinstance", new ManagedInstanceInner().withLocation("Japan East") - .withTags(mapOf("tagKey1", "fakeTokenPlaceholder")) - .withSku(new Sku().withName("GP_Gen5").withTier("GeneralPurpose")) - .withAdministratorLogin("dummylogin") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withSubnetId( - "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withLicenseType(ManagedInstanceLicenseType.LICENSE_INCLUDED) - .withHybridSecondaryUsage(HybridSecondaryUsage.PASSIVE) - .withVCores(8) - .withStorageSizeInGB(1024) - .withCollation("SQL_Latin1_General_CP1_CI_AS") - .withDnsZonePartner( - "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance") - .withPublicDataEndpointEnabled(false) - .withProxyOverride(ManagedInstanceProxyOverride.REDIRECT) - .withTimezoneId("UTC") - .withInstancePoolId( - "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1") - .withMaintenanceConfigurationId( - "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1") - .withMinimalTlsVersion("1.2") - .withRequestedBackupStorageRedundancy(BackupStorageRedundancy.GEO) - .withAdministrators(new ManagedInstanceExternalAdministrator().withPrincipalType(PrincipalType.USER) - .withLogin("bob@contoso.com") - .withSid(UUID.fromString("00000011-1111-2222-2222-123456789111")) - .withTenantId(UUID.fromString("00000011-1111-2222-2222-123456789111")) - .withAzureADOnlyAuthentication(true)) - .withServicePrincipal(new ServicePrincipal().withType(ServicePrincipalType.SYSTEM_ASSIGNED)) - .withAuthenticationMetadata(AuthMetadataLookupModes.AZURE_AD) - .withDatabaseFormat(ManagedInstanceDatabaseFormat.ALWAYS_UP_TO_DATE) - .withRequestedLogicalAvailabilityZone(AvailabilityZoneType.ONE), 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesDeleteSamples.java deleted file mode 100644 index 84e3f566eb8c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstances Delete. - */ -public final class ManagedInstancesDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceDelete.json - */ - /** - * Sample code: Delete managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteManagedInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .delete("testrg", "testinstance", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesFailoverSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesFailoverSamples.java deleted file mode 100644 index 39fe594d4986..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesFailoverSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ReplicaType; - -/** - * Samples for ManagedInstances Failover. - */ -public final class ManagedInstancesFailoverSamples { - /* - * x-ms-original-file: 2025-02-01-preview/FailoverManagedInstance.json - */ - /** - * Sample code: Failover a managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void failoverAManagedInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .failover("group1", "instanceName", ReplicaType.PRIMARY, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesGetByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesGetByResourceGroupSamples.java deleted file mode 100644 index fbc72a82b702..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesGetByResourceGroupSamples.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstances GetByResourceGroup. - */ -public final class ManagedInstancesGetByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceGetWithExpandEqualsAdministrators.json - */ - /** - * Sample code: Get managed instance with $expand=administrators/activedirectory. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getManagedInstanceWithExpandAdministratorsActivedirectory( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .getByResourceGroupWithResponse("testrg", "testinstance", null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceGet.json - */ - /** - * Sample code: Get managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getManagedInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .getByResourceGroupWithResponse("testrg", "testinstance", null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceGetWhileUpdating.json - */ - /** - * Sample code: Get managed instance while resource is updating. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getManagedInstanceWhileResourceIsUpdating(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .getByResourceGroupWithResponse("testrg", "testinstance", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByInstancePoolSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByInstancePoolSamples.java deleted file mode 100644 index ff6fa623e537..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByInstancePoolSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstances ListByInstancePool. - */ -public final class ManagedInstancesListByInstancePoolSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceListByInstancePool.json - */ - /** - * Sample code: List managed instances by instance pool. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listManagedInstancesByInstancePool(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .listByInstancePool("Test1", "pool1", null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json - */ - /** - * Sample code: List managed instances by instance pool with $expand=administrators/activedirectory. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listManagedInstancesByInstancePoolWithExpandAdministratorsActivedirectory( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .listByInstancePool("Test1", "pool1", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByManagedInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByManagedInstanceSamples.java deleted file mode 100644 index 2946ee54b5e8..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByManagedInstanceSamples.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.MetricType; -import com.azure.resourcemanager.sql.models.QueryTimeGrainType; - -/** - * Samples for ManagedInstances ListByManagedInstance. - */ -public final class ManagedInstancesListByManagedInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceTopQueriesList.json - */ - /** - * Sample code: Obtain list of instance's top resource consuming queries. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - obtainListOfInstanceSTopResourceConsumingQueries(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .listByManagedInstance("sqlcrudtest-7398", "sqlcrudtest-4645", null, null, null, null, - QueryTimeGrainType.PT1H, null, MetricType.DURATION, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceTopQueriesListMax.json - */ - /** - * Sample code: Obtain list of instance's top resource consuming queries. Full-blown request and response. - * - * @param manager Entry point to SqlServerManager. - */ - public static void obtainListOfInstanceSTopResourceConsumingQueriesFullBlownRequestAndResponse( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .listByManagedInstance("sqlcrudtest-7398", "sqlcrudtest-4645", null, "db1,db2", "2020-03-10T12:00:00Z", - "2020-03-12T12:00:00Z", QueryTimeGrainType.P1D, null, MetricType.CPU, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceTopQueriesListMin.json - */ - /** - * Sample code: Obtain list of instance's top resource consuming queries. Minimal request and response. - * - * @param manager Entry point to SqlServerManager. - */ - public static void obtainListOfInstanceSTopResourceConsumingQueriesMinimalRequestAndResponse( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .listByManagedInstance("sqlcrudtest-7398", "sqlcrudtest-4645", null, null, null, null, null, null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByResourceGroupSamples.java deleted file mode 100644 index 330f31affdd2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListByResourceGroupSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstances ListByResourceGroup. - */ -public final class ManagedInstancesListByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json - */ - /** - * Sample code: List managed instances by resource group with $expand=administrators/activedirectory. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listManagedInstancesByResourceGroupWithExpandAdministratorsActivedirectory( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .listByResourceGroup("Test1", null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceListByResourceGroup.json - */ - /** - * Sample code: List managed instances by resource group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listManagedInstancesByResourceGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .listByResourceGroup("Test1", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceSamples.java deleted file mode 100644 index 2fbb77cfb800..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstances ListOutboundNetworkDependenciesByManagedInstance. - */ -public final class ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListOutboundNetworkDependenciesByManagedInstance.json - */ - /** - * Sample code: Gets the collection of outbound network dependencies for the given managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheCollectionOfOutboundNetworkDependenciesForTheGivenManagedInstance( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .listOutboundNetworkDependenciesByManagedInstance("sqlcrudtest-7398", "testinstance", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListSamples.java deleted file mode 100644 index e9859b6a3f90..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesListSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstances List. - */ -public final class ManagedInstancesListSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceList.json - */ - /** - * Sample code: List managed instances. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listManagedInstances(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getManagedInstances().list(null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceListWithExpandEqualsAdministrators.json - */ - /** - * Sample code: List managed instances with $expand=administrators/activedirectory. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listManagedInstancesWithExpandAdministratorsActivedirectory( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getManagedInstances().list(null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesReevaluateInaccessibleDatabaseStateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesReevaluateInaccessibleDatabaseStateSamples.java deleted file mode 100644 index 4c26a449dabe..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesReevaluateInaccessibleDatabaseStateSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstances ReevaluateInaccessibleDatabaseState. - */ -public final class ManagedInstancesReevaluateInaccessibleDatabaseStateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceReevaluateInaccessibleDatabaseState.json - */ - /** - * Sample code: Reevaluate inaccessibility states of all managed databases. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - reevaluateInaccessibilityStatesOfAllManagedDatabases(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .reevaluateInaccessibleDatabaseState("testrg", "testinstance", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesRefreshStatusSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesRefreshStatusSamples.java deleted file mode 100644 index 9bf4981e0198..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesRefreshStatusSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstances RefreshStatus. - */ -public final class ManagedInstancesRefreshStatusSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceRefreshExternalGovernanceStatus.json - */ - /** - * Sample code: Refresh external governance enablement status. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - refreshExternalGovernanceEnablementStatus(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .refreshStatus("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesStartSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesStartSamples.java deleted file mode 100644 index 051bcd603f56..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesStartSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstances Start. - */ -public final class ManagedInstancesStartSamples { - /* - * x-ms-original-file: 2025-02-01-preview/StartManagedInstance.json - */ - /** - * Sample code: Starts the managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void startsTheManagedInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getManagedInstances().start("startrg", "mitostart", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesStopSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesStopSamples.java deleted file mode 100644 index ea03d9428ba5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesStopSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedInstances Stop. - */ -public final class ManagedInstancesStopSamples { - /* - * x-ms-original-file: 2025-02-01-preview/StopManagedInstance.json - */ - /** - * Sample code: Stops the managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void stopsTheManagedInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getManagedInstances().stop("stoprg", "mitostop", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesUpdateSamples.java deleted file mode 100644 index aa537775d366..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesUpdateSamples.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.AuthMetadataLookupModes; -import com.azure.resourcemanager.sql.models.AvailabilityZoneType; -import com.azure.resourcemanager.sql.models.BackupStorageRedundancy; -import com.azure.resourcemanager.sql.models.HybridSecondaryUsage; -import com.azure.resourcemanager.sql.models.ManagedInstanceDatabaseFormat; -import com.azure.resourcemanager.sql.models.ManagedInstanceLicenseType; -import com.azure.resourcemanager.sql.models.ManagedInstanceProxyOverride; -import com.azure.resourcemanager.sql.models.ManagedInstanceUpdate; -import com.azure.resourcemanager.sql.models.Sku; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ManagedInstances Update. - */ -public final class ManagedInstancesUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceUpdateMin.json - */ - /** - * Sample code: Update managed instance with minimal properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateManagedInstanceWithMinimalProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .update("testrg", "testinstance", - new ManagedInstanceUpdate().withTags(mapOf("tagKey1", "fakeTokenPlaceholder")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceUpdateMax.json - */ - /** - * Sample code: Update managed instance with all properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateManagedInstanceWithAllProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .update("testrg", "testinstance", new ManagedInstanceUpdate() - .withSku(new Sku().withName("GP_Gen5").withTier("GeneralPurpose").withCapacity(8)) - .withTags(mapOf("tagKey1", "fakeTokenPlaceholder")) - .withAdministratorLogin("dummylogin") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withLicenseType(ManagedInstanceLicenseType.BASE_PRICE) - .withHybridSecondaryUsage(HybridSecondaryUsage.PASSIVE) - .withVCores(8) - .withStorageSizeInGB(448) - .withCollation("SQL_Latin1_General_CP1_CI_AS") - .withPublicDataEndpointEnabled(false) - .withProxyOverride(ManagedInstanceProxyOverride.REDIRECT) - .withMaintenanceConfigurationId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1") - .withMinimalTlsVersion("1.2") - .withRequestedBackupStorageRedundancy(BackupStorageRedundancy.GEO) - .withAuthenticationMetadata(AuthMetadataLookupModes.WINDOWS) - .withDatabaseFormat(ManagedInstanceDatabaseFormat.ALWAYS_UP_TO_DATE) - .withRequestedLogicalAvailabilityZone(AvailabilityZoneType.ONE), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceRemoveMaintenanceConfiguration.json - */ - /** - * Sample code: Remove maintenance policy from managed instance (select default maintenance policy). - * - * @param manager Entry point to SqlServerManager. - */ - public static void removeMaintenancePolicyFromManagedInstanceSelectDefaultMaintenancePolicy( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .update("testrg", "testinstance", new ManagedInstanceUpdate().withMaintenanceConfigurationId( - "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesValidateAzureKeyVaultEncryptionKeySamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesValidateAzureKeyVaultEncryptionKeySamples.java deleted file mode 100644 index eb2344a77aaf..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedInstancesValidateAzureKeyVaultEncryptionKeySamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest; - -/** - * Samples for ManagedInstances ValidateAzureKeyVaultEncryptionKey. - */ -public final class ManagedInstancesValidateAzureKeyVaultEncryptionKeySamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstancValidateAzureKeyVaultEncryptionKey.json - */ - /** - * Sample code: Validate the customer managed key. - * - * @param manager Entry point to SqlServerManager. - */ - public static void validateTheCustomerManagedKey(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedInstances() - .validateAzureKeyVaultEncryptionKey("testrg", "testinstance", - new ManagedInstanceValidateAzureKeyVaultEncryptionKeyRequest().withTdeKeyUri("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedLedgerDigestUploadsOperationCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedLedgerDigestUploadsOperationCreateOrUpdateSamples.java deleted file mode 100644 index bf651f814f23..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedLedgerDigestUploadsOperationCreateOrUpdateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedLedgerDigestUploadsInner; -import com.azure.resourcemanager.sql.models.ManagedLedgerDigestUploadsName; - -/** - * Samples for ManagedLedgerDigestUploadsOperation CreateOrUpdate. - */ -public final class ManagedLedgerDigestUploadsOperationCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedLedgerDigestUploadsEnable.json - */ - /** - * Sample code: Enables managed ledger digest upload configuration for a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void enablesManagedLedgerDigestUploadConfigurationForADatabase( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedLedgerDigestUploadsOperations() - .createOrUpdate("ledgertestrg", "ledgertestserver", "testdb", ManagedLedgerDigestUploadsName.CURRENT, - new ManagedLedgerDigestUploadsInner().withDigestStorageEndpoint( - "https://MyAccount.blob.core.windows.net"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedLedgerDigestUploadsOperationDisableSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedLedgerDigestUploadsOperationDisableSamples.java deleted file mode 100644 index 72d13058dc85..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedLedgerDigestUploadsOperationDisableSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ManagedLedgerDigestUploadsName; - -/** - * Samples for ManagedLedgerDigestUploadsOperation Disable. - */ -public final class ManagedLedgerDigestUploadsOperationDisableSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedLedgerDigestUploadsDisable.json - */ - /** - * Sample code: Disables uploading ledger digests for a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - disablesUploadingLedgerDigestsForADatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedLedgerDigestUploadsOperations() - .disable("ledgertestrg", "ledgertestserver", "testdb", ManagedLedgerDigestUploadsName.CURRENT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedLedgerDigestUploadsOperationGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedLedgerDigestUploadsOperationGetSamples.java deleted file mode 100644 index 580b42a41c6b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedLedgerDigestUploadsOperationGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ManagedLedgerDigestUploadsName; - -/** - * Samples for ManagedLedgerDigestUploadsOperation Get. - */ -public final class ManagedLedgerDigestUploadsOperationGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedLedgerDigestUploadsGet.json - */ - /** - * Sample code: Gets the current ledger digest upload configuration for a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheCurrentLedgerDigestUploadConfigurationForADatabase( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedLedgerDigestUploadsOperations() - .getWithResponse("ledgertestrg", "ledgertestserver", "testdb", ManagedLedgerDigestUploadsName.CURRENT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedLedgerDigestUploadsOperationListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedLedgerDigestUploadsOperationListByDatabaseSamples.java deleted file mode 100644 index 88dad19f0351..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedLedgerDigestUploadsOperationListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedLedgerDigestUploadsOperation ListByDatabase. - */ -public final class ManagedLedgerDigestUploadsOperationListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedLedgerDigestUploadsList.json - */ - /** - * Sample code: Gets list of ledger digest upload settings on a database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsListOfLedgerDigestUploadSettingsOnADatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedLedgerDigestUploadsOperations() - .listByDatabase("ledgertestrg", "ledgertestserver", "testdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 24f788936d21..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedBackupShortTermRetentionPolicyInner; -import com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName; - -/** - * Samples for ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies CreateOrUpdate. - */ -public final class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateManagedShortTermRetentionPolicyRestorableDropped.json - */ - /** - * Sample code: Update the short term retention policy for the restorable dropped database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateTheShortTermRetentionPolicyForTheRestorableDroppedDatabase( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies() - .createOrUpdate("resourceGroup", "testsvr", "testdb,131403269876900000", - ManagedShortTermRetentionPolicyName.DEFAULT, - new ManagedBackupShortTermRetentionPolicyInner().withRetentionDays(14), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesGetSamples.java deleted file mode 100644 index 78f46f355a8e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName; - -/** - * Samples for ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies Get. - */ -public final class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetManagedShortTermRetentionPolicyRestorableDropped.json - */ - /** - * Sample code: Get the short term retention policy for the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheShortTermRetentionPolicyForTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb,131403269876900000", - ManagedShortTermRetentionPolicyName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseSamples.java deleted file mode 100644 index 8978fc2c8d5d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies ListByRestorableDroppedDatabase. - */ -public final class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetListManagedShortTermRetentionPolicyRestorableDropped.json - */ - /** - * Sample code: Get the short term retention policy list for the database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheShortTermRetentionPolicyListForTheDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies() - .listByRestorableDroppedDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb,131403269876900000", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesUpdateSamples.java deleted file mode 100644 index 3f91da682f24..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesUpdateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedBackupShortTermRetentionPolicyInner; -import com.azure.resourcemanager.sql.models.ManagedShortTermRetentionPolicyName; - -/** - * Samples for ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies Update. - */ -public final class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/UpdateManagedShortTermRetentionPolicyRestorableDropped.json - */ - /** - * Sample code: Update the short term retention policy for the restorable dropped database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateTheShortTermRetentionPolicyForTheRestorableDroppedDatabase( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies() - .update("resourceGroup", "testsvr", "testdb,131403269876900000", - ManagedShortTermRetentionPolicyName.DEFAULT, - new ManagedBackupShortTermRetentionPolicyInner().withRetentionDays(14), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesAcquireSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesAcquireSamples.java deleted file mode 100644 index 9daa378bf969..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesAcquireSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ManagedServerDnsAliasAcquisition; - -/** - * Samples for ManagedServerDnsAliases Acquire. - */ -public final class ManagedServerDnsAliasesAcquireSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedServerDnsAliasAcquire.json - */ - /** - * Sample code: Acquire managed server DNS alias. - * - * @param manager Entry point to SqlServerManager. - */ - public static void acquireManagedServerDNSAlias(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedServerDnsAliases() - .acquire("Default", "new-mi", "dns-alias-mi", - new ManagedServerDnsAliasAcquisition().withOldManagedServerDnsAliasResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/old-mi/dnsAliases/alias1"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesCreateOrUpdateSamples.java deleted file mode 100644 index 497966517ecd..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesCreateOrUpdateSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ManagedServerDnsAliasCreation; - -/** - * Samples for ManagedServerDnsAliases CreateOrUpdate. - */ -public final class ManagedServerDnsAliasesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedServerDnsAliasCreateOrUpdate.json - */ - /** - * Sample code: Create managed server DNS alias. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createManagedServerDNSAlias(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedServerDnsAliases() - .createOrUpdate("Default", "dns-mi", "dns-alias-mi", new ManagedServerDnsAliasCreation(), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesDeleteSamples.java deleted file mode 100644 index ea14c16d0058..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedServerDnsAliases Delete. - */ -public final class ManagedServerDnsAliasesDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedServerDnsAliasDelete.json - */ - /** - * Sample code: Delete managed server DNS alias. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteManagedServerDNSAlias(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedServerDnsAliases() - .delete("Default", "dns-mi", "dns-alias-mi", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesGetSamples.java deleted file mode 100644 index 63c74f215f10..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedServerDnsAliases Get. - */ -public final class ManagedServerDnsAliasesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedServerDnsAliasGet.json - */ - /** - * Sample code: Get managed server DNS alias. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getManagedServerDNSAlias(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedServerDnsAliases() - .getWithResponse("Default", "dns-mi", "dns-alias-mi", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesListByManagedInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesListByManagedInstanceSamples.java deleted file mode 100644 index 1e4571a515b2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerDnsAliasesListByManagedInstanceSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedServerDnsAliases ListByManagedInstance. - */ -public final class ManagedServerDnsAliasesListByManagedInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedServerDnsAliasList.json - */ - /** - * Sample code: List managed server DNS aliases. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listManagedServerDNSAliases(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedServerDnsAliases() - .listByManagedInstance("Default", "dns-mi", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index e92fd861af5f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ManagedServerSecurityAlertPolicyInner; -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; -import java.util.Arrays; - -/** - * Samples for ManagedServerSecurityAlertPolicies CreateOrUpdate. - */ -public final class ManagedServerSecurityAlertPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedServerSecurityAlertCreateMin.json - */ - /** - * Sample code: Update a managed server's threat detection policy with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAManagedServerSThreatDetectionPolicyWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedServerSecurityAlertPolicies() - .createOrUpdate("securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, - new ManagedServerSecurityAlertPolicyInner().withState(SecurityAlertPolicyState.ENABLED), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ManagedServerSecurityAlertCreateMax.json - */ - /** - * Sample code: Update a managed server's threat detection policy with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAManagedServerSThreatDetectionPolicyWithAllParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedServerSecurityAlertPolicies() - .createOrUpdate("securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, - new ManagedServerSecurityAlertPolicyInner().withState(SecurityAlertPolicyState.ENABLED) - .withDisabledAlerts(Arrays.asList("Access_Anomaly", "Usage_Anomaly")) - .withEmailAddresses(Arrays.asList("testSecurityAlert@microsoft.com")) - .withEmailAccountAdmins(true) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey("fakeTokenPlaceholder") - .withRetentionDays(5), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesGetSamples.java deleted file mode 100644 index 8e87154ac84e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; - -/** - * Samples for ManagedServerSecurityAlertPolicies Get. - */ -public final class ManagedServerSecurityAlertPoliciesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedServerSecurityAlertGet.json - */ - /** - * Sample code: Get a managed server's threat detection policy. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAManagedServerSThreatDetectionPolicy(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedServerSecurityAlertPolicies() - .getWithResponse("securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesListByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesListByInstanceSamples.java deleted file mode 100644 index 465c74e54c03..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ManagedServerSecurityAlertPoliciesListByInstanceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ManagedServerSecurityAlertPolicies ListByInstance. - */ -public final class ManagedServerSecurityAlertPoliciesListByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedServerSecurityAlertListByInstance.json - */ - /** - * Sample code: Get the managed server's threat detection policies. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheManagedServerSThreatDetectionPolicies(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getManagedServerSecurityAlertPolicies() - .listByInstance("securityalert-4799", "securityalert-6440", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java deleted file mode 100644 index 248350fa9170..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for NetworkSecurityPerimeterConfigurations Get. - */ -public final class NetworkSecurityPerimeterConfigurationsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/NetworkSecurityPerimeterConfigurationsGet.json - */ - /** - * Sample code: Get an NSP config by name. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAnNSPConfigByName(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getNetworkSecurityPerimeterConfigurations() - .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-7398", "00000001-2222-3333-4444-111144444444.assoc1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/NetworkSecurityPerimeterConfigurationsListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/NetworkSecurityPerimeterConfigurationsListByServerSamples.java deleted file mode 100644 index 3716e07fcfb9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/NetworkSecurityPerimeterConfigurationsListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for NetworkSecurityPerimeterConfigurations ListByServer. - */ -public final class NetworkSecurityPerimeterConfigurationsListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/NetworkSecurityPerimeterConfigurationsListByServer.json - */ - /** - * Sample code: List NSP configs by server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listNSPConfigsByServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getNetworkSecurityPerimeterConfigurations() - .listByServer("sqlcrudtest-7398", "sqlcrudtest-7398", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java deleted file mode 100644 index 65113ced95a7..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for NetworkSecurityPerimeterConfigurations Reconcile. - */ -public final class NetworkSecurityPerimeterConfigurationsReconcileSamples { - /* - * x-ms-original-file: 2025-02-01-preview/NetworkSecurityPerimeterConfigurationsReconcile.json - */ - /** - * Sample code: Reconcile NSP Config. - * - * @param manager Entry point to SqlServerManager. - */ - public static void reconcileNSPConfig(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getNetworkSecurityPerimeterConfigurations() - .reconcile("sqlcrudtest-7398", "sqlcrudtest-7398", "00000001-2222-3333-4444-111144444444.assoc1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OperationsListSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OperationsListSamples.java deleted file mode 100644 index d1bc38a528ef..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OperationsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListOperations.json - */ - /** - * Sample code: Lists all of the available SQL Rest API operations. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listsAllOfTheAvailableSQLRestAPIOperations(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getOperations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesCreateOrUpdateSamples.java deleted file mode 100644 index 899a47932298..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesCreateOrUpdateSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for OutboundFirewallRules CreateOrUpdate. - */ -public final class OutboundFirewallRulesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/OutboundFirewallRuleCreate.json - */ - /** - * Sample code: Approve or reject a outbound firewall rule with a given name. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - approveOrRejectAOutboundFirewallRuleWithAGivenName(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getOutboundFirewallRules() - .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", "server.database.windows.net", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesDeleteSamples.java deleted file mode 100644 index 2b5621ab248b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesDeleteSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for OutboundFirewallRules Delete. - */ -public final class OutboundFirewallRulesDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/OutboundFirewallRuleDelete.json - */ - /** - * Sample code: Deletes a outbound firewall rule with a given name. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - deletesAOutboundFirewallRuleWithAGivenName(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getOutboundFirewallRules() - .delete("sqlcrudtest-7398", "sqlcrudtest-6661", "server.database.windows.net", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesGetSamples.java deleted file mode 100644 index 083cb73bdb27..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for OutboundFirewallRules Get. - */ -public final class OutboundFirewallRulesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/OutboundFirewallRuleGet.json - */ - /** - * Sample code: Gets outbound firewall rule. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsOutboundFirewallRule(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getOutboundFirewallRules() - .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", "server.database.windows.net", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesListByServerSamples.java deleted file mode 100644 index 46447db10fb7..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/OutboundFirewallRulesListByServerSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for OutboundFirewallRules ListByServer. - */ -public final class OutboundFirewallRulesListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/OutboundFirewallRuleList.json - */ - /** - * Sample code: Gets list of outbound firewall rules on a server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsListOfOutboundFirewallRulesOnAServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getOutboundFirewallRules() - .listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java deleted file mode 100644 index 38795917c7f6..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.sql.models.PrivateLinkServiceConnectionStateProperty; -import com.azure.resourcemanager.sql.models.PrivateLinkServiceConnectionStateStatus; - -/** - * Samples for PrivateEndpointConnections CreateOrUpdate. - */ -public final class PrivateEndpointConnectionsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/PrivateEndpointConnectionUpdate.json - */ - /** - * Sample code: Approve or reject a private endpoint connection with a given name. - * - * @param manager Entry point to SqlServerManager. - */ - public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate("Default", "test-svr", "private-endpoint-connection-name", - new PrivateEndpointConnectionInner() - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionStateProperty() - .withStatus(PrivateLinkServiceConnectionStateStatus.APPROVED) - .withDescription("Approved by johndoe@contoso.com")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsDeleteSamples.java deleted file mode 100644 index 9edfb78d323f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for PrivateEndpointConnections Delete. - */ -public final class PrivateEndpointConnectionsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/PrivateEndpointConnectionDelete.json - */ - /** - * Sample code: Deletes a private endpoint connection with a given name. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - deletesAPrivateEndpointConnectionWithAGivenName(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getPrivateEndpointConnections() - .delete("Default", "test-svr", "private-endpoint-connection-name", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsGetSamples.java deleted file mode 100644 index 2cde45b36eec..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for PrivateEndpointConnections Get. - */ -public final class PrivateEndpointConnectionsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/PrivateEndpointConnectionGet.json - */ - /** - * Sample code: Gets private endpoint connection. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsPrivateEndpointConnection(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getPrivateEndpointConnections() - .getWithResponse("Default", "test-svr", "private-endpoint-connection-name", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsListByServerSamples.java deleted file mode 100644 index af7660224150..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateEndpointConnectionsListByServerSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for PrivateEndpointConnections ListByServer. - */ -public final class PrivateEndpointConnectionsListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/PrivateEndpointConnectionList.json - */ - /** - * Sample code: Gets list of private endpoint connections on a server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsListOfPrivateEndpointConnectionsOnAServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getPrivateEndpointConnections() - .listByServer("Default", "test-svr", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateLinkResourcesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateLinkResourcesGetSamples.java deleted file mode 100644 index 29d2ecac3783..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateLinkResourcesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for PrivateLinkResources Get. - */ -public final class PrivateLinkResourcesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/PrivateLinkResourcesGet.json - */ - /** - * Sample code: Gets a private link resource for SQL. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAPrivateLinkResourceForSQL(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getPrivateLinkResources() - .getWithResponse("Default", "test-svr", "plr", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateLinkResourcesListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateLinkResourcesListByServerSamples.java deleted file mode 100644 index 028208c65171..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/PrivateLinkResourcesListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for PrivateLinkResources ListByServer. - */ -public final class PrivateLinkResourcesListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/PrivateLinkResourcesList.json - */ - /** - * Sample code: Gets private link resources for SQL. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsPrivateLinkResourcesForSQL(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getPrivateLinkResources() - .listByServer("Default", "test-svr", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecommendedSensitivityLabelsUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecommendedSensitivityLabelsUpdateSamples.java deleted file mode 100644 index 49a8a6d06993..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecommendedSensitivityLabelsUpdateSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdate; -import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdateKind; -import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelUpdateList; -import java.util.Arrays; - -/** - * Samples for RecommendedSensitivityLabels Update. - */ -public final class RecommendedSensitivityLabelsUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SensitivityLabelsRecommendedUpdate.json - */ - /** - * Sample code: Update recommended sensitivity labels of a given database using an operations batch. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateRecommendedSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRecommendedSensitivityLabels() - .updateWithResponse("myRG", "myServer", "myDatabase", - new RecommendedSensitivityLabelUpdateList().withOperations(Arrays.asList( - new RecommendedSensitivityLabelUpdate().withOp(RecommendedSensitivityLabelUpdateKind.ENABLE) - .withSchema("dbo") - .withTable("table1") - .withColumn("column1"), - new RecommendedSensitivityLabelUpdate().withOp(RecommendedSensitivityLabelUpdateKind.ENABLE) - .withSchema("dbo") - .withTable("table2") - .withColumn("column2"), - new RecommendedSensitivityLabelUpdate().withOp(RecommendedSensitivityLabelUpdateKind.DISABLE) - .withSchema("dbo") - .withTable("table1") - .withColumn("column3"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableDatabasesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableDatabasesGetSamples.java deleted file mode 100644 index 0a0f895f2159..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableDatabasesGetSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for RecoverableDatabases Get. - */ -public final class RecoverableDatabasesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/RecoverableDatabaseGet.json - */ - /** - * Sample code: Get a recoverable database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getARecoverableDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRecoverableDatabases() - .getWithResponse("recoverabledatabasetest-6852", "recoverabledatabasetest-2080", - "recoverabledatabasetest-9187", null, null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/RecoverableDatabaseGetWithExpandEqualsKeys.json - */ - /** - * Sample code: Gets a recoverable database with expand equals keys. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsARecoverableDatabaseWithExpandEqualsKeys(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRecoverableDatabases() - .getWithResponse("recoverabledatabasetest-6852", "recoverabledatabasetest-2080", - "recoverabledatabasetest-9187", "keys", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableDatabasesListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableDatabasesListByServerSamples.java deleted file mode 100644 index 8071ad2dc19a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableDatabasesListByServerSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for RecoverableDatabases ListByServer. - */ -public final class RecoverableDatabasesListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/RecoverableDatabaseList.json - */ - /** - * Sample code: Get list of recoverable databases. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getListOfRecoverableDatabases(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRecoverableDatabases() - .listByServer("recoverabledatabasetest-1234", "recoverabledatabasetest-7177", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableManagedDatabasesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableManagedDatabasesGetSamples.java deleted file mode 100644 index 8958edf29bd0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableManagedDatabasesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for RecoverableManagedDatabases Get. - */ -public final class RecoverableManagedDatabasesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetRecoverableManagedDatabase.json - */ - /** - * Sample code: Gets a recoverable databases by managed instances. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsARecoverableDatabasesByManagedInstances(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRecoverableManagedDatabases() - .getWithResponse("Test1", "managedInstance", "testdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableManagedDatabasesListByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableManagedDatabasesListByInstanceSamples.java deleted file mode 100644 index 61bb97157279..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RecoverableManagedDatabasesListByInstanceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for RecoverableManagedDatabases ListByInstance. - */ -public final class RecoverableManagedDatabasesListByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListRecoverableManagedDatabasesByServer.json - */ - /** - * Sample code: List recoverable databases by managed instances. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listRecoverableDatabasesByManagedInstances(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRecoverableManagedDatabases() - .listByInstance("Test1", "managedInstance", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksCreateOrUpdateSamples.java deleted file mode 100644 index 2b38a3054840..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksCreateOrUpdateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ReplicationLinkInner; -import com.azure.resourcemanager.sql.models.ReplicationLinkType; - -/** - * Samples for ReplicationLinks CreateOrUpdate. - */ -public final class ReplicationLinksCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ReplicationLinkCreateOrUpdate.json - */ - /** - * Sample code: Updates Replication Link. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updatesReplicationLink(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getReplicationLinks() - .createOrUpdate("Default", "sourcesvr", "gamma-db", "00000000-1111-2222-3333-666666666666", - new ReplicationLinkInner().withLinkType(ReplicationLinkType.STANDBY), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksDeleteSamples.java deleted file mode 100644 index e0ae08eb618e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ReplicationLinks Delete. - */ -public final class ReplicationLinksDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ReplicationLinkDelete.json - */ - /** - * Sample code: Delete replication link on server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteReplicationLinkOnServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getReplicationLinks() - .delete("Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksFailoverAllowDataLossSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksFailoverAllowDataLossSamples.java deleted file mode 100644 index 88a3e604eee4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksFailoverAllowDataLossSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ReplicationLinks FailoverAllowDataLoss. - */ -public final class ReplicationLinksFailoverAllowDataLossSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ReplicationLinkFailoverAllowDataLoss.json - */ - /** - * Sample code: Forced failover of a replication link. - * - * @param manager Entry point to SqlServerManager. - */ - public static void forcedFailoverOfAReplicationLink(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getReplicationLinks() - .failoverAllowDataLoss("Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksFailoverSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksFailoverSamples.java deleted file mode 100644 index 05b24ff729c4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksFailoverSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ReplicationLinks Failover. - */ -public final class ReplicationLinksFailoverSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ReplicationLinkFailover.json - */ - /** - * Sample code: Planned failover of a replication link. - * - * @param manager Entry point to SqlServerManager. - */ - public static void plannedFailoverOfAReplicationLink(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getReplicationLinks() - .failover("Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksGetSamples.java deleted file mode 100644 index 527a1238fb12..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ReplicationLinks Get. - */ -public final class ReplicationLinksGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ReplicationLinkGet.json - */ - /** - * Sample code: Gets the replication link. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheReplicationLink(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getReplicationLinks() - .getWithResponse("Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksListByDatabaseSamples.java deleted file mode 100644 index 7c705317e7ee..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksListByDatabaseSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ReplicationLinks ListByDatabase. - */ -public final class ReplicationLinksListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ReplicationLinkListByDatabase.json - */ - /** - * Sample code: List replication links on server on database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listReplicationLinksOnServerOnDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getReplicationLinks() - .listByDatabase("Default", "sourcesvr", "tetha-db", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksListByServerSamples.java deleted file mode 100644 index a8feba27473a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ReplicationLinks ListByServer. - */ -public final class ReplicationLinksListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ReplicationLinkListByServer.json - */ - /** - * Sample code: List replication links on server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listReplicationLinksOnServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getReplicationLinks() - .listByServer("Default", "sourcesvr", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksUpdateSamples.java deleted file mode 100644 index eafb45b7f0f9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ReplicationLinksUpdateSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ReplicationLinkType; -import com.azure.resourcemanager.sql.models.ReplicationLinkUpdate; - -/** - * Samples for ReplicationLinks Update. - */ -public final class ReplicationLinksUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ReplicationLinkUpdate.json - */ - /** - * Sample code: Update Replication Link. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateReplicationLink(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getReplicationLinks() - .update("Default", "sourcesvr", "gamma-db", "00000000-1111-2222-3333-666666666666", - new ReplicationLinkUpdate().withLinkType(ReplicationLinkType.STANDBY), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedDatabasesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedDatabasesGetSamples.java deleted file mode 100644 index b33324822bf6..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedDatabasesGetSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for RestorableDroppedDatabases Get. - */ -public final class RestorableDroppedDatabasesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetRestorableDroppedDatabaseWithExpandEqualsKeys.json - */ - /** - * Sample code: Gets a restorable dropped database with expand equals keys. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsARestorableDroppedDatabaseWithExpandEqualsKeys(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRestorableDroppedDatabases() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb,131403269876900000", "keys", null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/GetRestorableDroppedDatabase.json - */ - /** - * Sample code: Gets a restorable dropped database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsARestorableDroppedDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRestorableDroppedDatabases() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb,131403269876900000", null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedDatabasesListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedDatabasesListByServerSamples.java deleted file mode 100644 index 8fbd4179443f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedDatabasesListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for RestorableDroppedDatabases ListByServer. - */ -public final class RestorableDroppedDatabasesListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListRestorableDroppedDatabasesByServer.json - */ - /** - * Sample code: Gets a list of restorable dropped databases. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAListOfRestorableDroppedDatabases(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRestorableDroppedDatabases() - .listByServer("Default-SQL-SouthEastAsia", "testsvr", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedManagedDatabasesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedManagedDatabasesGetSamples.java deleted file mode 100644 index 367de974c174..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedManagedDatabasesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for RestorableDroppedManagedDatabases Get. - */ -public final class RestorableDroppedManagedDatabasesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetRestorableDroppedManagedDatabase.json - */ - /** - * Sample code: Gets a restorable dropped managed database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsARestorableDroppedManagedDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRestorableDroppedManagedDatabases() - .getWithResponse("Test1", "managedInstance", "testdb,131403269876900000", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedManagedDatabasesListByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedManagedDatabasesListByInstanceSamples.java deleted file mode 100644 index cec1f96685c3..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorableDroppedManagedDatabasesListByInstanceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for RestorableDroppedManagedDatabases ListByInstance. - */ -public final class RestorableDroppedManagedDatabasesListByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/RestorableDroppedManagedDatabaseListByManagedInstance.json - */ - /** - * Sample code: List restorable dropped databases by managed instances. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listRestorableDroppedDatabasesByManagedInstances(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRestorableDroppedManagedDatabases() - .listByInstance("Test1", "managedInstance", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsCreateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsCreateSamples.java deleted file mode 100644 index 21093a261bfb..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsCreateSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.CreateDatabaseRestorePointDefinition; - -/** - * Samples for RestorePoints Create. - */ -public final class RestorePointsCreateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseRestorePointsPost.json - */ - /** - * Sample code: Creates datawarehouse database restore point. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createsDatawarehouseDatabaseRestorePoint(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRestorePoints() - .create("Default-SQL-SouthEastAsia", "testserver", "testDatabase", - new CreateDatabaseRestorePointDefinition().withRestorePointLabel("mylabel"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsDeleteSamples.java deleted file mode 100644 index f20d8905d7a8..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for RestorePoints Delete. - */ -public final class RestorePointsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseRestorePointsDelete.json - */ - /** - * Sample code: Deletes a restore point. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deletesARestorePoint(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRestorePoints() - .deleteWithResponse("Default-SQL-SouthEastAsia", "testserver", "testDatabase", "131546477590000000", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsGetSamples.java deleted file mode 100644 index 9b0e9540510b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsGetSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for RestorePoints Get. - */ -public final class RestorePointsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DataWarehouseRestorePointsGet.json - */ - /** - * Sample code: Gets a datawarehouse database restore point. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsADatawarehouseDatabaseRestorePoint(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRestorePoints() - .getWithResponse("Default-SQL-SouthEastAsia", "testserver", "testDatabase", "131546477590000000", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseRestorePointsGet.json - */ - /** - * Sample code: Gets a database restore point. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsADatabaseRestorePoint(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRestorePoints() - .getWithResponse("Default-SQL-SouthEastAsia", "testserver", "testDatabase", "131546477590000000", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsListByDatabaseSamples.java deleted file mode 100644 index bf317b9d5b49..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/RestorePointsListByDatabaseSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for RestorePoints ListByDatabase. - */ -public final class RestorePointsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DatabaseRestorePointsListByDatabase.json - */ - /** - * Sample code: List database restore points. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listDatabaseRestorePoints(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRestorePoints() - .listByDatabase("sqlcrudtest-6730", "sqlcrudtest-9007", "3481", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/DataWarehouseRestorePointsListByDatabase.json - */ - /** - * Sample code: List datawarehouse database restore points. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listDatawarehouseDatabaseRestorePoints(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getRestorePoints() - .listByDatabase("Default-SQL-SouthEastAsia", "testserver", "testDatabase", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsCreateOrUpdateSamples.java deleted file mode 100644 index 8259a54f5c9a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsCreateOrUpdateSamples.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelInner; -import com.azure.resourcemanager.sql.models.ClientClassificationSource; -import com.azure.resourcemanager.sql.models.CurrentSensitivityLabelSource; -import com.azure.resourcemanager.sql.models.SensitivityLabelRank; - -/** - * Samples for SensitivityLabels CreateOrUpdate. - */ -public final class SensitivityLabelsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ColumnSensitivityLabelCreateMax.json - */ - /** - * Sample code: Updates the sensitivity label of a given column with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updatesTheSensitivityLabelOfAGivenColumnWithAllParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSensitivityLabels() - .createOrUpdateWithResponse("myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", - CurrentSensitivityLabelSource.CURRENT, - new SensitivityLabelInner().withLabelName("PII") - .withLabelId("bf91e08c-f4f0-478a-b016-25164b2a65ff") - .withInformationType("PhoneNumber") - .withInformationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646") - .withRank(SensitivityLabelRank.LOW) - .withClientClassificationSource(ClientClassificationSource.NATIVE), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsDeleteSamples.java deleted file mode 100644 index 3221fce1e355..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsDeleteSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.CurrentSensitivityLabelSource; - -/** - * Samples for SensitivityLabels Delete. - */ -public final class SensitivityLabelsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ColumnSensitivityLabelDelete.json - */ - /** - * Sample code: Deletes the sensitivity label of a given column. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - deletesTheSensitivityLabelOfAGivenColumn(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSensitivityLabels() - .deleteWithResponse("myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", - CurrentSensitivityLabelSource.CURRENT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsDisableRecommendationSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsDisableRecommendationSamples.java deleted file mode 100644 index 1b78fdd5585f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsDisableRecommendationSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelSource; - -/** - * Samples for SensitivityLabels DisableRecommendation. - */ -public final class SensitivityLabelsDisableRecommendationSamples { - /* - * x-ms-original-file: 2025-02-01-preview/RecommendedColumnSensitivityLabelDisable.json - */ - /** - * Sample code: Disables sensitivity recommendations on a given column. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - disablesSensitivityRecommendationsOnAGivenColumn(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSensitivityLabels() - .disableRecommendationWithResponse("myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", - RecommendedSensitivityLabelSource.RECOMMENDED, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsEnableRecommendationSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsEnableRecommendationSamples.java deleted file mode 100644 index 4b19d8620564..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsEnableRecommendationSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.RecommendedSensitivityLabelSource; - -/** - * Samples for SensitivityLabels EnableRecommendation. - */ -public final class SensitivityLabelsEnableRecommendationSamples { - /* - * x-ms-original-file: 2025-02-01-preview/RecommendedColumnSensitivityLabelEnable.json - */ - /** - * Sample code: Enables sensitivity recommendations on a given column. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - enablesSensitivityRecommendationsOnAGivenColumn(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSensitivityLabels() - .enableRecommendationWithResponse("myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", - RecommendedSensitivityLabelSource.RECOMMENDED, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsGetSamples.java deleted file mode 100644 index a1481c7f5109..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.SensitivityLabelSource; - -/** - * Samples for SensitivityLabels Get. - */ -public final class SensitivityLabelsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ColumnSensitivityLabelGet.json - */ - /** - * Sample code: Gets the sensitivity label of a given column. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheSensitivityLabelOfAGivenColumn(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSensitivityLabels() - .getWithResponse("myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", - SensitivityLabelSource.CURRENT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListByDatabaseSamples.java deleted file mode 100644 index 118c55a2e28c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SensitivityLabels ListByDatabase. - */ -public final class SensitivityLabelsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SensitivityLabelsListByDatabase.json - */ - /** - * Sample code: Gets the current and recommended sensitivity labels of a given database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheCurrentAndRecommendedSensitivityLabelsOfAGivenDatabase( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSensitivityLabels() - .listByDatabase("myRG", "myServer", "myDatabase", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListCurrentByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListCurrentByDatabaseSamples.java deleted file mode 100644 index f884ec8c61da..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListCurrentByDatabaseSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SensitivityLabels ListCurrentByDatabase. - */ -public final class SensitivityLabelsListCurrentByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SensitivityLabelsListByDatabaseWithSourceCurrent.json - */ - /** - * Sample code: Gets the current sensitivity labels of a given database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsTheCurrentSensitivityLabelsOfAGivenDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSensitivityLabels() - .listCurrentByDatabase("myRG", "myServer", "myDatabase", null, null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListRecommendedByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListRecommendedByDatabaseSamples.java deleted file mode 100644 index 3c17ec3314aa..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsListRecommendedByDatabaseSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SensitivityLabels ListRecommendedByDatabase. - */ -public final class SensitivityLabelsListRecommendedByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SensitivityLabelsListByDatabaseWithSourceRecommended.json - */ - /** - * Sample code: Gets the recommended sensitivity labels of a given database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsTheRecommendedSensitivityLabelsOfAGivenDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSensitivityLabels() - .listRecommendedByDatabase("myRG", "myServer", "myDatabase", null, null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsUpdateSamples.java deleted file mode 100644 index 7bc3660a8e81..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SensitivityLabelsUpdateSamples.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelInner; -import com.azure.resourcemanager.sql.fluent.models.SensitivityLabelUpdateInner; -import com.azure.resourcemanager.sql.models.SensitivityLabelRank; -import com.azure.resourcemanager.sql.models.SensitivityLabelUpdateKind; -import com.azure.resourcemanager.sql.models.SensitivityLabelUpdateList; -import java.util.Arrays; - -/** - * Samples for SensitivityLabels Update. - */ -public final class SensitivityLabelsUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SensitivityLabelsCurrentUpdate.json - */ - /** - * Sample code: Update sensitivity labels of a given database using an operations batch. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSensitivityLabels() - .updateWithResponse("myRG", "myServer", "myDatabase", - new SensitivityLabelUpdateList().withOperations(Arrays.asList( - new SensitivityLabelUpdateInner().withOp(SensitivityLabelUpdateKind.SET) - .withSchema("dbo") - .withTable("table1") - .withColumn("column1") - .withSensitivityLabel(new SensitivityLabelInner().withLabelName("Highly Confidential") - .withLabelId("3A477B16-9423-432B-AA97-6069B481CEC3") - .withInformationType("Financial") - .withInformationTypeId("1D3652D6-422C-4115-82F1-65DAEBC665C8") - .withRank(SensitivityLabelRank.LOW)), - new SensitivityLabelUpdateInner().withOp(SensitivityLabelUpdateKind.SET) - .withSchema("dbo") - .withTable("table2") - .withColumn("column2") - .withSensitivityLabel(new SensitivityLabelInner().withLabelName("PII") - .withLabelId("bf91e08c-f4f0-478a-b016-25164b2a65ff") - .withInformationType("PhoneNumber") - .withInformationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646") - .withRank(SensitivityLabelRank.CRITICAL)), - new SensitivityLabelUpdateInner().withOp(SensitivityLabelUpdateKind.REMOVE) - .withSchema("dbo") - .withTable("Table1") - .withColumn("Column3"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java deleted file mode 100644 index a2fd06fb938c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsCreateOrUpdateSamples.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ServerAdvancedThreatProtectionInner; -import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; -import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionState; - -/** - * Samples for ServerAdvancedThreatProtectionSettings CreateOrUpdate. - */ -public final class ServerAdvancedThreatProtectionSettingsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerAdvancedThreatProtectionSettingsCreateMin.json - */ - /** - * Sample code: Update a server's Advanced Threat Protection settings with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAServerSAdvancedThreatProtectionSettingsWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAdvancedThreatProtectionSettings() - .createOrUpdate("threatprotection-4799", "threatprotection-6440", AdvancedThreatProtectionName.DEFAULT, - new ServerAdvancedThreatProtectionInner().withState(AdvancedThreatProtectionState.DISABLED), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ServerAdvancedThreatProtectionSettingsCreateMax.json - */ - /** - * Sample code: Update a server's Advanced Threat Protection settings with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAServerSAdvancedThreatProtectionSettingsWithAllParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAdvancedThreatProtectionSettings() - .createOrUpdate("threatprotection-4799", "threatprotection-6440", AdvancedThreatProtectionName.DEFAULT, - new ServerAdvancedThreatProtectionInner().withState(AdvancedThreatProtectionState.ENABLED), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsGetSamples.java deleted file mode 100644 index 132ad67ed00c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.AdvancedThreatProtectionName; - -/** - * Samples for ServerAdvancedThreatProtectionSettings Get. - */ -public final class ServerAdvancedThreatProtectionSettingsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerAdvancedThreatProtectionSettingsGet.json - */ - /** - * Sample code: Get a server's Advanced Threat Protection settings. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAServerSAdvancedThreatProtectionSettings(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAdvancedThreatProtectionSettings() - .getWithResponse("threatprotection-4799", "threatprotection-6440", AdvancedThreatProtectionName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsListByServerSamples.java deleted file mode 100644 index a6ec1235df5d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvancedThreatProtectionSettingsListByServerSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerAdvancedThreatProtectionSettings ListByServer. - */ -public final class ServerAdvancedThreatProtectionSettingsListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerAdvancedThreatProtectionSettingsListByServer.json - */ - /** - * Sample code: List the server's Advanced Threat Protection settings. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listTheServerSAdvancedThreatProtectionSettings(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAdvancedThreatProtectionSettings() - .listByServer("threatprotection-4799", "threatprotection-6440", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsGetSamples.java deleted file mode 100644 index acac09114da2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerAdvisors Get. - */ -public final class ServerAdvisorsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerAdvisorGet.json - */ - /** - * Sample code: Get server advisor. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getServerAdvisor(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAdvisors() - .getWithResponse("workloadinsight-demos", "misosisvr", "CreateIndex", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsListByServerSamples.java deleted file mode 100644 index 2bb00f87349b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsListByServerSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerAdvisors ListByServer. - */ -public final class ServerAdvisorsListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerAdvisorList.json - */ - /** - * Sample code: List of server advisors. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listOfServerAdvisors(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAdvisors() - .listByServerWithResponse("workloadinsight-demos", "misosisvr", null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ServerRecommendedActionListExpand.json - */ - /** - * Sample code: List of server recommended actions for all advisors. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listOfServerRecommendedActionsForAllAdvisors(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAdvisors() - .listByServerWithResponse("workloadinsight-demos", "misosisvr", "recommendedActions", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsUpdateSamples.java deleted file mode 100644 index fc5f2bba52a8..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAdvisorsUpdateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.AdvisorInner; -import com.azure.resourcemanager.sql.models.AutoExecuteStatus; - -/** - * Samples for ServerAdvisors Update. - */ -public final class ServerAdvisorsUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerAdvisorUpdate.json - */ - /** - * Sample code: Update server advisor. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateServerAdvisor(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAdvisors() - .updateWithResponse("workloadinsight-demos", "misosisvr", "CreateIndex", - new AdvisorInner().withAutoExecuteStatus(AutoExecuteStatus.DISABLED), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAutomaticTuningGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAutomaticTuningGetSamples.java deleted file mode 100644 index d2a6e51f404a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAutomaticTuningGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerAutomaticTuning Get. - */ -public final class ServerAutomaticTuningGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerAutomaticTuningGet.json - */ - /** - * Sample code: Get a server's automatic tuning settings. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAServerSAutomaticTuningSettings(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAutomaticTunings() - .getWithResponse("default-sql-onebox", "testsvr11", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAutomaticTuningUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAutomaticTuningUpdateSamples.java deleted file mode 100644 index f40a5a272b0b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAutomaticTuningUpdateSamples.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ServerAutomaticTuningInner; -import com.azure.resourcemanager.sql.models.AutomaticTuningOptionModeDesired; -import com.azure.resourcemanager.sql.models.AutomaticTuningServerMode; -import com.azure.resourcemanager.sql.models.AutomaticTuningServerOptions; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ServerAutomaticTuning Update. - */ -public final class ServerAutomaticTuningUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerAutomaticTuningUpdateMax.json - */ - /** - * Sample code: Updates server automatic tuning settings with all properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updatesServerAutomaticTuningSettingsWithAllProperties(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAutomaticTunings() - .updateWithResponse("default-sql-onebox", "testsvr11", - new ServerAutomaticTuningInner().withDesiredState(AutomaticTuningServerMode.AUTO) - .withOptions(mapOf("createIndex", - new AutomaticTuningServerOptions().withDesiredState(AutomaticTuningOptionModeDesired.OFF), - "dropIndex", - new AutomaticTuningServerOptions().withDesiredState(AutomaticTuningOptionModeDesired.ON), - "forceLastGoodPlan", - new AutomaticTuningServerOptions().withDesiredState(AutomaticTuningOptionModeDesired.DEFAULT))), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ServerAutomaticTuningUpdateMin.json - */ - /** - * Sample code: Updates server automatic tuning settings with minimal properties. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updatesServerAutomaticTuningSettingsWithMinimalProperties( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAutomaticTunings() - .updateWithResponse("default-sql-onebox", "testsvr11", - new ServerAutomaticTuningInner().withDesiredState(AutomaticTuningServerMode.AUTO), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsCreateOrUpdateSamples.java deleted file mode 100644 index b07ce7b260ef..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsCreateOrUpdateSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ServerAzureADAdministratorInner; -import com.azure.resourcemanager.sql.models.AdministratorName; -import com.azure.resourcemanager.sql.models.AdministratorType; -import java.util.UUID; - -/** - * Samples for ServerAzureADAdministrators CreateOrUpdate. - */ -public final class ServerAzureADAdministratorsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/AdministratorCreateOrUpdate.json - */ - /** - * Sample code: Creates or updates an existing Azure Active Directory administrator. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsOrUpdatesAnExistingAzureActiveDirectoryAdministrator( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAzureADAdministrators() - .createOrUpdate("sqlcrudtest-4799", "sqlcrudtest-6440", AdministratorName.ACTIVE_DIRECTORY, - new ServerAzureADAdministratorInner().withAdministratorType(AdministratorType.ACTIVE_DIRECTORY) - .withLogin("bob@contoso.com") - .withSid(UUID.fromString("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c")) - .withTenantId(UUID.fromString("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsDeleteSamples.java deleted file mode 100644 index d68804eeaed2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsDeleteSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.AdministratorName; - -/** - * Samples for ServerAzureADAdministrators Delete. - */ -public final class ServerAzureADAdministratorsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/AdministratorDelete.json - */ - /** - * Sample code: Delete Azure Active Directory administrator. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteAzureActiveDirectoryAdministrator(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAzureADAdministrators() - .delete("sqlcrudtest-4799", "sqlcrudtest-6440", AdministratorName.ACTIVE_DIRECTORY, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsGetSamples.java deleted file mode 100644 index c329963a6eb9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.AdministratorName; - -/** - * Samples for ServerAzureADAdministrators Get. - */ -public final class ServerAzureADAdministratorsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/AdministratorGet.json - */ - /** - * Sample code: Gets a Azure Active Directory administrator. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAAzureActiveDirectoryAdministrator(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAzureADAdministrators() - .getWithResponse("sqlcrudtest-4799", "sqlcrudtest-6440", AdministratorName.ACTIVE_DIRECTORY, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsListByServerSamples.java deleted file mode 100644 index 313c5ddc3c64..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADAdministratorsListByServerSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerAzureADAdministrators ListByServer. - */ -public final class ServerAzureADAdministratorsListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/AdministratorList.json - */ - /** - * Sample code: Gets a list of Azure Active Directory administrator. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsAListOfAzureActiveDirectoryAdministrator(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAzureADAdministrators() - .listByServer("sqlcrudtest-4799", "sqlcrudtest-6440", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsCreateOrUpdateSamples.java deleted file mode 100644 index 3ca7983b9f53..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsCreateOrUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ServerAzureADOnlyAuthenticationInner; -import com.azure.resourcemanager.sql.models.AuthenticationName; - -/** - * Samples for ServerAzureADOnlyAuthentications CreateOrUpdate. - */ -public final class ServerAzureADOnlyAuthenticationsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/AzureADOnlyAuthCreateOrUpdate.json - */ - /** - * Sample code: Creates or updates Azure Active Directory only authentication object. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsOrUpdatesAzureActiveDirectoryOnlyAuthenticationObject( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAzureADOnlyAuthentications() - .createOrUpdate("sqlcrudtest-4799", "sqlcrudtest-6440", AuthenticationName.DEFAULT, - new ServerAzureADOnlyAuthenticationInner().withAzureADOnlyAuthentication(false), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsDeleteSamples.java deleted file mode 100644 index 51dcc9524203..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsDeleteSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.AuthenticationName; - -/** - * Samples for ServerAzureADOnlyAuthentications Delete. - */ -public final class ServerAzureADOnlyAuthenticationsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/AzureADOnlyAuthDelete.json - */ - /** - * Sample code: Deletes Azure Active Directory only authentication object. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - deletesAzureActiveDirectoryOnlyAuthenticationObject(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAzureADOnlyAuthentications() - .delete("sqlcrudtest-4799", "sqlcrudtest-6440", AuthenticationName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsGetSamples.java deleted file mode 100644 index 3f196629a8ff..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.AuthenticationName; - -/** - * Samples for ServerAzureADOnlyAuthentications Get. - */ -public final class ServerAzureADOnlyAuthenticationsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/AzureADOnlyAuthGet.json - */ - /** - * Sample code: Gets a Azure Active Directory only authentication property. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsAAzureActiveDirectoryOnlyAuthenticationProperty(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAzureADOnlyAuthentications() - .getWithResponse("sqlcrudtest-4799", "sqlcrudtest-6440", AuthenticationName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsListByServerSamples.java deleted file mode 100644 index 8e0151a294ab..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerAzureADOnlyAuthenticationsListByServerSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerAzureADOnlyAuthentications ListByServer. - */ -public final class ServerAzureADOnlyAuthenticationsListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/AzureADOnlyAuthList.json - */ - /** - * Sample code: Gets a list of Azure Active Directory only authentication object. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAListOfAzureActiveDirectoryOnlyAuthenticationObject( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerAzureADOnlyAuthentications() - .listByServer("sqlcrudtest-4799", "sqlcrudtest-6440", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 7fb63c24a53e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ServerBlobAuditingPolicyInner; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyName; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; -import java.util.Arrays; -import java.util.UUID; - -/** - * Samples for ServerBlobAuditingPolicies CreateOrUpdate. - */ -public final class ServerBlobAuditingPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerBlobAuditingCreateMin.json - */ - /** - * Sample code: Update a server's blob auditing policy with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateAServerSBlobAuditingPolicyWithMinimalParameters(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerBlobAuditingPolicies() - .createOrUpdate("blobauditingtest-4799", "blobauditingtest-6440", BlobAuditingPolicyName.DEFAULT, - new ServerBlobAuditingPolicyInner().withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ServerBlobAuditingCreateMax.json - */ - /** - * Sample code: Update a server's blob auditing policy with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateAServerSBlobAuditingPolicyWithAllParameters(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerBlobAuditingPolicies() - .createOrUpdate("blobauditingtest-4799", "blobauditingtest-6440", BlobAuditingPolicyName.DEFAULT, - new ServerBlobAuditingPolicyInner().withRetentionDays(6) - .withAuditActionsAndGroups(Arrays.asList("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP")) - .withIsStorageSecondaryKeyInUse(false) - .withIsAzureMonitorTargetEnabled(true) - .withQueueDelayMs(4000) - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey("fakeTokenPlaceholder") - .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesGetSamples.java deleted file mode 100644 index a7931080b4de..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyName; - -/** - * Samples for ServerBlobAuditingPolicies Get. - */ -public final class ServerBlobAuditingPoliciesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerBlobAuditingGet.json - */ - /** - * Sample code: Get a server's blob auditing policy. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAServerSBlobAuditingPolicy(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerBlobAuditingPolicies() - .getWithResponse("blobauditingtest-4799", "blobauditingtest-6440", BlobAuditingPolicyName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesListByServerSamples.java deleted file mode 100644 index 79584fef9c01..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerBlobAuditingPoliciesListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerBlobAuditingPolicies ListByServer. - */ -public final class ServerBlobAuditingPoliciesListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerAuditingSettingsList.json - */ - /** - * Sample code: List auditing settings of a server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listAuditingSettingsOfAServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerBlobAuditingPolicies() - .listByServer("blobauditingtest-4799", "blobauditingtest-6440", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConfigurationOptionsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConfigurationOptionsCreateOrUpdateSamples.java deleted file mode 100644 index 533e26b6663d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConfigurationOptionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ServerConfigurationOptionInner; -import com.azure.resourcemanager.sql.models.ServerConfigurationOptionName; - -/** - * Samples for ServerConfigurationOptions CreateOrUpdate. - */ -public final class ServerConfigurationOptionsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerConfigurationOptionUpdate.json - */ - /** - * Sample code: Updates managed instance server configuration option. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updatesManagedInstanceServerConfigurationOption(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerConfigurationOptions() - .createOrUpdate("testrg", "testinstance", ServerConfigurationOptionName.ALLOW_POLYBASE_EXPORT, - new ServerConfigurationOptionInner().withServerConfigurationOptionValue(1), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConfigurationOptionsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConfigurationOptionsGetSamples.java deleted file mode 100644 index cde8b1d553dd..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConfigurationOptionsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ServerConfigurationOptionName; - -/** - * Samples for ServerConfigurationOptions Get. - */ -public final class ServerConfigurationOptionsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerConfigurationOptionGet.json - */ - /** - * Sample code: Gets managed instance server configuration option. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsManagedInstanceServerConfigurationOption(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerConfigurationOptions() - .getWithResponse("testrg", "testinstance", ServerConfigurationOptionName.ALLOW_POLYBASE_EXPORT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConfigurationOptionsListByManagedInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConfigurationOptionsListByManagedInstanceSamples.java deleted file mode 100644 index 1d45b9f6d604..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConfigurationOptionsListByManagedInstanceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerConfigurationOptions ListByManagedInstance. - */ -public final class ServerConfigurationOptionsListByManagedInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerConfigurationOptionList.json - */ - /** - * Sample code: Gets a list of managed instance server configuration options. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsAListOfManagedInstanceServerConfigurationOptions(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerConfigurationOptions() - .listByManagedInstance("testrg", "testinstance", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 1aeec20c1cfb..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ServerConnectionPolicyInner; -import com.azure.resourcemanager.sql.models.ConnectionPolicyName; -import com.azure.resourcemanager.sql.models.ServerConnectionType; - -/** - * Samples for ServerConnectionPolicies CreateOrUpdate. - */ -public final class ServerConnectionPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerConnectionPoliciesUpdate.json - */ - /** - * Sample code: Updates a server connection policy. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updatesAServerConnectionPolicy(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerConnectionPolicies() - .createOrUpdate("testrg", "testserver", ConnectionPolicyName.DEFAULT, - new ServerConnectionPolicyInner().withConnectionType(ServerConnectionType.REDIRECT), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesGetSamples.java deleted file mode 100644 index 76261961b3a9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ConnectionPolicyName; - -/** - * Samples for ServerConnectionPolicies Get. - */ -public final class ServerConnectionPoliciesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerConnectionPoliciesGet.json - */ - /** - * Sample code: Gets a server connection policy. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAServerConnectionPolicy(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerConnectionPolicies() - .getWithResponse("rgtest-12", "servertest-6285", ConnectionPolicyName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesListByServerSamples.java deleted file mode 100644 index f743fd948a42..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerConnectionPoliciesListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerConnectionPolicies ListByServer. - */ -public final class ServerConnectionPoliciesListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerConnectionPoliciesList.json - */ - /** - * Sample code: Lists a servers connection policies. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listsAServersConnectionPolicies(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerConnectionPolicies() - .listByServer("rgtest-12", "servertest-6285", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsCreateOrUpdateSamples.java deleted file mode 100644 index ef14fca155e4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsCreateOrUpdateSamples.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ServerDevOpsAuditingSettingsInner; -import com.azure.resourcemanager.sql.models.BlobAuditingPolicyState; -import com.azure.resourcemanager.sql.models.DevOpsAuditingSettingsName; -import java.util.UUID; - -/** - * Samples for ServerDevOpsAuditSettings CreateOrUpdate. - */ -public final class ServerDevOpsAuditSettingsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerDevOpsAuditCreateMin.json - */ - /** - * Sample code: Update a server's DevOps audit settings with minimal input. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateAServerSDevOpsAuditSettingsWithMinimalInput(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerDevOpsAuditSettings() - .createOrUpdate("devAuditTestRG", "devOpsAuditTestSvr", DevOpsAuditingSettingsName.DEFAULT, - new ServerDevOpsAuditingSettingsInner().withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ServerDevOpsAuditCreateMax.json - */ - /** - * Sample code: Update a server's DevOps audit settings with all params. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateAServerSDevOpsAuditSettingsWithAllParams(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerDevOpsAuditSettings() - .createOrUpdate("devAuditTestRG", "devOpsAuditTestSvr", DevOpsAuditingSettingsName.DEFAULT, - new ServerDevOpsAuditingSettingsInner().withIsAzureMonitorTargetEnabled(true) - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey("fakeTokenPlaceholder") - .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsGetSamples.java deleted file mode 100644 index db708e595eec..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.DevOpsAuditingSettingsName; - -/** - * Samples for ServerDevOpsAuditSettings Get. - */ -public final class ServerDevOpsAuditSettingsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerDevOpsAuditGet.json - */ - /** - * Sample code: Get a server's DevOps audit settings. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAServerSDevOpsAuditSettings(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerDevOpsAuditSettings() - .getWithResponse("devAuditTestRG", "devOpsAuditTestSvr", DevOpsAuditingSettingsName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsListByServerSamples.java deleted file mode 100644 index 877e91c8aa27..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDevOpsAuditSettingsListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerDevOpsAuditSettings ListByServer. - */ -public final class ServerDevOpsAuditSettingsListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerDevOpsAuditList.json - */ - /** - * Sample code: List DevOps audit settings of a server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listDevOpsAuditSettingsOfAServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerDevOpsAuditSettings() - .listByServer("devAuditTestRG", "devOpsAuditTestSvr", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesAcquireSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesAcquireSamples.java deleted file mode 100644 index 16e4032143a7..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesAcquireSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ServerDnsAliasAcquisition; - -/** - * Samples for ServerDnsAliases Acquire. - */ -public final class ServerDnsAliasesAcquireSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerDnsAliasAcquire.json - */ - /** - * Sample code: Acquire server DNS alias. - * - * @param manager Entry point to SqlServerManager. - */ - public static void acquireServerDNSAlias(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerDnsAliases() - .acquire("Default", "dns-alias-new-server", "dns-alias-name-1", - new ServerDnsAliasAcquisition().withOldServerDnsAliasId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesCreateOrUpdateSamples.java deleted file mode 100644 index 8a8ccae688a8..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesCreateOrUpdateSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerDnsAliases CreateOrUpdate. - */ -public final class ServerDnsAliasesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerDnsAliasCreateOrUpdate.json - */ - /** - * Sample code: Create server DNS alias. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createServerDNSAlias(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerDnsAliases() - .createOrUpdate("Default", "dns-alias-server", "dns-alias-name-1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesDeleteSamples.java deleted file mode 100644 index 2a501035d2e5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerDnsAliases Delete. - */ -public final class ServerDnsAliasesDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerDnsAliasDelete.json - */ - /** - * Sample code: Delete server DNS alias. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteServerDNSAlias(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerDnsAliases() - .delete("Default", "dns-alias-server", "dns-alias-name-1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesGetSamples.java deleted file mode 100644 index 8c4e688a4903..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerDnsAliases Get. - */ -public final class ServerDnsAliasesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerDnsAliasGet.json - */ - /** - * Sample code: Get server DNS alias. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getServerDNSAlias(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerDnsAliases() - .getWithResponse("Default", "dns-alias-server", "dns-alias-name-1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesListByServerSamples.java deleted file mode 100644 index 4a78b67e9456..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerDnsAliasesListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerDnsAliases ListByServer. - */ -public final class ServerDnsAliasesListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerDnsAliasList.json - */ - /** - * Sample code: List server DNS aliases. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listServerDNSAliases(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerDnsAliases() - .listByServer("Default", "dns-alias-server", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysCreateOrUpdateSamples.java deleted file mode 100644 index 6f67573023e9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysCreateOrUpdateSamples.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ServerKeyInner; -import com.azure.resourcemanager.sql.models.ServerKeyType; - -/** - * Samples for ServerKeys CreateOrUpdate. - */ -public final class ServerKeysCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerKeyCreateOrUpdateWithVersionlessKey.json - */ - /** - * Sample code: Creates or updates a server key with versionless key. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createsOrUpdatesAServerKeyWithVersionlessKey(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerKeys() - .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", "someVault_someKey", - new ServerKeyInner().withServerKeyType(ServerKeyType.AZURE_KEY_VAULT) - .withUri("https://someVault.vault.azure.net/keys/someKey"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ServerKeyCreateOrUpdate.json - */ - /** - * Sample code: Creates or updates a server key. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsOrUpdatesAServerKey(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerKeys() - .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", - "someVault_someKey_01234567890123456789012345678901", - new ServerKeyInner().withServerKeyType(ServerKeyType.AZURE_KEY_VAULT) - .withUri("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysDeleteSamples.java deleted file mode 100644 index ca8fdefe95ba..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerKeys Delete. - */ -public final class ServerKeysDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerKeyDelete.json - */ - /** - * Sample code: Delete the server key. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteTheServerKey(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerKeys() - .delete("sqlcrudtest-7398", "sqlcrudtest-4645", "someVault_someKey_01234567890123456789012345678901", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysGetSamples.java deleted file mode 100644 index 51a94969e90f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysGetSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerKeys Get. - */ -public final class ServerKeysGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerKeyGet.json - */ - /** - * Sample code: Get the server key. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getTheServerKey(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerKeys() - .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", - "someVault_someKey_01234567890123456789012345678901", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ServerKeyGetWithVersionlessKey.json - */ - /** - * Sample code: Get the server key with versionless key. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getTheServerKeyWithVersionlessKey(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerKeys() - .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", "someVault_someKey", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysListByServerSamples.java deleted file mode 100644 index 919bff2dd195..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerKeysListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerKeys ListByServer. - */ -public final class ServerKeysListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerKeyList.json - */ - /** - * Sample code: List the server keys by server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listTheServerKeysByServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerKeys() - .listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerOperationsListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerOperationsListByServerSamples.java deleted file mode 100644 index 1e5fb43c2c15..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerOperationsListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerOperations ListByServer. - */ -public final class ServerOperationsListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListServerOperations.json - */ - /** - * Sample code: List the server management operations. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listTheServerManagementOperations(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerOperations() - .listByServer("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index a26979e1ccf4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ServerSecurityAlertPolicyInner; -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyState; -import java.util.Arrays; - -/** - * Samples for ServerSecurityAlertPolicies CreateOrUpdate. - */ -public final class ServerSecurityAlertPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerSecurityAlertsCreateMin.json - */ - /** - * Sample code: Update a server's threat detection policy with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAServerSThreatDetectionPolicyWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerSecurityAlertPolicies() - .createOrUpdate("securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, - new ServerSecurityAlertPolicyInner().withState(SecurityAlertPolicyState.ENABLED), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ServerSecurityAlertsCreateMax.json - */ - /** - * Sample code: Update a server's threat detection policy with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateAServerSThreatDetectionPolicyWithAllParameters(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerSecurityAlertPolicies() - .createOrUpdate("securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, - new ServerSecurityAlertPolicyInner().withState(SecurityAlertPolicyState.ENABLED) - .withDisabledAlerts(Arrays.asList("Access_Anomaly", "Usage_Anomaly")) - .withEmailAddresses(Arrays.asList("testSecurityAlert@microsoft.com")) - .withEmailAccountAdmins(true) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey("fakeTokenPlaceholder") - .withRetentionDays(5), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesGetSamples.java deleted file mode 100644 index a941913c380d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.SecurityAlertPolicyName; - -/** - * Samples for ServerSecurityAlertPolicies Get. - */ -public final class ServerSecurityAlertPoliciesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerSecurityAlertsGet.json - */ - /** - * Sample code: Get a server's threat detection policy. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAServerSThreatDetectionPolicy(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerSecurityAlertPolicies() - .getWithResponse("securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesListByServerSamples.java deleted file mode 100644 index 2c427e0184c0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerSecurityAlertPoliciesListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerSecurityAlertPolicies ListByServer. - */ -public final class ServerSecurityAlertPoliciesListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerSecurityAlertsListByServer.json - */ - /** - * Sample code: List the server's threat detection policies. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listTheServerSThreatDetectionPolicies(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerSecurityAlertPolicies() - .listByServer("securityalert-4799", "securityalert-6440", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesCreateOrUpdateSamples.java deleted file mode 100644 index 0f959a20faf7..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesCreateOrUpdateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ServerTrustCertificateInner; - -/** - * Samples for ServerTrustCertificates CreateOrUpdate. - */ -public final class ServerTrustCertificatesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerTrustCertificatesCreate.json - */ - /** - * Sample code: Create server trust certificate. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createServerTrustCertificate(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerTrustCertificates() - .createOrUpdate("testrg", "testcl", "customerCertificateName", - new ServerTrustCertificateInner().withPublicBlob("308203AE30820296A0030201020210"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesDeleteSamples.java deleted file mode 100644 index 1588add58cd6..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerTrustCertificates Delete. - */ -public final class ServerTrustCertificatesDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerTrustCertificatesDelete.json - */ - /** - * Sample code: Delete server trust certificate. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteServerTrustCertificate(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerTrustCertificates() - .delete("testrg", "testcl", "customerCertificateName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesGetSamples.java deleted file mode 100644 index 56a189215a9e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerTrustCertificates Get. - */ -public final class ServerTrustCertificatesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerTrustCertificatesGet.json - */ - /** - * Sample code: Gets server trust certificate. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsServerTrustCertificate(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerTrustCertificates() - .getWithResponse("testrg", "testcl", "customerCertificateName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesListByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesListByInstanceSamples.java deleted file mode 100644 index f45027b90f51..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustCertificatesListByInstanceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerTrustCertificates ListByInstance. - */ -public final class ServerTrustCertificatesListByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerTrustCertificatesListByInstance.json - */ - /** - * Sample code: Gets a list of server trust certificates on a given server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsAListOfServerTrustCertificatesOnAGivenServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerTrustCertificates() - .listByInstance("testrg", "testcl", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsCreateOrUpdateSamples.java deleted file mode 100644 index e71019f24720..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsCreateOrUpdateSamples.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ServerTrustGroupInner; -import com.azure.resourcemanager.sql.models.ServerInfo; -import com.azure.resourcemanager.sql.models.ServerTrustGroupPropertiesTrustScopesItem; -import java.util.Arrays; - -/** - * Samples for ServerTrustGroups CreateOrUpdate. - */ -public final class ServerTrustGroupsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerTrustGroupCreate.json - */ - /** - * Sample code: Create server trust group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createServerTrustGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerTrustGroups() - .createOrUpdate("Default", "Japan East", "server-trust-group-test", - new ServerTrustGroupInner().withGroupMembers(Arrays.asList(new ServerInfo().withServerId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"), - new ServerInfo().withServerId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2"))) - .withTrustScopes(Arrays.asList(ServerTrustGroupPropertiesTrustScopesItem.GLOBAL_TRANSACTIONS, - ServerTrustGroupPropertiesTrustScopesItem.SERVICE_BROKER)), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsDeleteSamples.java deleted file mode 100644 index ad10e3dc50ad..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerTrustGroups Delete. - */ -public final class ServerTrustGroupsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerTrustGroupDelete.json - */ - /** - * Sample code: Drop server trust group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void dropServerTrustGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerTrustGroups() - .delete("Default", "Japan East", "server-trust-group-test", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsGetSamples.java deleted file mode 100644 index 941b55f0c38a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerTrustGroups Get. - */ -public final class ServerTrustGroupsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerTrustGroupGet.json - */ - /** - * Sample code: Get server trust group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getServerTrustGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerTrustGroups() - .getWithResponse("Default", "Japan East", "server-trust-group-test", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsListByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsListByInstanceSamples.java deleted file mode 100644 index 6e34de05c7b4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsListByInstanceSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerTrustGroups ListByInstance. - */ -public final class ServerTrustGroupsListByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerTrustGroupListByManagedInstance.json - */ - /** - * Sample code: List server trust groups by managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listServerTrustGroupsByManagedInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerTrustGroups() - .listByInstance("Default-SQL-SouthEastAsia", "managedInstance-1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsListByLocationSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsListByLocationSamples.java deleted file mode 100644 index 9d432cf25344..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerTrustGroupsListByLocationSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerTrustGroups ListByLocation. - */ -public final class ServerTrustGroupsListByLocationSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerTrustGroupList.json - */ - /** - * Sample code: List server trust groups. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listServerTrustGroups(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerTrustGroups() - .listByLocation("Default", "Japan East", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerUsagesListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerUsagesListByServerSamples.java deleted file mode 100644 index a739445d5f80..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerUsagesListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerUsages ListByServer. - */ -public final class ServerUsagesListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerUsageList.json - */ - /** - * Sample code: List servers usages. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listServersUsages(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerUsages() - .listByServer("sqlcrudtest-6730", "sqlcrudtest-9007", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsCreateOrUpdateSamples.java deleted file mode 100644 index aff04d6d29e4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ServerVulnerabilityAssessmentInner; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentRecurringScansProperties; -import java.util.Arrays; - -/** - * Samples for ServerVulnerabilityAssessments CreateOrUpdate. - */ -public final class ServerVulnerabilityAssessmentsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerVulnerabilityAssessmentCreateMax.json - */ - /** - * Sample code: Create a server's vulnerability assessment with all parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createAServerSVulnerabilityAssessmentWithAllParameters(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerVulnerabilityAssessments() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, - new ServerVulnerabilityAssessmentInner() - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageContainerSasKey("fakeTokenPlaceholder") - .withStorageAccountAccessKey("fakeTokenPlaceholder") - .withRecurringScans(new VulnerabilityAssessmentRecurringScansProperties().withIsEnabled(true) - .withEmailSubscriptionAdmins(true) - .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json - */ - /** - * Sample code: Create a server's vulnerability assessment with minimal parameters, when storageAccountAccessKey is - * specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createAServerSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerVulnerabilityAssessments() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, - new ServerVulnerabilityAssessmentInner() - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageAccountAccessKey("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json - */ - /** - * Sample code: Create a server's vulnerability assessment with minimal parameters, when storageContainerSasKey is - * specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createAServerSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerVulnerabilityAssessments() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, - new ServerVulnerabilityAssessmentInner() - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageContainerSasKey("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsDeleteSamples.java deleted file mode 100644 index 03ba0b75b326..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsDeleteSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for ServerVulnerabilityAssessments Delete. - */ -public final class ServerVulnerabilityAssessmentsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerVulnerabilityAssessmentDelete.json - */ - /** - * Sample code: Remove a server's vulnerability assessment. - * - * @param manager Entry point to SqlServerManager. - */ - public static void removeAServerSVulnerabilityAssessment(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerVulnerabilityAssessments() - .deleteWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsGetSamples.java deleted file mode 100644 index 1d0454bfdd7b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for ServerVulnerabilityAssessments Get. - */ -public final class ServerVulnerabilityAssessmentsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerVulnerabilityAssessmentGet.json - */ - /** - * Sample code: Get a server's vulnerability assessment. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAServerSVulnerabilityAssessment(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerVulnerabilityAssessments() - .getWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsListByServerSamples.java deleted file mode 100644 index cf87f7f66899..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServerVulnerabilityAssessmentsListByServerSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for ServerVulnerabilityAssessments ListByServer. - */ -public final class ServerVulnerabilityAssessmentsListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerVulnerabilityAssessmentListByServer.json - */ - /** - * Sample code: Get a server's vulnerability assessment policies. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAServerSVulnerabilityAssessmentPolicies(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServerVulnerabilityAssessments() - .listByServer("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersCheckNameAvailabilitySamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersCheckNameAvailabilitySamples.java deleted file mode 100644 index 938bdfd710b0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersCheckNameAvailabilitySamples.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.CheckNameAvailabilityRequest; - -/** - * Samples for Servers CheckNameAvailability. - */ -public final class ServersCheckNameAvailabilitySamples { - /* - * x-ms-original-file: 2025-02-01-preview/CheckNameAvailabilityServerAvailable.json - */ - /** - * Sample code: Check for a server name that is available. - * - * @param manager Entry point to SqlServerManager. - */ - public static void checkForAServerNameThatIsAvailable(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServers() - .checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest().withName("server1"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CheckNameAvailabilityServerAlreadyExists.json - */ - /** - * Sample code: Check for a server name that already exists. - * - * @param manager Entry point to SqlServerManager. - */ - public static void checkForAServerNameThatAlreadyExists(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServers() - .checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest().withName("server1"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CheckNameAvailabilityServerInvalid.json - */ - /** - * Sample code: Check for a server name that is invalid. - * - * @param manager Entry point to SqlServerManager. - */ - public static void checkForAServerNameThatIsInvalid(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServers() - .checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest().withName("SERVER1"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersCreateOrUpdateSamples.java deleted file mode 100644 index b4458fe1a714..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersCreateOrUpdateSamples.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.ServerInner; -import com.azure.resourcemanager.sql.models.PrincipalType; -import com.azure.resourcemanager.sql.models.ServerCreateMode; -import com.azure.resourcemanager.sql.models.ServerExternalAdministrator; -import com.azure.resourcemanager.sql.models.ServerNetworkAccessFlag; -import java.util.UUID; - -/** - * Samples for Servers CreateOrUpdate. - */ -public final class ServersCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerCreate.json - */ - /** - * Sample code: Create server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServers() - .createOrUpdate("sqlcrudtest-7398", "sqlcrudtest-4645", - new ServerInner().withLocation("Japan East") - .withAdministratorLogin("dummylogin") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withPublicNetworkAccess(ServerNetworkAccessFlag.ENABLED) - .withAdministrators(new ServerExternalAdministrator().withPrincipalType(PrincipalType.USER) - .withLogin("bob@contoso.com") - .withSid(UUID.fromString("00000011-1111-2222-2222-123456789111")) - .withTenantId(UUID.fromString("00000011-1111-2222-2222-123456789111")) - .withAzureADOnlyAuthentication(true)) - .withRestrictOutboundNetworkAccess(ServerNetworkAccessFlag.ENABLED) - .withIsIPv6Enabled(ServerNetworkAccessFlag.ENABLED) - .withRetentionDays(7) - .withCreateMode(ServerCreateMode.NORMAL), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersDeleteSamples.java deleted file mode 100644 index 21ea5bfa67cf..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Servers Delete. - */ -public final class ServersDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerDelete.json - */ - /** - * Sample code: Delete server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServers() - .delete("sqlcrudtest-7398", "sqlcrudtest-6661", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersGetByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersGetByResourceGroupSamples.java deleted file mode 100644 index c9c3d97ffc0d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersGetByResourceGroupSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Servers GetByResourceGroup. - */ -public final class ServersGetByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerGetWithExpandEqualsAdministrators.json - */ - /** - * Sample code: Get server with $expand=administrators/activedirectory. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getServerWithExpandAdministratorsActivedirectory(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServers() - .getByResourceGroupWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ServerGet.json - */ - /** - * Sample code: Get server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServers() - .getByResourceGroupWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersImportDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersImportDatabaseSamples.java deleted file mode 100644 index 26f6753bfe57..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersImportDatabaseSamples.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ImportNewDatabaseDefinition; -import com.azure.resourcemanager.sql.models.NetworkIsolationSettings; -import com.azure.resourcemanager.sql.models.StorageKeyType; - -/** - * Samples for Servers ImportDatabase. - */ -public final class ServersImportDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ImportNewDatabaseWithNetworkIsolation.json - */ - /** - * Sample code: Imports to a new database, using private link for the SQL server and storage account. - * - * @param manager Entry point to SqlServerManager. - */ - public static void importsToANewDatabaseUsingPrivateLinkForTheSQLServerAndStorageAccount( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServers() - .importDatabase("Default-SQL-SouthEastAsia", "testsvr", new ImportNewDatabaseDefinition() - .withDatabaseName("testdb") - .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) - .withStorageKey("fakeTokenPlaceholder") - .withStorageUri("https://test.blob.core.windows.net/test.bacpac") - .withAdministratorLogin("login") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withAuthenticationType("Sql") - .withNetworkIsolation(new NetworkIsolationSettings().withStorageAccountResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink") - .withSqlServerResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ImportNewDatabase.json - */ - /** - * Sample code: Imports to a new database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void importsToANewDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServers() - .importDatabase("Default-SQL-SouthEastAsia", "testsvr", - new ImportNewDatabaseDefinition().withDatabaseName("testdb") - .withStorageKeyType(StorageKeyType.STORAGE_ACCESS_KEY) - .withStorageKey("fakeTokenPlaceholder") - .withStorageUri("https://test.blob.core.windows.net/test.bacpac") - .withAdministratorLogin("login") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withAuthenticationType("Sql"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ImportNewDatabaseWithManagedIdentity.json - */ - /** - * Sample code: Imports to a new database, using Managed Identity for the SQL server and storage account. - * - * @param manager Entry point to SqlServerManager. - */ - public static void importsToANewDatabaseUsingManagedIdentityForTheSQLServerAndStorageAccount( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServers() - .importDatabase("Default-SQL-SouthEastAsia", "testsvr", new ImportNewDatabaseDefinition() - .withDatabaseName("testdb") - .withStorageKeyType(StorageKeyType.MANAGED_IDENTITY) - .withStorageKey("fakeTokenPlaceholder") - .withStorageUri("https://test.blob.core.windows.net/test.bacpac") - .withAdministratorLogin( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName") - .withAuthenticationType("ManagedIdentity"), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersListByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersListByResourceGroupSamples.java deleted file mode 100644 index 48dc0c8e90e6..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersListByResourceGroupSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Servers ListByResourceGroup. - */ -public final class ServersListByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerListByResourceGroup.json - */ - /** - * Sample code: List servers by resource group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listServersByResourceGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServers() - .listByResourceGroup("sqlcrudtest-7398", null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ServerListByResourceGroupWithExpandEqualsAdministrators.json - */ - /** - * Sample code: List servers by resource group with $expand=administrators/activedirectory. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listServersByResourceGroupWithExpandAdministratorsActivedirectory( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServers() - .listByResourceGroup("sqlcrudtest-7398", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersListSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersListSamples.java deleted file mode 100644 index 2bba73d8008d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersListSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Servers List. - */ -public final class ServersListSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerList.json - */ - /** - * Sample code: List servers. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listServers(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getServers().list(null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ServerListWithExpandEqualsAdministrators.json - */ - /** - * Sample code: List servers with $expand=administrators/activedirectory. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listServersWithExpandAdministratorsActivedirectory(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getServers().list(null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersRefreshStatusSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersRefreshStatusSamples.java deleted file mode 100644 index 5d92cde37a11..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersRefreshStatusSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Servers RefreshStatus. - */ -public final class ServersRefreshStatusSamples { - /* - * x-ms-original-file: 2025-02-01-preview/RefreshExternalGovernanceStatus.json - */ - /** - * Sample code: Refresh external governance enablement status. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - refreshExternalGovernanceEnablementStatus(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServers() - .refreshStatus("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersUpdateSamples.java deleted file mode 100644 index 84d7dc13d3a4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/ServersUpdateSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.ServerNetworkAccessFlag; -import com.azure.resourcemanager.sql.models.ServerUpdate; - -/** - * Samples for Servers Update. - */ -public final class ServersUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ServerUpdate.json - */ - /** - * Sample code: Update a server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getServers() - .update("sqlcrudtest-7398", "sqlcrudtest-4645", - new ServerUpdate().withAdministratorLogin("dummylogin") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withPublicNetworkAccess(ServerNetworkAccessFlag.DISABLED) - .withRestrictOutboundNetworkAccess(ServerNetworkAccessFlag.ENABLED) - .withIsIPv6Enabled(ServerNetworkAccessFlag.ENABLED) - .withRetentionDays(7), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlAgentCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlAgentCreateOrUpdateSamples.java deleted file mode 100644 index bc8e3a4d5ae1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlAgentCreateOrUpdateSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.SqlAgentConfigurationInner; -import com.azure.resourcemanager.sql.models.SqlAgentConfigurationPropertiesState; - -/** - * Samples for SqlAgent CreateOrUpdate. - */ -public final class SqlAgentCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlAgentConfigurationPut.json - */ - /** - * Sample code: Puts new sql agent configuration to instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void putsNewSqlAgentConfigurationToInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlAgents() - .createOrUpdateWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", - new SqlAgentConfigurationInner().withState(SqlAgentConfigurationPropertiesState.ENABLED), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlAgentGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlAgentGetSamples.java deleted file mode 100644 index 9a3f5c01b32c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlAgentGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SqlAgent Get. - */ -public final class SqlAgentGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlAgentConfigurationGet.json - */ - /** - * Sample code: Gets current instance sql agent configuration. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsCurrentInstanceSqlAgentConfiguration(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlAgents() - .getWithResponse("sqlcrudtest-7398", "sqlcrudtest-4645", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentBaselineGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentBaselineGetSamples.java deleted file mode 100644 index dcd23fe016c8..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentBaselineGetSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; - -/** - * Samples for SqlVulnerabilityAssessmentBaseline Get. - */ -public final class SqlVulnerabilityAssessmentBaselineGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentBaselineGet.json - */ - /** - * Sample code: Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessmentBaselines() - .getWithResponse("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", - VulnerabilityAssessmentName.DEFAULT, BaselineName.DEFAULT, - VulnerabilityAssessmentSystemDatabaseName.MASTER, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentSamples.java deleted file mode 100644 index 86677798a14b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; - -/** - * Samples for SqlVulnerabilityAssessmentBaseline ListBySqlVulnerabilityAssessment. - */ -public final class SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json - */ - /** - * Sample code: Gets a list of database's sql vulnerability assessment rule baselines. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessmentBaselines() - .listBySqlVulnerabilityAssessment("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", - VulnerabilityAssessmentName.DEFAULT, VulnerabilityAssessmentSystemDatabaseName.MASTER, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentBaselinesOperationCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentBaselinesOperationCreateOrUpdateSamples.java deleted file mode 100644 index ccc678adcd74..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentBaselinesOperationCreateOrUpdateSamples.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for SqlVulnerabilityAssessmentBaselinesOperation CreateOrUpdate. - */ -public final class SqlVulnerabilityAssessmentBaselinesOperationCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentBaselineAddLatest.json - */ - /** - * Sample code: Add a database's vulnerability assessment rule baseline from the latest scan result. - * - * @param manager Entry point to SqlServerManager. - */ - public static void addADatabaseSVulnerabilityAssessmentRuleBaselineFromTheLatestScanResult( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessmentBaselinesOperations() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, BaselineName.DEFAULT, - VulnerabilityAssessmentSystemDatabaseName.MASTER, - new DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput().withLatestScan(true).withResults(mapOf()), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentBaselineAdd.json - */ - /** - * Sample code: Add a database's vulnerability assessment rule baseline list. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - addADatabaseSVulnerabilityAssessmentRuleBaselineList(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessmentBaselinesOperations() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", - VulnerabilityAssessmentName.DEFAULT, BaselineName.DEFAULT, - VulnerabilityAssessmentSystemDatabaseName.MASTER, - new DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput().withLatestScan(false) - .withResults(mapOf("VA2063", Arrays.asList(Arrays.asList("AllowAll", "0.0.0.0", "255.255.255.255")), - "VA2065", Arrays.asList(Arrays.asList("AllowAll", "0.0.0.0", "255.255.255.255")))), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentExecuteScanExecuteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentExecuteScanExecuteSamples.java deleted file mode 100644 index ff87cfb0baea..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentExecuteScanExecuteSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; - -/** - * Samples for SqlVulnerabilityAssessmentExecuteScan Execute. - */ -public final class SqlVulnerabilityAssessmentExecuteScanExecuteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentScansExecute.json - */ - /** - * Sample code: Executes a database's vulnerability assessment scan. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - executesADatabaseSVulnerabilityAssessmentScan(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessmentExecuteScans() - .execute("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", - VulnerabilityAssessmentName.DEFAULT, VulnerabilityAssessmentSystemDatabaseName.MASTER, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateSamples.java deleted file mode 100644 index 14dfeab4afbc..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInput; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; -import java.util.Arrays; - -/** - * Samples for SqlVulnerabilityAssessmentRuleBaseline CreateOrUpdate. - */ -public final class SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentRuleBaselineCreate.json - */ - /** - * Sample code: Creates or updates a database's vulnerability assessment rule baseline. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessmentRuleBaselines() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, BaselineName.DEFAULT, "VA1001", - VulnerabilityAssessmentSystemDatabaseName.MASTER, - new DatabaseSqlVulnerabilityAssessmentRuleBaselineInput().withLatestScan(false) - .withResults(Arrays.asList(Arrays.asList("userA", "SELECT"), Arrays.asList("userB", "SELECT"), - Arrays.asList("userC", "SELECT"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentRuleBaselineGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentRuleBaselineGetSamples.java deleted file mode 100644 index 3b4e6fa5a737..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentRuleBaselineGetSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; - -/** - * Samples for SqlVulnerabilityAssessmentRuleBaseline Get. - */ -public final class SqlVulnerabilityAssessmentRuleBaselineGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentRuleBaselineGet.json - */ - /** - * Sample code: Gets a system database's sql vulnerability assessment rule baseline. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsASystemDatabaseSSqlVulnerabilityAssessmentRuleBaseline( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessmentRuleBaselines() - .getWithResponse("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", - VulnerabilityAssessmentName.DEFAULT, BaselineName.DEFAULT, "VA1001", - VulnerabilityAssessmentSystemDatabaseName.MASTER, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentRuleBaselineListByBaselineSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentRuleBaselineListByBaselineSamples.java deleted file mode 100644 index bf94ce3ed59c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentRuleBaselineListByBaselineSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; - -/** - * Samples for SqlVulnerabilityAssessmentRuleBaseline ListByBaseline. - */ -public final class SqlVulnerabilityAssessmentRuleBaselineListByBaselineSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json - */ - /** - * Sample code: Gets a system database's sql vulnerability assessment rule baseline. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsASystemDatabaseSSqlVulnerabilityAssessmentRuleBaseline( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessmentRuleBaselines() - .listByBaseline("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", - VulnerabilityAssessmentName.DEFAULT, BaselineName.DEFAULT, - VulnerabilityAssessmentSystemDatabaseName.MASTER, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentRuleBaselinesOperationDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentRuleBaselinesOperationDeleteSamples.java deleted file mode 100644 index ba7595befed9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentRuleBaselinesOperationDeleteSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.BaselineName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; - -/** - * Samples for SqlVulnerabilityAssessmentRuleBaselinesOperation Delete. - */ -public final class SqlVulnerabilityAssessmentRuleBaselinesOperationDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentRuleBaselineDelete.json - */ - /** - * Sample code: Removes a database's vulnerability assessment rule baseline. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - removesADatabaseSVulnerabilityAssessmentRuleBaseline(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessmentRuleBaselinesOperations() - .deleteWithResponse("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", - VulnerabilityAssessmentName.DEFAULT, BaselineName.DEFAULT, "VA1001", - VulnerabilityAssessmentSystemDatabaseName.MASTER, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentScanResultOperationGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentScanResultOperationGetSamples.java deleted file mode 100644 index 33f73edc0aeb..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentScanResultOperationGetSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.SqlVulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; - -/** - * Samples for SqlVulnerabilityAssessmentScanResultOperation Get. - */ -public final class SqlVulnerabilityAssessmentScanResultOperationGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentScansResults.json - */ - /** - * Sample code: Get a system database SQL Vulnerability Assessment scan result for scan id and scan result id. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getASystemDatabaseSQLVulnerabilityAssessmentScanResultForScanIdAndScanResultId( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessmentScanResultOperations() - .getWithResponse("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", - SqlVulnerabilityAssessmentName.DEFAULT, "scanId1", "VA1234", - VulnerabilityAssessmentSystemDatabaseName.MASTER, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentScanResultOperationListByScanSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentScanResultOperationListByScanSamples.java deleted file mode 100644 index 89144a71ae13..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentScanResultOperationListByScanSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.SqlVulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; - -/** - * Samples for SqlVulnerabilityAssessmentScanResultOperation ListByScan. - */ -public final class SqlVulnerabilityAssessmentScanResultOperationListByScanSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentListScansResults.json - */ - /** - * Sample code: List system database SQL Vulnerability Assessment scan results for scan id. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listSystemDatabaseSQLVulnerabilityAssessmentScanResultsForScanId( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessmentScanResultOperations() - .listByScan("vulnerabilityassessmenttest-4711", "testsvr", SqlVulnerabilityAssessmentName.DEFAULT, - "scanId1", VulnerabilityAssessmentSystemDatabaseName.MASTER, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentScansGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentScansGetSamples.java deleted file mode 100644 index fe400c8a1c7c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentScansGetSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; - -/** - * Samples for SqlVulnerabilityAssessmentScans Get. - */ -public final class SqlVulnerabilityAssessmentScansGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentScan.json - */ - /** - * Sample code: Gets the a database vulnerability assessment scan records. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsTheADatabaseVulnerabilityAssessmentScanRecords(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessmentScans() - .getWithResponse("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", - VulnerabilityAssessmentName.DEFAULT, "scan001", VulnerabilityAssessmentSystemDatabaseName.MASTER, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsSamples.java deleted file mode 100644 index 1d27eb3dded9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentSystemDatabaseName; - -/** - * Samples for SqlVulnerabilityAssessmentScans ListBySqlVulnerabilityAssessments. - */ -public final class SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json - */ - /** - * Sample code: Gets the list of a database vulnerability assessment scan records. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsTheListOfADatabaseVulnerabilityAssessmentScanRecords( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessmentScans() - .listBySqlVulnerabilityAssessments("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", - VulnerabilityAssessmentName.DEFAULT, VulnerabilityAssessmentSystemDatabaseName.MASTER, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentsDeleteSamples.java deleted file mode 100644 index 81dd978a146a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentsDeleteSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for SqlVulnerabilityAssessments Delete. - */ -public final class SqlVulnerabilityAssessmentsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentDelete.json - */ - /** - * Sample code: Remove SQL Vulnerability Assessment. - * - * @param manager Entry point to SqlServerManager. - */ - public static void removeSQLVulnerabilityAssessment(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessments() - .deleteWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentsSettingsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentsSettingsCreateOrUpdateSamples.java deleted file mode 100644 index 82d4ae3c5557..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentsSettingsCreateOrUpdateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.SqlVulnerabilityAssessmentInner; -import com.azure.resourcemanager.sql.models.SqlVulnerabilityAssessmentState; -import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; - -/** - * Samples for SqlVulnerabilityAssessmentsSettings CreateOrUpdate. - */ -public final class SqlVulnerabilityAssessmentsSettingsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentCreate.json - */ - /** - * Sample code: Create a SQL Vulnerability Assessment policy. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createASQLVulnerabilityAssessmentPolicy(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessmentsSettings() - .createOrUpdateWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - VulnerabilityAssessmentName.DEFAULT, - new SqlVulnerabilityAssessmentInner().withState(SqlVulnerabilityAssessmentState.ENABLED), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentsSettingsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentsSettingsGetSamples.java deleted file mode 100644 index 8dc7a14a64c1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentsSettingsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.SqlVulnerabilityAssessmentName; - -/** - * Samples for SqlVulnerabilityAssessmentsSettings Get. - */ -public final class SqlVulnerabilityAssessmentsSettingsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentGet.json - */ - /** - * Sample code: Get SQL Vulnerability Assessment policy. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getSQLVulnerabilityAssessmentPolicy(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessmentsSettings() - .getWithResponse("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - SqlVulnerabilityAssessmentName.DEFAULT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentsSettingsListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentsSettingsListByServerSamples.java deleted file mode 100644 index dc652a7082b5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SqlVulnerabilityAssessmentsSettingsListByServerSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SqlVulnerabilityAssessmentsSettings ListByServer. - */ -public final class SqlVulnerabilityAssessmentsSettingsListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlVulnerabilityAssessmentListByServer.json - */ - /** - * Sample code: Get SQL Vulnerability Assessment policies. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getSQLVulnerabilityAssessmentPolicies(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSqlVulnerabilityAssessmentsSettings() - .listByServer("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/StartStopManagedInstanceSchedulesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/StartStopManagedInstanceSchedulesCreateOrUpdateSamples.java deleted file mode 100644 index 8e63330d0b86..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/StartStopManagedInstanceSchedulesCreateOrUpdateSamples.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.StartStopManagedInstanceScheduleInner; -import com.azure.resourcemanager.sql.models.DayOfWeek; -import com.azure.resourcemanager.sql.models.ScheduleItem; -import com.azure.resourcemanager.sql.models.StartStopScheduleName; -import java.util.Arrays; - -/** - * Samples for StartStopManagedInstanceSchedules CreateOrUpdate. - */ -public final class StartStopManagedInstanceSchedulesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/StartStopManagedInstanceScheduleCreateOrUpdateMin.json - */ - /** - * Sample code: Creates or updates the managed instance's Start/Stop schedule with no optional parameters specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsOrUpdatesTheManagedInstanceSStartStopScheduleWithNoOptionalParametersSpecified( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getStartStopManagedInstanceSchedules() - .createOrUpdateWithResponse("schedulerg", "schedulemi", StartStopScheduleName.DEFAULT, - new StartStopManagedInstanceScheduleInner().withScheduleList(Arrays.asList( - new ScheduleItem().withStartDay(DayOfWeek.THURSDAY) - .withStartTime("18:00") - .withStopDay(DayOfWeek.THURSDAY) - .withStopTime("17:00"), - new ScheduleItem().withStartDay(DayOfWeek.THURSDAY) - .withStartTime("15:00") - .withStopDay(DayOfWeek.THURSDAY) - .withStopTime("14:00"))), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/StartStopManagedInstanceScheduleCreateOrUpdateMax.json - */ - /** - * Sample code: Creates or updates the managed instance's Start/Stop schedule with all optional parameters - * specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createsOrUpdatesTheManagedInstanceSStartStopScheduleWithAllOptionalParametersSpecified( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getStartStopManagedInstanceSchedules() - .createOrUpdateWithResponse("schedulerg", "schedulemi", StartStopScheduleName.DEFAULT, - new StartStopManagedInstanceScheduleInner() - .withDescription("This is a schedule for our Dev/Test environment.") - .withTimeZoneId("Central European Standard Time") - .withScheduleList(Arrays.asList( - new ScheduleItem().withStartDay(DayOfWeek.THURSDAY) - .withStartTime("18:00") - .withStopDay(DayOfWeek.THURSDAY) - .withStopTime("17:00"), - new ScheduleItem().withStartDay(DayOfWeek.THURSDAY) - .withStartTime("15:00") - .withStopDay(DayOfWeek.THURSDAY) - .withStopTime("14:00"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/StartStopManagedInstanceSchedulesDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/StartStopManagedInstanceSchedulesDeleteSamples.java deleted file mode 100644 index 1d85414b8c67..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/StartStopManagedInstanceSchedulesDeleteSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.StartStopScheduleName; - -/** - * Samples for StartStopManagedInstanceSchedules Delete. - */ -public final class StartStopManagedInstanceSchedulesDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/StartStopManagedInstanceScheduleDelete.json - */ - /** - * Sample code: Deletes the managed instance's Start/Stop schedule. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - deletesTheManagedInstanceSStartStopSchedule(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getStartStopManagedInstanceSchedules() - .deleteWithResponse("schedulerg", "schedulemi", StartStopScheduleName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/StartStopManagedInstanceSchedulesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/StartStopManagedInstanceSchedulesGetSamples.java deleted file mode 100644 index 19b698ddd8e3..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/StartStopManagedInstanceSchedulesGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.StartStopScheduleName; - -/** - * Samples for StartStopManagedInstanceSchedules Get. - */ -public final class StartStopManagedInstanceSchedulesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/StartStopManagedInstanceScheduleGet.json - */ - /** - * Sample code: Gets the managed instance's Start/Stop schedule. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsTheManagedInstanceSStartStopSchedule(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getStartStopManagedInstanceSchedules() - .getWithResponse("schedulerg", "schedulemi", StartStopScheduleName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/StartStopManagedInstanceSchedulesListByInstanceSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/StartStopManagedInstanceSchedulesListByInstanceSamples.java deleted file mode 100644 index 6496cafaf787..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/StartStopManagedInstanceSchedulesListByInstanceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for StartStopManagedInstanceSchedules ListByInstance. - */ -public final class StartStopManagedInstanceSchedulesListByInstanceSamples { - /* - * x-ms-original-file: 2025-02-01-preview/StartStopManagedInstanceScheduleList.json - */ - /** - * Sample code: Lists the managed instance's Start/Stop schedules. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listsTheManagedInstanceSStartStopSchedules(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getStartStopManagedInstanceSchedules() - .listByInstance("schedulerg", "schedulemi", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SubscriptionUsagesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SubscriptionUsagesGetSamples.java deleted file mode 100644 index 4bc0ebaacf28..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SubscriptionUsagesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SubscriptionUsages Get. - */ -public final class SubscriptionUsagesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SubscriptionUsageGet.json - */ - /** - * Sample code: Get specific subscription usage in the given location. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getSpecificSubscriptionUsageInTheGivenLocation(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSubscriptionUsages() - .getWithResponse("WestUS", "ServerQuota", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SubscriptionUsagesListByLocationSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SubscriptionUsagesListByLocationSamples.java deleted file mode 100644 index f041f33295cc..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SubscriptionUsagesListByLocationSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SubscriptionUsages ListByLocation. - */ -public final class SubscriptionUsagesListByLocationSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SubscriptionUsageListByLocation.json - */ - /** - * Sample code: List subscription usages in the given location. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listSubscriptionUsagesInTheGivenLocation(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getSubscriptionUsages().listByLocation("WestUS", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SynapseLinkWorkspacesListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SynapseLinkWorkspacesListByDatabaseSamples.java deleted file mode 100644 index 9e10e164c207..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SynapseLinkWorkspacesListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SynapseLinkWorkspaces ListByDatabase. - */ -public final class SynapseLinkWorkspacesListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SynapseLinkWorkspaceListByDatabase.json - */ - /** - * Sample code: List all synapselink workspaces for the given database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listAllSynapselinkWorkspacesForTheGivenDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSynapseLinkWorkspaces() - .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "dbSynapse", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsCreateOrUpdateSamples.java deleted file mode 100644 index bc31cdedfc42..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.SyncAgentInner; - -/** - * Samples for SyncAgents CreateOrUpdate. - */ -public final class SyncAgentsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncAgentCreate.json - */ - /** - * Sample code: Create a new sync agent. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createANewSyncAgent(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncAgents() - .createOrUpdate("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", - new SyncAgentInner().withSyncDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/SyncAgentUpdate.json - */ - /** - * Sample code: Update a sync agent. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateASyncAgent(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncAgents() - .createOrUpdate("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", - new SyncAgentInner().withSyncDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsDeleteSamples.java deleted file mode 100644 index d87ff57353ed..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncAgents Delete. - */ -public final class SyncAgentsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncAgentDelete.json - */ - /** - * Sample code: Delete a sync agent. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteASyncAgent(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncAgents() - .delete("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsGenerateKeySamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsGenerateKeySamples.java deleted file mode 100644 index 25850c998af4..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsGenerateKeySamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncAgents GenerateKey. - */ -public final class SyncAgentsGenerateKeySamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncAgentGenerateKey.json - */ - /** - * Sample code: Generate a sync agent key. - * - * @param manager Entry point to SqlServerManager. - */ - public static void generateASyncAgentKey(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncAgents() - .generateKeyWithResponse("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsGetSamples.java deleted file mode 100644 index 68637ef9726a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncAgents Get. - */ -public final class SyncAgentsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncAgentGet.json - */ - /** - * Sample code: Get a sync agent. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getASyncAgent(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncAgents() - .getWithResponse("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsListByServerSamples.java deleted file mode 100644 index 69c5c093370b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncAgents ListByServer. - */ -public final class SyncAgentsListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncAgentListByServer.json - */ - /** - * Sample code: Get sync agents under a server. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getSyncAgentsUnderAServer(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncAgents() - .listByServer("syncagentcrud-65440", "syncagentcrud-8475", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsListLinkedDatabasesSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsListLinkedDatabasesSamples.java deleted file mode 100644 index 4829dbdd80b8..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncAgentsListLinkedDatabasesSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncAgents ListLinkedDatabases. - */ -public final class SyncAgentsListLinkedDatabasesSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncAgentGetLinkedDatabases.json - */ - /** - * Sample code: Get sync agent linked databases. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getSyncAgentLinkedDatabases(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncAgents() - .listLinkedDatabases("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsCancelSyncSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsCancelSyncSamples.java deleted file mode 100644 index a5be4d181491..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsCancelSyncSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncGroups CancelSync. - */ -public final class SyncGroupsCancelSyncSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncGroupCancelSync.json - */ - /** - * Sample code: Cancel a sync group synchronization. - * - * @param manager Entry point to SqlServerManager. - */ - public static void cancelASyncGroupSynchronization(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncGroups() - .cancelSyncWithResponse("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", - "syncgroupcrud-3187", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsCreateOrUpdateSamples.java deleted file mode 100644 index 9b28078ef4d1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsCreateOrUpdateSamples.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.SyncGroupInner; -import com.azure.resourcemanager.sql.models.DataSyncParticipantIdentity; -import com.azure.resourcemanager.sql.models.DataSyncParticipantIdentityType; -import com.azure.resourcemanager.sql.models.DataSyncParticipantUserAssignedIdentity; -import com.azure.resourcemanager.sql.models.SyncConflictResolutionPolicy; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for SyncGroups CreateOrUpdate. - */ -public final class SyncGroupsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncGroupUpdate.json - */ - /** - * Sample code: Update a sync group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateASyncGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncGroups() - .createOrUpdate("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - new SyncGroupInner().withInterval(-1) - .withConflictResolutionPolicy(SyncConflictResolutionPolicy.HUB_WIN) - .withSyncDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") - .withHubDatabaseUsername("hubUser") - .withUsePrivateLinkConnection(true), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/SyncGroupCreate.json - */ - /** - * Sample code: Create a sync group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createASyncGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncGroups() - .createOrUpdate("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - new SyncGroupInner().withInterval(-1) - .withConflictResolutionPolicy(SyncConflictResolutionPolicy.HUB_WIN) - .withSyncDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") - .withHubDatabaseUsername("hubUser") - .withUsePrivateLinkConnection(true), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/SyncGroupCreateWithIdentity.json - */ - /** - * Sample code: Create a sync group with user assigned identity. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createASyncGroupWithUserAssignedIdentity(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncGroups() - .createOrUpdate("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - new SyncGroupInner().withIdentity(new DataSyncParticipantIdentity() - .withType(DataSyncParticipantIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi", - new DataSyncParticipantUserAssignedIdentity()))) - .withInterval(-1) - .withConflictResolutionPolicy(SyncConflictResolutionPolicy.HUB_WIN) - .withSyncDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") - .withUsePrivateLinkConnection(false), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsDeleteSamples.java deleted file mode 100644 index 0730948bdaad..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncGroups Delete. - */ -public final class SyncGroupsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncGroupDelete.json - */ - /** - * Sample code: Delete a sync group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteASyncGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncGroups() - .delete("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsGetSamples.java deleted file mode 100644 index a0141bda0122..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsGetSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncGroups Get. - */ -public final class SyncGroupsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncGroupGet.json - */ - /** - * Sample code: Get a sync group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getASyncGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncGroups() - .getWithResponse("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/SyncGroupGetWithIdentity.json - */ - /** - * Sample code: Get a sync group with user assigned identity. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getASyncGroupWithUserAssignedIdentity(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncGroups() - .getWithResponse("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListByDatabaseSamples.java deleted file mode 100644 index 9bcffdec7df0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncGroups ListByDatabase. - */ -public final class SyncGroupsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncGroupListByDatabase.json - */ - /** - * Sample code: List sync groups under a given database. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listSyncGroupsUnderAGivenDatabase(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncGroups() - .listByDatabase("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListHubSchemasSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListHubSchemasSamples.java deleted file mode 100644 index 54281c79e3f5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListHubSchemasSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncGroups ListHubSchemas. - */ -public final class SyncGroupsListHubSchemasSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncGroupGetHubSchema.json - */ - /** - * Sample code: Get a hub database schema. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getAHubDatabaseSchema(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncGroups() - .listHubSchemas("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListLogsSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListLogsSamples.java deleted file mode 100644 index cfecc5317faf..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListLogsSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.SyncGroupsType; - -/** - * Samples for SyncGroups ListLogs. - */ -public final class SyncGroupsListLogsSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncGroupGetLog.json - */ - /** - * Sample code: Get sync group logs. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getSyncGroupLogs(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncGroups() - .listLogs("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - "2017-01-01T00:00:00", "2017-12-31T00:00:00", SyncGroupsType.ALL, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListSyncDatabaseIdsSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListSyncDatabaseIdsSamples.java deleted file mode 100644 index fe2fbb65a1b1..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsListSyncDatabaseIdsSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncGroups ListSyncDatabaseIds. - */ -public final class SyncGroupsListSyncDatabaseIdsSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncGroupGetSyncDatabaseId.json - */ - /** - * Sample code: Get a sync database ID. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getASyncDatabaseID(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getSyncGroups().listSyncDatabaseIds("westus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsRefreshHubSchemaSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsRefreshHubSchemaSamples.java deleted file mode 100644 index 9d1c73a00f7a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsRefreshHubSchemaSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncGroups RefreshHubSchema. - */ -public final class SyncGroupsRefreshHubSchemaSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncGroupRefreshHubSchema.json - */ - /** - * Sample code: Refresh a hub database schema. - * - * @param manager Entry point to SqlServerManager. - */ - public static void refreshAHubDatabaseSchema(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncGroups() - .refreshHubSchema("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsTriggerSyncSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsTriggerSyncSamples.java deleted file mode 100644 index bc42d2693bd5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsTriggerSyncSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncGroups TriggerSync. - */ -public final class SyncGroupsTriggerSyncSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncGroupTriggerSync.json - */ - /** - * Sample code: Trigger a sync group synchronization. - * - * @param manager Entry point to SqlServerManager. - */ - public static void triggerASyncGroupSynchronization(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncGroups() - .triggerSyncWithResponse("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", - "syncgroupcrud-3187", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsUpdateSamples.java deleted file mode 100644 index 38909e2abd3f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncGroupsUpdateSamples.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.SyncGroupInner; -import com.azure.resourcemanager.sql.models.DataSyncParticipantIdentity; -import com.azure.resourcemanager.sql.models.DataSyncParticipantIdentityType; -import com.azure.resourcemanager.sql.models.DataSyncParticipantUserAssignedIdentity; -import com.azure.resourcemanager.sql.models.SyncConflictResolutionPolicy; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for SyncGroups Update. - */ -public final class SyncGroupsUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncGroupPatchWithIdentity.json - */ - /** - * Sample code: Update a sync group with user assigned identity. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateASyncGroupWithUserAssignedIdentity(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncGroups() - .update("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - new SyncGroupInner().withIdentity(new DataSyncParticipantIdentity() - .withType(DataSyncParticipantIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi", - new DataSyncParticipantUserAssignedIdentity()))) - .withInterval(-1) - .withConflictResolutionPolicy(SyncConflictResolutionPolicy.HUB_WIN) - .withSyncDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") - .withUsePrivateLinkConnection(true), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/SyncGroupPatch.json - */ - /** - * Sample code: Update a sync group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateASyncGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncGroups() - .update("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - new SyncGroupInner().withInterval(-1) - .withConflictResolutionPolicy(SyncConflictResolutionPolicy.HUB_WIN) - .withSyncDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") - .withHubDatabaseUsername("hubUser") - .withHubDatabasePassword("fakeTokenPlaceholder") - .withUsePrivateLinkConnection(true), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/SyncGroupPatchAddAndRemoveIdentity.json - */ - /** - * Sample code: Update a sync group with new user assigned identity and remove older assigned identity. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateASyncGroupWithNewUserAssignedIdentityAndRemoveOlderAssignedIdentity( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncGroups() - .update("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - new SyncGroupInner().withIdentity(new DataSyncParticipantIdentity() - .withType(DataSyncParticipantIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi", - null, - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi-2", - new DataSyncParticipantUserAssignedIdentity()))) - .withInterval(-1) - .withConflictResolutionPolicy(SyncConflictResolutionPolicy.HUB_WIN) - .withSyncDatabaseId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") - .withUsePrivateLinkConnection(false), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersCreateOrUpdateSamples.java deleted file mode 100644 index 03e993149544..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersCreateOrUpdateSamples.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.SyncMemberInner; -import com.azure.resourcemanager.sql.models.DataSyncParticipantIdentity; -import com.azure.resourcemanager.sql.models.DataSyncParticipantIdentityType; -import com.azure.resourcemanager.sql.models.DataSyncParticipantUserAssignedIdentity; -import com.azure.resourcemanager.sql.models.SyncDirection; -import com.azure.resourcemanager.sql.models.SyncMemberDbType; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for SyncMembers CreateOrUpdate. - */ -public final class SyncMembersCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncMemberCreate.json - */ - /** - * Sample code: Create a new sync member. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createANewSyncMember(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncMembers() - .createOrUpdate("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - "syncmembercrud-4879", - new SyncMemberInner().withDatabaseType(SyncMemberDbType.AZURE_SQL_DATABASE) - .withSyncMemberAzureDatabaseResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") - .withUsePrivateLinkConnection(true) - .withServerName("syncgroupcrud-3379.database.windows.net") - .withDatabaseName("syncgroupcrud-7421") - .withUsername("myUser") - .withSyncDirection(SyncDirection.BIDIRECTIONAL), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/SyncMemberUpdate.json - */ - /** - * Sample code: Update a sync member. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateASyncMember(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncMembers() - .createOrUpdate("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - "syncmembercrud-4879", - new SyncMemberInner().withDatabaseType(SyncMemberDbType.AZURE_SQL_DATABASE) - .withSyncMemberAzureDatabaseResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") - .withUsePrivateLinkConnection(true) - .withServerName("syncgroupcrud-3379.database.windows.net") - .withDatabaseName("syncgroupcrud-7421") - .withUsername("myUser") - .withSyncDirection(SyncDirection.BIDIRECTIONAL), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/SyncMemberCreateWithIdentity.json - */ - /** - * Sample code: Create a new sync member with user assigned identity. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createANewSyncMemberWithUserAssignedIdentity(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncMembers() - .createOrUpdate("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - "syncmembercrud-4879", - new SyncMemberInner().withIdentity(new DataSyncParticipantIdentity() - .withType(DataSyncParticipantIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi", - new DataSyncParticipantUserAssignedIdentity()))) - .withDatabaseType(SyncMemberDbType.AZURE_SQL_DATABASE) - .withSyncMemberAzureDatabaseResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") - .withUsePrivateLinkConnection(true) - .withServerName("syncgroupcrud-3379.database.windows.net") - .withDatabaseName("syncgroupcrud-7421") - .withSyncDirection(SyncDirection.BIDIRECTIONAL), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersDeleteSamples.java deleted file mode 100644 index 00fe8c5a25f9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncMembers Delete. - */ -public final class SyncMembersDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncMemberDelete.json - */ - /** - * Sample code: Delete a sync member. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteASyncMember(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncMembers() - .delete("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - "syncgroupcrud-4879", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersGetSamples.java deleted file mode 100644 index 23f4342fa820..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersGetSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncMembers Get. - */ -public final class SyncMembersGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncMemberGet.json - */ - /** - * Sample code: Get a sync member. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getASyncMember(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncMembers() - .getWithResponse("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - "syncmembercrud-4879", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/SyncMemberGetWithIdentity.json - */ - /** - * Sample code: Get a sync member with user assigned identity. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getASyncMemberWithUserAssignedIdentity(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncMembers() - .getWithResponse("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - "syncmembercrud-4879", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersListBySyncGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersListBySyncGroupSamples.java deleted file mode 100644 index 650f2cee151a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersListBySyncGroupSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncMembers ListBySyncGroup. - */ -public final class SyncMembersListBySyncGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncMemberListBySyncGroup.json - */ - /** - * Sample code: List sync members under a sync group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listSyncMembersUnderASyncGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncMembers() - .listBySyncGroup("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersListMemberSchemasSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersListMemberSchemasSamples.java deleted file mode 100644 index 7791120691f0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersListMemberSchemasSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncMembers ListMemberSchemas. - */ -public final class SyncMembersListMemberSchemasSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncMemberGetSchema.json - */ - /** - * Sample code: Get a sync member schema. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getASyncMemberSchema(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncMembers() - .listMemberSchemas("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - "syncgroupcrud-4879", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersRefreshMemberSchemaSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersRefreshMemberSchemaSamples.java deleted file mode 100644 index e50611821b0e..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersRefreshMemberSchemaSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for SyncMembers RefreshMemberSchema. - */ -public final class SyncMembersRefreshMemberSchemaSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncMemberRefreshSchema.json - */ - /** - * Sample code: Refresh a sync member database schema. - * - * @param manager Entry point to SqlServerManager. - */ - public static void refreshASyncMemberDatabaseSchema(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncMembers() - .refreshMemberSchema("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", - "syncgroupcrud-3187", "syncgroupcrud-4879", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersUpdateSamples.java deleted file mode 100644 index cb85e9c06212..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/SyncMembersUpdateSamples.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.SyncMemberInner; -import com.azure.resourcemanager.sql.models.DataSyncParticipantIdentity; -import com.azure.resourcemanager.sql.models.DataSyncParticipantIdentityType; -import com.azure.resourcemanager.sql.models.DataSyncParticipantUserAssignedIdentity; -import com.azure.resourcemanager.sql.models.SyncDirection; -import com.azure.resourcemanager.sql.models.SyncMemberDbType; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for SyncMembers Update. - */ -public final class SyncMembersUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SyncMemberPatchAddAndRemoveIdentity.json - */ - /** - * Sample code: Update an existing sync member with new user assigned identity and removing older user assigned - * identity. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAnExistingSyncMemberWithNewUserAssignedIdentityAndRemovingOlderUserAssignedIdentity( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncMembers() - .update("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - "syncmembercrud-4879", - new SyncMemberInner().withIdentity(new DataSyncParticipantIdentity() - .withType(DataSyncParticipantIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi", - null, - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi-2", - new DataSyncParticipantUserAssignedIdentity()))) - .withDatabaseType(SyncMemberDbType.AZURE_SQL_DATABASE) - .withSyncMemberAzureDatabaseResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") - .withUsePrivateLinkConnection(true) - .withServerName("syncgroupcrud-3379.database.windows.net") - .withDatabaseName("syncgroupcrud-7421") - .withSyncDirection(SyncDirection.BIDIRECTIONAL), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/SyncMemberPatch.json - */ - /** - * Sample code: Update an existing sync member. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateAnExistingSyncMember(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncMembers() - .update("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - "syncmembercrud-4879", - new SyncMemberInner().withDatabaseType(SyncMemberDbType.AZURE_SQL_DATABASE) - .withSyncMemberAzureDatabaseResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") - .withUsePrivateLinkConnection(true) - .withServerName("syncgroupcrud-3379.database.windows.net") - .withDatabaseName("syncgroupcrud-7421") - .withUsername("myUser") - .withSyncDirection(SyncDirection.BIDIRECTIONAL), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/SyncMemberPatchWithIdentity.json - */ - /** - * Sample code: Update an existing sync member with user assigned identity. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - updateAnExistingSyncMemberWithUserAssignedIdentity(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getSyncMembers() - .update("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", - "syncmembercrud-4879", - new SyncMemberInner().withIdentity(new DataSyncParticipantIdentity() - .withType(DataSyncParticipantIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi", - new DataSyncParticipantUserAssignedIdentity()))) - .withDatabaseType(SyncMemberDbType.AZURE_SQL_DATABASE) - .withSyncMemberAzureDatabaseResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328") - .withUsePrivateLinkConnection(true) - .withServerName("syncgroupcrud-3379.database.windows.net") - .withDatabaseName("syncgroupcrud-7421") - .withSyncDirection(SyncDirection.BIDIRECTIONAL), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TdeCertificatesCreateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TdeCertificatesCreateSamples.java deleted file mode 100644 index 98142a5c37fa..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TdeCertificatesCreateSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.TdeCertificate; - -/** - * Samples for TdeCertificates Create. - */ -public final class TdeCertificatesCreateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SqlTdeCertificateCreate.json - */ - /** - * Sample code: Upload a TDE certificate. - * - * @param manager Entry point to SqlServerManager. - */ - public static void uploadATDECertificate(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getTdeCertificates() - .create("testtdecert", "testtdecert", new TdeCertificate().withPrivateBlob("MIIXXXXXXXX"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TimeZonesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TimeZonesGetSamples.java deleted file mode 100644 index 7a96a07ba9ad..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TimeZonesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for TimeZones Get. - */ -public final class TimeZonesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceTimeZoneGet.json - */ - /** - * Sample code: Get managed instance time zone. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getManagedInstanceTimeZone(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getTimeZones() - .getWithResponse("canadaeast", "Haiti Standard Time", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TimeZonesListByLocationSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TimeZonesListByLocationSamples.java deleted file mode 100644 index df72d12a7c0d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TimeZonesListByLocationSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for TimeZones ListByLocation. - */ -public final class TimeZonesListByLocationSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ManagedInstanceTimeZoneListByLocation.json - */ - /** - * Sample code: List managed instance time zones by location. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listManagedInstanceTimeZonesByLocation(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getTimeZones().listByLocation("canadaeast", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsCreateOrUpdateSamples.java deleted file mode 100644 index dd6e8e72bf90..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.LogicalDatabaseTransparentDataEncryptionInner; -import com.azure.resourcemanager.sql.models.TransparentDataEncryptionName; -import com.azure.resourcemanager.sql.models.TransparentDataEncryptionScanState; -import com.azure.resourcemanager.sql.models.TransparentDataEncryptionState; - -/** - * Samples for TransparentDataEncryptions CreateOrUpdate. - */ -public final class TransparentDataEncryptionsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/TransparentDataEncryptionUpdate.json - */ - /** - * Sample code: Update a database's Transparent Data Encryption state with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateADatabaseSTransparentDataEncryptionStateWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getTransparentDataEncryptions() - .createOrUpdate("securitytde-42-rg", "securitytde-42", "testdb", TransparentDataEncryptionName.CURRENT, - new LogicalDatabaseTransparentDataEncryptionInner().withState(TransparentDataEncryptionState.ENABLED) - .withScanState(TransparentDataEncryptionScanState.SUSPEND), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsGetSamples.java deleted file mode 100644 index 0e941bd5245a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.TransparentDataEncryptionName; - -/** - * Samples for TransparentDataEncryptions Get. - */ -public final class TransparentDataEncryptionsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/TransparentDataEncryptionGet.json - */ - /** - * Sample code: Get a database's transparent data encryption. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getADatabaseSTransparentDataEncryption(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getTransparentDataEncryptions() - .getWithResponse("security-tde-resourcegroup", "securitytde", "testdb", - TransparentDataEncryptionName.CURRENT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsListByDatabaseSamples.java deleted file mode 100644 index 6467ee7b9395..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for TransparentDataEncryptions ListByDatabase. - */ -public final class TransparentDataEncryptionsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/TransparentDataEncryptionList.json - */ - /** - * Sample code: Get a list of the database's transparent data encryption. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getAListOfTheDatabaseSTransparentDataEncryption(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getTransparentDataEncryptions() - .listByDatabase("security-tde-resourcegroup", "securitytde", "testdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsResumeSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsResumeSamples.java deleted file mode 100644 index 8171679e472c..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsResumeSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.TransparentDataEncryptionName; - -/** - * Samples for TransparentDataEncryptions Resume. - */ -public final class TransparentDataEncryptionsResumeSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ResumeTransparentDataEncryptionUpdate.json - */ - /** - * Sample code: Resume database's Transparent Data Encryption scan state with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void resumeDatabaseSTransparentDataEncryptionScanStateWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getTransparentDataEncryptions() - .resume("securitytde-42-rg", "securitytde-42", "testdb", TransparentDataEncryptionName.CURRENT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsSuspendSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsSuspendSamples.java deleted file mode 100644 index bf2723523684..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/TransparentDataEncryptionsSuspendSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.TransparentDataEncryptionName; - -/** - * Samples for TransparentDataEncryptions Suspend. - */ -public final class TransparentDataEncryptionsSuspendSamples { - /* - * x-ms-original-file: 2025-02-01-preview/SuspendTransparentDataEncryptionUpdate.json - */ - /** - * Sample code: Suspend database's Transparent Data Encryption scan state with minimal parameters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void suspendDatabaseSTransparentDataEncryptionScanStateWithMinimalParameters( - com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getTransparentDataEncryptions() - .suspend("securitytde-42-rg", "securitytde-42", "testdb", TransparentDataEncryptionName.CURRENT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/UsagesListByInstancePoolSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/UsagesListByInstancePoolSamples.java deleted file mode 100644 index 87cdffab9470..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/UsagesListByInstancePoolSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for Usages ListByInstancePool. - */ -public final class UsagesListByInstancePoolSamples { - /* - * x-ms-original-file: 2025-02-01-preview/ListInstancePoolUsage.json - */ - /** - * Sample code: List instance pool usages. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listInstancePoolUsages(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getUsages() - .listByInstancePool("group1", "testIP", null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/ListInstancePoolUsageExpanded.json - */ - /** - * Sample code: List instance pool usages expanded with children. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - listInstancePoolUsagesExpandedWithChildren(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getUsages() - .listByInstancePool("group1", "testIP", true, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersCreateOrUpdateSamples.java deleted file mode 100644 index 29f6c8037c09..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersCreateOrUpdateSamples.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.VirtualClusterInner; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for VirtualClusters CreateOrUpdate. - */ -public final class VirtualClustersCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/VirtualClusterCreate.json - */ - /** - * Sample code: Create virtual cluster. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createVirtualCluster(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getVirtualClusters() - .createOrUpdate("testrg", "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", - new VirtualClusterInner().withLocation("japaneast").withTags(mapOf("key", "fakeTokenPlaceholder")), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersDeleteSamples.java deleted file mode 100644 index 9444f1b136e7..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for VirtualClusters Delete. - */ -public final class VirtualClustersDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/VirtualClusterDelete.json - */ - /** - * Sample code: Delete virtual cluster. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteVirtualCluster(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getVirtualClusters() - .delete("testrg", "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersGetByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersGetByResourceGroupSamples.java deleted file mode 100644 index 9fda2e9d51e9..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersGetByResourceGroupSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for VirtualClusters GetByResourceGroup. - */ -public final class VirtualClustersGetByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/VirtualClusterGet.json - */ - /** - * Sample code: Gets a virtual cluster. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAVirtualCluster(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getVirtualClusters() - .getByResourceGroupWithResponse("testrg", "vc-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersListByResourceGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersListByResourceGroupSamples.java deleted file mode 100644 index 3b2eb6fc86b5..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersListByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for VirtualClusters ListByResourceGroup. - */ -public final class VirtualClustersListByResourceGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/VirtualClusterListByResourceGroup.json - */ - /** - * Sample code: List virtual clusters by resource group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listVirtualClustersByResourceGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getVirtualClusters().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersListSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersListSamples.java deleted file mode 100644 index 96e8bb88e455..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for VirtualClusters List. - */ -public final class VirtualClustersListSamples { - /* - * x-ms-original-file: 2025-02-01-preview/VirtualClusterList.json - */ - /** - * Sample code: List virtualClusters. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listVirtualClusters(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient().getVirtualClusters().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersUpdateDnsServersSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersUpdateDnsServersSamples.java deleted file mode 100644 index 82d1e2e15fc2..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersUpdateDnsServersSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for VirtualClusters UpdateDnsServers. - */ -public final class VirtualClustersUpdateDnsServersSamples { - /* - * x-ms-original-file: 2025-02-01-preview/UpdateVirtualClusterDnsServers.json - */ - /** - * Sample code: Performs update of dns servers on managed instance. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - performsUpdateOfDnsServersOnManagedInstance(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getVirtualClusters() - .updateDnsServers("sqlcrudtest-7398", "VirtualCluster2b9a846b-2e37-43ef-a8e9-f2c6d645c1d7", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersUpdateSamples.java deleted file mode 100644 index 2419e3229ec0..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualClustersUpdateSamples.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.models.VirtualClusterUpdate; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for VirtualClusters Update. - */ -public final class VirtualClustersUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/VirtualClusterUpdate.json - */ - /** - * Sample code: Update virtual cluster with tags. - * - * @param manager Entry point to SqlServerManager. - */ - public static void updateVirtualClusterWithTags(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getVirtualClusters() - .update("testrg", "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", - new VirtualClusterUpdate().withTags(mapOf("tkey", "fakeTokenPlaceholder")), - 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; - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesCreateOrUpdateSamples.java deleted file mode 100644 index e7b4821f8f55..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesCreateOrUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.VirtualNetworkRuleInner; - -/** - * Samples for VirtualNetworkRules CreateOrUpdate. - */ -public final class VirtualNetworkRulesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/VirtualNetworkRulesCreateOrUpdate.json - */ - /** - * Sample code: Create or update a virtual network rule. - * - * @param manager Entry point to SqlServerManager. - */ - public static void createOrUpdateAVirtualNetworkRule(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getVirtualNetworkRules() - .createOrUpdate("Default", "vnet-test-svr", "vnet-firewall-rule", - new VirtualNetworkRuleInner().withVirtualNetworkSubnetId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet") - .withIgnoreMissingVnetServiceEndpoint(false), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesDeleteSamples.java deleted file mode 100644 index 0b154af284f8..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for VirtualNetworkRules Delete. - */ -public final class VirtualNetworkRulesDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/VirtualNetworkRulesDelete.json - */ - /** - * Sample code: Delete a virtual network rule. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteAVirtualNetworkRule(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getVirtualNetworkRules() - .delete("Default", "vnet-test-svr", "vnet-firewall-rule", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesGetSamples.java deleted file mode 100644 index 72e99b553228..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for VirtualNetworkRules Get. - */ -public final class VirtualNetworkRulesGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/VirtualNetworkRulesGet.json - */ - /** - * Sample code: Gets a virtual network rule. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAVirtualNetworkRule(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getVirtualNetworkRules() - .getWithResponse("Default", "vnet-test-svr", "vnet-firewall-rule", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesListByServerSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesListByServerSamples.java deleted file mode 100644 index 4c9638132556..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/VirtualNetworkRulesListByServerSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for VirtualNetworkRules ListByServer. - */ -public final class VirtualNetworkRulesListByServerSamples { - /* - * x-ms-original-file: 2025-02-01-preview/VirtualNetworkRulesList.json - */ - /** - * Sample code: List virtual network rules. - * - * @param manager Entry point to SqlServerManager. - */ - public static void listVirtualNetworkRules(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getVirtualNetworkRules() - .listByServer("Default", "vnet-test-svr", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersCreateOrUpdateSamples.java deleted file mode 100644 index 6e18276fd20b..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersCreateOrUpdateSamples.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.WorkloadClassifierInner; - -/** - * Samples for WorkloadClassifiers CreateOrUpdate. - */ -public final class WorkloadClassifiersCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateWorkloadClassifierMin.json - */ - /** - * Sample code: Create a workload group with the required properties specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createAWorkloadGroupWithTheRequiredPropertiesSpecified(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getWorkloadClassifiers() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", - "wlm_workloadclassifier", new WorkloadClassifierInner().withMemberName("dbo"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateWorkloadClassifierMax.json - */ - /** - * Sample code: Create a workload group with all properties specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createAWorkloadGroupWithAllPropertiesSpecified(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getWorkloadClassifiers() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", - "wlm_workloadclassifier", - new WorkloadClassifierInner().withMemberName("dbo") - .withLabel("test_label") - .withContext("test_context") - .withStartTime("12:00") - .withEndTime("14:00") - .withImportance("high"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersDeleteSamples.java deleted file mode 100644 index 996755fa8661..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for WorkloadClassifiers Delete. - */ -public final class WorkloadClassifiersDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DeleteWorkloadClassifier.json - */ - /** - * Sample code: Delete a workload classifier. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteAWorkloadClassifier(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getWorkloadClassifiers() - .delete("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", "wlm_workloadclassifier", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersGetSamples.java deleted file mode 100644 index e46394280920..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for WorkloadClassifiers Get. - */ -public final class WorkloadClassifiersGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetWorkloadClassifier.json - */ - /** - * Sample code: Gets a workload classifier for a data warehouse. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getsAWorkloadClassifierForADataWarehouse(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getWorkloadClassifiers() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", "wlm_classifier", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersListByWorkloadGroupSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersListByWorkloadGroupSamples.java deleted file mode 100644 index 71a90d57863a..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadClassifiersListByWorkloadGroupSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for WorkloadClassifiers ListByWorkloadGroup. - */ -public final class WorkloadClassifiersListByWorkloadGroupSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetWorkloadClassifierList.json - */ - /** - * Sample code: Get the list of workload classifiers for a workload group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheListOfWorkloadClassifiersForAWorkloadGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getWorkloadClassifiers() - .listByWorkloadGroup("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsCreateOrUpdateSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsCreateOrUpdateSamples.java deleted file mode 100644 index 6c4f6509c753..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsCreateOrUpdateSamples.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -import com.azure.resourcemanager.sql.fluent.models.WorkloadGroupInner; - -/** - * Samples for WorkloadGroups CreateOrUpdate. - */ -public final class WorkloadGroupsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateWorkloadGroupMin.json - */ - /** - * Sample code: Create a workload group with the required properties specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createAWorkloadGroupWithTheRequiredPropertiesSpecified(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getWorkloadGroups() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", "smallrc", - new WorkloadGroupInner().withMinResourcePercent(0) - .withMaxResourcePercent(100) - .withMinResourcePercentPerRequest(3.0), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-02-01-preview/CreateOrUpdateWorkloadGroupMax.json - */ - /** - * Sample code: Create a workload group with all properties specified. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - createAWorkloadGroupWithAllPropertiesSpecified(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getWorkloadGroups() - .createOrUpdate("Default-SQL-SouthEastAsia", "testsvr", "testdb", "smallrc", - new WorkloadGroupInner().withMinResourcePercent(0) - .withMaxResourcePercent(100) - .withMinResourcePercentPerRequest(3.0) - .withMaxResourcePercentPerRequest(3.0D) - .withImportance("normal") - .withQueryExecutionTimeout(0), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsDeleteSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsDeleteSamples.java deleted file mode 100644 index 008c0334d390..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for WorkloadGroups Delete. - */ -public final class WorkloadGroupsDeleteSamples { - /* - * x-ms-original-file: 2025-02-01-preview/DeleteWorkloadGroup.json - */ - /** - * Sample code: Delete a workload group. - * - * @param manager Entry point to SqlServerManager. - */ - public static void deleteAWorkloadGroup(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getWorkloadGroups() - .delete("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsGetSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsGetSamples.java deleted file mode 100644 index 2aee05d2cf51..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for WorkloadGroups Get. - */ -public final class WorkloadGroupsGetSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetWorkloadGroup.json - */ - /** - * Sample code: Gets a workload group for a data warehouse. - * - * @param manager Entry point to SqlServerManager. - */ - public static void getsAWorkloadGroupForADataWarehouse(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getWorkloadGroups() - .getWithResponse("Default-SQL-SouthEastAsia", "testsvr", "testdb", "smallrc", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsListByDatabaseSamples.java b/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsListByDatabaseSamples.java deleted file mode 100644 index 5ea0024e9e0d..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/src/samples/java/com/azure/resourcemanager/sql/generated/WorkloadGroupsListByDatabaseSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.sql.generated; - -/** - * Samples for WorkloadGroups ListByDatabase. - */ -public final class WorkloadGroupsListByDatabaseSamples { - /* - * x-ms-original-file: 2025-02-01-preview/GetWorkloadGroupList.json - */ - /** - * Sample code: Get the list of workload groups for a data warehouse. - * - * @param manager Entry point to SqlServerManager. - */ - public static void - getTheListOfWorkloadGroupsForADataWarehouse(com.azure.resourcemanager.sql.SqlServerManager manager) { - manager.serviceClient() - .getWorkloadGroups() - .listByDatabase("Default-SQL-SouthEastAsia", "testsvr", "testdb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/sql/azure-resourcemanager-sql/tsp-location.yaml b/sdk/sql/azure-resourcemanager-sql/tsp-location.yaml deleted file mode 100644 index 706e3592aa9f..000000000000 --- a/sdk/sql/azure-resourcemanager-sql/tsp-location.yaml +++ /dev/null @@ -1,4 +0,0 @@ -directory: specification/sql/resource-manager/Microsoft.Sql/SQL -commit: 0308555682b39ce6ad5859ebe428d3a8f5cfb1aa -repo: Azure/azure-rest-api-specs -additionalDirectories: From 500e7b46f7e7752889796f269bad38cace86b629 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 2 Jun 2026 04:06:04 +0000 Subject: [PATCH 09/16] Prepare azure-resourcemanager-sql for 2.53.9 patch release. --- eng/versioning/version_client.txt | 2 +- sdk/sql/azure-resourcemanager-sql/CHANGELOG.md | 10 ++++++++++ sdk/sql/azure-resourcemanager-sql/pom.xml | 6 +++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index f344737c7be4..ed7f35828c64 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -299,7 +299,7 @@ com.azure.resourcemanager:azure-resourcemanager-redis;2.53.8;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.7;2.55.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-servicebus;2.53.8;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-sql;2.53.8;2.54.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-sql;2.53.8;2.53.9 com.azure.resourcemanager:azure-resourcemanager-storage;2.56.0;2.57.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.53.8;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-test;2.0.0-beta.2;2.0.0-beta.3 diff --git a/sdk/sql/azure-resourcemanager-sql/CHANGELOG.md b/sdk/sql/azure-resourcemanager-sql/CHANGELOG.md index 71453dab0ecd..60f6c717fdde 100644 --- a/sdk/sql/azure-resourcemanager-sql/CHANGELOG.md +++ b/sdk/sql/azure-resourcemanager-sql/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 2.53.9 (2026-06-02) + +### Other Changes + +#### Dependency Updates + +- Upgraded `azure-resourcemanager-storage` from `2.55.4` to version `2.56.0`. +- Upgraded `azure-resourcemanager-resources` from `2.54.0` to version `2.54.1`. + + ## 2.53.8 (2026-05-05) ### Other Changes diff --git a/sdk/sql/azure-resourcemanager-sql/pom.xml b/sdk/sql/azure-resourcemanager-sql/pom.xml index 1701123cbbbb..6a676d79bf2b 100644 --- a/sdk/sql/azure-resourcemanager-sql/pom.xml +++ b/sdk/sql/azure-resourcemanager-sql/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-sql - 2.53.8 + 2.53.9 jar Microsoft Azure SDK for Sql Management @@ -63,12 +63,12 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.54.0 + 2.54.1 com.azure.resourcemanager azure-resourcemanager-storage - 2.55.4 + 2.56.0 org.junit.jupiter From c014038feae1fc4de337edab3a2716a5d3d9cc83 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 2 Jun 2026 04:06:06 +0000 Subject: [PATCH 10/16] Reset sources for azure-resourcemanager-appservice to the release version 2.55.2. --- .../azure-resourcemanager-appservice/CHANGELOG.md | 11 +---------- .../azure-resourcemanager-appservice/README.md | 2 +- .../azure-resourcemanager-appservice/pom.xml | 12 ++++++------ 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md b/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md index 87585f4f41ca..023acfd8d18a 100644 --- a/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md +++ b/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md @@ -1,15 +1,5 @@ # Release History -## 2.56.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - ## 2.55.2 (2026-05-05) ### Other Changes @@ -22,6 +12,7 @@ - Upgraded `azure-resourcemanager-resources` from `2.54.0` to version `2.54.1`. - Upgraded `azure-resourcemanager-dns` from `2.53.6` to version `2.53.8`. + ## 2.55.1 (2026-03-30) ### Other Changes diff --git a/sdk/appservice/azure-resourcemanager-appservice/README.md b/sdk/appservice/azure-resourcemanager-appservice/README.md index 5efc2a6c28f4..af2f269f4128 100644 --- a/sdk/appservice/azure-resourcemanager-appservice/README.md +++ b/sdk/appservice/azure-resourcemanager-appservice/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-appservice - 2.55.0 + 2.55.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/appservice/azure-resourcemanager-appservice/pom.xml b/sdk/appservice/azure-resourcemanager-appservice/pom.xml index e139fa474290..433cbca94d7a 100644 --- a/sdk/appservice/azure-resourcemanager-appservice/pom.xml +++ b/sdk/appservice/azure-resourcemanager-appservice/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-appservice - 2.56.0-beta.1 + 2.55.2 jar Microsoft Azure SDK for App Service Management @@ -64,27 +64,27 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.54.1 + 2.54.0 com.azure.resourcemanager azure-resourcemanager-storage - 2.56.0 + 2.55.4 com.azure.resourcemanager azure-resourcemanager-msi - 2.53.8 + 2.53.7 com.azure.resourcemanager azure-resourcemanager-keyvault - 2.55.2 + 2.55.1 com.azure.resourcemanager azure-resourcemanager-dns - 2.53.8 + 2.53.7 com.azure.resourcemanager From cd4b9eec03d9448ce6d139cfb79bcb395bc66df5 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 2 Jun 2026 04:06:07 +0000 Subject: [PATCH 11/16] Prepare azure-resourcemanager-appservice for 2.55.3 patch release. --- eng/versioning/version_client.txt | 2 +- .../azure-resourcemanager-appservice/CHANGELOG.md | 13 +++++++++++++ .../azure-resourcemanager-appservice/pom.xml | 12 ++++++------ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index ed7f35828c64..fe9f64c0c4d3 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -278,7 +278,7 @@ com.azure.spring:spring-cloud-azure-testcontainers;7.3.0;7.4.0-beta.1 com.azure:azure-spring-data-cosmos;7.3.0;7.4.0-beta.1 com.azure.resourcemanager:azure-resourcemanager;2.62.0;2.63.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appplatform;2.51.0;2.52.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-appservice;2.55.2;2.56.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-appservice;2.55.2;2.55.3 com.azure.resourcemanager:azure-resourcemanager-authorization;2.53.9;2.54.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-cdn;2.53.8;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-compute;2.57.1;2.57.2 diff --git a/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md b/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md index 023acfd8d18a..8596a875ce14 100644 --- a/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md +++ b/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md @@ -1,5 +1,18 @@ # Release History +## 2.55.3 (2026-06-02) + +### Other Changes + +#### Dependency Updates + +- Upgraded `azure-resourcemanager-msi` from `2.53.7` to version `2.53.8`. +- Upgraded `azure-resourcemanager-keyvault` from `2.55.1` to version `2.55.3`. +- Upgraded `azure-resourcemanager-resources` from `2.54.0` to version `2.54.1`. +- Upgraded `azure-resourcemanager-storage` from `2.55.4` to version `2.56.0`. +- Upgraded `azure-resourcemanager-dns` from `2.53.7` to version `2.53.8`. + + ## 2.55.2 (2026-05-05) ### Other Changes diff --git a/sdk/appservice/azure-resourcemanager-appservice/pom.xml b/sdk/appservice/azure-resourcemanager-appservice/pom.xml index 433cbca94d7a..c8c3acffdb10 100644 --- a/sdk/appservice/azure-resourcemanager-appservice/pom.xml +++ b/sdk/appservice/azure-resourcemanager-appservice/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-appservice - 2.55.2 + 2.55.3 jar Microsoft Azure SDK for App Service Management @@ -64,27 +64,27 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.54.0 + 2.54.1 com.azure.resourcemanager azure-resourcemanager-storage - 2.55.4 + 2.56.0 com.azure.resourcemanager azure-resourcemanager-msi - 2.53.7 + 2.53.8 com.azure.resourcemanager azure-resourcemanager-keyvault - 2.55.1 + 2.55.2 com.azure.resourcemanager azure-resourcemanager-dns - 2.53.7 + 2.53.8 com.azure.resourcemanager From 8180728151701d5c4a9ac54148807a8943677554 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 2 Jun 2026 04:06:10 +0000 Subject: [PATCH 12/16] Reset sources for azure-resourcemanager-eventhubs to the release version 2.53.8. --- .../CHANGELOG.md | 22 +- .../azure-resourcemanager-eventhubs/README.md | 2 +- .../assets.json | 2 +- .../customization/pom.xml | 17 - .../src/main/java/EventHubsCustomization.java | 38 - .../azure-resourcemanager-eventhubs/pom.xml | 6 +- .../fluent/ApplicationGroupsClient.java | 118 +- .../eventhubs/fluent/ClustersClient.java | 284 +-- .../fluent/ConfigurationsClient.java | 18 +- .../fluent/ConsumerGroupsClient.java | 134 +- .../fluent/DisasterRecoveryConfigsClient.java | 242 +-- .../fluent/EventHubManagementClient.java | 78 +- .../eventhubs/fluent/EventHubsClient.java | 306 +-- .../eventhubs/fluent/NamespacesClient.java | 594 +++--- ...SecurityPerimeterConfigurationsClient.java | 187 +- ...rimeterConfigurationsOperationsClient.java | 125 ++ .../eventhubs/fluent/OperationsClient.java | 8 +- .../PrivateEndpointConnectionsClient.java | 134 +- .../fluent/PrivateLinkResourcesClient.java | 10 +- .../fluent/SchemaRegistriesClient.java | 136 +- .../fluent/models/AccessKeysInner.java | 4 +- .../fluent/models/ApplicationGroupInner.java | 54 +- .../models/ApplicationGroupProperties.java | 2 +- .../models/ArmDisasterRecoveryInner.java | 54 +- .../models/ArmDisasterRecoveryProperties.java | 2 +- .../fluent/models/AuthorizationRuleInner.java | 54 +- .../models/AuthorizationRuleProperties.java | 2 +- .../models/AvailableClustersListInner.java | 19 +- .../CheckNameAvailabilityResultInner.java | 31 +- .../eventhubs/fluent/models/ClusterInner.java | 204 +- .../fluent/models/ClusterProperties.java | 34 +- ...sterQuotaConfigurationPropertiesInner.java | 2 +- .../fluent/models/ConsumerGroupInner.java | 54 +- .../models/ConsumerGroupProperties.java | 2 +- .../fluent/models/DestinationProperties.java | 2 +- .../models/EHNamespaceIdListResultInner.java | 19 +- .../fluent/models/EHNamespaceInner.java | 276 +-- .../fluent/models/EHNamespaceProperties.java | 67 +- .../fluent/models/EventhubInner.java | 135 +- .../fluent/models/EventhubProperties.java | 111 +- .../fluent/models/FailOverProperties.java | 124 -- .../fluent/models/NetworkRuleSetInner.java | 54 +- .../models/NetworkRuleSetListResultInner.java | 52 +- .../models/NetworkRuleSetProperties.java | 2 +- ...curityPerimeterConfigurationListInner.java | 4 +- ...urityPerimeterConfigurationProperties.java | 34 +- .../fluent/models/OperationInner.java | 56 +- .../PrivateEndpointConnectionInner.java | 54 +- .../PrivateEndpointConnectionProperties.java | 2 +- .../models/PrivateLinkResourceProperties.java | 41 +- .../PrivateLinkResourcesListResultInner.java | 50 +- .../fluent/models/SchemaGroupInner.java | 57 +- .../fluent/models/SchemaGroupProperties.java | 10 +- .../eventhubs/fluent/models/package-info.java | 5 +- .../eventhubs/fluent/package-info.java | 5 +- .../ApplicationGroupsClientImpl.java | 371 ++-- .../implementation/ClustersClientImpl.java | 1043 +++++----- .../ConfigurationsClientImpl.java | 61 +- .../ConsumerGroupsClientImpl.java | 388 ++-- .../DisasterRecoveryConfigsClientImpl.java | 812 ++++---- .../EventHubManagementClientBuilder.java | 30 +- .../EventHubManagementClientImpl.java | 181 +- .../implementation/EventHubNamespaceImpl.java | 17 - .../implementation/EventHubsClientImpl.java | 989 +++++----- .../implementation/NamespacesClientImpl.java | 1736 +++++++---------- ...rityPerimeterConfigurationsClientImpl.java | 443 +---- ...terConfigurationsOperationsClientImpl.java | 306 +++ .../implementation/OperationsClientImpl.java | 36 +- .../PrivateEndpointConnectionsClientImpl.java | 354 ++-- .../PrivateLinkResourcesClientImpl.java | 44 +- .../SchemaRegistriesClientImpl.java | 443 +++-- .../eventhubs/models/AccessRights.java | 2 +- .../models/ApplicationGroupListResult.java | 43 +- .../models/ApplicationGroupPolicy.java | 2 +- .../models/ApplicationGroupPolicyType.java | 2 +- .../models/ArmDisasterRecoveryListResult.java | 44 +- .../models/AuthorizationRuleListResult.java | 54 +- .../eventhubs/models/AvailableCluster.java | 19 +- .../eventhubs/models/CaptureDescription.java | 2 +- .../eventhubs/models/CaptureIdentity.java | 2 +- .../eventhubs/models/CaptureIdentityType.java | 2 +- .../CheckNameAvailabilityParameter.java | 2 +- .../CleanupPolicyRetentionDescription.java | 7 +- .../models/ClusterListResult.java | 54 +- .../eventhubs/models/ClusterSku.java | 2 +- .../eventhubs/models/ClusterSkuName.java | 2 +- .../eventhubs/models/ConfidentialCompute.java | 93 - .../eventhubs/models/ConnectionState.java | 2 +- .../models/ConsumerGroupListResult.java | 53 +- .../eventhubs/models/DefaultAction.java | 2 +- .../eventhubs/models/Destination.java | 2 +- .../models/EHNamespaceIdContainer.java | 19 +- .../models/EHNamespaceListResult.java | 53 +- .../models/EncodingCaptureDescription.java | 2 +- .../eventhubs/models/Encryption.java | 2 +- .../models/EndPointProvisioningState.java | 2 +- .../eventhubs/models/EntityStatus.java | 2 +- .../models/EventHubListResult.java | 53 +- .../eventhubs/models/EventHubNamespace.java | 52 +- .../eventhubs/models/FailOver.java | 134 -- .../eventhubs/models/GeoDRRoleType.java | 51 - .../models/GeoDataReplicationProperties.java | 135 -- .../eventhubs/models/Identity.java | 2 +- .../eventhubs/models/KeySource.java | 4 +- .../eventhubs/models/KeyType.java | 2 +- .../eventhubs/models/KeyVaultProperties.java | 2 +- .../models/ManagedServiceIdentityType.java | 2 +- .../models/MessageTimestampDescription.java | 106 - .../eventhubs/models/MetricId.java | 2 +- .../eventhubs/models/Mode.java | 51 - .../eventhubs/models/NWRuleSetIpRules.java | 2 +- .../models/NWRuleSetVirtualNetworkRules.java | 2 +- .../models/NamespaceReplicaLocation.java | 168 -- .../eventhubs/models/NetworkRuleIpAction.java | 2 +- .../models/NetworkSecurityPerimeter.java | 41 +- ...NetworkSecurityPerimeterConfiguration.java | 75 +- ...rimeterConfigurationPropertiesProfile.java | 41 +- ...gurationPropertiesResourceAssociation.java | 31 +- ...rimeterConfigurationProvisioningState.java | 2 +- .../eventhubs/models/NspAccessRule.java | 41 +- .../models/NspAccessRuleDirection.java | 2 +- .../models/NspAccessRuleProperties.java | 41 +- ...AccessRulePropertiesSubscriptionsItem.java | 19 +- .../eventhubs/models/OperationDisplay.java | 4 +- .../models/OperationListResult.java | 19 +- .../models/PlatformCapabilities.java | 96 - .../eventhubs/models/PrivateEndpoint.java | 2 +- .../PrivateEndpointConnectionListResult.java | 52 +- .../models/PrivateLinkConnectionStatus.java | 2 +- .../eventhubs/models/PrivateLinkResource.java | 83 +- .../eventhubs/models/ProvisioningIssue.java | 19 +- .../models/ProvisioningIssueProperties.java | 30 +- .../eventhubs/models/ProvisioningState.java | 2 +- .../eventhubs/models/ProvisioningStateDR.java | 2 +- .../eventhubs/models/PublicNetworkAccess.java | 2 +- .../models/PublicNetworkAccessFlag.java | 2 +- .../models/RegenerateAccessKeyParameters.java | 2 +- .../models/ResourceAssociationAccessMode.java | 2 +- .../models/RetentionDescription.java | 71 +- .../models/RoleDisasterRecovery.java | 2 +- .../eventhubs/models/SchemaCompatibility.java | 2 +- .../models/SchemaGroupListResult.java | 53 +- .../eventhubs/models/SchemaType.java | 12 +- .../resourcemanager/eventhubs/models/Sku.java | 2 +- .../eventhubs/models/SkuName.java | 2 +- .../eventhubs/models/SkuTier.java | 2 +- .../eventhubs/models/Subnet.java | 2 +- .../eventhubs/models/ThrottlingPolicy.java | 7 +- .../eventhubs/models/TimestampType.java | 54 - .../eventhubs/models/TlsVersion.java | 7 +- .../eventhubs/models/UnavailableReason.java | 2 +- .../models/UserAssignedIdentity.java | 2 +- .../UserAssignedIdentityProperties.java | 2 +- .../eventhubs/models/package-info.java | 5 +- .../eventhubs/package-info.java | 5 +- .../src/main/java/module-info.java | 1 - ...re-resourcemanager-eventhubs_metadata.json | 1 - .../proxy-config.json | 2 +- ...CreateOrUpdateApplicationGroupSamples.java | 42 - .../ApplicationGroupDeleteSamples.java | 25 - .../generated/ApplicationGroupGetSamples.java | 25 - ...pplicationGroupListByNamespaceSamples.java | 24 - .../ClustersCreateOrUpdateSamples.java | 46 - .../generated/ClustersDeleteSamples.java | 24 - .../ClustersGetByResourceGroupSamples.java | 24 - ...tersListAvailableClusterRegionSamples.java | 22 - .../ClustersListByResourceGroupSamples.java | 22 - .../ClustersListNamespacesSamples.java | 24 - .../generated/ClustersListSamples.java | 22 - .../generated/ClustersUpdateSamples.java | 42 - .../generated/ConfigurationGetSamples.java | 24 - .../generated/ConfigurationPatchSamples.java | 43 - .../ConsumerGroupsCreateOrUpdateSamples.java | 28 - .../ConsumerGroupsDeleteSamples.java | 25 - .../generated/ConsumerGroupsGetSamples.java | 25 - .../ConsumerGroupsListByEventHubSamples.java | 25 - ...terRecoveryConfigsBreakPairingSamples.java | 25 - ...ryConfigsCheckNameAvailabilitySamples.java | 28 - ...rRecoveryConfigsCreateOrUpdateSamples.java | 28 - .../DisasterRecoveryConfigsDeleteSamples.java | 25 - ...isasterRecoveryConfigsFailOverSamples.java | 25 - ...eryConfigsGetAuthorizationRuleSamples.java | 25 - .../DisasterRecoveryConfigsGetSamples.java | 25 - ...yConfigsListAuthorizationRulesSamples.java | 25 - ...isasterRecoveryConfigsListKeysSamples.java | 25 - .../DisasterRecoveryConfigsListSamples.java | 24 - ...reateOrUpdateAuthorizationRuleSamples.java | 31 - .../EventHubsCreateOrUpdateSamples.java | 170 -- ...entHubsDeleteAuthorizationRuleSamples.java | 25 - .../generated/EventHubsDeleteSamples.java | 25 - .../EventHubsGetAuthorizationRuleSamples.java | 25 - .../generated/EventHubsGetSamples.java | 25 - ...ventHubsListAuthorizationRulesSamples.java | 25 - .../EventHubsListByNamespaceSamples.java | 25 - .../generated/EventHubsListKeysSamples.java | 25 - .../EventHubsRegenerateKeysSamples.java | 29 - ...amespacesCheckNameAvailabilitySamples.java | 27 - ...reateOrUpdateAuthorizationRuleSamples.java | 30 - ...esCreateOrUpdateNetworkRuleSetSamples.java | 50 - .../NamespacesCreateOrUpdateSamples.java | 93 - ...espacesDeleteAuthorizationRuleSamples.java | 25 - .../generated/NamespacesDeleteSamples.java | 24 - .../generated/NamespacesFailoverSamples.java | 27 - ...NamespacesGetAuthorizationRuleSamples.java | 25 - .../NamespacesGetByResourceGroupSamples.java | 24 - .../NamespacesGetNetworkRuleSetSamples.java | 24 - ...mespacesListAuthorizationRulesSamples.java | 24 - .../NamespacesListByResourceGroupSamples.java | 24 - .../generated/NamespacesListKeysSamples.java | 25 - .../NamespacesListNetworkRuleSetSamples.java | 24 - .../generated/NamespacesListSamples.java | 22 - .../NamespacesRegenerateKeysSamples.java | 29 - .../generated/NamespacesUpdateSamples.java | 47 - ...erConfigurationsCreateOrUpdateSamples.java | 26 - ...ionsGetResourceAssociationNameSamples.java | 26 - .../generated/OperationsListSamples.java | 22 - ...pointConnectionsCreateOrUpdateSamples.java | 38 - ...ivateEndpointConnectionsDeleteSamples.java | 26 - .../PrivateEndpointConnectionsGetSamples.java | 26 - ...PrivateEndpointConnectionsListSamples.java | 24 - .../PrivateLinkResourcesGetSamples.java | 24 - .../SchemaRegistryCreateOrUpdateSamples.java | 46 - .../SchemaRegistryDeleteSamples.java | 25 - .../generated/SchemaRegistryGetSamples.java | 25 - .../SchemaRegistryListByNamespaceSamples.java | 24 - .../eventhubs/EventHubTests.java | 74 +- .../tsp-location.yaml | 4 - 227 files changed, 6009 insertions(+), 9599 deletions(-) delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/customization/pom.xml delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/customization/src/main/java/EventHubsCustomization.java create mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NetworkSecurityPerimeterConfigurationsOperationsClient.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/FailOverProperties.java create mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/NetworkSecurityPerimeterConfigurationsOperationsClientImpl.java rename sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/{implementation => }/models/ApplicationGroupListResult.java (73%) rename sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/{implementation => }/models/ArmDisasterRecoveryListResult.java (73%) rename sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/{implementation => }/models/AuthorizationRuleListResult.java (67%) rename sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/{implementation => }/models/ClusterListResult.java (64%) delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ConfidentialCompute.java rename sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/{implementation => }/models/ConsumerGroupListResult.java (67%) rename sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/{implementation => }/models/EHNamespaceListResult.java (68%) rename sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/{implementation => }/models/EventHubListResult.java (68%) delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/FailOver.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/GeoDRRoleType.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/GeoDataReplicationProperties.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/MessageTimestampDescription.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Mode.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NamespaceReplicaLocation.java rename sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/{implementation => }/models/OperationListResult.java (80%) delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PlatformCapabilities.java rename sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/{implementation => }/models/PrivateEndpointConnectionListResult.java (69%) rename sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/{implementation => }/models/SchemaGroupListResult.java (67%) delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/TimestampType.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/resources/META-INF/azure-resourcemanager-eventhubs_metadata.json delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ApplicationGroupCreateOrUpdateApplicationGroupSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ApplicationGroupDeleteSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ApplicationGroupGetSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ApplicationGroupListByNamespaceSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersCreateOrUpdateSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersDeleteSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersGetByResourceGroupSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersListAvailableClusterRegionSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersListByResourceGroupSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersListNamespacesSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersListSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersUpdateSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConfigurationGetSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConfigurationPatchSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsCreateOrUpdateSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsDeleteSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsGetSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsListByEventHubSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsBreakPairingSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsCheckNameAvailabilitySamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsCreateOrUpdateSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsDeleteSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsFailOverSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsGetAuthorizationRuleSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsGetSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsListAuthorizationRulesSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsListKeysSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsListSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsCreateOrUpdateAuthorizationRuleSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsCreateOrUpdateSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsDeleteAuthorizationRuleSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsDeleteSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsGetAuthorizationRuleSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsGetSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsListAuthorizationRulesSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsListByNamespaceSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsListKeysSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsRegenerateKeysSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesCheckNameAvailabilitySamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesCreateOrUpdateAuthorizationRuleSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesCreateOrUpdateNetworkRuleSetSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesCreateOrUpdateSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesDeleteAuthorizationRuleSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesDeleteSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesFailoverSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesGetAuthorizationRuleSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesGetByResourceGroupSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesGetNetworkRuleSetSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListAuthorizationRulesSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListByResourceGroupSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListKeysSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListNetworkRuleSetSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesRegenerateKeysSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesUpdateSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NetworkSecurityPerimeterConfigurationsCreateOrUpdateSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NetworkSecurityPerimeterConfigurationsGetResourceAssociationNameSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/OperationsListSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateEndpointConnectionsDeleteSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateEndpointConnectionsGetSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateEndpointConnectionsListSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateLinkResourcesGetSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/SchemaRegistryCreateOrUpdateSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/SchemaRegistryDeleteSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/SchemaRegistryGetSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/SchemaRegistryListByNamespaceSamples.java delete mode 100644 sdk/eventhubs/azure-resourcemanager-eventhubs/tsp-location.yaml diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/CHANGELOG.md b/sdk/eventhubs/azure-resourcemanager-eventhubs/CHANGELOG.md index 60294d707b05..35dd014a020d 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/CHANGELOG.md +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/CHANGELOG.md @@ -1,17 +1,5 @@ # Release History -## 2.54.0-beta.1 (Unreleased) - -### Features Added - -- Supported `disableLocalAuth()` and `enableLocalAuth()` in `EventHubNamespace`. - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - ## 2.53.8 (2026-05-05) ### Other Changes @@ -21,6 +9,7 @@ - Upgraded `azure-resourcemanager-storage` from `2.55.3` to version `2.55.5`. - Upgraded `azure-resourcemanager-resources` from `2.54.0` to version `2.54.1`. + ## 2.53.7 (2026-03-30) ### Other Changes @@ -39,13 +28,16 @@ - Upgraded `azure-resourcemanager-storage` from `2.55.1` to version `2.55.2`. + ## 2.53.5 (2025-11-24) ### Other Changes #### Dependency Updates -- Updated core dependency from resources. +- Upgraded `azure-resourcemanager-storage` from `2.55.0` to version `2.55.1`. +- Upgraded `azure-resourcemanager-resources` from `2.53.3` to version `2.53.5`. + ## 2.53.4 (2025-10-27) @@ -53,7 +45,9 @@ #### Dependency Updates -- Updated core dependency from resources. +- Upgraded `azure-resourcemanager-storage` from `2.54.0` to version `2.55.0`. +- Upgraded `azure-resourcemanager-resources` from `2.53.2` to version `2.53.3`. + ## 2.53.3 (2025-09-24) diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/README.md b/sdk/eventhubs/azure-resourcemanager-eventhubs/README.md index 617d13311d92..10fe92aaf345 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/README.md +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-eventhubs - 2.54.0-beta.1 + 2.53.8 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/assets.json b/sdk/eventhubs/azure-resourcemanager-eventhubs/assets.json index 70067b215a39..6a622e5771d4 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/assets.json +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/eventhubs/azure-resourcemanager-eventhubs", - "Tag": "java/eventhubs/azure-resourcemanager-eventhubs_aef499556f" + "Tag": "java/eventhubs/azure-resourcemanager-eventhubs_7f9757c7bd" } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/customization/pom.xml b/sdk/eventhubs/azure-resourcemanager-eventhubs/customization/pom.xml deleted file mode 100644 index 4968d6040651..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/customization/pom.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - com.azure - azure-code-customization-parent - 1.0.0-beta.1 - ../../../parents/azure-code-customization-parent - - - com.azure.resourcemanager - azure-resourcemanager-eventhubs-customization - 1.0.0-beta.1 - 4.0.0 - diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/customization/src/main/java/EventHubsCustomization.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/customization/src/main/java/EventHubsCustomization.java deleted file mode 100644 index 58d7b0fed181..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/customization/src/main/java/EventHubsCustomization.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -import com.azure.autorest.customization.ClassCustomization; -import com.azure.autorest.customization.Customization; -import com.azure.autorest.customization.LibraryCustomization; -import com.azure.autorest.customization.PackageCustomization; -import com.github.javaparser.ast.type.ClassOrInterfaceType; -import org.slf4j.Logger; - -/** - * Code customization after code generation. - */ -public class EventHubsCustomization extends Customization { - @Override - public void customize(LibraryCustomization customization, Logger logger) { - PackageCustomization fluentModelsPackage = customization.getPackage("com.azure.resourcemanager.eventhubs.fluent.models"); - // change base class from `ProxyResource` to `Resource`, to avoid breaking changes and compilation errors - customizeResourceBaseClass(fluentModelsPackage.getClass("EHNamespaceInner")); - customizeResourceBaseClass(fluentModelsPackage.getClass("ClusterInner")); - } - - /** - * Customize the base class to be "com.azure.core.management.Resource". - * - * @param customization the customization for class - */ - private static void customizeResourceBaseClass(ClassCustomization customization) { - customization.customizeAst(ast -> { - ast.getClassByName(customization.getClassName()).ifPresent(clazz -> { - String resourceClassName = "com.azure.core.management.Resource"; - ast.addImport(resourceClassName); - clazz.getExtendedTypes().clear(); - clazz.addExtendedType(new ClassOrInterfaceType(null, "Resource")); - }); - }); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml b/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml index 0d5b8b0d49a3..388e12dd9120 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-eventhubs - 2.54.0-beta.1 + 2.53.8 jar Microsoft Azure SDK for EventHubs Management @@ -59,12 +59,12 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.54.1 + 2.54.0 com.azure.resourcemanager azure-resourcemanager-storage - 2.56.0 + 2.55.4 org.junit.jupiter diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ApplicationGroupsClient.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ApplicationGroupsClient.java index feee9fbe7a88..12796f12ab12 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ApplicationGroupsClient.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ApplicationGroupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent; @@ -18,68 +18,50 @@ */ public interface ApplicationGroupsClient { /** - * Gets an ApplicationGroup for a Namespace. + * Gets a list of application groups for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param applicationGroupName The Application Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ApplicationGroup for a Namespace along with {@link Response} on successful completion of {@link Mono}. + * @return a list of application groups for a Namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, - String applicationGroupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName); /** - * Gets an ApplicationGroup for a Namespace. + * Gets a list of application groups for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param applicationGroupName The Application Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ApplicationGroup for a Namespace on successful completion of {@link Mono}. + * @return a list of application groups for a Namespace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String namespaceName, String applicationGroupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); /** - * Gets an ApplicationGroup for a Namespace. + * Gets a list of application groups for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param applicationGroupName The Application Group name. * @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 an ApplicationGroup for a Namespace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String namespaceName, - String applicationGroupName, Context context); - - /** - * Gets an ApplicationGroup for a Namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param applicationGroupName The Application Group name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ApplicationGroup for a Namespace. + * @return a list of application groups for a Namespace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationGroupInner get(String resourceGroupName, String namespaceName, String applicationGroupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace(String resourceGroupName, String namespaceName, + Context context); /** * Creates or updates an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @param parameters The ApplicationGroup. @@ -95,7 +77,7 @@ Mono> createOrUpdateApplicationGroupWithResponse /** * Creates or updates an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @param parameters The ApplicationGroup. @@ -111,7 +93,7 @@ Mono createOrUpdateApplicationGroupAsync(String resourceG /** * Creates or updates an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @param parameters The ApplicationGroup. @@ -128,7 +110,7 @@ Response createOrUpdateApplicationGroupWithResponse(Strin /** * Creates or updates an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @param parameters The ApplicationGroup. @@ -144,7 +126,7 @@ ApplicationGroupInner createOrUpdateApplicationGroup(String resourceGroupName, S /** * Deletes an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -159,7 +141,7 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String na /** * Deletes an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -173,7 +155,7 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String na /** * Deletes an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @param context The context to associate with this operation. @@ -189,7 +171,7 @@ Response deleteWithResponse(String resourceGroupName, String namespaceName /** * Deletes an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -200,43 +182,61 @@ Response deleteWithResponse(String resourceGroupName, String namespaceName void delete(String resourceGroupName, String namespaceName, String applicationGroupName); /** - * Gets a list of application groups for a Namespace. + * Gets an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param applicationGroupName The Application Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 application groups for a Namespace as paginated response with {@link PagedFlux}. + * @return an ApplicationGroup for a Namespace along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, + String applicationGroupName); /** - * Gets a list of application groups for a Namespace. + * Gets an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param applicationGroupName The Application Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 application groups for a Namespace as paginated response with {@link PagedIterable}. + * @return an ApplicationGroup for a Namespace on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String namespaceName, String applicationGroupName); /** - * Gets a list of application groups for a Namespace. + * Gets an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param applicationGroupName The Application Group name. * @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 application groups for a Namespace as paginated response with {@link PagedIterable}. + * @return an ApplicationGroup for a Namespace along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByNamespace(String resourceGroupName, String namespaceName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String namespaceName, + String applicationGroupName, Context context); + + /** + * Gets an ApplicationGroup for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param applicationGroupName The Application Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an ApplicationGroup for a Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApplicationGroupInner get(String resourceGroupName, String namespaceName, String applicationGroupName); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ClustersClient.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ClustersClient.java index 88037c4f1433..e4914162842a 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ClustersClient.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ClustersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent; @@ -28,10 +28,122 @@ */ public interface ClustersClient extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { + /** + * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + * + * @throws com.azure.core.management.exception.ManagementException 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 the List Available Clusters operation along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listAvailableClusterRegionWithResponseAsync(); + + /** + * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + * + * @throws com.azure.core.management.exception.ManagementException 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 the List Available Clusters operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listAvailableClusterRegionAsync(); + + /** + * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + * + * @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 response of the List Available Clusters operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listAvailableClusterRegionWithResponse(Context context); + + /** + * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + * + * @throws com.azure.core.management.exception.ManagementException 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 the List Available Clusters operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AvailableClustersListInner listAvailableClusterRegion(); + + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @throws com.azure.core.management.exception.ManagementException 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 the List Event Hubs Clusters operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); + + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @throws com.azure.core.management.exception.ManagementException 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 the List Event Hubs Clusters operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @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 response of the List Event Hubs Clusters operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 the List Event Hubs Clusters operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); + + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 the List Event Hubs Clusters operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @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 response of the List Event Hubs Clusters operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + /** * Gets the resource description of the specified Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -45,7 +157,7 @@ public interface ClustersClient /** * Gets the resource description of the specified Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -58,7 +170,7 @@ public interface ClustersClient /** * Gets the resource description of the specified Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -73,7 +185,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, /** * Gets the resource description of the specified Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -86,7 +198,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -102,7 +214,7 @@ Mono>> createOrUpdateWithResponseAsync(String resource /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -117,7 +229,7 @@ PollerFlux, ClusterInner> beginCreateOrUpdateAsync(Stri /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -132,7 +244,7 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(String re /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @param context The context to associate with this operation. @@ -148,7 +260,7 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(String re /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -162,7 +274,7 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(String re /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -176,7 +288,7 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(String re /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @param context The context to associate with this operation. @@ -191,7 +303,7 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(String re /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -207,7 +319,7 @@ Mono>> updateWithResponseAsync(String resourceGroupNam /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -222,7 +334,7 @@ PollerFlux, ClusterInner> beginUpdateAsync(String resou /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -237,7 +349,7 @@ SyncPoller, ClusterInner> beginUpdate(String resourceGr /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @param context The context to associate with this operation. @@ -253,7 +365,7 @@ SyncPoller, ClusterInner> beginUpdate(String resourceGr /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -267,7 +379,7 @@ SyncPoller, ClusterInner> beginUpdate(String resourceGr /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -281,7 +393,7 @@ SyncPoller, ClusterInner> beginUpdate(String resourceGr /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @param context The context to associate with this operation. @@ -296,7 +408,7 @@ SyncPoller, ClusterInner> beginUpdate(String resourceGr /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -309,7 +421,7 @@ SyncPoller, ClusterInner> beginUpdate(String resourceGr /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -322,7 +434,7 @@ SyncPoller, ClusterInner> beginUpdate(String resourceGr /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -335,7 +447,7 @@ SyncPoller, ClusterInner> beginUpdate(String resourceGr /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -349,7 +461,7 @@ SyncPoller, ClusterInner> beginUpdate(String resourceGr /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -362,7 +474,7 @@ SyncPoller, ClusterInner> beginUpdate(String resourceGr /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -374,7 +486,7 @@ SyncPoller, ClusterInner> beginUpdate(String resourceGr /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -384,79 +496,10 @@ SyncPoller, ClusterInner> beginUpdate(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String clusterName, Context context); - /** - * Lists the available Event Hubs Clusters within an ARM resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 Cluster list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - - /** - * Lists the available Event Hubs Clusters within an ARM resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 Cluster list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists the available Event Hubs Clusters within an ARM 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 com.azure.core.management.exception.ManagementException 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 Cluster list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Lists the available Event Hubs Clusters within an ARM resource group. - * - * @throws com.azure.core.management.exception.ManagementException 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 Cluster list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); - - /** - * Lists the available Event Hubs Clusters within an ARM resource group. - * - * @throws com.azure.core.management.exception.ManagementException 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 Cluster list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists the available Event Hubs Clusters within an ARM resource group. - * - * @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 response of a Cluster list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - /** * List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -471,7 +514,7 @@ Mono> listNamespacesWithResponseAsync(Str /** * List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -484,7 +527,7 @@ Mono> listNamespacesWithResponseAsync(Str /** * List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -499,7 +542,7 @@ Response listNamespacesWithResponse(String resourc /** * List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -508,47 +551,4 @@ Response listNamespacesWithResponse(String resourc */ @ServiceMethod(returns = ReturnType.SINGLE) EHNamespaceIdListResultInner listNamespaces(String resourceGroupName, String clusterName); - - /** - * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. - * - * @throws com.azure.core.management.exception.ManagementException 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 the List Available Clusters operation along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> listAvailableClusterRegionWithResponseAsync(); - - /** - * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. - * - * @throws com.azure.core.management.exception.ManagementException 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 the List Available Clusters operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono listAvailableClusterRegionAsync(); - - /** - * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. - * - * @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 response of the List Available Clusters operation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listAvailableClusterRegionWithResponse(Context context); - - /** - * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. - * - * @throws com.azure.core.management.exception.ManagementException 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 the List Available Clusters operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AvailableClustersListInner listAvailableClusterRegion(); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConfigurationsClient.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConfigurationsClient.java index b81984e6ef93..86b76b4eb678 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConfigurationsClient.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConfigurationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent; @@ -19,7 +19,7 @@ public interface ConfigurationsClient { * Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings * not specified in the request body unmodified. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating an Event Hubs Cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -36,7 +36,7 @@ Mono> patchWithResponseAsync( * Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings * not specified in the request body unmodified. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating an Event Hubs Cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -52,7 +52,7 @@ Mono patchAsync(String resourceGroupNa * Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings * not specified in the request body unmodified. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating an Event Hubs Cluster resource. * @param context The context to associate with this operation. @@ -69,7 +69,7 @@ Response patchWithResponse(String reso * Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings * not specified in the request body unmodified. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating an Event Hubs Cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -85,7 +85,7 @@ ClusterQuotaConfigurationPropertiesInner patch(String resourceGroupName, String * Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and settings * imposed on the cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -101,7 +101,7 @@ Mono> getWithResponseAsync(St * Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and settings * imposed on the cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -116,7 +116,7 @@ Mono> getWithResponseAsync(St * Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and settings * imposed on the cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -133,7 +133,7 @@ Response getWithResponse(String resour * Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and settings * imposed on the cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConsumerGroupsClient.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConsumerGroupsClient.java index e81117fac155..2608af60ee84 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConsumerGroupsClient.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConsumerGroupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent; @@ -18,177 +18,175 @@ */ public interface ConsumerGroupsClient { /** - * Gets a description for the specified consumer group. + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. + * @param parameters Parameters supplied to create or update a consumer group 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 description for the specified consumer group along with {@link Response} on successful completion of - * {@link Mono}. + * @return single item in List or Get Consumer group operation along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, - String eventHubName, String consumerGroupName); + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String namespaceName, + String eventHubName, String consumerGroupName, ConsumerGroupInner parameters); /** - * Gets a description for the specified consumer group. + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. + * @param parameters Parameters supplied to create or update a consumer group 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 description for the specified consumer group on successful completion of {@link Mono}. + * @return single item in List or Get Consumer group operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String namespaceName, String eventHubName, - String consumerGroupName); + Mono createOrUpdateAsync(String resourceGroupName, String namespaceName, String eventHubName, + String consumerGroupName, ConsumerGroupInner parameters); /** - * Gets a description for the specified consumer group. + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. + * @param parameters Parameters supplied to create or update a consumer group 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 a description for the specified consumer group along with {@link Response}. + * @return single item in List or Get Consumer group operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String namespaceName, String eventHubName, - String consumerGroupName, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, + String eventHubName, String consumerGroupName, ConsumerGroupInner parameters, Context context); /** - * Gets a description for the specified consumer group. + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. + * @param parameters Parameters supplied to create or update a consumer group 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 description for the specified consumer group. + * @return single item in List or Get Consumer group operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConsumerGroupInner get(String resourceGroupName, String namespaceName, String eventHubName, - String consumerGroupName); + ConsumerGroupInner createOrUpdate(String resourceGroupName, String namespaceName, String eventHubName, + String consumerGroupName, ConsumerGroupInner parameters); /** - * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * Deletes a consumer group from the specified Event Hub and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. - * @param parameters Parameters supplied to create or update a consumer group 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 single item in List or Get Consumer group operation along with {@link Response} on successful completion - * of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String namespaceName, - String eventHubName, String consumerGroupName, ConsumerGroupInner parameters); + Mono> deleteWithResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, + String consumerGroupName); /** - * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * Deletes a consumer group from the specified Event Hub and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. - * @param parameters Parameters supplied to create or update a consumer group 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 single item in List or Get Consumer group operation on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String namespaceName, String eventHubName, - String consumerGroupName, ConsumerGroupInner parameters); + Mono deleteAsync(String resourceGroupName, String namespaceName, String eventHubName, + String consumerGroupName); /** - * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * Deletes a consumer group from the specified Event Hub and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. - * @param parameters Parameters supplied to create or update a consumer group 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 single item in List or Get Consumer group operation along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, - String eventHubName, String consumerGroupName, ConsumerGroupInner parameters, Context context); + Response deleteWithResponse(String resourceGroupName, String namespaceName, String eventHubName, + String consumerGroupName, Context context); /** - * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * Deletes a consumer group from the specified Event Hub and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. - * @param parameters Parameters supplied to create or update a consumer group 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 single item in List or Get Consumer group operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConsumerGroupInner createOrUpdate(String resourceGroupName, String namespaceName, String eventHubName, - String consumerGroupName, ConsumerGroupInner parameters); + void delete(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName); /** - * Deletes a consumer group from the specified Event Hub and resource group. + * Gets a description for the specified consumer group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 description for the specified consumer group along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, - String consumerGroupName); + Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, + String eventHubName, String consumerGroupName); /** - * Deletes a consumer group from the specified Event Hub and resource group. + * Gets a description for the specified consumer group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 description for the specified consumer group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String namespaceName, String eventHubName, + Mono getAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName); /** - * Deletes a consumer group from the specified Event Hub and resource group. + * Gets a description for the specified consumer group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. @@ -196,31 +194,33 @@ Mono deleteAsync(String resourceGroupName, String namespaceName, String ev * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 a description for the specified consumer group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String namespaceName, String eventHubName, + Response getWithResponse(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName, Context context); /** - * Deletes a consumer group from the specified Event Hub and resource group. + * Gets a description for the specified consumer group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a description for the specified consumer group. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName); + ConsumerGroupInner get(String resourceGroupName, String namespaceName, String eventHubName, + String consumerGroupName); /** * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the * Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains @@ -240,7 +240,7 @@ PagedFlux listByEventHubAsync(String resourceGroupName, Stri * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the * Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -256,7 +256,7 @@ PagedFlux listByEventHubAsync(String resourceGroupName, Stri * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the * Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -272,7 +272,7 @@ PagedIterable listByEventHub(String resourceGroupName, Strin * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the * Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/DisasterRecoveryConfigsClient.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/DisasterRecoveryConfigsClient.java index 5a6d1eb0213d..79a84b655ea2 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/DisasterRecoveryConfigsClient.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/DisasterRecoveryConfigsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent; @@ -22,121 +22,121 @@ */ public interface DisasterRecoveryConfigsClient { /** - * Gets an AuthorizationRule for a Namespace by rule name. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. - * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an AuthorizationRule for a Namespace by rule name along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of authorization rules for a Namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, - String namespaceName, String alias, String authorizationRuleName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAuthorizationRulesAsync(String resourceGroupName, String namespaceName, + String alias); /** - * Gets an AuthorizationRule for a Namespace by rule name. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. - * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an AuthorizationRule for a Namespace by rule name on successful completion of {@link Mono}. + * @return a list of authorization rules for a Namespace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String alias, - String authorizationRuleName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, + String alias); /** - * Gets an AuthorizationRule for a Namespace by rule name. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. - * @param authorizationRuleName The authorization rule name. * @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 an AuthorizationRule for a Namespace by rule name along with {@link Response}. + * @return a list of authorization rules for a Namespace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getAuthorizationRuleWithResponse(String resourceGroupName, String namespaceName, - String alias, String authorizationRuleName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, + String alias, Context context); /** * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an AuthorizationRule for a Namespace by rule name. + * @return an AuthorizationRule for a Namespace by rule name along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, String alias, - String authorizationRuleName); + Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, + String namespaceName, String alias, String authorizationRuleName); /** - * Gets a list of authorization rules for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 authorization rules for a Namespace as paginated response with {@link PagedFlux}. + * @return an AuthorizationRule for a Namespace by rule name on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAuthorizationRulesAsync(String resourceGroupName, String namespaceName, - String alias); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String alias, + String authorizationRuleName); /** - * Gets a list of authorization rules for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. + * @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 authorization rules for a Namespace as paginated response with {@link PagedIterable}. + * @return an AuthorizationRule for a Namespace by rule name along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, - String alias); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAuthorizationRuleWithResponse(String resourceGroupName, String namespaceName, + String alias, String authorizationRuleName, Context context); /** - * Gets a list of authorization rules for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. - * @param context The context to associate with this operation. + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 authorization rules for a Namespace as paginated response with {@link PagedIterable}. + * @return an AuthorizationRule for a Namespace by rule name. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, - String alias, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, String alias, + String authorizationRuleName); /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param authorizationRuleName The authorization rule name. @@ -153,7 +153,7 @@ Mono> listKeysWithResponseAsync(String resourceGroupNa /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param authorizationRuleName The authorization rule name. @@ -169,7 +169,7 @@ Mono listKeysAsync(String resourceGroupName, String namespaceNa /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param authorizationRuleName The authorization rule name. @@ -186,7 +186,7 @@ Response listKeysWithResponse(String resourceGroupName, String /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param authorizationRuleName The authorization rule name. @@ -202,7 +202,7 @@ AccessKeysInner listKeys(String resourceGroupName, String namespaceName, String /** * Check the give Namespace name availability. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters to check availability of the given Alias name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -218,7 +218,7 @@ Mono> checkNameAvailabilityWithRespon /** * Check the give Namespace name availability. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters to check availability of the given Alias name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -233,7 +233,7 @@ Mono checkNameAvailabilityAsync(String resourc /** * Check the give Namespace name availability. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters to check availability of the given Alias name. * @param context The context to associate with this operation. @@ -249,7 +249,7 @@ Response checkNameAvailabilityWithResponse(Str /** * Check the give Namespace name availability. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters to check availability of the given Alias name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -262,70 +262,49 @@ CheckNameAvailabilityResultInner checkNameAvailability(String resourceGroupName, CheckNameAvailabilityParameter parameters); /** - * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * Gets all Alias(Disaster Recovery configurations). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return single item in List or Get Alias(Disaster Recovery configuration) operation along with {@link Response} - * on successful completion of {@link Mono}. + * @return all Alias(Disaster Recovery configurations) as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, - String alias); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String namespaceName); /** - * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * Gets all Alias(Disaster Recovery configurations). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return single item in List or Get Alias(Disaster Recovery configuration) operation on successful completion of - * {@link Mono}. + * @return all Alias(Disaster Recovery configurations) as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String namespaceName, String alias); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String namespaceName); /** - * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * Gets all Alias(Disaster Recovery configurations). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param alias The Disaster Recovery configuration name. * @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 single item in List or Get Alias(Disaster Recovery configuration) operation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String namespaceName, String alias, - Context context); - - /** - * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param alias The Disaster Recovery configuration name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return single item in List or Get Alias(Disaster Recovery configuration) operation. + * @return all Alias(Disaster Recovery configurations) as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ArmDisasterRecoveryInner get(String resourceGroupName, String namespaceName, String alias); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String namespaceName, Context context); /** * Creates or updates a new Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param parameters Parameters required to create an Alias(Disaster Recovery configuration). @@ -342,7 +321,7 @@ Mono> createOrUpdateWithResponseAsync(String /** * Creates or updates a new Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param parameters Parameters required to create an Alias(Disaster Recovery configuration). @@ -359,7 +338,7 @@ Mono createOrUpdateAsync(String resourceGroupName, Str /** * Creates or updates a new Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param parameters Parameters required to create an Alias(Disaster Recovery configuration). @@ -376,7 +355,7 @@ Response createOrUpdateWithResponse(String resourceGro /** * Creates or updates a new Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param parameters Parameters required to create an Alias(Disaster Recovery configuration). @@ -392,7 +371,7 @@ ArmDisasterRecoveryInner createOrUpdate(String resourceGroupName, String namespa /** * Deletes an Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -406,7 +385,7 @@ ArmDisasterRecoveryInner createOrUpdate(String resourceGroupName, String namespa /** * Deletes an Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -420,7 +399,7 @@ ArmDisasterRecoveryInner createOrUpdate(String resourceGroupName, String namespa /** * Deletes an Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param context The context to associate with this operation. @@ -435,7 +414,7 @@ ArmDisasterRecoveryInner createOrUpdate(String resourceGroupName, String namespa /** * Deletes an Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -446,49 +425,70 @@ ArmDisasterRecoveryInner createOrUpdate(String resourceGroupName, String namespa void delete(String resourceGroupName, String namespaceName, String alias); /** - * Gets all Alias(Disaster Recovery configurations). + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Alias(Disaster Recovery configurations) as paginated response with {@link PagedFlux}. + * @return single item in List or Get Alias(Disaster Recovery configuration) operation along with {@link Response} + * on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String namespaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, + String alias); /** - * Gets all Alias(Disaster Recovery configurations). + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Alias(Disaster Recovery configurations) as paginated response with {@link PagedIterable}. + * @return single item in List or Get Alias(Disaster Recovery configuration) operation on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String namespaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String namespaceName, String alias); /** - * Gets all Alias(Disaster Recovery configurations). + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. * @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 all Alias(Disaster Recovery configurations) as paginated response with {@link PagedIterable}. + * @return single item in List or Get Alias(Disaster Recovery configuration) operation along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String namespaceName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String namespaceName, String alias, + Context context); + + /** + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return single item in List or Get Alias(Disaster Recovery configuration) operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArmDisasterRecoveryInner get(String resourceGroupName, String namespaceName, String alias); /** * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -502,7 +502,7 @@ ArmDisasterRecoveryInner createOrUpdate(String resourceGroupName, String namespa /** * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -516,7 +516,7 @@ ArmDisasterRecoveryInner createOrUpdate(String resourceGroupName, String namespa /** * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param context The context to associate with this operation. @@ -532,7 +532,7 @@ Response breakPairingWithResponse(String resourceGroupName, String namespa /** * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -545,7 +545,7 @@ Response breakPairingWithResponse(String resourceGroupName, String namespa /** * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -559,7 +559,7 @@ Response breakPairingWithResponse(String resourceGroupName, String namespa /** * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -573,7 +573,7 @@ Response breakPairingWithResponse(String resourceGroupName, String namespa /** * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param context The context to associate with this operation. @@ -588,7 +588,7 @@ Response breakPairingWithResponse(String resourceGroupName, String namespa /** * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubManagementClient.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubManagementClient.java index 8ffb86d2c07f..0cc3f519f9ca 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubManagementClient.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent; @@ -12,25 +12,26 @@ */ public interface EventHubManagementClient { /** - * Gets Service host. + * Gets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. * - * @return the endpoint value. + * @return the subscriptionId value. */ - String getEndpoint(); + String getSubscriptionId(); /** - * Gets Version parameter. + * Gets server parameter. * - * @return the apiVersion value. + * @return the endpoint value. */ - String getApiVersion(); + String getEndpoint(); /** - * Gets The ID of the target subscription. The value must be an UUID. + * Gets Api Version. * - * @return the subscriptionId value. + * @return the apiVersion value. */ - String getSubscriptionId(); + String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. @@ -46,13 +47,6 @@ public interface EventHubManagementClient { */ Duration getDefaultPollInterval(); - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - /** * Gets the ClustersClient object to access its operations. * @@ -61,25 +55,25 @@ public interface EventHubManagementClient { ClustersClient getClusters(); /** - * Gets the DisasterRecoveryConfigsClient object to access its operations. + * Gets the NamespacesClient object to access its operations. * - * @return the DisasterRecoveryConfigsClient object. + * @return the NamespacesClient object. */ - DisasterRecoveryConfigsClient getDisasterRecoveryConfigs(); + NamespacesClient getNamespaces(); /** - * Gets the EventHubsClient object to access its operations. + * Gets the PrivateEndpointConnectionsClient object to access its operations. * - * @return the EventHubsClient object. + * @return the PrivateEndpointConnectionsClient object. */ - EventHubsClient getEventHubs(); + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. + * Gets the PrivateLinkResourcesClient object to access its operations. * - * @return the PrivateEndpointConnectionsClient object. + * @return the PrivateLinkResourcesClient object. */ - PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + PrivateLinkResourcesClient getPrivateLinkResources(); /** * Gets the NetworkSecurityPerimeterConfigurationsClient object to access its operations. @@ -89,11 +83,11 @@ public interface EventHubManagementClient { NetworkSecurityPerimeterConfigurationsClient getNetworkSecurityPerimeterConfigurations(); /** - * Gets the ConsumerGroupsClient object to access its operations. + * Gets the NetworkSecurityPerimeterConfigurationsOperationsClient object to access its operations. * - * @return the ConsumerGroupsClient object. + * @return the NetworkSecurityPerimeterConfigurationsOperationsClient object. */ - ConsumerGroupsClient getConsumerGroups(); + NetworkSecurityPerimeterConfigurationsOperationsClient getNetworkSecurityPerimeterConfigurationsOperations(); /** * Gets the ConfigurationsClient object to access its operations. @@ -103,18 +97,32 @@ public interface EventHubManagementClient { ConfigurationsClient getConfigurations(); /** - * Gets the NamespacesClient object to access its operations. + * Gets the DisasterRecoveryConfigsClient object to access its operations. * - * @return the NamespacesClient object. + * @return the DisasterRecoveryConfigsClient object. */ - NamespacesClient getNamespaces(); + DisasterRecoveryConfigsClient getDisasterRecoveryConfigs(); /** - * Gets the PrivateLinkResourcesClient object to access its operations. + * Gets the EventHubsClient object to access its operations. * - * @return the PrivateLinkResourcesClient object. + * @return the EventHubsClient object. */ - PrivateLinkResourcesClient getPrivateLinkResources(); + EventHubsClient getEventHubs(); + + /** + * Gets the ConsumerGroupsClient object to access its operations. + * + * @return the ConsumerGroupsClient object. + */ + ConsumerGroupsClient getConsumerGroups(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); /** * Gets the SchemaRegistriesClient object to access its operations. diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubsClient.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubsClient.java index ee14dc5ee07d..0d216f7dfbbd 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubsClient.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent; @@ -21,76 +21,56 @@ */ public interface EventHubsClient { /** - * Gets an AuthorizationRule for an Event Hub by rule name. + * Gets the authorization rules for an Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. - * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an AuthorizationRule for an Event Hub by rule name along with {@link Response} on successful completion - * of {@link Mono}. + * @return the authorization rules for an Event Hub as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, - String namespaceName, String eventHubName, String authorizationRuleName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAuthorizationRulesAsync(String resourceGroupName, String namespaceName, + String eventHubName); /** - * Gets an AuthorizationRule for an Event Hub by rule name. + * Gets the authorization rules for an Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. - * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an AuthorizationRule for an Event Hub by rule name on successful completion of {@link Mono}. + * @return the authorization rules for an Event Hub as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, - String eventHubName, String authorizationRuleName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, + String eventHubName); /** - * Gets an AuthorizationRule for an Event Hub by rule name. + * Gets the authorization rules for an Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. - * @param authorizationRuleName The authorization rule name. * @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 an AuthorizationRule for an Event Hub by rule name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getAuthorizationRuleWithResponse(String resourceGroupName, String namespaceName, - String eventHubName, String authorizationRuleName, Context context); - - /** - * Gets an AuthorizationRule for an Event Hub by rule name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param eventHubName The Event Hub name. - * @param authorizationRuleName The authorization rule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an AuthorizationRule for an Event Hub by rule name. + * @return the authorization rules for an Event Hub as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, String eventHubName, - String authorizationRuleName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, + String eventHubName, Context context); /** * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule * will take a few seconds to take effect. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -109,7 +89,7 @@ Mono> createOrUpdateAuthorizationRuleWithRespon * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule * will take a few seconds to take effect. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -127,7 +107,7 @@ Mono createOrUpdateAuthorizationRuleAsync(String resourc * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule * will take a few seconds to take effect. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -147,7 +127,7 @@ Response createOrUpdateAuthorizationRuleWithResponse(Str * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule * will take a few seconds to take effect. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -162,41 +142,42 @@ AuthorizationRuleInner createOrUpdateAuthorizationRule(String resourceGroupName, String eventHubName, String authorizationRuleName, AuthorizationRuleInner parameters); /** - * Deletes an Event Hub AuthorizationRule. + * Gets an AuthorizationRule for an Event Hub by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an AuthorizationRule for an Event Hub by rule name along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteAuthorizationRuleWithResponseAsync(String resourceGroupName, String namespaceName, - String eventHubName, String authorizationRuleName); + Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, + String namespaceName, String eventHubName, String authorizationRuleName); /** - * Deletes an Event Hub AuthorizationRule. + * Gets an AuthorizationRule for an Event Hub by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an AuthorizationRule for an Event Hub by rule name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, - String authorizationRuleName); + Mono getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, + String eventHubName, String authorizationRuleName); /** - * Deletes an Event Hub AuthorizationRule. + * Gets an AuthorizationRule for an Event Hub by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -204,77 +185,96 @@ Mono deleteAuthorizationRuleAsync(String resourceGroupName, String namespa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 an AuthorizationRule for an Event Hub by rule name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteAuthorizationRuleWithResponse(String resourceGroupName, String namespaceName, + Response getAuthorizationRuleWithResponse(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName, Context context); /** - * Deletes an Event Hub AuthorizationRule. + * Gets an AuthorizationRule for an Event Hub by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an AuthorizationRule for an Event Hub by rule name. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String eventHubName, + AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName); /** - * Gets the authorization rules for an Event Hub. + * Deletes an Event Hub AuthorizationRule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the authorization rules for an Event Hub as paginated response with {@link PagedFlux}. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAuthorizationRulesAsync(String resourceGroupName, String namespaceName, - String eventHubName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> deleteAuthorizationRuleWithResponseAsync(String resourceGroupName, String namespaceName, + String eventHubName, String authorizationRuleName); /** - * Gets the authorization rules for an Event Hub. + * Deletes an Event Hub AuthorizationRule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the authorization rules for an Event Hub as paginated response with {@link PagedIterable}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, - String eventHubName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, + String authorizationRuleName); /** - * Gets the authorization rules for an Event Hub. + * Deletes an Event Hub AuthorizationRule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. * @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 authorization rules for an Event Hub as paginated response with {@link PagedIterable}. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, - String eventHubName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteAuthorizationRuleWithResponse(String resourceGroupName, String namespaceName, + String eventHubName, String authorizationRuleName, Context context); + + /** + * Deletes an Event Hub AuthorizationRule. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 deleteAuthorizationRule(String resourceGroupName, String namespaceName, String eventHubName, + String authorizationRuleName); /** * Gets the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -291,7 +291,7 @@ Mono> listKeysWithResponseAsync(String resourceGroupNa /** * Gets the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -307,7 +307,7 @@ Mono listKeysAsync(String resourceGroupName, String namespaceNa /** * Gets the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -324,7 +324,7 @@ Response listKeysWithResponse(String resourceGroupName, String /** * Gets the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -340,7 +340,7 @@ AccessKeysInner listKeys(String resourceGroupName, String namespaceName, String /** * Regenerates the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -358,7 +358,7 @@ Mono> regenerateKeysWithResponseAsync(String resourceG /** * Regenerates the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -375,7 +375,7 @@ Mono regenerateKeysAsync(String resourceGroupName, String names /** * Regenerates the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -393,7 +393,7 @@ Response regenerateKeysWithResponse(String resourceGroupName, S /** * Regenerates the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -408,69 +408,72 @@ AccessKeysInner regenerateKeys(String resourceGroupName, String namespaceName, S String authorizationRuleName, RegenerateAccessKeyParameters parameters); /** - * Gets an Event Hubs description for the specified Event Hub. + * Gets all the Event Hubs in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param eventHubName The Event Hub name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Event Hubs description for the specified Event Hub along with {@link Response} on successful - * completion of {@link Mono}. + * @return all the Event Hubs in a Namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, - String eventHubName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, Integer skip, + Integer top); /** - * Gets an Event Hubs description for the specified Event Hub. + * Gets all the Event Hubs in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Event Hubs description for the specified Event Hub on successful completion of {@link Mono}. + * @return all the Event Hubs in a Namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String namespaceName, String eventHubName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName); /** - * Gets an Event Hubs description for the specified Event Hub. + * Gets all the Event Hubs in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param eventHubName The Event Hub name. - * @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 an Event Hubs description for the specified Event Hub along with {@link Response}. + * @return all the Event Hubs in a Namespace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String namespaceName, String eventHubName, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); /** - * Gets an Event Hubs description for the specified Event Hub. + * Gets all the Event Hubs in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param eventHubName The Event Hub name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 an Event Hubs description for the specified Event Hub. + * @return all the Event Hubs in a Namespace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - EventhubInner get(String resourceGroupName, String namespaceName, String eventHubName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace(String resourceGroupName, String namespaceName, Integer skip, + Integer top, Context context); /** * Creates or updates a new Event Hub as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -487,7 +490,7 @@ Mono> createOrUpdateWithResponseAsync(String resourceGro /** * Creates or updates a new Event Hub as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -503,7 +506,7 @@ Mono createOrUpdateAsync(String resourceGroupName, String namespa /** * Creates or updates a new Event Hub as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -520,7 +523,7 @@ Response createOrUpdateWithResponse(String resourceGroupName, Str /** * Creates or updates a new Event Hub as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -536,7 +539,7 @@ EventhubInner createOrUpdate(String resourceGroupName, String namespaceName, Str /** * Deletes an Event Hub from the specified Namespace and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -550,7 +553,7 @@ EventhubInner createOrUpdate(String resourceGroupName, String namespaceName, Str /** * Deletes an Event Hub from the specified Namespace and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -564,7 +567,7 @@ EventhubInner createOrUpdate(String resourceGroupName, String namespaceName, Str /** * Deletes an Event Hub from the specified Namespace and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param context The context to associate with this operation. @@ -580,7 +583,7 @@ Response deleteWithResponse(String resourceGroupName, String namespaceName /** * Deletes an Event Hub from the specified Namespace and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -591,65 +594,62 @@ Response deleteWithResponse(String resourceGroupName, String namespaceName void delete(String resourceGroupName, String namespaceName, String eventHubName); /** - * Gets all the Event Hubs in a Namespace. + * Gets an Event Hubs description for the specified Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains - * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting - * point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. + * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 the Event Hubs in a Namespace as paginated response with {@link PagedFlux}. + * @return an Event Hubs description for the specified Event Hub along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, Integer skip, - Integer top); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, + String eventHubName); /** - * Gets all the Event Hubs in a Namespace. + * Gets an Event Hubs description for the specified Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 the Event Hubs in a Namespace as paginated response with {@link PagedFlux}. + * @return an Event Hubs description for the specified Event Hub on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String namespaceName, String eventHubName); /** - * Gets all the Event Hubs in a Namespace. + * Gets an Event Hubs description for the specified Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 all the Event Hubs in a Namespace as paginated response with {@link PagedIterable}. + * @return an Event Hubs description for the specified Event Hub along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String namespaceName, String eventHubName, + Context context); /** - * Gets all the Event Hubs in a Namespace. + * Gets an Event Hubs description for the specified Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains - * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting - * point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. - * @param context The context to associate with this operation. + * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 the Event Hubs in a Namespace as paginated response with {@link PagedIterable}. + * @return an Event Hubs description for the specified Event Hub. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByNamespace(String resourceGroupName, String namespaceName, Integer skip, - Integer top, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + EventhubInner get(String resourceGroupName, String namespaceName, String eventHubName); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NamespacesClient.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NamespacesClient.java index 702cbd44d692..1d19b6db4083 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NamespacesClient.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NamespacesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent; @@ -20,7 +20,6 @@ import com.azure.resourcemanager.eventhubs.fluent.models.NetworkRuleSetInner; import com.azure.resourcemanager.eventhubs.fluent.models.NetworkRuleSetListResultInner; import com.azure.resourcemanager.eventhubs.models.CheckNameAvailabilityParameter; -import com.azure.resourcemanager.eventhubs.models.FailOver; import com.azure.resourcemanager.eventhubs.models.RegenerateAccessKeyParameters; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; @@ -35,182 +34,81 @@ public interface NamespacesClient extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { /** - * Gets the description of the specified namespace. + * Lists all the available Namespaces within a subscription, irrespective of the resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the specified namespace along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response of the List Namespace operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String namespaceName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); /** - * Gets the description of the specified namespace. + * Lists all the available Namespaces within a subscription, irrespective of the resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the specified namespace on successful completion of {@link Mono}. + * @return the response of the List Namespace operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String namespaceName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * Gets the description of the specified namespace. + * Lists all the available Namespaces within a subscription, irrespective of the resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. * @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 description of the specified namespace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String namespaceName, - Context context); - - /** - * Gets the description of the specified namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the specified namespace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EHNamespaceInner getByResourceGroup(String resourceGroupName, String namespaceName); - - /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for creating a namespace 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 single Namespace item in List or Get Operation along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response of the List Namespace operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String namespaceName, - EHNamespaceInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. + * Lists the available Namespaces within a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for creating a namespace resource. + * @param resourceGroupName Name of the resource group within the azure subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 single Namespace item in List or Get Operation. + * @return the response of the List Namespace operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, EHNamespaceInner> beginCreateOrUpdateAsync(String resourceGroupName, - String namespaceName, EHNamespaceInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. + * Lists the available Namespaces within a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for creating a namespace resource. + * @param resourceGroupName Name of the resource group within the azure subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 single Namespace item in List or Get Operation. + * @return the response of the List Namespace operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EHNamespaceInner> beginCreateOrUpdate(String resourceGroupName, - String namespaceName, EHNamespaceInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. + * Lists the available Namespaces within a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for creating a namespace resource. + * @param resourceGroupName Name of the resource group within the azure subscription. * @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 single Namespace item in List or Get Operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EHNamespaceInner> beginCreateOrUpdate(String resourceGroupName, - String namespaceName, EHNamespaceInner parameters, Context context); - - /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for creating a namespace 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 single Namespace item in List or Get Operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String namespaceName, - EHNamespaceInner parameters); - - /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for creating a namespace 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 single Namespace item in List or Get Operation. + * @return the response of the List Namespace operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - EHNamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, EHNamespaceInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters for creating a namespace 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 single Namespace item in List or Get Operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EHNamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, EHNamespaceInner parameters, - Context context); - - /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace 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. @@ -218,48 +116,48 @@ EHNamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String namespaceName, + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters); /** * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters Parameters for creating a namespace 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 PollerFlux} for polling of single Namespace item in List or Get Operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, EHNamespaceInner> beginUpdateAsync(String resourceGroupName, + PollerFlux, EHNamespaceInner> beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters); /** * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters Parameters for creating a namespace 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 single Namespace item in List or Get Operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EHNamespaceInner> beginUpdate(String resourceGroupName, + SyncPoller, EHNamespaceInner> beginCreateOrUpdate(String resourceGroupName, String namespaceName, EHNamespaceInner parameters); /** * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters Parameters for creating a namespace 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. @@ -267,46 +165,47 @@ SyncPoller, EHNamespaceInner> beginUpdate(String re * @return the {@link SyncPoller} for polling of single Namespace item in List or Get Operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EHNamespaceInner> beginUpdate(String resourceGroupName, + SyncPoller, EHNamespaceInner> beginCreateOrUpdate(String resourceGroupName, String namespaceName, EHNamespaceInner parameters, Context context); /** * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters Parameters for creating a namespace 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 single Namespace item in List or Get Operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String namespaceName, + EHNamespaceInner parameters); /** * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters Parameters for creating a namespace 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 single Namespace item in List or Get Operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamespaceInner parameters); + EHNamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, EHNamespaceInner parameters); /** * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters Parameters for creating a namespace 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. @@ -314,13 +213,13 @@ SyncPoller, EHNamespaceInner> beginUpdate(String re * @return single Namespace item in List or Get Operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamespaceInner parameters, + EHNamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, EHNamespaceInner parameters, Context context); /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -333,7 +232,7 @@ EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamesp /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -346,7 +245,7 @@ EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamesp /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -359,7 +258,7 @@ EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamesp /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -373,7 +272,7 @@ EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamesp /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -386,7 +285,7 @@ EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamesp /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -398,7 +297,7 @@ EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamesp /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -409,182 +308,190 @@ EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamesp void delete(String resourceGroupName, String namespaceName, Context context); /** - * Lists the available Namespaces within a resource group. + * Gets the description of the specified namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 EHNamespace list operation as paginated response with {@link PagedFlux}. + * @return the description of the specified namespace along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String namespaceName); /** - * Lists the available Namespaces within a resource group. + * Gets the description of the specified namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 EHNamespace list operation as paginated response with {@link PagedIterable}. + * @return the description of the specified namespace on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getByResourceGroupAsync(String resourceGroupName, String namespaceName); /** - * Lists the available Namespaces within a resource group. + * Gets the description of the specified namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. * @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 response of a EHNamespace list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Lists all the available Namespaces within a subscription, irrespective of the resource groups. - * - * @throws com.azure.core.management.exception.ManagementException 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 EHNamespace list operation as paginated response with {@link PagedFlux}. + * @return the description of the specified namespace along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String namespaceName, + Context context); /** - * Lists all the available Namespaces within a subscription, irrespective of the resource groups. + * Gets the description of the specified namespace. * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 EHNamespace list operation as paginated response with {@link PagedIterable}. + * @return the description of the specified namespace. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + @ServiceMethod(returns = ReturnType.SINGLE) + EHNamespaceInner getByResourceGroup(String resourceGroupName, String namespaceName); /** - * Lists all the available Namespaces within a subscription, irrespective of the resource groups. + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. * - * @param context The context to associate with this operation. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param parameters Parameters for updating a namespace 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 response of a EHNamespace list operation as paginated response with {@link PagedIterable}. + * @return single Namespace item in List or Get Operation along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> updateWithResponseAsync(String resourceGroupName, String namespaceName, + EHNamespaceInner parameters); /** - * GeoDR Failover. + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters for updating a namespace 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 Response} on successful completion of {@link Mono}. + * @return single Namespace item in List or Get Operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> failoverWithResponseAsync(String resourceGroupName, String namespaceName, - FailOver parameters); + Mono updateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters); /** - * GeoDR Failover. + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters for updating a namespace 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 the {@link PollerFlux} for polling of long-running operation. + * @return single Namespace item in List or Get Operation along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, FailOver> beginFailoverAsync(String resourceGroupName, String namespaceName, - FailOver parameters); + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String namespaceName, + EHNamespaceInner parameters, Context context); /** - * GeoDR Failover. + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters for updating a namespace 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 long-running operation. + * @return single Namespace item in List or Get Operation. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FailOver> beginFailover(String resourceGroupName, String namespaceName, - FailOver parameters); + @ServiceMethod(returns = ReturnType.SINGLE) + EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamespaceInner parameters); /** - * GeoDR Failover. + * Create or update NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. - * @param context The context to associate with this operation. + * @param parameters The Namespace IpFilterRule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 description of topic resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FailOver> beginFailover(String resourceGroupName, String namespaceName, - FailOver parameters, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> createOrUpdateNetworkRuleSetWithResponseAsync(String resourceGroupName, + String namespaceName, NetworkRuleSetInner parameters); /** - * GeoDR Failover. + * Create or update NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters The Namespace IpFilterRule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 on successful completion of {@link Mono}. + * @return description of topic resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono failoverAsync(String resourceGroupName, String namespaceName, FailOver parameters); + Mono createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, + NetworkRuleSetInner parameters); /** - * GeoDR Failover. + * Create or update NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters The Namespace IpFilterRule. + * @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 response. + * @return description of topic resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - FailOver failover(String resourceGroupName, String namespaceName, FailOver parameters); + Response createOrUpdateNetworkRuleSetWithResponse(String resourceGroupName, + String namespaceName, NetworkRuleSetInner parameters, Context context); /** - * GeoDR Failover. + * Create or update NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. - * @param context The context to associate with this operation. + * @param parameters The Namespace IpFilterRule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return description of topic resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - FailOver failover(String resourceGroupName, String namespaceName, FailOver parameters, Context context); + NetworkRuleSetInner createOrUpdateNetworkRuleSet(String resourceGroupName, String namespaceName, + NetworkRuleSetInner parameters); /** * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -598,7 +505,7 @@ Mono> getNetworkRuleSetWithResponseAsync(String re /** * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -611,7 +518,7 @@ Mono> getNetworkRuleSetWithResponseAsync(String re /** * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -626,7 +533,7 @@ Response getNetworkRuleSetWithResponse(String resourceGroup /** * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -636,71 +543,10 @@ Response getNetworkRuleSetWithResponse(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) NetworkRuleSetInner getNetworkRuleSet(String resourceGroupName, String namespaceName); - /** - * Create or update NetworkRuleSet for a Namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters The Namespace IpFilterRule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return description of topic resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateNetworkRuleSetWithResponseAsync(String resourceGroupName, - String namespaceName, NetworkRuleSetInner parameters); - - /** - * Create or update NetworkRuleSet for a Namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters The Namespace IpFilterRule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return description of topic resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, - NetworkRuleSetInner parameters); - - /** - * Create or update NetworkRuleSet for a Namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters The Namespace IpFilterRule. - * @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 description of topic resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateNetworkRuleSetWithResponse(String resourceGroupName, - String namespaceName, NetworkRuleSetInner parameters, Context context); - - /** - * Create or update NetworkRuleSet for a Namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters The Namespace IpFilterRule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return description of topic resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkRuleSetInner createOrUpdateNetworkRuleSet(String resourceGroupName, String namespaceName, - NetworkRuleSetInner parameters); - /** * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -714,7 +560,7 @@ Mono> listNetworkRuleSetWithResponseAsyn /** * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -727,7 +573,7 @@ Mono> listNetworkRuleSetWithResponseAsyn /** * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -742,7 +588,7 @@ Response listNetworkRuleSetWithResponse(String re /** * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -753,71 +599,50 @@ Response listNetworkRuleSetWithResponse(String re NetworkRuleSetListResultInner listNetworkRuleSet(String resourceGroupName, String namespaceName); /** - * Gets an AuthorizationRule for a Namespace by rule name. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an AuthorizationRule for a Namespace by rule name along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of authorization rules for a Namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, - String namespaceName, String authorizationRuleName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAuthorizationRulesAsync(String resourceGroupName, String namespaceName); /** - * Gets an AuthorizationRule for a Namespace by rule name. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an AuthorizationRule for a Namespace by rule name on successful completion of {@link Mono}. + * @return a list of authorization rules for a Namespace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, - String authorizationRuleName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName); /** - * Gets an AuthorizationRule for a Namespace by rule name. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param authorizationRuleName The authorization rule name. * @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 an AuthorizationRule for a Namespace by rule name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getAuthorizationRuleWithResponse(String resourceGroupName, String namespaceName, - String authorizationRuleName, Context context); - - /** - * Gets an AuthorizationRule for a Namespace by rule name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param authorizationRuleName The authorization rule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an AuthorizationRule for a Namespace by rule name. + * @return a list of authorization rules for a Namespace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, - String authorizationRuleName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, + Context context); /** * Creates or updates an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters The shared access AuthorizationRule. @@ -834,7 +659,7 @@ Mono> createOrUpdateAuthorizationRuleWithRespon /** * Creates or updates an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters The shared access AuthorizationRule. @@ -850,7 +675,7 @@ Mono createOrUpdateAuthorizationRuleAsync(String resourc /** * Creates or updates an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters The shared access AuthorizationRule. @@ -867,7 +692,7 @@ Response createOrUpdateAuthorizationRuleWithResponse(Str /** * Creates or updates an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters The shared access AuthorizationRule. @@ -883,7 +708,7 @@ AuthorizationRuleInner createOrUpdateAuthorizationRule(String resourceGroupName, /** * Deletes an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -898,7 +723,7 @@ Mono> deleteAuthorizationRuleWithResponseAsync(String resourceGro /** * Deletes an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -913,7 +738,7 @@ Mono deleteAuthorizationRuleAsync(String resourceGroupName, String namespa /** * Deletes an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param context The context to associate with this operation. @@ -929,7 +754,7 @@ Response deleteAuthorizationRuleWithResponse(String resourceGroupName, Str /** * Deletes an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -940,50 +765,71 @@ Response deleteAuthorizationRuleWithResponse(String resourceGroupName, Str void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName); /** - * Gets a list of authorization rules for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 authorization rules for a Namespace as paginated response with {@link PagedFlux}. + * @return an AuthorizationRule for a Namespace by rule name along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAuthorizationRulesAsync(String resourceGroupName, String namespaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, + String namespaceName, String authorizationRuleName); /** - * Gets a list of authorization rules for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 authorization rules for a Namespace as paginated response with {@link PagedIterable}. + * @return an AuthorizationRule for a Namespace by rule name on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, + String authorizationRuleName); /** - * Gets a list of authorization rules for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. * @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 authorization rules for a Namespace as paginated response with {@link PagedIterable}. + * @return an AuthorizationRule for a Namespace by rule name along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAuthorizationRuleWithResponse(String resourceGroupName, String namespaceName, + String authorizationRuleName, Context context); + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an AuthorizationRule for a Namespace by rule name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, + String authorizationRuleName); /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -999,7 +845,7 @@ Mono> listKeysWithResponseAsync(String resourceGroupNa /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1013,7 +859,7 @@ Mono> listKeysWithResponseAsync(String resourceGroupNa /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param context The context to associate with this operation. @@ -1029,7 +875,7 @@ Response listKeysWithResponse(String resourceGroupName, String /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1043,7 +889,7 @@ Response listKeysWithResponse(String resourceGroupName, String /** * Regenerates the primary or secondary connection strings for the specified Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters Parameters required to regenerate the connection string. @@ -1060,7 +906,7 @@ Mono> regenerateKeysWithResponseAsync(String resourceG /** * Regenerates the primary or secondary connection strings for the specified Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters Parameters required to regenerate the connection string. @@ -1076,7 +922,7 @@ Mono regenerateKeysAsync(String resourceGroupName, String names /** * Regenerates the primary or secondary connection strings for the specified Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters Parameters required to regenerate the connection string. @@ -1093,7 +939,7 @@ Response regenerateKeysWithResponse(String resourceGroupName, S /** * Regenerates the primary or secondary connection strings for the specified Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters Parameters required to regenerate the connection string. @@ -1109,7 +955,7 @@ AccessKeysInner regenerateKeys(String resourceGroupName, String namespaceName, S /** * Check the give Namespace name availability. * - * @param parameters The request body. + * @param parameters Parameters to check availability of the given Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1123,7 +969,7 @@ AccessKeysInner regenerateKeys(String resourceGroupName, String namespaceName, S /** * Check the give Namespace name availability. * - * @param parameters The request body. + * @param parameters Parameters to check availability of the given Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1135,7 +981,7 @@ AccessKeysInner regenerateKeys(String resourceGroupName, String namespaceName, S /** * Check the give Namespace name availability. * - * @param parameters The request body. + * @param parameters Parameters to check availability of the given Namespace name. * @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. @@ -1149,7 +995,7 @@ AccessKeysInner regenerateKeys(String resourceGroupName, String namespaceName, S /** * Check the give Namespace name availability. * - * @param parameters The request body. + * @param parameters Parameters to check availability of the given Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NetworkSecurityPerimeterConfigurationsClient.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NetworkSecurityPerimeterConfigurationsClient.java index 931aa1c49892..6a5f19d628cc 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NetworkSecurityPerimeterConfigurationsClient.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NetworkSecurityPerimeterConfigurationsClient.java @@ -1,20 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.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.eventhubs.fluent.models.NetworkSecurityPerimeterConfigurationListInner; -import com.azure.resourcemanager.eventhubs.models.NetworkSecurityPerimeterConfiguration; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -22,73 +16,10 @@ * NetworkSecurityPerimeterConfigurationsClient. */ public interface NetworkSecurityPerimeterConfigurationsClient { - /** - * Return a NetworkSecurityPerimeterConfigurations resourceAssociationName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Security Perimeter related configurations of a given namespace along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getResourceAssociationNameWithResponseAsync( - String resourceGroupName, String namespaceName, String resourceAssociationName); - - /** - * Return a NetworkSecurityPerimeterConfigurations resourceAssociationName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Security Perimeter related configurations of a given namespace on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getResourceAssociationNameAsync(String resourceGroupName, - String namespaceName, String resourceAssociationName); - - /** - * Return a NetworkSecurityPerimeterConfigurations resourceAssociationName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @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 network Security Perimeter related configurations of a given namespace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getResourceAssociationNameWithResponse(String resourceGroupName, - String namespaceName, String resourceAssociationName, Context context); - - /** - * Return a NetworkSecurityPerimeterConfigurations resourceAssociationName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Security Perimeter related configurations of a given namespace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkSecurityPerimeterConfiguration getResourceAssociationName(String resourceGroupName, String namespaceName, - String resourceAssociationName); - /** * Gets list of current NetworkSecurityPerimeterConfiguration for Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -103,7 +34,7 @@ Mono> listWithResponseA /** * Gets list of current NetworkSecurityPerimeterConfiguration for Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -117,7 +48,7 @@ Mono> listWithResponseA /** * Gets list of current NetworkSecurityPerimeterConfiguration for Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -132,7 +63,7 @@ Response listWithResponse(String /** * Gets list of current NetworkSecurityPerimeterConfiguration for Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -141,112 +72,4 @@ Response listWithResponse(String */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkSecurityPerimeterConfigurationListInner list(String resourceGroupName, String namespaceName); - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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>> createOrUpdateWithResponseAsync(String resourceGroupName, String namespaceName, - String resourceAssociationName); - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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, NetworkSecurityPerimeterConfiguration> - beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, String resourceAssociationName); - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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, NetworkSecurityPerimeterConfiguration> - beginCreateOrUpdate(String resourceGroupName, String namespaceName, String resourceAssociationName); - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @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, NetworkSecurityPerimeterConfiguration> - beginCreateOrUpdate(String resourceGroupName, String namespaceName, String resourceAssociationName, - Context context); - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String namespaceName, - String resourceAssociationName); - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkSecurityPerimeterConfiguration createOrUpdate(String resourceGroupName, String namespaceName, - String resourceAssociationName); - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkSecurityPerimeterConfiguration createOrUpdate(String resourceGroupName, String namespaceName, - String resourceAssociationName, Context context); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NetworkSecurityPerimeterConfigurationsOperationsClient.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NetworkSecurityPerimeterConfigurationsOperationsClient.java new file mode 100644 index 000000000000..c47e6629089d --- /dev/null +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/NetworkSecurityPerimeterConfigurationsOperationsClient.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.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 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 + * NetworkSecurityPerimeterConfigurationsOperationsClient. + */ +public interface NetworkSecurityPerimeterConfigurationsOperationsClient { + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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>> createOrUpdateWithResponseAsync(String resourceGroupName, String namespaceName, + String resourceAssociationName); + + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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> beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, + String resourceAssociationName); + + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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> beginCreateOrUpdate(String resourceGroupName, String namespaceName, + String resourceAssociationName); + + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @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> beginCreateOrUpdate(String resourceGroupName, String namespaceName, + String resourceAssociationName, Context context); + + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 createOrUpdateAsync(String resourceGroupName, String namespaceName, String resourceAssociationName); + + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 createOrUpdate(String resourceGroupName, String namespaceName, String resourceAssociationName); + + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @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 createOrUpdate(String resourceGroupName, String namespaceName, String resourceAssociationName, + Context context); +} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/OperationsClient.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/OperationsClient.java index 1e117ffc2504..37bcf5e840b4 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/OperationsClient.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent; @@ -20,7 +20,7 @@ public interface OperationsClient { * * @throws com.azure.core.management.exception.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 Operation items as paginated response with {@link PagedFlux}. + * @return result of the request to list Event Hub operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listAsync(); @@ -30,7 +30,7 @@ public interface OperationsClient { * * @throws com.azure.core.management.exception.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 Operation items as paginated response with {@link PagedIterable}. + * @return result of the request to list Event Hub operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -42,7 +42,7 @@ public interface OperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Operation items as paginated response with {@link PagedIterable}. + * @return result of the request to list Event Hub operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/PrivateEndpointConnectionsClient.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/PrivateEndpointConnectionsClient.java index 9a1d3e8c6f1f..25c2aaa577ec 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/PrivateEndpointConnectionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent; @@ -23,72 +23,51 @@ */ public interface PrivateEndpointConnectionsClient { /** - * Gets a description for the specified Private Endpoint Connection name. + * Gets the available PrivateEndpointConnections within a namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a description for the specified Private Endpoint Connection name along with {@link Response} on - * successful completion of {@link Mono}. + * @return the available PrivateEndpointConnections within a namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, - String privateEndpointConnectionName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String namespaceName); /** - * Gets a description for the specified Private Endpoint Connection name. + * Gets the available PrivateEndpointConnections within a namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a description for the specified Private Endpoint Connection name on successful completion of - * {@link Mono}. + * @return the available PrivateEndpointConnections within a namespace as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String namespaceName, - String privateEndpointConnectionName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String namespaceName); /** - * Gets a description for the specified Private Endpoint Connection name. + * Gets the available PrivateEndpointConnections within a namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @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 description for the specified Private Endpoint Connection name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String namespaceName, - String privateEndpointConnectionName, Context context); - - /** - * Gets a description for the specified Private Endpoint Connection name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param privateEndpointConnectionName The PrivateEndpointConnection name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a description for the specified Private Endpoint Connection name. + * @return the available PrivateEndpointConnections within a namespace as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get(String resourceGroupName, String namespaceName, - String privateEndpointConnectionName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String namespaceName, Context context); /** * Creates or updates PrivateEndpointConnections of service namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. @@ -105,7 +84,7 @@ Mono> createOrUpdateWithResponseAsync(S /** * Creates or updates PrivateEndpointConnections of service namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. @@ -121,7 +100,7 @@ Mono createOrUpdateAsync(String resourceGroupNam /** * Creates or updates PrivateEndpointConnections of service namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. @@ -138,7 +117,7 @@ Response createOrUpdateWithResponse(String resou /** * Creates or updates PrivateEndpointConnections of service namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. @@ -154,7 +133,7 @@ PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String n /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -169,7 +148,7 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -184,7 +163,7 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -199,7 +178,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @param context The context to associate with this operation. @@ -215,7 +194,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -229,7 +208,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -242,7 +221,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @param context The context to associate with this operation. @@ -254,44 +233,65 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String namespaceName, String privateEndpointConnectionName, Context context); /** - * Gets the available PrivateEndpointConnections within a namespace. + * Gets a description for the specified Private Endpoint Connection name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available PrivateEndpointConnections within a namespace as paginated response with {@link PagedFlux}. + * @return a description for the specified Private Endpoint Connection name along with {@link Response} on + * successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String namespaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, + String privateEndpointConnectionName); /** - * Gets the available PrivateEndpointConnections within a namespace. + * Gets a description for the specified Private Endpoint Connection name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available PrivateEndpointConnections within a namespace as paginated response with - * {@link PagedIterable}. + * @return a description for the specified Private Endpoint Connection name on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String namespaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String namespaceName, + String privateEndpointConnectionName); /** - * Gets the available PrivateEndpointConnections within a namespace. + * Gets a description for the specified Private Endpoint Connection name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @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 available PrivateEndpointConnections within a namespace as paginated response with - * {@link PagedIterable}. + * @return a description for the specified Private Endpoint Connection name along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String namespaceName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String namespaceName, + String privateEndpointConnectionName, Context context); + + /** + * Gets a description for the specified Private Endpoint Connection name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param privateEndpointConnectionName The PrivateEndpointConnection name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a description for the specified Private Endpoint Connection name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner get(String resourceGroupName, String namespaceName, + String privateEndpointConnectionName); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/PrivateLinkResourcesClient.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/PrivateLinkResourcesClient.java index b70da5e19e1b..ffcd2f48e642 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/PrivateLinkResourcesClient.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/PrivateLinkResourcesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent; @@ -18,7 +18,7 @@ public interface PrivateLinkResourcesClient { /** * Gets lists of resources that supports Privatelinks. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -33,7 +33,7 @@ Mono> getWithResponseAsync(String /** * Gets lists of resources that supports Privatelinks. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -46,7 +46,7 @@ Mono> getWithResponseAsync(String /** * Gets lists of resources that supports Privatelinks. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -61,7 +61,7 @@ Response getWithResponse(String resourceGro /** * Gets lists of resources that supports Privatelinks. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/SchemaRegistriesClient.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/SchemaRegistriesClient.java index 3d40d2f5a104..089444af68e2 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/SchemaRegistriesClient.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/SchemaRegistriesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent; @@ -18,69 +18,72 @@ */ public interface SchemaRegistriesClient { /** - * Gets the details of an EventHub schema group. + * Gets all the Schema Groups in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param schemaGroupName The Schema Group name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an EventHub schema group along with {@link Response} on successful completion of - * {@link Mono}. + * @return all the Schema Groups in a Namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, - String schemaGroupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, Integer skip, + Integer top); /** - * Gets the details of an EventHub schema group. + * Gets all the Schema Groups in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param schemaGroupName The Schema Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an EventHub schema group on successful completion of {@link Mono}. + * @return all the Schema Groups in a Namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String namespaceName, String schemaGroupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName); /** - * Gets the details of an EventHub schema group. + * Gets all the Schema Groups in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param schemaGroupName The Schema Group name. - * @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 details of an EventHub schema group along with {@link Response}. + * @return all the Schema Groups in a Namespace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String namespaceName, String schemaGroupName, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); /** - * Gets the details of an EventHub schema group. + * Gets all the Schema Groups in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param schemaGroupName The Schema Group name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 details of an EventHub schema group. + * @return all the Schema Groups in a Namespace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - SchemaGroupInner get(String resourceGroupName, String namespaceName, String schemaGroupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace(String resourceGroupName, String namespaceName, Integer skip, + Integer top, Context context); /** * Creates or Updates an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -97,7 +100,7 @@ Mono> createOrUpdateWithResponseAsync(String resource /** * Creates or Updates an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -113,7 +116,7 @@ Mono createOrUpdateAsync(String resourceGroupName, String name /** * Creates or Updates an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -130,7 +133,7 @@ Response createOrUpdateWithResponse(String resourceGroupName, /** * Creates or Updates an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -146,7 +149,7 @@ SchemaGroupInner createOrUpdate(String resourceGroupName, String namespaceName, /** * Deletes an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -161,7 +164,7 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String na /** * Deletes an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -175,7 +178,7 @@ Mono> deleteWithResponseAsync(String resourceGroupName, String na /** * Deletes an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @param context The context to associate with this operation. @@ -191,7 +194,7 @@ Response deleteWithResponse(String resourceGroupName, String namespaceName /** * Deletes an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -202,65 +205,62 @@ Response deleteWithResponse(String resourceGroupName, String namespaceName void delete(String resourceGroupName, String namespaceName, String schemaGroupName); /** - * Gets all the Schema Groups in a Namespace. + * Gets the details of an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains - * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting - * point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. + * @param schemaGroupName The Schema Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 the Schema Groups in a Namespace as paginated response with {@link PagedFlux}. + * @return the details of an EventHub schema group along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, Integer skip, - Integer top); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, + String schemaGroupName); /** - * Gets all the Schema Groups in a Namespace. + * Gets the details of an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param schemaGroupName The Schema Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 the Schema Groups in a Namespace as paginated response with {@link PagedFlux}. + * @return the details of an EventHub schema group on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String namespaceName, String schemaGroupName); /** - * Gets all the Schema Groups in a Namespace. + * Gets the details of an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param schemaGroupName The Schema Group name. + * @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 all the Schema Groups in a Namespace as paginated response with {@link PagedIterable}. + * @return the details of an EventHub schema group along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String namespaceName, String schemaGroupName, + Context context); /** - * Gets all the Schema Groups in a Namespace. + * Gets the details of an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains - * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting - * point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. - * @param context The context to associate with this operation. + * @param schemaGroupName The Schema Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 the Schema Groups in a Namespace as paginated response with {@link PagedIterable}. + * @return the details of an EventHub schema group. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByNamespace(String resourceGroupName, String namespaceName, Integer skip, - Integer top, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + SchemaGroupInner get(String resourceGroupName, String namespaceName, String schemaGroupName); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AccessKeysInner.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AccessKeysInner.java index 933f901ba621..e1dcc26f939e 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AccessKeysInner.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AccessKeysInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; @@ -54,7 +54,7 @@ public final class AccessKeysInner implements JsonSerializable /** * Creates an instance of AccessKeysInner class. */ - private AccessKeysInner() { + public AccessKeysInner() { } /** diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ApplicationGroupInner.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ApplicationGroupInner.java index edac3c569004..03ebfba7f4dd 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ApplicationGroupInner.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ApplicationGroupInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; @@ -25,19 +25,19 @@ public final class ApplicationGroupInner extends ProxyResource { private ApplicationGroupProperties innerProperties; /* - * The geo-location where the resource lives + * The system meta data relating to this resource. */ - private String location; + private SystemData systemData; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * The geo-location where the resource lives */ - private SystemData systemData; + private String location; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /* * The name of the resource. @@ -45,9 +45,9 @@ public final class ApplicationGroupInner extends ProxyResource { private String name; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /** * Creates an instance of ApplicationGroupInner class. @@ -65,31 +65,31 @@ private ApplicationGroupProperties innerProperties() { } /** - * Get the location property: The geo-location where the resource lives. + * Get the systemData property: The system meta data relating to this resource. * - * @return the location value. + * @return the systemData value. */ - public String location() { - return this.location; + public SystemData systemData() { + return this.systemData; } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the location property: The geo-location where the resource lives. * - * @return the systemData value. + * @return the location value. */ - public SystemData systemData() { - return this.systemData; + public String location() { + return this.location; } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -103,13 +103,13 @@ public String name() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -234,10 +234,10 @@ public static ApplicationGroupInner fromJson(JsonReader jsonReader) throws IOExc deserializedApplicationGroupInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedApplicationGroupInner.innerProperties = ApplicationGroupProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedApplicationGroupInner.location = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedApplicationGroupInner.systemData = SystemData.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedApplicationGroupInner.location = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ApplicationGroupProperties.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ApplicationGroupProperties.java index 2ea019af9c5a..d4715218b555 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ApplicationGroupProperties.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ApplicationGroupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ArmDisasterRecoveryInner.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ArmDisasterRecoveryInner.java index 2b4ef14d6b0a..142b20c0cc7d 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ArmDisasterRecoveryInner.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ArmDisasterRecoveryInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; @@ -25,19 +25,19 @@ public final class ArmDisasterRecoveryInner extends ProxyResource { private ArmDisasterRecoveryProperties innerProperties; /* - * The geo-location where the resource lives + * The system meta data relating to this resource. */ - private String location; + private SystemData systemData; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * The geo-location where the resource lives */ - private SystemData systemData; + private String location; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /* * The name of the resource. @@ -45,9 +45,9 @@ public final class ArmDisasterRecoveryInner extends ProxyResource { private String name; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /** * Creates an instance of ArmDisasterRecoveryInner class. @@ -66,31 +66,31 @@ private ArmDisasterRecoveryProperties innerProperties() { } /** - * Get the location property: The geo-location where the resource lives. + * Get the systemData property: The system meta data relating to this resource. * - * @return the location value. + * @return the systemData value. */ - public String location() { - return this.location; + public SystemData systemData() { + return this.systemData; } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the location property: The geo-location where the resource lives. * - * @return the systemData value. + * @return the location value. */ - public SystemData systemData() { - return this.systemData; + public String location() { + return this.location; } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -104,13 +104,13 @@ public String name() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -236,10 +236,10 @@ public static ArmDisasterRecoveryInner fromJson(JsonReader jsonReader) throws IO } else if ("properties".equals(fieldName)) { deserializedArmDisasterRecoveryInner.innerProperties = ArmDisasterRecoveryProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedArmDisasterRecoveryInner.location = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedArmDisasterRecoveryInner.systemData = SystemData.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedArmDisasterRecoveryInner.location = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ArmDisasterRecoveryProperties.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ArmDisasterRecoveryProperties.java index 286f92c3f228..031616b59e25 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ArmDisasterRecoveryProperties.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ArmDisasterRecoveryProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AuthorizationRuleInner.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AuthorizationRuleInner.java index c64836b4ca1c..c3eca880bbac 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AuthorizationRuleInner.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AuthorizationRuleInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; @@ -25,19 +25,19 @@ public final class AuthorizationRuleInner extends ProxyResource { private AuthorizationRuleProperties innerProperties; /* - * The geo-location where the resource lives + * The system meta data relating to this resource. */ - private String location; + private SystemData systemData; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * The geo-location where the resource lives */ - private SystemData systemData; + private String location; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /* * The name of the resource. @@ -45,9 +45,9 @@ public final class AuthorizationRuleInner extends ProxyResource { private String name; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /** * Creates an instance of AuthorizationRuleInner class. @@ -65,31 +65,31 @@ private AuthorizationRuleProperties innerProperties() { } /** - * Get the location property: The geo-location where the resource lives. + * Get the systemData property: The system meta data relating to this resource. * - * @return the location value. + * @return the systemData value. */ - public String location() { - return this.location; + public SystemData systemData() { + return this.systemData; } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the location property: The geo-location where the resource lives. * - * @return the systemData value. + * @return the location value. */ - public SystemData systemData() { - return this.systemData; + public String location() { + return this.location; } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -103,13 +103,13 @@ public String name() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -180,10 +180,10 @@ public static AuthorizationRuleInner fromJson(JsonReader jsonReader) throws IOEx deserializedAuthorizationRuleInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedAuthorizationRuleInner.innerProperties = AuthorizationRuleProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedAuthorizationRuleInner.location = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedAuthorizationRuleInner.systemData = SystemData.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedAuthorizationRuleInner.location = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AuthorizationRuleProperties.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AuthorizationRuleProperties.java index f8fe5cc03f29..a7e636651478 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AuthorizationRuleProperties.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AuthorizationRuleProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AvailableClustersListInner.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AvailableClustersListInner.java index 5265d62a3912..67214223e7b2 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AvailableClustersListInner.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AvailableClustersListInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.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,7 +16,7 @@ /** * The response of the List Available Clusters operation. */ -@Immutable +@Fluent public final class AvailableClustersListInner implements JsonSerializable { /* * The count of readily available and pre-provisioned Event Hubs Clusters per region. @@ -26,7 +26,7 @@ public final class AvailableClustersListInner implements JsonSerializable value() { return this.value; } + /** + * Set the value property: The count of readily available and pre-provisioned Event Hubs Clusters per region. + * + * @param value the value value to set. + * @return the AvailableClustersListInner object itself. + */ + public AvailableClustersListInner withValue(List value) { + this.value = value; + return this; + } + /** * Validates the instance. * diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/CheckNameAvailabilityResultInner.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/CheckNameAvailabilityResultInner.java index c3b4fd6f9fd0..53e04a30ca28 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/CheckNameAvailabilityResultInner.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/CheckNameAvailabilityResultInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.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; @@ -15,7 +15,7 @@ /** * The Result of the CheckNameAvailability operation. */ -@Immutable +@Fluent public final class CheckNameAvailabilityResultInner implements JsonSerializable { /* * The detailed info regarding the reason associated with the Namespace. @@ -35,7 +35,7 @@ public final class CheckNameAvailabilityResultInner implements JsonSerializable< /** * Creates an instance of CheckNameAvailabilityResultInner class. */ - private CheckNameAvailabilityResultInner() { + public CheckNameAvailabilityResultInner() { } /** @@ -57,6 +57,18 @@ public Boolean nameAvailable() { return this.nameAvailable; } + /** + * Set the nameAvailable property: Value indicating Namespace is availability, true if the Namespace is available; + * otherwise, false. + * + * @param nameAvailable the nameAvailable value to set. + * @return the CheckNameAvailabilityResultInner object itself. + */ + public CheckNameAvailabilityResultInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + /** * Get the reason property: The reason for unavailability of a Namespace. * @@ -66,6 +78,17 @@ public UnavailableReason reason() { return this.reason; } + /** + * Set the reason property: The reason for unavailability of a Namespace. + * + * @param reason the reason value to set. + * @return the CheckNameAvailabilityResultInner object itself. + */ + public CheckNameAvailabilityResultInner withReason(UnavailableReason reason) { + this.reason = reason; + return this; + } + /** * Validates the instance. * diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ClusterInner.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ClusterInner.java index 743cf31407b4..edd05aaf295b 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ClusterInner.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ClusterInner.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. + package com.azure.resourcemanager.eventhubs.fluent.models; import com.azure.core.annotation.Fluent; @@ -10,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.eventhubs.models.ClusterSku; -import com.azure.resourcemanager.eventhubs.models.PlatformCapabilities; import com.azure.resourcemanager.eventhubs.models.ProvisioningState; import java.io.IOException; import java.util.Map; @@ -20,36 +20,25 @@ */ @Fluent public final class ClusterInner extends Resource { - - /* - * Event Hubs Cluster properties supplied in responses in List or Get operations. - */ - private ClusterProperties innerProperties; - - /* - * Resource tags. - */ - private Map tags; - - /* - * The geo-location where the resource lives - */ - private String location; - /* * Properties of the cluster SKU. */ private ClusterSku sku; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * The system meta data relating to this resource. */ private SystemData systemData; /* - * The type of the resource. + * Event Hubs Cluster properties supplied in responses in List or Get operations. */ - private String type; + private ClusterProperties innerProperties; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; /* * The name of the resource. @@ -57,9 +46,9 @@ public final class ClusterInner extends Resource { private String name; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /** * Creates an instance of ClusterInner class. @@ -68,86 +57,66 @@ public ClusterInner() { } /** - * Get the innerProperties property: Event Hubs Cluster properties supplied in responses in List or Get operations. - * - * @return the innerProperties value. - */ - private ClusterProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. + * Get the sku property: Properties of the cluster SKU. + * + * @return the sku value. */ - public Map tags() { - return this.tags; + public ClusterSku sku() { + return this.sku; } /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. + * Set the sku property: Properties of the cluster SKU. + * + * @param sku the sku value to set. * @return the ClusterInner object itself. */ - public ClusterInner withTags(Map tags) { - this.tags = tags; + public ClusterInner withSku(ClusterSku sku) { + this.sku = sku; return this; } /** - * Get the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The geo-location where the resource lives. - * - * @param location the location value to set. - * @return the ClusterInner object itself. + * Get the systemData property: The system meta data relating to this resource. + * + * @return the systemData value. */ - public ClusterInner withLocation(String location) { - this.location = location; - return this; + public SystemData systemData() { + return this.systemData; } /** - * Get the sku property: Properties of the cluster SKU. - * - * @return the sku value. + * Get the innerProperties property: Event Hubs Cluster properties supplied in responses in List or Get operations. + * + * @return the innerProperties value. */ - public ClusterSku sku() { - return this.sku; + private ClusterProperties innerProperties() { + return this.innerProperties; } /** - * Set the sku property: Properties of the cluster SKU. - * - * @param sku the sku value to set. - * @return the ClusterInner object itself. + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. */ - public ClusterInner withSku(ClusterSku sku) { - this.sku = sku; - return this; + @Override + public String id() { + return this.id; } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. + * Get the name property: The name of the resource. + * + * @return the name value. */ - public SystemData systemData() { - return this.systemData; + @Override + public String name() { + return this.name; } /** * Get the type property: The type of the resource. - * + * * @return the type value. */ @Override @@ -156,28 +125,26 @@ public String type() { } /** - * Get the name property: The name of the resource. - * - * @return the name value. + * {@inheritDoc} */ @Override - public String name() { - return this.name; + public ClusterInner withLocation(String location) { + super.withLocation(location); + return this; } /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. + * {@inheritDoc} */ @Override - public String id() { - return this.id; + public ClusterInner withTags(Map tags) { + super.withTags(tags); + return this; } /** * Get the createdAt property: The UTC time when the Event Hubs Cluster was created. - * + * * @return the createdAt value. */ public String createdAt() { @@ -186,7 +153,7 @@ public String createdAt() { /** * Get the provisioningState property: Provisioning state of the Cluster. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -195,7 +162,7 @@ public ProvisioningState provisioningState() { /** * Get the updatedAt property: The UTC time when the Event Hubs Cluster was last updated. - * + * * @return the updatedAt value. */ public String updatedAt() { @@ -205,7 +172,7 @@ public String updatedAt() { /** * Get the metricId property: The metric ID of the cluster resource. Provided by the service and not modifiable by * the user. - * + * * @return the metricId value. */ public String metricId() { @@ -214,7 +181,7 @@ public String metricId() { /** * Get the status property: Status of the Cluster resource. - * + * * @return the status value. */ public String status() { @@ -223,7 +190,7 @@ public String status() { /** * Get the supportsScaling property: A value that indicates whether Scaling is Supported. - * + * * @return the supportsScaling value. */ public Boolean supportsScaling() { @@ -232,7 +199,7 @@ public Boolean supportsScaling() { /** * Set the supportsScaling property: A value that indicates whether Scaling is Supported. - * + * * @param supportsScaling the supportsScaling value to set. * @return the ClusterInner object itself. */ @@ -244,41 +211,18 @@ public ClusterInner withSupportsScaling(Boolean supportsScaling) { return this; } - /** - * Get the platformCapabilities property: The platformCapabilities property. - * - * @return the platformCapabilities value. - */ - public PlatformCapabilities platformCapabilities() { - return this.innerProperties() == null ? null : this.innerProperties().platformCapabilities(); - } - - /** - * Set the platformCapabilities property: The platformCapabilities property. - * - * @param platformCapabilities the platformCapabilities value to set. - * @return the ClusterInner object itself. - */ - public ClusterInner withPlatformCapabilities(PlatformCapabilities platformCapabilities) { - if (this.innerProperties() == null) { - this.innerProperties = new ClusterProperties(); - } - this.innerProperties().withPlatformCapabilities(platformCapabilities); - return this; - } - /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } if (sku() != null) { sku().validate(); } + if (innerProperties() != null) { + innerProperties().validate(); + } } /** @@ -287,16 +231,16 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("location", this.location); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } /** * Reads an instance of ClusterInner from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ClusterInner if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -309,27 +253,29 @@ public static ClusterInner fromJson(JsonReader jsonReader) throws IOException { while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("id".equals(fieldName)) { deserializedClusterInner.id = reader.getString(); } else if ("name".equals(fieldName)) { deserializedClusterInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedClusterInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedClusterInner.innerProperties = ClusterProperties.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedClusterInner.withLocation(reader.getString()); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedClusterInner.tags = tags; - } else if ("location".equals(fieldName)) { - deserializedClusterInner.location = reader.getString(); + deserializedClusterInner.withTags(tags); } else if ("sku".equals(fieldName)) { deserializedClusterInner.sku = ClusterSku.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedClusterInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedClusterInner.innerProperties = ClusterProperties.fromJson(reader); } else { reader.skipChildren(); } } + return deserializedClusterInner; }); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ClusterProperties.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ClusterProperties.java index 361a952f4b42..aae67e828907 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ClusterProperties.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ClusterProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; @@ -9,7 +9,6 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.eventhubs.models.PlatformCapabilities; import com.azure.resourcemanager.eventhubs.models.ProvisioningState; import java.io.IOException; @@ -48,11 +47,6 @@ public final class ClusterProperties implements JsonSerializable { /* * Result of the List Namespace IDs operation @@ -26,7 +26,7 @@ public final class EHNamespaceIdListResultInner implements JsonSerializable value() { return this.value; } + /** + * Set the value property: Result of the List Namespace IDs operation. + * + * @param value the value value to set. + * @return the EHNamespaceIdListResultInner object itself. + */ + public EHNamespaceIdListResultInner withValue(List value) { + this.value = value; + return this; + } + /** * Validates the instance. * diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EHNamespaceInner.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EHNamespaceInner.java index c7858c499abc..5c44a6d868bb 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EHNamespaceInner.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EHNamespaceInner.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. + package com.azure.resourcemanager.eventhubs.fluent.models; import com.azure.core.annotation.Fluent; @@ -10,9 +11,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.eventhubs.models.Encryption; -import com.azure.resourcemanager.eventhubs.models.GeoDataReplicationProperties; import com.azure.resourcemanager.eventhubs.models.Identity; -import com.azure.resourcemanager.eventhubs.models.PlatformCapabilities; import com.azure.resourcemanager.eventhubs.models.PublicNetworkAccess; import com.azure.resourcemanager.eventhubs.models.Sku; import com.azure.resourcemanager.eventhubs.models.TlsVersion; @@ -26,22 +25,6 @@ */ @Fluent public final class EHNamespaceInner extends Resource { - - /* - * Namespace properties supplied for create namespace operation. - */ - private EHNamespaceProperties innerProperties; - - /* - * Resource tags. - */ - private Map tags; - - /* - * The geo-location where the resource lives - */ - private String location; - /* * Properties of sku resource */ @@ -53,14 +36,19 @@ public final class EHNamespaceInner extends Resource { private Identity identity; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * The system meta data relating to this resource. */ private SystemData systemData; /* - * The type of the resource. + * Namespace properties supplied for create namespace operation. */ - private String type; + private EHNamespaceProperties innerProperties; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; /* * The name of the resource. @@ -68,9 +56,9 @@ public final class EHNamespaceInner extends Resource { private String name; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /** * Creates an instance of EHNamespaceInner class. @@ -78,58 +66,9 @@ public final class EHNamespaceInner extends Resource { public EHNamespaceInner() { } - /** - * Get the innerProperties property: Namespace properties supplied for create namespace operation. - * - * @return the innerProperties value. - */ - private EHNamespaceProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the EHNamespaceInner object itself. - */ - public EHNamespaceInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The geo-location where the resource lives. - * - * @param location the location value to set. - * @return the EHNamespaceInner object itself. - */ - public EHNamespaceInner withLocation(String location) { - this.location = location; - return this; - } - /** * Get the sku property: Properties of sku resource. - * + * * @return the sku value. */ public Sku sku() { @@ -138,7 +77,7 @@ public Sku sku() { /** * Set the sku property: Properties of sku resource. - * + * * @param sku the sku value to set. * @return the EHNamespaceInner object itself. */ @@ -149,7 +88,7 @@ public EHNamespaceInner withSku(Sku sku) { /** * Get the identity property: Properties of BYOK Identity description. - * + * * @return the identity value. */ public Identity identity() { @@ -158,7 +97,7 @@ public Identity identity() { /** * Set the identity property: Properties of BYOK Identity description. - * + * * @param identity the identity value to set. * @return the EHNamespaceInner object itself. */ @@ -168,8 +107,8 @@ public EHNamespaceInner withIdentity(Identity identity) { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * Get the systemData property: The system meta data relating to this resource. + * * @return the systemData value. */ public SystemData systemData() { @@ -177,18 +116,27 @@ public SystemData systemData() { } /** - * Get the type property: The type of the resource. - * - * @return the type value. + * Get the innerProperties property: Namespace properties supplied for create namespace operation. + * + * @return the innerProperties value. + */ + private EHNamespaceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** * Get the name property: The name of the resource. - * + * * @return the name value. */ @Override @@ -197,18 +145,36 @@ public String name() { } /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. + * Get the type property: The type of the resource. + * + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; + } + + /** + * {@inheritDoc} + */ + @Override + public EHNamespaceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public EHNamespaceInner withTags(Map tags) { + super.withTags(tags); + return this; } /** * Get the minimumTlsVersion property: The minimum TLS version for the cluster to support, e.g. '1.2'. - * + * * @return the minimumTlsVersion value. */ public TlsVersion minimumTlsVersion() { @@ -217,7 +183,7 @@ public TlsVersion minimumTlsVersion() { /** * Set the minimumTlsVersion property: The minimum TLS version for the cluster to support, e.g. '1.2'. - * + * * @param minimumTlsVersion the minimumTlsVersion value to set. * @return the EHNamespaceInner object itself. */ @@ -231,7 +197,7 @@ public EHNamespaceInner withMinimumTlsVersion(TlsVersion minimumTlsVersion) { /** * Get the provisioningState property: Provisioning state of the Namespace. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -240,7 +206,7 @@ public String provisioningState() { /** * Get the status property: Status of the Namespace. - * + * * @return the status value. */ public String status() { @@ -249,7 +215,7 @@ public String status() { /** * Get the createdAt property: The time the Namespace was created. - * + * * @return the createdAt value. */ public OffsetDateTime createdAt() { @@ -258,7 +224,7 @@ public OffsetDateTime createdAt() { /** * Get the updatedAt property: The time the Namespace was updated. - * + * * @return the updatedAt value. */ public OffsetDateTime updatedAt() { @@ -267,7 +233,7 @@ public OffsetDateTime updatedAt() { /** * Get the serviceBusEndpoint property: Endpoint you can use to perform Service Bus operations. - * + * * @return the serviceBusEndpoint value. */ public String serviceBusEndpoint() { @@ -276,7 +242,7 @@ public String serviceBusEndpoint() { /** * Get the clusterArmId property: Cluster ARM ID of the Namespace. - * + * * @return the clusterArmId value. */ public String clusterArmId() { @@ -285,7 +251,7 @@ public String clusterArmId() { /** * Set the clusterArmId property: Cluster ARM ID of the Namespace. - * + * * @param clusterArmId the clusterArmId value to set. * @return the EHNamespaceInner object itself. */ @@ -299,7 +265,7 @@ public EHNamespaceInner withClusterArmId(String clusterArmId) { /** * Get the metricId property: Identifier for Azure Insights metrics. - * + * * @return the metricId value. */ public String metricId() { @@ -309,7 +275,7 @@ public String metricId() { /** * Get the isAutoInflateEnabled property: Value that indicates whether AutoInflate is enabled for eventhub * namespace. - * + * * @return the isAutoInflateEnabled value. */ public Boolean isAutoInflateEnabled() { @@ -319,7 +285,7 @@ public Boolean isAutoInflateEnabled() { /** * Set the isAutoInflateEnabled property: Value that indicates whether AutoInflate is enabled for eventhub * namespace. - * + * * @param isAutoInflateEnabled the isAutoInflateEnabled value to set. * @return the EHNamespaceInner object itself. */ @@ -334,7 +300,7 @@ public EHNamespaceInner withIsAutoInflateEnabled(Boolean isAutoInflateEnabled) { /** * Get the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is * enabled. - * + * * @return the publicNetworkAccess value. */ public PublicNetworkAccess publicNetworkAccess() { @@ -344,7 +310,7 @@ public PublicNetworkAccess publicNetworkAccess() { /** * Set the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is * enabled. - * + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the EHNamespaceInner object itself. */ @@ -359,7 +325,7 @@ public EHNamespaceInner withPublicNetworkAccess(PublicNetworkAccess publicNetwor /** * Get the maximumThroughputUnits property: Upper limit of throughput units when AutoInflate is enabled, value * should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true). - * + * * @return the maximumThroughputUnits value. */ public Integer maximumThroughputUnits() { @@ -369,7 +335,7 @@ public Integer maximumThroughputUnits() { /** * Set the maximumThroughputUnits property: Upper limit of throughput units when AutoInflate is enabled, value * should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true). - * + * * @param maximumThroughputUnits the maximumThroughputUnits value to set. * @return the EHNamespaceInner object itself. */ @@ -383,7 +349,7 @@ public EHNamespaceInner withMaximumThroughputUnits(Integer maximumThroughputUnit /** * Get the kafkaEnabled property: Value that indicates whether Kafka is enabled for eventhub namespace. - * + * * @return the kafkaEnabled value. */ public Boolean kafkaEnabled() { @@ -392,7 +358,7 @@ public Boolean kafkaEnabled() { /** * Set the kafkaEnabled property: Value that indicates whether Kafka is enabled for eventhub namespace. - * + * * @param kafkaEnabled the kafkaEnabled value to set. * @return the EHNamespaceInner object itself. */ @@ -407,7 +373,7 @@ public EHNamespaceInner withKafkaEnabled(Boolean kafkaEnabled) { /** * Get the zoneRedundant property: Enabling this property creates a Standard Event Hubs Namespace in regions * supported availability zones. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -417,7 +383,7 @@ public Boolean zoneRedundant() { /** * Set the zoneRedundant property: Enabling this property creates a Standard Event Hubs Namespace in regions * supported availability zones. - * + * * @param zoneRedundant the zoneRedundant value to set. * @return the EHNamespaceInner object itself. */ @@ -431,7 +397,7 @@ public EHNamespaceInner withZoneRedundant(Boolean zoneRedundant) { /** * Get the encryption property: Properties of BYOK Encryption description. - * + * * @return the encryption value. */ public Encryption encryption() { @@ -440,7 +406,7 @@ public Encryption encryption() { /** * Set the encryption property: Properties of BYOK Encryption description. - * + * * @param encryption the encryption value to set. * @return the EHNamespaceInner object itself. */ @@ -454,7 +420,7 @@ public EHNamespaceInner withEncryption(Encryption encryption) { /** * Get the privateEndpointConnections property: List of private endpoint connections. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -463,7 +429,7 @@ public List privateEndpointConnections() { /** * Set the privateEndpointConnections property: List of private endpoint connections. - * + * * @param privateEndpointConnections the privateEndpointConnections value to set. * @return the EHNamespaceInner object itself. */ @@ -478,7 +444,7 @@ public List privateEndpointConnections() { /** * Get the disableLocalAuth property: This property disables SAS authentication for the Event Hubs namespace. - * + * * @return the disableLocalAuth value. */ public Boolean disableLocalAuth() { @@ -487,7 +453,7 @@ public Boolean disableLocalAuth() { /** * Set the disableLocalAuth property: This property disables SAS authentication for the Event Hubs namespace. - * + * * @param disableLocalAuth the disableLocalAuth value to set. * @return the EHNamespaceInner object itself. */ @@ -501,7 +467,7 @@ public EHNamespaceInner withDisableLocalAuth(Boolean disableLocalAuth) { /** * Get the alternateName property: Alternate name specified when alias and namespace names are same. - * + * * @return the alternateName value. */ public String alternateName() { @@ -510,7 +476,7 @@ public String alternateName() { /** * Set the alternateName property: Alternate name specified when alias and namespace names are same. - * + * * @param alternateName the alternateName value to set. * @return the EHNamespaceInner object itself. */ @@ -522,67 +488,21 @@ public EHNamespaceInner withAlternateName(String alternateName) { return this; } - /** - * Get the platformCapabilities property: The platformCapabilities property. - * - * @return the platformCapabilities value. - */ - public PlatformCapabilities platformCapabilities() { - return this.innerProperties() == null ? null : this.innerProperties().platformCapabilities(); - } - - /** - * Set the platformCapabilities property: The platformCapabilities property. - * - * @param platformCapabilities the platformCapabilities value to set. - * @return the EHNamespaceInner object itself. - */ - public EHNamespaceInner withPlatformCapabilities(PlatformCapabilities platformCapabilities) { - if (this.innerProperties() == null) { - this.innerProperties = new EHNamespaceProperties(); - } - this.innerProperties().withPlatformCapabilities(platformCapabilities); - return this; - } - - /** - * Get the geoDataReplication property: Geo Data Replication settings for the namespace. - * - * @return the geoDataReplication value. - */ - public GeoDataReplicationProperties geoDataReplication() { - return this.innerProperties() == null ? null : this.innerProperties().geoDataReplication(); - } - - /** - * Set the geoDataReplication property: Geo Data Replication settings for the namespace. - * - * @param geoDataReplication the geoDataReplication value to set. - * @return the EHNamespaceInner object itself. - */ - public EHNamespaceInner withGeoDataReplication(GeoDataReplicationProperties geoDataReplication) { - if (this.innerProperties() == null) { - this.innerProperties = new EHNamespaceProperties(); - } - this.innerProperties().withGeoDataReplication(geoDataReplication); - return this; - } - /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } if (sku() != null) { sku().validate(); } if (identity() != null) { identity().validate(); } + if (innerProperties() != null) { + innerProperties().validate(); + } } /** @@ -591,17 +511,17 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("location", this.location); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("sku", this.sku); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } /** * Reads an instance of EHNamespaceInner from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of EHNamespaceInner if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -614,29 +534,31 @@ public static EHNamespaceInner fromJson(JsonReader jsonReader) throws IOExceptio while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("id".equals(fieldName)) { deserializedEHNamespaceInner.id = reader.getString(); } else if ("name".equals(fieldName)) { deserializedEHNamespaceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedEHNamespaceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedEHNamespaceInner.innerProperties = EHNamespaceProperties.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedEHNamespaceInner.withLocation(reader.getString()); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedEHNamespaceInner.tags = tags; - } else if ("location".equals(fieldName)) { - deserializedEHNamespaceInner.location = reader.getString(); + deserializedEHNamespaceInner.withTags(tags); } else if ("sku".equals(fieldName)) { deserializedEHNamespaceInner.sku = Sku.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedEHNamespaceInner.identity = Identity.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedEHNamespaceInner.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedEHNamespaceInner.innerProperties = EHNamespaceProperties.fromJson(reader); } else { reader.skipChildren(); } } + return deserializedEHNamespaceInner; }); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EHNamespaceProperties.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EHNamespaceProperties.java index 1a12889d5d4e..028ca84e5d92 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EHNamespaceProperties.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EHNamespaceProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; @@ -11,8 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.eventhubs.models.Encryption; -import com.azure.resourcemanager.eventhubs.models.GeoDataReplicationProperties; -import com.azure.resourcemanager.eventhubs.models.PlatformCapabilities; import com.azure.resourcemanager.eventhubs.models.PublicNetworkAccess; import com.azure.resourcemanager.eventhubs.models.TlsVersion; import java.io.IOException; @@ -110,16 +108,6 @@ public final class EHNamespaceProperties implements JsonSerializable e.validate()); } - if (platformCapabilities() != null) { - platformCapabilities().validate(); - } - if (geoDataReplication() != null) { - geoDataReplication().validate(); - } } /** @@ -489,8 +431,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeBooleanField("disableLocalAuth", this.disableLocalAuth); jsonWriter.writeStringField("alternateName", this.alternateName); - jsonWriter.writeJsonField("platformCapabilities", this.platformCapabilities); - jsonWriter.writeJsonField("geoDataReplication", this.geoDataReplication); return jsonWriter.writeEndObject(); } @@ -548,11 +488,6 @@ public static EHNamespaceProperties fromJson(JsonReader jsonReader) throws IOExc deserializedEHNamespaceProperties.disableLocalAuth = reader.getNullable(JsonReader::getBoolean); } else if ("alternateName".equals(fieldName)) { deserializedEHNamespaceProperties.alternateName = reader.getString(); - } else if ("platformCapabilities".equals(fieldName)) { - deserializedEHNamespaceProperties.platformCapabilities = PlatformCapabilities.fromJson(reader); - } else if ("geoDataReplication".equals(fieldName)) { - deserializedEHNamespaceProperties.geoDataReplication - = GeoDataReplicationProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EventhubInner.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EventhubInner.java index e30913f8f5d2..8f9af12fc470 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EventhubInner.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EventhubInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; @@ -12,7 +12,6 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.eventhubs.models.CaptureDescription; import com.azure.resourcemanager.eventhubs.models.EntityStatus; -import com.azure.resourcemanager.eventhubs.models.MessageTimestampDescription; import com.azure.resourcemanager.eventhubs.models.RetentionDescription; import java.io.IOException; import java.time.OffsetDateTime; @@ -29,19 +28,19 @@ public final class EventhubInner extends ProxyResource { private EventhubProperties innerProperties; /* - * The geo-location where the resource lives + * The system meta data relating to this resource. */ - private String location; + private SystemData systemData; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * The geo-location where the resource lives */ - private SystemData systemData; + private String location; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /* * The name of the resource. @@ -49,9 +48,9 @@ public final class EventhubInner extends ProxyResource { private String name; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /** * Creates an instance of EventhubInner class. @@ -69,31 +68,31 @@ private EventhubProperties innerProperties() { } /** - * Get the location property: The geo-location where the resource lives. + * Get the systemData property: The system meta data relating to this resource. * - * @return the location value. + * @return the systemData value. */ - public String location() { - return this.location; + public SystemData systemData() { + return this.systemData; } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the location property: The geo-location where the resource lives. * - * @return the systemData value. + * @return the location value. */ - public SystemData systemData() { - return this.systemData; + public String location() { + return this.location; } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -107,13 +106,13 @@ public String name() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -216,6 +215,29 @@ public EventhubInner withStatus(EntityStatus status) { return this; } + /** + * Get the userMetadata property: Gets and Sets Metadata of User. + * + * @return the userMetadata value. + */ + public String userMetadata() { + return this.innerProperties() == null ? null : this.innerProperties().userMetadata(); + } + + /** + * Set the userMetadata property: Gets and Sets Metadata of User. + * + * @param userMetadata the userMetadata value to set. + * @return the EventhubInner object itself. + */ + public EventhubInner withUserMetadata(String userMetadata) { + if (this.innerProperties() == null) { + this.innerProperties = new EventhubProperties(); + } + this.innerProperties().withUserMetadata(userMetadata); + return this; + } + /** * Get the captureDescription property: Properties of capture description. * @@ -262,63 +284,6 @@ public EventhubInner withRetentionDescription(RetentionDescription retentionDesc return this; } - /** - * Get the messageTimestampDescription property: Properties of MessageTimestamp Description. - * - * @return the messageTimestampDescription value. - */ - public MessageTimestampDescription messageTimestampDescription() { - return this.innerProperties() == null ? null : this.innerProperties().messageTimestampDescription(); - } - - /** - * Set the messageTimestampDescription property: Properties of MessageTimestamp Description. - * - * @param messageTimestampDescription the messageTimestampDescription value to set. - * @return the EventhubInner object itself. - */ - public EventhubInner withMessageTimestampDescription(MessageTimestampDescription messageTimestampDescription) { - if (this.innerProperties() == null) { - this.innerProperties = new EventhubProperties(); - } - this.innerProperties().withMessageTimestampDescription(messageTimestampDescription); - return this; - } - - /** - * Get the identifier property: Denotes the unique identifier for event hub and is generated by service while - * creating topic. This identifier can be used in kafka runtime apis wherever a UUID is required e.g Fetch & - * Delete Topic. This identifier is not supported in AMQP runtime operations yet. - * - * @return the identifier value. - */ - public String identifier() { - return this.innerProperties() == null ? null : this.innerProperties().identifier(); - } - - /** - * Get the userMetadata property: Gets and Sets Metadata of User. - * - * @return the userMetadata value. - */ - public String userMetadata() { - return this.innerProperties() == null ? null : this.innerProperties().userMetadata(); - } - - /** - * Set the userMetadata property: Gets and Sets Metadata of User. - * - * @param userMetadata the userMetadata value to set. - * @return the EventhubInner object itself. - */ - public EventhubInner withUserMetadata(String userMetadata) { - if (this.innerProperties() == null) { - this.innerProperties = new EventhubProperties(); - } - this.innerProperties().withUserMetadata(userMetadata); - return this; - } - /** * Validates the instance. * @@ -364,10 +329,10 @@ public static EventhubInner fromJson(JsonReader jsonReader) throws IOException { deserializedEventhubInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedEventhubInner.innerProperties = EventhubProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedEventhubInner.location = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedEventhubInner.systemData = SystemData.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedEventhubInner.location = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EventhubProperties.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EventhubProperties.java index 347486248c25..9949797d2a44 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EventhubProperties.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EventhubProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; @@ -12,7 +12,6 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.eventhubs.models.CaptureDescription; import com.azure.resourcemanager.eventhubs.models.EntityStatus; -import com.azure.resourcemanager.eventhubs.models.MessageTimestampDescription; import com.azure.resourcemanager.eventhubs.models.RetentionDescription; import java.io.IOException; import java.time.OffsetDateTime; @@ -53,6 +52,11 @@ public final class EventhubProperties implements JsonSerializable { - /* - * Query parameter for the new primary location after failover. - */ - private String primaryLocation; - - /* - * If Force is false then graceful failover is attempted after ensuring no data loss. If Force flag is set to true, - * Forced failover is attempted with possible data loss. - */ - private Boolean force; - - /** - * Creates an instance of FailOverProperties class. - */ - public FailOverProperties() { - } - - /** - * Get the primaryLocation property: Query parameter for the new primary location after failover. - * - * @return the primaryLocation value. - */ - public String primaryLocation() { - return this.primaryLocation; - } - - /** - * Set the primaryLocation property: Query parameter for the new primary location after failover. - * - * @param primaryLocation the primaryLocation value to set. - * @return the FailOverProperties object itself. - */ - public FailOverProperties withPrimaryLocation(String primaryLocation) { - this.primaryLocation = primaryLocation; - return this; - } - - /** - * Get the force property: If Force is false then graceful failover is attempted after ensuring no data loss. If - * Force flag is set to true, Forced failover is attempted with possible data loss. - * - * @return the force value. - */ - public Boolean force() { - return this.force; - } - - /** - * Set the force property: If Force is false then graceful failover is attempted after ensuring no data loss. If - * Force flag is set to true, Forced failover is attempted with possible data loss. - * - * @param force the force value to set. - * @return the FailOverProperties object itself. - */ - public FailOverProperties withForce(Boolean force) { - this.force = force; - 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("primaryLocation", this.primaryLocation); - jsonWriter.writeBooleanField("force", this.force); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FailOverProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FailOverProperties 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 FailOverProperties. - */ - public static FailOverProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FailOverProperties deserializedFailOverProperties = new FailOverProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("primaryLocation".equals(fieldName)) { - deserializedFailOverProperties.primaryLocation = reader.getString(); - } else if ("force".equals(fieldName)) { - deserializedFailOverProperties.force = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedFailOverProperties; - }); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkRuleSetInner.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkRuleSetInner.java index 61aa88e77f34..ae7497aeaddc 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkRuleSetInner.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkRuleSetInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; @@ -28,19 +28,19 @@ public final class NetworkRuleSetInner extends ProxyResource { private NetworkRuleSetProperties innerProperties; /* - * The geo-location where the resource lives + * The system meta data relating to this resource. */ - private String location; + private SystemData systemData; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * The geo-location where the resource lives */ - private SystemData systemData; + private String location; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /* * The name of the resource. @@ -48,9 +48,9 @@ public final class NetworkRuleSetInner extends ProxyResource { private String name; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /** * Creates an instance of NetworkRuleSetInner class. @@ -68,31 +68,31 @@ private NetworkRuleSetProperties innerProperties() { } /** - * Get the location property: The geo-location where the resource lives. + * Get the systemData property: The system meta data relating to this resource. * - * @return the location value. + * @return the systemData value. */ - public String location() { - return this.location; + public SystemData systemData() { + return this.systemData; } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the location property: The geo-location where the resource lives. * - * @return the systemData value. + * @return the location value. */ - public SystemData systemData() { - return this.systemData; + public String location() { + return this.location; } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -106,13 +106,13 @@ public String name() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -281,10 +281,10 @@ public static NetworkRuleSetInner fromJson(JsonReader jsonReader) throws IOExcep deserializedNetworkRuleSetInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedNetworkRuleSetInner.innerProperties = NetworkRuleSetProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedNetworkRuleSetInner.location = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedNetworkRuleSetInner.systemData = SystemData.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedNetworkRuleSetInner.location = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkRuleSetListResultInner.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkRuleSetListResultInner.java index b3769685d7a7..16da8286a96d 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkRuleSetListResultInner.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkRuleSetListResultInner.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +13,28 @@ import java.util.List; /** - * Paged collection of NetworkRuleSet items. + * The response of the List NetworkRuleSet operation. */ -@Immutable +@Fluent public final class NetworkRuleSetListResultInner implements JsonSerializable { /* - * The NetworkRuleSet items on this page + * Result of the List NetworkRuleSet operation */ private List value; /* - * The link to the next page of items + * Link to the next set of results. Not empty if Value contains incomplete list of NetworkRuleSet. */ private String nextLink; /** * Creates an instance of NetworkRuleSetListResultInner class. */ - private NetworkRuleSetListResultInner() { + public NetworkRuleSetListResultInner() { } /** - * Get the value property: The NetworkRuleSet items on this page. + * Get the value property: Result of the List NetworkRuleSet operation. * * @return the value value. */ @@ -44,7 +43,19 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: Result of the List NetworkRuleSet operation. + * + * @param value the value value to set. + * @return the NetworkRuleSetListResultInner object itself. + */ + public NetworkRuleSetListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * NetworkRuleSet. * * @return the nextLink value. */ @@ -52,23 +63,29 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * NetworkRuleSet. + * + * @param nextLink the nextLink value to set. + * @return the NetworkRuleSetListResultInner object itself. + */ + public NetworkRuleSetListResultInner 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model NetworkRuleSetListResultInner")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(NetworkRuleSetListResultInner.class); - /** * {@inheritDoc} */ @@ -86,7 +103,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkRuleSetListResultInner 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 NetworkRuleSetListResultInner. */ public static NetworkRuleSetListResultInner fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkRuleSetProperties.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkRuleSetProperties.java index aad3facafb1b..ee84631f79ca 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkRuleSetProperties.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkRuleSetProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkSecurityPerimeterConfigurationListInner.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkSecurityPerimeterConfigurationListInner.java index 16467d4e27c3..7cac8767e64e 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkSecurityPerimeterConfigurationListInner.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkSecurityPerimeterConfigurationListInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; @@ -27,7 +27,7 @@ public final class NetworkSecurityPerimeterConfigurationListInner /** * Creates an instance of NetworkSecurityPerimeterConfigurationListInner class. */ - private NetworkSecurityPerimeterConfigurationListInner() { + public NetworkSecurityPerimeterConfigurationListInner() { } /** diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java index 77ded08b88e3..39e37a38c25e 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.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; @@ -20,7 +20,7 @@ /** * Properties of NetworkSecurityPerimeterConfiguration. */ -@Immutable +@Fluent public final class NetworkSecurityPerimeterConfigurationProperties implements JsonSerializable { /* @@ -72,7 +72,7 @@ public final class NetworkSecurityPerimeterConfigurationProperties /** * Creates an instance of NetworkSecurityPerimeterConfigurationProperties class. */ - private NetworkSecurityPerimeterConfigurationProperties() { + public NetworkSecurityPerimeterConfigurationProperties() { } /** @@ -84,6 +84,18 @@ public NetworkSecurityPerimeterConfigurationProvisioningState provisioningState( return this.provisioningState; } + /** + * Set the provisioningState property: Provisioning state of NetworkSecurityPerimeter configuration propagation. + * + * @param provisioningState the provisioningState value to set. + * @return the NetworkSecurityPerimeterConfigurationProperties object itself. + */ + public NetworkSecurityPerimeterConfigurationProperties + withProvisioningState(NetworkSecurityPerimeterConfigurationProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + /** * Get the provisioningIssues property: List of Provisioning Issues if any. * @@ -93,6 +105,18 @@ public List provisioningIssues() { return this.provisioningIssues; } + /** + * Set the provisioningIssues property: List of Provisioning Issues if any. + * + * @param provisioningIssues the provisioningIssues value to set. + * @return the NetworkSecurityPerimeterConfigurationProperties object itself. + */ + public NetworkSecurityPerimeterConfigurationProperties + withProvisioningIssues(List provisioningIssues) { + this.provisioningIssues = provisioningIssues; + return this; + } + /** * Get the networkSecurityPerimeter property: NetworkSecurityPerimeter related information. * @@ -186,6 +210,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("provisioningState", this.provisioningState == null ? null : this.provisioningState.toString()); + jsonWriter.writeArrayField("provisioningIssues", this.provisioningIssues, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/OperationInner.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/OperationInner.java index 53985048ab77..5fab84b273ee 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/OperationInner.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/OperationInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.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; @@ -15,7 +15,7 @@ /** * A Event Hub REST API operation. */ -@Immutable +@Fluent public final class OperationInner implements JsonSerializable { /* * Operation name: {provider}/{resource}/{operation} @@ -45,7 +45,7 @@ public final class OperationInner implements JsonSerializable { /** * Creates an instance of OperationInner class. */ - private OperationInner() { + public OperationInner() { } /** @@ -66,6 +66,17 @@ public Boolean isDataAction() { return this.isDataAction; } + /** + * Set the isDataAction property: Indicates whether the operation is a data action. + * + * @param isDataAction the isDataAction value to set. + * @return the OperationInner object itself. + */ + public OperationInner withIsDataAction(Boolean isDataAction) { + this.isDataAction = isDataAction; + return this; + } + /** * Get the display property: Display of the operation. * @@ -75,6 +86,17 @@ public OperationDisplay display() { return this.display; } + /** + * Set the display property: Display of the operation. + * + * @param display the display value to set. + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + /** * Get the origin property: Origin of the operation. * @@ -84,6 +106,17 @@ public String origin() { return this.origin; } + /** + * Set the origin property: Origin of the operation. + * + * @param origin the origin value to set. + * @return the OperationInner object itself. + */ + public OperationInner withOrigin(String origin) { + this.origin = origin; + return this; + } + /** * Get the properties property: Properties of the operation. * @@ -93,6 +126,17 @@ public Object properties() { return this.properties; } + /** + * Set the properties property: Properties of the operation. + * + * @param properties the properties value to set. + * @return the OperationInner object itself. + */ + public OperationInner withProperties(Object properties) { + this.properties = properties; + return this; + } + /** * Validates the instance. * @@ -113,9 +157,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("isDataAction", this.isDataAction); jsonWriter.writeJsonField("display", this.display); jsonWriter.writeStringField("origin", this.origin); - if (this.properties != null) { - jsonWriter.writeUntypedField("properties", this.properties); - } + jsonWriter.writeUntypedField("properties", this.properties); return jsonWriter.writeEndObject(); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateEndpointConnectionInner.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateEndpointConnectionInner.java index c779a9c3c826..8bcb485122de 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateEndpointConnectionInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; @@ -26,19 +26,19 @@ public final class PrivateEndpointConnectionInner extends ProxyResource { private PrivateEndpointConnectionProperties innerProperties; /* - * The geo-location where the resource lives + * The system meta data relating to this resource. */ - private String location; + private SystemData systemData; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * The geo-location where the resource lives */ - private SystemData systemData; + private String location; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /* * The name of the resource. @@ -46,9 +46,9 @@ public final class PrivateEndpointConnectionInner extends ProxyResource { private String name; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /** * Creates an instance of PrivateEndpointConnectionInner class. @@ -66,31 +66,31 @@ private PrivateEndpointConnectionProperties innerProperties() { } /** - * Get the location property: The geo-location where the resource lives. + * Get the systemData property: The system meta data relating to this resource. * - * @return the location value. + * @return the systemData value. */ - public String location() { - return this.location; + public SystemData systemData() { + return this.systemData; } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the location property: The geo-location where the resource lives. * - * @return the systemData value. + * @return the location value. */ - public SystemData systemData() { - return this.systemData; + public String location() { + return this.location; } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -104,13 +104,13 @@ public String name() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -230,10 +230,10 @@ public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) thr } else if ("properties".equals(fieldName)) { deserializedPrivateEndpointConnectionInner.innerProperties = PrivateEndpointConnectionProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.location = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.location = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateEndpointConnectionProperties.java index fc7b6ba5049a..c6ccb44b8841 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateEndpointConnectionProperties.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateEndpointConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateLinkResourceProperties.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateLinkResourceProperties.java index e414778566e9..b1db6f443cb4 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateLinkResourceProperties.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateLinkResourceProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.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; @@ -15,7 +15,7 @@ /** * Properties of PrivateLinkResource. */ -@Immutable +@Fluent public final class PrivateLinkResourceProperties implements JsonSerializable { /* * The private link resource group id. @@ -35,7 +35,7 @@ public final class PrivateLinkResourceProperties implements JsonSerializable requiredMembers() { return this.requiredMembers; } + /** + * Set the requiredMembers property: The private link resource required member names. + * + * @param requiredMembers the requiredMembers value to set. + * @return the PrivateLinkResourceProperties object itself. + */ + public PrivateLinkResourceProperties withRequiredMembers(List requiredMembers) { + this.requiredMembers = requiredMembers; + return this; + } + /** * Get the requiredZoneNames property: The private link resource Private link DNS zone name. * @@ -65,6 +87,17 @@ public List requiredZoneNames() { return this.requiredZoneNames; } + /** + * Set the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @param requiredZoneNames the requiredZoneNames value to set. + * @return the PrivateLinkResourceProperties object itself. + */ + public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) { + this.requiredZoneNames = requiredZoneNames; + return this; + } + /** * Validates the instance. * diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateLinkResourcesListResultInner.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateLinkResourcesListResultInner.java index b56ad874547e..8843eaf22e1d 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateLinkResourcesListResultInner.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateLinkResourcesListResultInner.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * Paged collection of PrivateLinkResource items. + * Result of the List private link resources operation. */ -@Immutable +@Fluent public final class PrivateLinkResourcesListResultInner implements JsonSerializable { /* - * The PrivateLinkResource items on this page + * A collection of private link resources */ private List value; /* - * The link to the next page of items + * A link for the next page of private link resources. */ private String nextLink; /** * Creates an instance of PrivateLinkResourcesListResultInner class. */ - private PrivateLinkResourcesListResultInner() { + public PrivateLinkResourcesListResultInner() { } /** - * Get the value property: The PrivateLinkResource items on this page. + * Get the value property: A collection of private link resources. * * @return the value value. */ @@ -46,7 +45,18 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: A collection of private link resources. + * + * @param value the value value to set. + * @return the PrivateLinkResourcesListResultInner object itself. + */ + public PrivateLinkResourcesListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: A link for the next page of private link resources. * * @return the nextLink value. */ @@ -54,23 +64,28 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: A link for the next page of private link resources. + * + * @param nextLink the nextLink value to set. + * @return the PrivateLinkResourcesListResultInner object itself. + */ + public PrivateLinkResourcesListResultInner 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model PrivateLinkResourcesListResultInner")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesListResultInner.class); - /** * {@inheritDoc} */ @@ -88,7 +103,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of PrivateLinkResourcesListResultInner 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 PrivateLinkResourcesListResultInner. */ public static PrivateLinkResourcesListResultInner fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/SchemaGroupInner.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/SchemaGroupInner.java index 1dfc758722af..7a4f4717e20c 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/SchemaGroupInner.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/SchemaGroupInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; @@ -15,6 +15,7 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.Map; +import java.util.UUID; /** * Single item in List or Get Schema Group operation. @@ -27,19 +28,19 @@ public final class SchemaGroupInner extends ProxyResource { private SchemaGroupProperties innerProperties; /* - * The geo-location where the resource lives + * The system meta data relating to this resource. */ - private String location; + private SystemData systemData; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * The geo-location where the resource lives */ - private SystemData systemData; + private String location; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /* * The name of the resource. @@ -47,9 +48,9 @@ public final class SchemaGroupInner extends ProxyResource { private String name; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /** * Creates an instance of SchemaGroupInner class. @@ -67,31 +68,31 @@ private SchemaGroupProperties innerProperties() { } /** - * Get the location property: The geo-location where the resource lives. + * Get the systemData property: The system meta data relating to this resource. * - * @return the location value. + * @return the systemData value. */ - public String location() { - return this.location; + public SystemData systemData() { + return this.systemData; } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the location property: The geo-location where the resource lives. * - * @return the systemData value. + * @return the location value. */ - public SystemData systemData() { - return this.systemData; + public String location() { + return this.location; } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -105,13 +106,13 @@ public String name() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -137,7 +138,7 @@ public OffsetDateTime createdAtUtc() { * * @return the etag value. */ - public String etag() { + public UUID etag() { return this.innerProperties() == null ? null : this.innerProperties().etag(); } @@ -255,10 +256,10 @@ public static SchemaGroupInner fromJson(JsonReader jsonReader) throws IOExceptio deserializedSchemaGroupInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedSchemaGroupInner.innerProperties = SchemaGroupProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedSchemaGroupInner.location = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedSchemaGroupInner.systemData = SystemData.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedSchemaGroupInner.location = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/SchemaGroupProperties.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/SchemaGroupProperties.java index 238cf286944d..013bdbadd49f 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/SchemaGroupProperties.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/SchemaGroupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.fluent.models; @@ -15,6 +15,7 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.Map; +import java.util.UUID; /** * The SchemaGroupProperties model. @@ -34,7 +35,7 @@ public final class SchemaGroupProperties implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("eTag".equals(fieldName)) { - deserializedSchemaGroupProperties.etag = reader.getString(); + deserializedSchemaGroupProperties.etag + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("groupProperties".equals(fieldName)) { Map groupProperties = reader.readMap(reader1 -> reader1.getString()); deserializedSchemaGroupProperties.groupProperties = groupProperties; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/package-info.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/package-info.java index 0f4aad7546c0..522351d7a6fb 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/package-info.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/package-info.java @@ -1,8 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for EventHubsManagementClient. + * Package containing the inner data models for EventHubManagementClient. + * Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and VirtualNetworkRules resources. */ package com.azure.resourcemanager.eventhubs.fluent.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/package-info.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/package-info.java index 8d3d91f00d2f..375444f85f02 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/package-info.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/fluent/package-info.java @@ -1,8 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for EventHubsManagementClient. + * Package containing the service clients for EventHubManagementClient. + * Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and VirtualNetworkRules resources. */ package com.azure.resourcemanager.eventhubs.fluent; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/ApplicationGroupsClientImpl.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/ApplicationGroupsClientImpl.java index 666e41af7f19..a99f011d8804 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/ApplicationGroupsClientImpl.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/ApplicationGroupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.eventhubs.fluent.ApplicationGroupsClient; import com.azure.resourcemanager.eventhubs.fluent.models.ApplicationGroupInner; -import com.azure.resourcemanager.eventhubs.implementation.models.ApplicationGroupListResult; +import com.azure.resourcemanager.eventhubs.models.ApplicationGroupListResult; import reactor.core.publisher.Mono; /** @@ -62,45 +62,47 @@ public final class ApplicationGroupsClientImpl implements ApplicationGroupsClien * The interface defining all the services for EventHubManagementClientApplicationGroups to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "EventHubManagementClientApplicationGroups") + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") public interface ApplicationGroupsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByNamespace(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("applicationGroupName") String applicationGroupName, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdateApplicationGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdateApplicationGroup(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("applicationGroupName") String applicationGroupName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ApplicationGroupInner parameters, Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") ApplicationGroupInner parameters, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("applicationGroupName") String applicationGroupName, Context context); + @PathParam("applicationGroupName") String applicationGroupName, + @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/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNamespace(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, + @PathParam("applicationGroupName") String applicationGroupName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -108,32 +110,28 @@ Mono> listByNamespace(@HostParam("endpoint" @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByNamespaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets an ApplicationGroup for a Namespace. + * Gets a list of application groups for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param applicationGroupName The Application Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ApplicationGroup for a Namespace along with {@link Response} on successful completion of {@link Mono}. + * @return a list of application groups for a Namespace along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, - String applicationGroupName) { + private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, + String namespaceName) { 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.")); @@ -141,39 +139,38 @@ public Mono> getWithResponseAsync(String resourc if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } - if (applicationGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationGroupName 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"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, applicationGroupName, accept, context)) + return FluxUtil + .withContext(context -> service.listByNamespace(this.client.getEndpoint(), resourceGroupName, namespaceName, + 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)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets an ApplicationGroup for a Namespace. + * Gets a list of application groups for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param applicationGroupName The Application Group name. * @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 an ApplicationGroup for a Namespace along with {@link Response} on successful completion of {@link Mono}. + * @return a list of application groups for a Namespace along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, - String applicationGroupName, Context context) { + private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, + String namespaceName, 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.")); @@ -181,72 +178,89 @@ private Mono> getWithResponseAsync(String resour if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } - if (applicationGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationGroupName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, applicationGroupName, accept, context); + return service + .listByNamespace(this.client.getEndpoint(), resourceGroupName, namespaceName, 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)); } /** - * Gets an ApplicationGroup for a Namespace. + * Gets a list of application groups for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param applicationGroupName The Application Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ApplicationGroup for a Namespace on successful completion of {@link Mono}. + * @return a list of application groups for a Namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String namespaceName, - String applicationGroupName) { - return getWithResponseAsync(resourceGroupName, namespaceName, applicationGroupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { + return new PagedFlux<>(() -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); } /** - * Gets an ApplicationGroup for a Namespace. + * Gets a list of application groups for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param applicationGroupName The Application Group name. * @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 an ApplicationGroup for a Namespace along with {@link Response}. + * @return a list of application groups for a Namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String namespaceName, - String applicationGroupName, Context context) { - return getWithResponseAsync(resourceGroupName, namespaceName, applicationGroupName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, + Context context) { + return new PagedFlux<>(() -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, context), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink, context)); } /** - * Gets an ApplicationGroup for a Namespace. + * Gets a list of application groups for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param applicationGroupName The Application Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ApplicationGroup for a Namespace. + * @return a list of application groups for a Namespace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationGroupInner get(String resourceGroupName, String namespaceName, String applicationGroupName) { - return getWithResponse(resourceGroupName, namespaceName, applicationGroupName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName)); + } + + /** + * Gets a list of application groups for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 application groups for a Namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, + Context context) { + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, context)); } /** * Creates or updates an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @param parameters The ApplicationGroup. @@ -262,10 +276,6 @@ public Mono> createOrUpdateApplicationGroupWithR 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.")); @@ -277,24 +287,27 @@ public Mono> createOrUpdateApplicationGroupWithR return Mono .error(new IllegalArgumentException("Parameter applicationGroupName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdateApplicationGroup(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, namespaceName, - applicationGroupName, contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdateApplicationGroup(this.client.getEndpoint(), resourceGroupName, + namespaceName, applicationGroupName, this.client.getApiVersion(), this.client.getSubscriptionId(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @param parameters The ApplicationGroup. @@ -312,10 +325,6 @@ private Mono> createOrUpdateApplicationGroupWith 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.")); @@ -327,23 +336,26 @@ private Mono> createOrUpdateApplicationGroupWith return Mono .error(new IllegalArgumentException("Parameter applicationGroupName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdateApplicationGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, applicationGroupName, contentType, - accept, parameters, context); + return service.createOrUpdateApplicationGroup(this.client.getEndpoint(), resourceGroupName, namespaceName, + applicationGroupName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, + context); } /** * Creates or updates an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @param parameters The ApplicationGroup. @@ -362,7 +374,7 @@ public Mono createOrUpdateApplicationGroupAsync(String re /** * Creates or updates an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @param parameters The ApplicationGroup. @@ -382,7 +394,7 @@ public Response createOrUpdateApplicationGroupWithRespons /** * Creates or updates an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @param parameters The ApplicationGroup. @@ -401,7 +413,7 @@ public ApplicationGroupInner createOrUpdateApplicationGroup(String resourceGroup /** * Deletes an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -416,10 +428,6 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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.")); @@ -431,16 +439,21 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono .error(new IllegalArgumentException("Parameter applicationGroupName 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"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, applicationGroupName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, namespaceName, + applicationGroupName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @param context The context to associate with this operation. @@ -456,10 +469,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -471,15 +480,20 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono .error(new IllegalArgumentException("Parameter applicationGroupName 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.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, applicationGroupName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, namespaceName, applicationGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** * Deletes an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -496,7 +510,7 @@ public Mono deleteAsync(String resourceGroupName, String namespaceName, St /** * Deletes an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @param context The context to associate with this operation. @@ -514,7 +528,7 @@ public Response deleteWithResponse(String resourceGroupName, String namesp /** * Deletes an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param applicationGroupName The Application Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -527,27 +541,23 @@ public void delete(String resourceGroupName, String namespaceName, String applic } /** - * Gets a list of application groups for a Namespace. + * Gets an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param applicationGroupName The Application Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 application groups for a Namespace along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return an ApplicationGroup for a Namespace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, - String namespaceName) { + public Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, + String applicationGroupName) { 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.")); @@ -555,38 +565,40 @@ private Mono> listByNamespaceSinglePageAsyn if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } + if (applicationGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationGroupName 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"; return FluxUtil - .withContext(context -> service.listByNamespace(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, namespaceName, + applicationGroupName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of application groups for a Namespace. + * Gets an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param applicationGroupName The Application Group name. * @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 application groups for a Namespace along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return an ApplicationGroup for a Namespace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, - String namespaceName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, + String applicationGroupName, 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.")); @@ -594,79 +606,70 @@ private Mono> listByNamespaceSinglePageAsyn if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } + if (applicationGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationGroupName 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 - .listByNamespace(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), resourceGroupName, namespaceName, applicationGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** - * Gets a list of application groups for a Namespace. + * Gets an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param applicationGroupName The Application Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 application groups for a Namespace as paginated response with {@link PagedFlux}. + * @return an ApplicationGroup for a Namespace on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { - return new PagedFlux<>(() -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName), - nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String namespaceName, + String applicationGroupName) { + return getWithResponseAsync(resourceGroupName, namespaceName, applicationGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of application groups for a Namespace. + * Gets an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param applicationGroupName The Application Group name. * @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 application groups for a Namespace as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, - Context context) { - return new PagedFlux<>(() -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, context), - nextLink -> listByNamespaceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of application groups for a Namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 application groups for a Namespace as paginated response with {@link PagedIterable}. + * @return an ApplicationGroup for a Namespace along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { - return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String namespaceName, + String applicationGroupName, Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, applicationGroupName, context).block(); } /** - * Gets a list of application groups for a Namespace. + * Gets an ApplicationGroup for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param context The context to associate with this operation. + * @param applicationGroupName The Application Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 application groups for a Namespace as paginated response with {@link PagedIterable}. + * @return an ApplicationGroup for a Namespace. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, - Context context) { - return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ApplicationGroupInner get(String resourceGroupName, String namespaceName, String applicationGroupName) { + return getWithResponse(resourceGroupName, namespaceName, applicationGroupName, Context.NONE).getValue(); } /** @@ -676,8 +679,8 @@ public PagedIterable listByNamespace(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 application groups for a Namespace along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response from the List Application Groups operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNamespaceNextSinglePageAsync(String nextLink) { @@ -704,8 +707,8 @@ private Mono> listByNamespaceNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 application groups for a Namespace along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response from the List Application Groups operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByNamespaceNextSinglePageAsync(String nextLink, diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/ClustersClientImpl.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/ClustersClientImpl.java index 611603e4ba7c..a1cdf9feb1c5 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/ClustersClientImpl.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/ClustersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.implementation; @@ -36,7 +36,7 @@ import com.azure.resourcemanager.eventhubs.fluent.models.AvailableClustersListInner; import com.azure.resourcemanager.eventhubs.fluent.models.ClusterInner; import com.azure.resourcemanager.eventhubs.fluent.models.EHNamespaceIdListResultInner; -import com.azure.resourcemanager.eventhubs.implementation.models.ClusterListResult; +import com.azure.resourcemanager.eventhubs.models.ClusterListResult; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; @@ -73,100 +73,429 @@ public final class ClustersClientImpl implements InnerSupportsGet, * The interface defining all the services for EventHubManagementClientClusters to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "EventHubManagementClientClusters") + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") public interface ClustersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/availableClusterRegions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAvailableClusterRegion(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/clusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ClusterInner parameters, Context context); + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ClusterInner parameters, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ClusterInner parameters, Context context); + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ClusterInner parameters, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/namespaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); + Mono> listNamespaces(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/clusters") + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + 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("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/namespaces") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNamespaces(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + * + * @throws ManagementException 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 the List Available Clusters operation along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listAvailableClusterRegionWithResponseAsync() { + 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"; + return FluxUtil + .withContext(context -> service.listAvailableClusterRegion(this.client.getEndpoint(), + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + * + * @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 the List Available Clusters operation along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAvailableClusterRegionWithResponseAsync(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.listAvailableClusterRegion(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); + } + + /** + * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + * + * @throws ManagementException 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 the List Available Clusters operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listAvailableClusterRegionAsync() { + return listAvailableClusterRegionWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + * + * @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 the List Available Clusters operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listAvailableClusterRegionWithResponse(Context context) { + return listAvailableClusterRegionWithResponseAsync(context).block(); + } + + /** + * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + * + * @throws ManagementException 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 the List Available Clusters operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AvailableClustersListInner listAvailableClusterRegion() { + return listAvailableClusterRegionWithResponse(Context.NONE).getValue(); + } + + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @throws ManagementException 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 the List Event Hubs Clusters operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + 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"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + 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())); + } + + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @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 the List Event Hubs Clusters 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.getSubscriptionId(), this.client.getApiVersion(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @throws ManagementException 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 the List Event Hubs Clusters operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @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 the List Event Hubs Clusters operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @throws ManagementException 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 the List Event Hubs Clusters operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @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 the List Event Hubs Clusters operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 the List Event Hubs Clusters operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + 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"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, 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())); + } + + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @param resourceGroupName Name of the resource group within the azure 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 the List Event Hubs Clusters operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 the List Event Hubs Clusters operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/availableClusterRegions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAvailableClusterRegion(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @param resourceGroupName Name of the resource group within the azure 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 the List Event Hubs Clusters operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 the List Event Hubs Clusters operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); + /** + * Lists the available Event Hubs Clusters within an ARM resource group. + * + * @param resourceGroupName Name of the resource group within the azure 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 the List Event Hubs Clusters operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** * Gets the resource description of the specified Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -194,15 +523,16 @@ public Mono> getByResourceGroupWithResponseAsync(String r } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .withContext( + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the resource description of the specified Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -231,14 +561,14 @@ private Mono> getByResourceGroupWithResponseAsync(String } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, this.client.getApiVersion(), accept, context); } /** * Gets the resource description of the specified Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -254,7 +584,7 @@ public Mono getByResourceGroupAsync(String resourceGroupName, Stri /** * Gets the resource description of the specified Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -271,7 +601,7 @@ public Response getByResourceGroupWithResponse(String resourceGrou /** * Gets the resource description of the specified Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -286,7 +616,7 @@ public ClusterInner getByResourceGroup(String resourceGroupName, String clusterN /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -318,19 +648,17 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, parameters, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @param context The context to associate with this operation. @@ -363,17 +691,16 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -393,7 +720,7 @@ public PollerFlux, ClusterInner> beginCreateOrUpdateAsy /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @param context The context to associate with this operation. @@ -415,7 +742,7 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -432,7 +759,7 @@ public SyncPoller, ClusterInner> beginCreateOrUpdate(St /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @param context The context to associate with this operation. @@ -450,7 +777,7 @@ public SyncPoller, ClusterInner> beginCreateOrUpdate(St /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -468,7 +795,7 @@ public Mono createOrUpdateAsync(String resourceGroupName, String c /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @param context The context to associate with this operation. @@ -487,7 +814,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, String /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -503,7 +830,7 @@ public ClusterInner createOrUpdate(String resourceGroupName, String clusterName, /** * Creates or updates an instance of an Event Hubs Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating a eventhub cluster resource. * @param context The context to associate with this operation. @@ -521,7 +848,7 @@ public ClusterInner createOrUpdate(String resourceGroupName, String clusterName, /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -553,17 +880,17 @@ public Mono>> updateWithResponseAsync(String resourceG } else { parameters.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, parameters, context)) + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @param context The context to associate with this operation. @@ -596,17 +923,16 @@ private Mono>> updateWithResponseAsync(String resource } else { parameters.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, contentType, accept, parameters, context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, this.client.getApiVersion(), parameters, accept, context); } /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -625,7 +951,7 @@ public PollerFlux, ClusterInner> beginUpdateAsync(Strin /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @param context The context to associate with this operation. @@ -647,7 +973,7 @@ private PollerFlux, ClusterInner> beginUpdateAsync(Stri /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -664,7 +990,7 @@ public SyncPoller, ClusterInner> beginUpdate(String res /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @param context The context to associate with this operation. @@ -682,7 +1008,7 @@ public SyncPoller, ClusterInner> beginUpdate(String res /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -699,7 +1025,7 @@ public Mono updateAsync(String resourceGroupName, String clusterNa /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @param context The context to associate with this operation. @@ -718,7 +1044,7 @@ private Mono updateAsync(String resourceGroupName, String clusterN /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -734,7 +1060,7 @@ public ClusterInner update(String resourceGroupName, String clusterName, Cluster /** * Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters The properties of the Event Hubs Cluster which should be updated. * @param context The context to associate with this operation. @@ -751,7 +1077,7 @@ public ClusterInner update(String resourceGroupName, String clusterName, Cluster /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -775,222 +1101,26 @@ public Mono>> deleteWithResponseAsync(String resourceG if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName 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, clusterName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the Event Hubs Cluster. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - 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 (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, context); - } - - /** - * Deletes an existing Event Hubs Cluster. This operation is idempotent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the Event Hubs Cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 clusterName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes an existing Event Hubs Cluster. This operation is idempotent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the Event Hubs Cluster. - * @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 clusterName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes an existing Event Hubs Cluster. This operation is idempotent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the Event Hubs Cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 clusterName) { - return this.beginDeleteAsync(resourceGroupName, clusterName).getSyncPoller(); - } - - /** - * Deletes an existing Event Hubs Cluster. This operation is idempotent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the Event Hubs Cluster. - * @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 clusterName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller(); - } - - /** - * Deletes an existing Event Hubs Cluster. This operation is idempotent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the Event Hubs Cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 clusterName) { - return beginDeleteAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes an existing Event Hubs Cluster. This operation is idempotent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the Event Hubs Cluster. - * @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 clusterName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes an existing Event Hubs Cluster. This operation is idempotent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the Event Hubs Cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 clusterName) { - deleteAsync(resourceGroupName, clusterName).block(); - } - - /** - * Deletes an existing Event Hubs Cluster. This operation is idempotent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, Context context) { - deleteAsync(resourceGroupName, clusterName, context).block(); - } - - /** - * Lists the available Event Hubs Clusters within an ARM 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 Cluster list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - 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"; - return FluxUtil - .withContext(context -> 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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists the available Event Hubs Clusters within an ARM 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 Cluster list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -1004,189 +1134,149 @@ private Mono> listByResourceGroupSinglePageAsync(Str return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName 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)); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, this.client.getApiVersion(), accept, context); } /** - * Lists the available Event Hubs Clusters within an ARM resource group. + * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Cluster list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Lists the available Event Hubs Clusters within an ARM resource group. + * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. * @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 Cluster list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Lists the available Event Hubs Clusters within an ARM resource group. + * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Cluster list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName) { + return this.beginDeleteAsync(resourceGroupName, clusterName).getSyncPoller(); } /** - * Lists the available Event Hubs Clusters within an ARM resource group. + * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. * @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 Cluster list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller(); } /** - * Lists the available Event Hubs Clusters within an ARM resource group. + * Deletes an existing Event Hubs Cluster. This operation is idempotent. * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Cluster list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - 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"; - return FluxUtil - .withContext(context -> 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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public Mono deleteAsync(String resourceGroupName, String clusterName) { + return beginDeleteAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Lists the available Event Hubs Clusters within an ARM resource group. + * Deletes an existing Event Hubs Cluster. This operation is idempotent. * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. * @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 Cluster list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @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)); - } - - /** - * Lists the available Event Hubs Clusters within an ARM resource group. - * - * @throws ManagementException 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 Cluster list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + private Mono deleteAsync(String resourceGroupName, String clusterName, Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Lists the available Event Hubs Clusters within an ARM resource group. + * Deletes an existing Event Hubs Cluster. This operation is idempotent. * - * @param context The context to associate with this operation. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Cluster list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the available Event Hubs Clusters within an ARM resource group. - * - * @throws ManagementException 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 Cluster list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName) { + deleteAsync(resourceGroupName, clusterName).block(); } /** - * Lists the available Event Hubs Clusters within an ARM resource group. + * Deletes an existing Event Hubs Cluster. This operation is idempotent. * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. * @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 Cluster list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, Context context) { + deleteAsync(resourceGroupName, clusterName, context).block(); } /** * List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1214,15 +1304,15 @@ public Mono> listNamespacesWithResponseAs } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listNamespaces(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .withContext(context -> service.listNamespaces(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1251,14 +1341,14 @@ private Mono> listNamespacesWithResponseA } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listNamespaces(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); + return service.listNamespaces(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, this.client.getApiVersion(), accept, context); } /** * List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1274,7 +1364,7 @@ public Mono listNamespacesAsync(String resourceGro /** * List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1291,7 +1381,7 @@ public Response listNamespacesWithResponse(String /** * List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1303,95 +1393,6 @@ public EHNamespaceIdListResultInner listNamespaces(String resourceGroupName, Str return listNamespacesWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); } - /** - * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. - * - * @throws ManagementException 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 the List Available Clusters operation along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listAvailableClusterRegionWithResponseAsync() { - 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"; - return FluxUtil - .withContext(context -> service.listAvailableClusterRegion(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. - * - * @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 the List Available Clusters operation along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAvailableClusterRegionWithResponseAsync(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.listAvailableClusterRegion(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); - } - - /** - * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. - * - * @throws ManagementException 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 the List Available Clusters operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listAvailableClusterRegionAsync() { - return listAvailableClusterRegionWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. - * - * @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 the List Available Clusters operation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listAvailableClusterRegionWithResponse(Context context) { - return listAvailableClusterRegionWithResponseAsync(context).block(); - } - - /** - * List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. - * - * @throws ManagementException 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 the List Available Clusters operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AvailableClustersListInner listAvailableClusterRegion() { - return listAvailableClusterRegionWithResponse(Context.NONE).getValue(); - } - /** * Get the next page of items. * @@ -1399,11 +1400,11 @@ public AvailableClustersListInner listAvailableClusterRegion() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Cluster list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of the List Event Hubs Clusters operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1414,7 +1415,7 @@ private Mono> listByResourceGroupNextSinglePageAsync final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -1428,11 +1429,11 @@ private Mono> listByResourceGroupNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Cluster list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of the List Event Hubs Clusters operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1442,7 +1443,7 @@ private Mono> listByResourceGroupNextSinglePageAsync } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, 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)); } @@ -1454,11 +1455,11 @@ private Mono> listByResourceGroupNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Cluster list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of the List Event Hubs Clusters operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1469,7 +1470,7 @@ private Mono> listBySubscriptionNextSinglePageAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> 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)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1483,11 +1484,11 @@ private Mono> listBySubscriptionNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Cluster list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of the List Event Hubs Clusters operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1497,7 +1498,7 @@ private Mono> listBySubscriptionNextSinglePageAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, 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)); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/ConfigurationsClientImpl.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/ConfigurationsClientImpl.java index 63254aae55c6..0db715a57e01 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/ConfigurationsClientImpl.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/ConfigurationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.implementation; @@ -56,33 +56,35 @@ public final class ConfigurationsClientImpl implements ConfigurationsClient { * The interface defining all the services for EventHubManagementClientConfigurations to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "EventHubManagementClientConfigurations") + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") public interface ConfigurationsService { + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/quotaConfiguration/default") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> patch(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> patch(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ClusterQuotaConfigurationPropertiesInner parameters, Context context); + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ClusterQuotaConfigurationPropertiesInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/quotaConfiguration/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** * Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings * not specified in the request body unmodified. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating an Event Hubs Cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -114,10 +116,10 @@ public Mono> patchWithRespons } else { parameters.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.patch(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, parameters, context)) + return FluxUtil + .withContext(context -> service.patch(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -125,7 +127,7 @@ public Mono> patchWithRespons * Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings * not specified in the request body unmodified. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating an Event Hubs Cluster resource. * @param context The context to associate with this operation. @@ -158,18 +160,17 @@ private Mono> patchWithRespon } else { parameters.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.patch(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, contentType, accept, parameters, context); + return service.patch(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + this.client.getApiVersion(), parameters, accept, context); } /** * Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings * not specified in the request body unmodified. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating an Event Hubs Cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -188,7 +189,7 @@ public Mono patchAsync(String resource * Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings * not specified in the request body unmodified. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating an Event Hubs Cluster resource. * @param context The context to associate with this operation. @@ -207,7 +208,7 @@ public Response patchWithResponse(Stri * Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings * not specified in the request body unmodified. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param parameters Parameters for creating an Event Hubs Cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -225,7 +226,7 @@ public ClusterQuotaConfigurationPropertiesInner patch(String resourceGroupName, * Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and settings * imposed on the cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -253,8 +254,8 @@ public Mono> getWithResponseA } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -262,7 +263,7 @@ public Mono> getWithResponseA * Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and settings * imposed on the cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -291,15 +292,15 @@ private Mono> getWithResponse } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, accept, context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + this.client.getApiVersion(), accept, context); } /** * Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and settings * imposed on the cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -316,7 +317,7 @@ public Mono getAsync(String resourceGr * Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and settings * imposed on the cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -335,7 +336,7 @@ public Response getWithResponse(String * Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and settings * imposed on the cluster. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param clusterName The name of the Event Hubs Cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/ConsumerGroupsClientImpl.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/ConsumerGroupsClientImpl.java index d32571cc7ced..bfb237fe0852 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/ConsumerGroupsClientImpl.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/ConsumerGroupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.eventhubs.fluent.ConsumerGroupsClient; import com.azure.resourcemanager.eventhubs.fluent.models.ConsumerGroupInner; -import com.azure.resourcemanager.eventhubs.implementation.models.ConsumerGroupListResult; +import com.azure.resourcemanager.eventhubs.models.ConsumerGroupListResult; import reactor.core.publisher.Mono; /** @@ -62,47 +62,48 @@ public final class ConsumerGroupsClientImpl implements ConsumerGroupsClient { * The interface defining all the services for EventHubManagementClientConsumerGroups to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "EventHubManagementClientConsumerGroups") + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") public interface ConsumerGroupsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("eventHubName") String eventHubName, @PathParam("consumerGroupName") String consumerGroupName, - @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("eventHubName") String eventHubName, @PathParam("consumerGroupName") String consumerGroupName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ConsumerGroupInner parameters, Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") ConsumerGroupInner parameters, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, + @PathParam("eventHubName") String eventHubName, @PathParam("consumerGroupName") String consumerGroupName, @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/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("eventHubName") String eventHubName, @PathParam("consumerGroupName") String consumerGroupName, - Context context); + @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/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByEventHub(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByEventHub(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("eventHubName") String eventHubName, @QueryParam("$skip") Integer skip, + @PathParam("eventHubName") String eventHubName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("$skip") Integer skip, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -110,34 +111,31 @@ Mono> listByEventHub(@HostParam("endpoint") St @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByEventHubNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a description for the specified consumer group. + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. + * @param parameters Parameters supplied to create or update a consumer group 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 description for the specified consumer group along with {@link Response} on successful completion of - * {@link Mono}. + * @return single item in List or Get Consumer group operation along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, - String eventHubName, String consumerGroupName) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String namespaceName, String eventHubName, String consumerGroupName, ConsumerGroupInner 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.")); @@ -152,39 +150,46 @@ public Mono> getWithResponseAsync(String resourceGr return Mono .error(new IllegalArgumentException("Parameter consumerGroupName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, consumerGroupName, - accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, namespaceName, + eventHubName, consumerGroupName, this.client.getApiVersion(), this.client.getSubscriptionId(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a description for the specified consumer group. + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. + * @param parameters Parameters supplied to create or update a consumer group 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 description for the specified consumer group along with {@link Response} on successful completion of - * {@link Mono}. + * @return single item in List or Get Consumer group operation along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, - String eventHubName, String consumerGroupName, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String namespaceName, String eventHubName, String consumerGroupName, ConsumerGroupInner 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.")); @@ -199,94 +204,102 @@ private Mono> getWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter consumerGroupName 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"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, eventHubName, consumerGroupName, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, namespaceName, eventHubName, + consumerGroupName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, + context); } /** - * Gets a description for the specified consumer group. + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. + * @param parameters Parameters supplied to create or update a consumer group 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 description for the specified consumer group on successful completion of {@link Mono}. + * @return single item in List or Get Consumer group operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String namespaceName, String eventHubName, - String consumerGroupName) { - return getWithResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono createOrUpdateAsync(String resourceGroupName, String namespaceName, + String eventHubName, String consumerGroupName, ConsumerGroupInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, + parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a description for the specified consumer group. + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. + * @param parameters Parameters supplied to create or update a consumer group 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 description for the specified consumer group along with {@link Response}. + * @return single item in List or Get Consumer group operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String namespaceName, - String eventHubName, String consumerGroupName, Context context) { - return getWithResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, context).block(); + public Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, + String eventHubName, String consumerGroupName, ConsumerGroupInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, + parameters, context).block(); } /** - * Gets a description for the specified consumer group. + * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. + * @param parameters Parameters supplied to create or update a consumer group 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 description for the specified consumer group. + * @return single item in List or Get Consumer group operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConsumerGroupInner get(String resourceGroupName, String namespaceName, String eventHubName, - String consumerGroupName) { - return getWithResponse(resourceGroupName, namespaceName, eventHubName, consumerGroupName, Context.NONE) - .getValue(); + public ConsumerGroupInner createOrUpdate(String resourceGroupName, String namespaceName, String eventHubName, + String consumerGroupName, ConsumerGroupInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, namespaceName, eventHubName, consumerGroupName, parameters, + Context.NONE).getValue(); } /** - * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * Deletes a consumer group from the specified Event Hub and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. - * @param parameters Parameters supplied to create or update a consumer group 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 single item in List or Get Consumer group operation along with {@link Response} on successful completion - * of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String namespaceName, String eventHubName, String consumerGroupName, ConsumerGroupInner parameters) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String namespaceName, + String eventHubName, String consumerGroupName) { 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.")); @@ -301,47 +314,38 @@ public Mono> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter consumerGroupName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, consumerGroupName, - contentType, accept, parameters, context)) + .withContext( + context -> service.delete(this.client.getEndpoint(), resourceGroupName, namespaceName, eventHubName, + consumerGroupName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * Deletes a consumer group from the specified Event Hub and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. - * @param parameters Parameters supplied to create or update a consumer group 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 single item in List or Get Consumer group operation along with {@link Response} on successful completion - * of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String namespaceName, String eventHubName, String consumerGroupName, ConsumerGroupInner parameters, - Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String namespaceName, + String eventHubName, String consumerGroupName, 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.")); @@ -356,103 +360,91 @@ private Mono> createOrUpdateWithResponseAsync(Strin return Mono .error(new IllegalArgumentException("Parameter consumerGroupName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, consumerGroupName, - contentType, accept, parameters, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, namespaceName, eventHubName, + consumerGroupName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** - * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * Deletes a consumer group from the specified Event Hub and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. - * @param parameters Parameters supplied to create or update a consumer group 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 single item in List or Get Consumer group operation on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String namespaceName, - String eventHubName, String consumerGroupName, ConsumerGroupInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, - parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono deleteAsync(String resourceGroupName, String namespaceName, String eventHubName, + String consumerGroupName) { + return deleteWithResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName) + .flatMap(ignored -> Mono.empty()); } /** - * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * Deletes a consumer group from the specified Event Hub and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. - * @param parameters Parameters supplied to create or update a consumer group 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 single item in List or Get Consumer group operation along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName, - String eventHubName, String consumerGroupName, ConsumerGroupInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, - parameters, context).block(); + public Response deleteWithResponse(String resourceGroupName, String namespaceName, String eventHubName, + String consumerGroupName, Context context) { + return deleteWithResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, context) + .block(); } /** - * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + * Deletes a consumer group from the specified Event Hub and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. - * @param parameters Parameters supplied to create or update a consumer group 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 single item in List or Get Consumer group operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConsumerGroupInner createOrUpdate(String resourceGroupName, String namespaceName, String eventHubName, - String consumerGroupName, ConsumerGroupInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, namespaceName, eventHubName, consumerGroupName, parameters, - Context.NONE).getValue(); + public void delete(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { + deleteWithResponse(resourceGroupName, namespaceName, eventHubName, consumerGroupName, Context.NONE); } /** - * Deletes a consumer group from the specified Event Hub and resource group. + * Gets a description for the specified consumer group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 description for the specified consumer group along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, String namespaceName, + public Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { 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.")); @@ -467,17 +459,22 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono .error(new IllegalArgumentException("Parameter consumerGroupName 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"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, consumerGroupName, - context)) + .withContext( + context -> service.get(this.client.getEndpoint(), resourceGroupName, namespaceName, eventHubName, + consumerGroupName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a consumer group from the specified Event Hub and resource group. + * Gets a description for the specified consumer group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. @@ -485,19 +482,16 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 description for the specified consumer group along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String namespaceName, + private Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName, 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.")); @@ -512,34 +506,39 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono .error(new IllegalArgumentException("Parameter consumerGroupName 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.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, eventHubName, consumerGroupName, context); + return service.get(this.client.getEndpoint(), resourceGroupName, namespaceName, eventHubName, consumerGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** - * Deletes a consumer group from the specified Event Hub and resource group. + * Gets a description for the specified consumer group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 description for the specified consumer group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String namespaceName, String eventHubName, + public Mono getAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { - return deleteWithResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName) - .flatMap(ignored -> Mono.empty()); + return getWithResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Deletes a consumer group from the specified Event Hub and resource group. + * Gets a description for the specified consumer group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. @@ -547,36 +546,38 @@ public Mono deleteAsync(String resourceGroupName, String namespaceName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 a description for the specified consumer group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String namespaceName, String eventHubName, - String consumerGroupName, Context context) { - return deleteWithResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, context) - .block(); + public Response getWithResponse(String resourceGroupName, String namespaceName, + String eventHubName, String consumerGroupName, Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, context).block(); } /** - * Deletes a consumer group from the specified Event Hub and resource group. + * Gets a description for the specified consumer group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param consumerGroupName The consumer group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a description for the specified consumer group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) { - deleteWithResponse(resourceGroupName, namespaceName, eventHubName, consumerGroupName, Context.NONE); + public ConsumerGroupInner get(String resourceGroupName, String namespaceName, String eventHubName, + String consumerGroupName) { + return getWithResponse(resourceGroupName, namespaceName, eventHubName, consumerGroupName, Context.NONE) + .getValue(); } /** * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the * Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains @@ -596,10 +597,6 @@ private Mono> listByEventHubSinglePageAsync(St 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.")); @@ -610,11 +607,14 @@ private Mono> listByEventHubSinglePageAsync(St if (eventHubName == null) { return Mono.error(new IllegalArgumentException("Parameter eventHubName 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"; return FluxUtil - .withContext(context -> service.listByEventHub(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, skip, top, accept, - context)) + .withContext(context -> service.listByEventHub(this.client.getEndpoint(), resourceGroupName, namespaceName, + eventHubName, this.client.getApiVersion(), this.client.getSubscriptionId(), skip, top, 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())); @@ -624,7 +624,7 @@ private Mono> listByEventHubSinglePageAsync(St * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the * Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains @@ -645,10 +645,6 @@ private Mono> listByEventHubSinglePageAsync(St 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.")); @@ -659,11 +655,15 @@ private Mono> listByEventHubSinglePageAsync(St if (eventHubName == null) { return Mono.error(new IllegalArgumentException("Parameter eventHubName 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 - .listByEventHub(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, eventHubName, skip, top, accept, context) + .listByEventHub(this.client.getEndpoint(), resourceGroupName, namespaceName, eventHubName, + this.client.getApiVersion(), this.client.getSubscriptionId(), skip, top, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -672,7 +672,7 @@ private Mono> listByEventHubSinglePageAsync(St * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the * Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains @@ -696,7 +696,7 @@ public PagedFlux listByEventHubAsync(String resourceGroupNam * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the * Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -718,7 +718,7 @@ public PagedFlux listByEventHubAsync(String resourceGroupNam * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the * Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains @@ -743,7 +743,7 @@ private PagedFlux listByEventHubAsync(String resourceGroupNa * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the * Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -763,7 +763,7 @@ public PagedIterable listByEventHub(String resourceGroupName * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the * Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains @@ -790,8 +790,8 @@ public PagedIterable listByEventHub(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 all the consumer groups in a Namespace along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the result to the List Consumer Group operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByEventHubNextSinglePageAsync(String nextLink) { @@ -818,8 +818,8 @@ private Mono> listByEventHubNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 the consumer groups in a Namespace along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the result to the List Consumer Group operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByEventHubNextSinglePageAsync(String nextLink, diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryConfigsClientImpl.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryConfigsClientImpl.java index f7430fe18c5f..21108e421673 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryConfigsClientImpl.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryConfigsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.implementation; @@ -34,8 +34,8 @@ import com.azure.resourcemanager.eventhubs.fluent.models.ArmDisasterRecoveryInner; import com.azure.resourcemanager.eventhubs.fluent.models.AuthorizationRuleInner; import com.azure.resourcemanager.eventhubs.fluent.models.CheckNameAvailabilityResultInner; -import com.azure.resourcemanager.eventhubs.implementation.models.ArmDisasterRecoveryListResult; -import com.azure.resourcemanager.eventhubs.implementation.models.AuthorizationRuleListResult; +import com.azure.resourcemanager.eventhubs.models.ArmDisasterRecoveryListResult; +import com.azure.resourcemanager.eventhubs.models.AuthorizationRuleListResult; import com.azure.resourcemanager.eventhubs.models.CheckNameAvailabilityParameter; import reactor.core.publisher.Mono; @@ -68,108 +68,110 @@ public final class DisasterRecoveryConfigsClientImpl implements DisasterRecovery * The interface defining all the services for EventHubManagementClientDisasterRecoveryConfigs to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "EventHubManagementClientDisasterRecoveryConfigs") + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") public interface DisasterRecoveryConfigsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getAuthorizationRule(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listAuthorizationRules(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("alias") String alias, @PathParam("authorizationRuleName") String authorizationRuleName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("alias") String alias, @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/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAuthorizationRules(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> getAuthorizationRule(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("alias") String alias, @HeaderParam("Accept") String accept, Context context); + @PathParam("alias") String alias, @PathParam("authorizationRuleName") String authorizationRuleName, + @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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listKeys(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("alias") String alias, @PathParam("authorizationRuleName") String authorizationRuleName, + @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.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability(@HostParam("endpoint") String endpoint, + Mono> checkNameAvailability(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") CheckNameAvailabilityParameter parameters, Context context); + @BodyParam("application/json") CheckNameAvailabilityParameter parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("alias") String alias, @HeaderParam("Accept") String accept, Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("alias") String alias, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ArmDisasterRecoveryInner parameters, + @PathParam("alias") String alias, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") ArmDisasterRecoveryInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("alias") String alias, Context context); + @PathParam("alias") String alias, @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/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("alias") String alias, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> breakPairing(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> breakPairing(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("alias") String alias, Context context); + @PathParam("alias") String alias, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> failOver(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> failOver(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("alias") String alias, Context context); + @PathParam("alias") String alias, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listAuthorizationRulesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -177,34 +179,29 @@ Mono> listAuthorizationRulesNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets an AuthorizationRule for a Namespace by rule name. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. - * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an AuthorizationRule for a Namespace by rule name along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of authorization rules for a Namespace along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, - String namespaceName, String alias, String authorizationRuleName) { + private Mono> listAuthorizationRulesSinglePageAsync(String resourceGroupName, + String namespaceName, String alias) { 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.")); @@ -215,43 +212,39 @@ public Mono> getAuthorizationRuleWithResponseAs if (alias == null) { return Mono.error(new IllegalArgumentException("Parameter alias is required and cannot be null.")); } - if (authorizationRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter authorizationRuleName 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"; return FluxUtil - .withContext(context -> service.getAuthorizationRule(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, alias, authorizationRuleName, accept, - context)) + .withContext(context -> service.listAuthorizationRules(this.client.getEndpoint(), resourceGroupName, + namespaceName, alias, 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)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets an AuthorizationRule for a Namespace by rule name. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. - * @param authorizationRuleName The authorization rule name. * @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 an AuthorizationRule for a Namespace by rule name along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of authorization rules for a Namespace along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, - String namespaceName, String alias, String authorizationRuleName, Context context) { + private Mono> listAuthorizationRulesSinglePageAsync(String resourceGroupName, + String namespaceName, String alias, 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.")); @@ -262,98 +255,112 @@ private Mono> getAuthorizationRuleWithResponseA if (alias == null) { return Mono.error(new IllegalArgumentException("Parameter alias is required and cannot be null.")); } - if (authorizationRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter authorizationRuleName 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.getAuthorizationRule(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, alias, authorizationRuleName, accept, - context); + return service + .listAuthorizationRules(this.client.getEndpoint(), resourceGroupName, namespaceName, alias, + 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)); } /** - * Gets an AuthorizationRule for a Namespace by rule name. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. - * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an AuthorizationRule for a Namespace by rule name on successful completion of {@link Mono}. + * @return a list of authorization rules for a Namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, - String alias, String authorizationRuleName) { - return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, alias, authorizationRuleName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAuthorizationRulesAsync(String resourceGroupName, String namespaceName, + String alias) { + return new PagedFlux<>(() -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, alias), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink)); } /** - * Gets an AuthorizationRule for a Namespace by rule name. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. - * @param authorizationRuleName The authorization rule name. * @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 an AuthorizationRule for a Namespace by rule name along with {@link Response}. + * @return a list of authorization rules for a Namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAuthorizationRuleWithResponse(String resourceGroupName, - String namespaceName, String alias, String authorizationRuleName, Context context) { - return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, alias, authorizationRuleName, - context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAuthorizationRulesAsync(String resourceGroupName, + String namespaceName, String alias, Context context) { + return new PagedFlux<>( + () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, alias, context), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink, context)); } /** - * Gets an AuthorizationRule for a Namespace by rule name. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. - * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an AuthorizationRule for a Namespace by rule name. + * @return a list of authorization rules for a Namespace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, String alias, - String authorizationRuleName) { - return getAuthorizationRuleWithResponse(resourceGroupName, namespaceName, alias, authorizationRuleName, - Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, + String alias) { + return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, alias)); } /** * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. + * @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 authorization rules for a Namespace along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a list of authorization rules for a Namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, + String alias, Context context) { + return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, alias, context)); + } + + /** + * Gets an AuthorizationRule for a Namespace by rule name. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an AuthorizationRule for a Namespace by rule name along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAuthorizationRulesSinglePageAsync(String resourceGroupName, - String namespaceName, String alias) { + public Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, + String namespaceName, String alias, String authorizationRuleName) { 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.")); @@ -364,40 +371,43 @@ private Mono> listAuthorizationRulesSingle if (alias == null) { return Mono.error(new IllegalArgumentException("Parameter alias is required and cannot be null.")); } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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"; return FluxUtil - .withContext( - context -> service.listAuthorizationRules(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, alias, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getAuthorizationRule(this.client.getEndpoint(), resourceGroupName, + namespaceName, alias, authorizationRuleName, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of authorization rules for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. * @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 authorization rules for a Namespace along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return an AuthorizationRule for a Namespace by rule name along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAuthorizationRulesSinglePageAsync(String resourceGroupName, - String namespaceName, String alias, Context context) { + private Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, + String namespaceName, String alias, String authorizationRuleName, 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.")); @@ -408,92 +418,82 @@ private Mono> listAuthorizationRulesSingle if (alias == null) { return Mono.error(new IllegalArgumentException("Parameter alias is required and cannot be null.")); } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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 - .listAuthorizationRules(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, alias, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getAuthorizationRule(this.client.getEndpoint(), resourceGroupName, namespaceName, alias, + authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** - * Gets a list of authorization rules for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 authorization rules for a Namespace as paginated response with {@link PagedFlux}. + * @return an AuthorizationRule for a Namespace by rule name on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAuthorizationRulesAsync(String resourceGroupName, String namespaceName, - String alias) { - return new PagedFlux<>(() -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, alias), - nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, + String alias, String authorizationRuleName) { + return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, alias, authorizationRuleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of authorization rules for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. + * @param authorizationRuleName The authorization rule name. * @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 authorization rules for a Namespace as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAuthorizationRulesAsync(String resourceGroupName, - String namespaceName, String alias, Context context) { - return new PagedFlux<>( - () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, alias, context), - nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of authorization rules for a Namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param alias The Disaster Recovery configuration name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 authorization rules for a Namespace as paginated response with {@link PagedIterable}. + * @return an AuthorizationRule for a Namespace by rule name along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, - String alias) { - return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, alias)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAuthorizationRuleWithResponse(String resourceGroupName, + String namespaceName, String alias, String authorizationRuleName, Context context) { + return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, alias, authorizationRuleName, + context).block(); } /** - * Gets a list of authorization rules for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. - * @param context The context to associate with this operation. + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 authorization rules for a Namespace as paginated response with {@link PagedIterable}. + * @return an AuthorizationRule for a Namespace by rule name. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, - String alias, Context context) { - return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, alias, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, String alias, + String authorizationRuleName) { + return getAuthorizationRuleWithResponse(resourceGroupName, namespaceName, alias, authorizationRuleName, + Context.NONE).getValue(); } /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param authorizationRuleName The authorization rule name. @@ -510,10 +510,6 @@ public Mono> listKeysWithResponseAsync(String resource 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.")); @@ -528,18 +524,21 @@ public Mono> listKeysWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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"; return FluxUtil - .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, alias, authorizationRuleName, accept, - context)) + .withContext(context -> service.listKeys(this.client.getEndpoint(), resourceGroupName, namespaceName, alias, + authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param authorizationRuleName The authorization rule name. @@ -557,10 +556,6 @@ private Mono> listKeysWithResponseAsync(String resourc 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.")); @@ -575,16 +570,20 @@ private Mono> listKeysWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, alias, authorizationRuleName, accept, context); + return service.listKeys(this.client.getEndpoint(), resourceGroupName, namespaceName, alias, + authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param authorizationRuleName The authorization rule name. @@ -603,7 +602,7 @@ public Mono listKeysAsync(String resourceGroupName, String name /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param authorizationRuleName The authorization rule name. @@ -623,7 +622,7 @@ public Response listKeysWithResponse(String resourceGroupName, /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param authorizationRuleName The authorization rule name. @@ -642,7 +641,7 @@ public AccessKeysInner listKeys(String resourceGroupName, String namespaceName, /** * Check the give Namespace name availability. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters to check availability of the given Alias name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -674,19 +673,18 @@ public Mono> checkNameAvailabilityWit } else { parameters.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, namespaceName, - contentType, accept, parameters, context)) + .withContext( + context -> service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Check the give Namespace name availability. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters to check availability of the given Alias name. * @param context The context to associate with this operation. @@ -719,18 +717,16 @@ private Mono> checkNameAvailabilityWi } else { parameters.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, parameters, - context); + this.client.getSubscriptionId(), resourceGroupName, namespaceName, parameters, accept, context); } /** * Check the give Namespace name availability. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters to check availability of the given Alias name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -748,7 +744,7 @@ public Mono checkNameAvailabilityAsync(String /** * Check the give Namespace name availability. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters to check availability of the given Alias name. * @param context The context to associate with this operation. @@ -766,7 +762,7 @@ public Response checkNameAvailabilityWithRespo /** * Check the give Namespace name availability. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters to check availability of the given Alias name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -781,28 +777,23 @@ public CheckNameAvailabilityResultInner checkNameAvailability(String resourceGro } /** - * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * Gets all Alias(Disaster Recovery configurations). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return single item in List or Get Alias(Disaster Recovery configuration) operation along with {@link Response} - * on successful completion of {@link Mono}. + * @return all Alias(Disaster Recovery configurations) along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, - String alias) { + private Mono> listSinglePageAsync(String resourceGroupName, + String namespaceName) { 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.")); @@ -810,40 +801,38 @@ public Mono> getWithResponseAsync(String reso if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } - if (alias == null) { - return Mono.error(new IllegalArgumentException("Parameter alias 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, alias, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, namespaceName, + 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)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * Gets all Alias(Disaster Recovery configurations). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param alias The Disaster Recovery configuration name. * @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 single item in List or Get Alias(Disaster Recovery configuration) operation along with {@link Response} - * on successful completion of {@link Mono}. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Alias(Disaster Recovery configurations) along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String namespaceName, String alias, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String namespaceName, 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.")); @@ -851,71 +840,89 @@ private Mono> getWithResponseAsync(String res if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } - if (alias == null) { - return Mono.error(new IllegalArgumentException("Parameter alias 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, alias, accept, context); + return service + .list(this.client.getEndpoint(), resourceGroupName, namespaceName, 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)); } /** - * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * Gets all Alias(Disaster Recovery configurations). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return single item in List or Get Alias(Disaster Recovery configuration) operation on successful completion of - * {@link Mono}. + * @return all Alias(Disaster Recovery configurations) as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String namespaceName, String alias) { - return getWithResponseAsync(resourceGroupName, namespaceName, alias) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String namespaceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, namespaceName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * Gets all Alias(Disaster Recovery configurations). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param alias The Disaster Recovery configuration name. * @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 single item in List or Get Alias(Disaster Recovery configuration) operation along with {@link Response}. + * @return all Alias(Disaster Recovery configurations) as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String namespaceName, - String alias, Context context) { - return getWithResponseAsync(resourceGroupName, namespaceName, alias, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String namespaceName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, namespaceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + * Gets all Alias(Disaster Recovery configurations). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return single item in List or Get Alias(Disaster Recovery configuration) operation. + * @return all Alias(Disaster Recovery configurations) as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ArmDisasterRecoveryInner get(String resourceGroupName, String namespaceName, String alias) { - return getWithResponse(resourceGroupName, namespaceName, alias, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String namespaceName) { + return new PagedIterable<>(listAsync(resourceGroupName, namespaceName)); + } + + /** + * Gets all Alias(Disaster Recovery configurations). + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 all Alias(Disaster Recovery configurations) as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String namespaceName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, namespaceName, context)); } /** * Creates or updates a new Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param parameters Parameters required to create an Alias(Disaster Recovery configuration). @@ -932,10 +939,6 @@ public Mono> createOrUpdateWithResponseAsync( 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.")); @@ -946,24 +949,26 @@ public Mono> createOrUpdateWithResponseAsync( if (alias == null) { return Mono.error(new IllegalArgumentException("Parameter alias 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, alias, contentType, accept, - parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, namespaceName, + alias, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a new Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param parameters Parameters required to create an Alias(Disaster Recovery configuration). @@ -981,10 +986,6 @@ private Mono> createOrUpdateWithResponseAsync 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.")); @@ -995,23 +996,25 @@ private Mono> createOrUpdateWithResponseAsync if (alias == null) { return Mono.error(new IllegalArgumentException("Parameter alias 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, alias, contentType, accept, parameters, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, namespaceName, alias, + this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); } /** * Creates or updates a new Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param parameters Parameters required to create an Alias(Disaster Recovery configuration). @@ -1031,7 +1034,7 @@ public Mono createOrUpdateAsync(String resourceGroupNa /** * Creates or updates a new Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param parameters Parameters required to create an Alias(Disaster Recovery configuration). @@ -1050,7 +1053,7 @@ public Response createOrUpdateWithResponse(String reso /** * Creates or updates a new Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param parameters Parameters required to create an Alias(Disaster Recovery configuration). @@ -1068,7 +1071,7 @@ public ArmDisasterRecoveryInner createOrUpdate(String resourceGroupName, String /** * Deletes an Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1082,10 +1085,6 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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.")); @@ -1096,16 +1095,21 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St if (alias == null) { return Mono.error(new IllegalArgumentException("Parameter alias 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"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, alias, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, namespaceName, alias, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param context The context to associate with this operation. @@ -1121,10 +1125,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -1135,15 +1135,20 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (alias == null) { return Mono.error(new IllegalArgumentException("Parameter alias 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.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, alias, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, namespaceName, alias, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** * Deletes an Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1159,7 +1164,7 @@ public Mono deleteAsync(String resourceGroupName, String namespaceName, St /** * Deletes an Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param context The context to associate with this operation. @@ -1177,7 +1182,7 @@ public Response deleteWithResponse(String resourceGroupName, String namesp /** * Deletes an Alias(Disaster Recovery configuration). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1190,27 +1195,24 @@ public void delete(String resourceGroupName, String namespaceName, String alias) } /** - * Gets all Alias(Disaster Recovery configurations). + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Alias(Disaster Recovery configurations) along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return single item in List or Get Alias(Disaster Recovery configuration) operation along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String namespaceName) { + public Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, + String alias) { 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.")); @@ -1218,38 +1220,40 @@ private Mono> listSinglePageAsync(String if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias 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"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, namespaceName, alias, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets all Alias(Disaster Recovery configurations). + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. * @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 all Alias(Disaster Recovery configurations) along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return single item in List or Get Alias(Disaster Recovery configuration) operation along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String namespaceName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String namespaceName, String alias, 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.")); @@ -1257,85 +1261,75 @@ private Mono> listSinglePageAsync(String if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } + if (alias == null) { + return Mono.error(new IllegalArgumentException("Parameter alias 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(), - resourceGroupName, namespaceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), resourceGroupName, namespaceName, alias, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** - * Gets all Alias(Disaster Recovery configurations). + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Alias(Disaster Recovery configurations) as paginated response with {@link PagedFlux}. + * @return single item in List or Get Alias(Disaster Recovery configuration) operation on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String namespaceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, namespaceName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String namespaceName, String alias) { + return getWithResponseAsync(resourceGroupName, namespaceName, alias) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets all Alias(Disaster Recovery configurations). + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param alias The Disaster Recovery configuration name. * @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 all Alias(Disaster Recovery configurations) as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String namespaceName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, namespaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all Alias(Disaster Recovery configurations). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Alias(Disaster Recovery configurations) as paginated response with {@link PagedIterable}. + * @return single item in List or Get Alias(Disaster Recovery configuration) operation along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String namespaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, namespaceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String namespaceName, + String alias, Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, alias, context).block(); } /** - * Gets all Alias(Disaster Recovery configurations). + * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param context The context to associate with this operation. + * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Alias(Disaster Recovery configurations) as paginated response with {@link PagedIterable}. + * @return single item in List or Get Alias(Disaster Recovery configuration) operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String namespaceName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, namespaceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ArmDisasterRecoveryInner get(String resourceGroupName, String namespaceName, String alias) { + return getWithResponse(resourceGroupName, namespaceName, alias, Context.NONE).getValue(); } /** * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1350,10 +1344,6 @@ public Mono> breakPairingWithResponseAsync(String resourceGroupNa 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.")); @@ -1364,16 +1354,21 @@ public Mono> breakPairingWithResponseAsync(String resourceGroupNa if (alias == null) { return Mono.error(new IllegalArgumentException("Parameter alias 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"; return FluxUtil - .withContext(context -> service.breakPairing(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, alias, context)) + .withContext(context -> service.breakPairing(this.client.getEndpoint(), resourceGroupName, namespaceName, + alias, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param context The context to associate with this operation. @@ -1389,10 +1384,6 @@ private Mono> breakPairingWithResponseAsync(String resourceGroupN 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.")); @@ -1403,15 +1394,20 @@ private Mono> breakPairingWithResponseAsync(String resourceGroupN if (alias == null) { return Mono.error(new IllegalArgumentException("Parameter alias 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.breakPairing(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, alias, context); + return service.breakPairing(this.client.getEndpoint(), resourceGroupName, namespaceName, alias, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1427,7 +1423,7 @@ public Mono breakPairingAsync(String resourceGroupName, String namespaceNa /** * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param context The context to associate with this operation. @@ -1445,7 +1441,7 @@ public Response breakPairingWithResponse(String resourceGroupName, String /** * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1460,7 +1456,7 @@ public void breakPairing(String resourceGroupName, String namespaceName, String /** * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1475,10 +1471,6 @@ public Mono> failOverWithResponseAsync(String resourceGroupName, 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.")); @@ -1489,16 +1481,21 @@ public Mono> failOverWithResponseAsync(String resourceGroupName, if (alias == null) { return Mono.error(new IllegalArgumentException("Parameter alias 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"; return FluxUtil - .withContext(context -> service.failOver(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, alias, context)) + .withContext(context -> service.failOver(this.client.getEndpoint(), resourceGroupName, namespaceName, alias, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param context The context to associate with this operation. @@ -1514,10 +1511,6 @@ private Mono> failOverWithResponseAsync(String resourceGroupName, 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.")); @@ -1528,15 +1521,20 @@ private Mono> failOverWithResponseAsync(String resourceGroupName, if (alias == null) { return Mono.error(new IllegalArgumentException("Parameter alias 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.failOver(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, alias, context); + return service.failOver(this.client.getEndpoint(), resourceGroupName, namespaceName, alias, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1552,7 +1550,7 @@ public Mono failOverAsync(String resourceGroupName, String namespaceName, /** * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @param context The context to associate with this operation. @@ -1570,7 +1568,7 @@ public Response failOverWithResponse(String resourceGroupName, String name /** * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1589,7 +1587,7 @@ public void failOver(String resourceGroupName, String namespaceName, String alia * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 authorization rules for a Namespace along with {@link PagedResponse} on successful completion + * @return the response from the List namespace operation along with {@link PagedResponse} on successful completion * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1618,7 +1616,7 @@ private Mono> listAuthorizationRulesNextSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 authorization rules for a Namespace along with {@link PagedResponse} on successful completion + * @return the response from the List namespace operation along with {@link PagedResponse} on successful completion * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1645,8 +1643,8 @@ private Mono> listAuthorizationRulesNextSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Alias(Disaster Recovery configurations) along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the result of the List Alias(Disaster Recovery configuration) operation along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1672,8 +1670,8 @@ private Mono> listNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Alias(Disaster Recovery configurations) along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the result of the List Alias(Disaster Recovery configuration) operation along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubManagementClientBuilder.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubManagementClientBuilder.java index 945f68a13271..2dfdd5808237 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubManagementClientBuilder.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.implementation; @@ -20,34 +20,36 @@ @ServiceClientBuilder(serviceClients = { EventHubManagementClientImpl.class }) public final class EventHubManagementClientBuilder { /* - * Service host + * Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of + * the URI for every service call. */ - private String endpoint; + private String subscriptionId; /** - * Sets Service host. + * Sets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the EventHubManagementClientBuilder. */ - public EventHubManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public EventHubManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } /* - * The ID of the target subscription. The value must be an UUID. + * server parameter */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets server parameter. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the EventHubManagementClientBuilder. */ - public EventHubManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public EventHubManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } @@ -132,7 +134,7 @@ public EventHubManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); EventHubManagementClientImpl client = new EventHubManagementClientImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); + localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubManagementClientImpl.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubManagementClientImpl.java index 4c6dfd2957a8..8b9f25cc72de 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubManagementClientImpl.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.implementation; @@ -17,6 +17,7 @@ import com.azure.resourcemanager.eventhubs.fluent.EventHubsClient; import com.azure.resourcemanager.eventhubs.fluent.NamespacesClient; import com.azure.resourcemanager.eventhubs.fluent.NetworkSecurityPerimeterConfigurationsClient; +import com.azure.resourcemanager.eventhubs.fluent.NetworkSecurityPerimeterConfigurationsOperationsClient; import com.azure.resourcemanager.eventhubs.fluent.OperationsClient; import com.azure.resourcemanager.eventhubs.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.eventhubs.fluent.PrivateLinkResourcesClient; @@ -30,45 +31,47 @@ @ServiceClient(builder = EventHubManagementClientBuilder.class) public final class EventHubManagementClientImpl extends AzureServiceClient implements EventHubManagementClient { /** - * Service host. + * Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of + * the URI for every service call. */ - private final String endpoint; + private final String subscriptionId; /** - * Gets Service host. + * Gets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. * - * @return the endpoint value. + * @return the subscriptionId value. */ - public String getEndpoint() { - return this.endpoint; + public String getSubscriptionId() { + return this.subscriptionId; } /** - * Version parameter. + * server parameter. */ - private final String apiVersion; + private final String endpoint; /** - * Gets Version parameter. + * Gets server parameter. * - * @return the apiVersion value. + * @return the endpoint value. */ - public String getApiVersion() { - return this.apiVersion; + public String getEndpoint() { + return this.endpoint; } /** - * The ID of the target subscription. The value must be an UUID. + * Api Version. */ - private final String subscriptionId; + private final String apiVersion; /** - * Gets The ID of the target subscription. The value must be an UUID. + * Gets Api Version. * - * @return the subscriptionId value. + * @return the apiVersion value. */ - public String getSubscriptionId() { - return this.subscriptionId; + public String getApiVersion() { + return this.apiVersion; } /** @@ -113,20 +116,6 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - /** * The ClustersClient object to access its operations. */ @@ -142,45 +131,45 @@ public ClustersClient getClusters() { } /** - * The DisasterRecoveryConfigsClient object to access its operations. + * The NamespacesClient object to access its operations. */ - private final DisasterRecoveryConfigsClient disasterRecoveryConfigs; + private final NamespacesClient namespaces; /** - * Gets the DisasterRecoveryConfigsClient object to access its operations. + * Gets the NamespacesClient object to access its operations. * - * @return the DisasterRecoveryConfigsClient object. + * @return the NamespacesClient object. */ - public DisasterRecoveryConfigsClient getDisasterRecoveryConfigs() { - return this.disasterRecoveryConfigs; + public NamespacesClient getNamespaces() { + return this.namespaces; } /** - * The EventHubsClient object to access its operations. + * The PrivateEndpointConnectionsClient object to access its operations. */ - private final EventHubsClient eventHubs; + private final PrivateEndpointConnectionsClient privateEndpointConnections; /** - * Gets the EventHubsClient object to access its operations. + * Gets the PrivateEndpointConnectionsClient object to access its operations. * - * @return the EventHubsClient object. + * @return the PrivateEndpointConnectionsClient object. */ - public EventHubsClient getEventHubs() { - return this.eventHubs; + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; } /** - * The PrivateEndpointConnectionsClient object to access its operations. + * The PrivateLinkResourcesClient object to access its operations. */ - private final PrivateEndpointConnectionsClient privateEndpointConnections; + private final PrivateLinkResourcesClient privateLinkResources; /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. + * Gets the PrivateLinkResourcesClient object to access its operations. * - * @return the PrivateEndpointConnectionsClient object. + * @return the PrivateLinkResourcesClient object. */ - public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { - return this.privateEndpointConnections; + public PrivateLinkResourcesClient getPrivateLinkResources() { + return this.privateLinkResources; } /** @@ -198,17 +187,18 @@ public NetworkSecurityPerimeterConfigurationsClient getNetworkSecurityPerimeterC } /** - * The ConsumerGroupsClient object to access its operations. + * The NetworkSecurityPerimeterConfigurationsOperationsClient object to access its operations. */ - private final ConsumerGroupsClient consumerGroups; + private final NetworkSecurityPerimeterConfigurationsOperationsClient networkSecurityPerimeterConfigurationsOperations; /** - * Gets the ConsumerGroupsClient object to access its operations. + * Gets the NetworkSecurityPerimeterConfigurationsOperationsClient object to access its operations. * - * @return the ConsumerGroupsClient object. + * @return the NetworkSecurityPerimeterConfigurationsOperationsClient object. */ - public ConsumerGroupsClient getConsumerGroups() { - return this.consumerGroups; + public NetworkSecurityPerimeterConfigurationsOperationsClient + getNetworkSecurityPerimeterConfigurationsOperations() { + return this.networkSecurityPerimeterConfigurationsOperations; } /** @@ -226,31 +216,59 @@ public ConfigurationsClient getConfigurations() { } /** - * The NamespacesClient object to access its operations. + * The DisasterRecoveryConfigsClient object to access its operations. */ - private final NamespacesClient namespaces; + private final DisasterRecoveryConfigsClient disasterRecoveryConfigs; /** - * Gets the NamespacesClient object to access its operations. + * Gets the DisasterRecoveryConfigsClient object to access its operations. * - * @return the NamespacesClient object. + * @return the DisasterRecoveryConfigsClient object. */ - public NamespacesClient getNamespaces() { - return this.namespaces; + public DisasterRecoveryConfigsClient getDisasterRecoveryConfigs() { + return this.disasterRecoveryConfigs; } /** - * The PrivateLinkResourcesClient object to access its operations. + * The EventHubsClient object to access its operations. */ - private final PrivateLinkResourcesClient privateLinkResources; + private final EventHubsClient eventHubs; /** - * Gets the PrivateLinkResourcesClient object to access its operations. + * Gets the EventHubsClient object to access its operations. * - * @return the PrivateLinkResourcesClient object. + * @return the EventHubsClient object. */ - public PrivateLinkResourcesClient getPrivateLinkResources() { - return this.privateLinkResources; + public EventHubsClient getEventHubs() { + return this.eventHubs; + } + + /** + * The ConsumerGroupsClient object to access its operations. + */ + private final ConsumerGroupsClient consumerGroups; + + /** + * Gets the ConsumerGroupsClient object to access its operations. + * + * @return the ConsumerGroupsClient object. + */ + public ConsumerGroupsClient getConsumerGroups() { + return this.consumerGroups; + } + + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; } /** @@ -288,28 +306,31 @@ public ApplicationGroupsClient getApplicationGroups() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param endpoint Service host. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. + * @param subscriptionId Subscription credentials that uniquely identify a Microsoft Azure subscription. The + * subscription ID forms part of the URI for every service call. + * @param endpoint server parameter. */ EventHubManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { super(httpPipeline, serializerAdapter, environment); this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2025-05-01-preview"; - this.operations = new OperationsClientImpl(this); + this.endpoint = endpoint; + this.apiVersion = "2024-01-01"; this.clusters = new ClustersClientImpl(this); - this.disasterRecoveryConfigs = new DisasterRecoveryConfigsClientImpl(this); - this.eventHubs = new EventHubsClientImpl(this); + this.namespaces = new NamespacesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.networkSecurityPerimeterConfigurations = new NetworkSecurityPerimeterConfigurationsClientImpl(this); - this.consumerGroups = new ConsumerGroupsClientImpl(this); + this.networkSecurityPerimeterConfigurationsOperations + = new NetworkSecurityPerimeterConfigurationsOperationsClientImpl(this); this.configurations = new ConfigurationsClientImpl(this); - this.namespaces = new NamespacesClientImpl(this); - this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); + this.disasterRecoveryConfigs = new DisasterRecoveryConfigsClientImpl(this); + this.eventHubs = new EventHubsClientImpl(this); + this.consumerGroups = new ConsumerGroupsClientImpl(this); + this.operations = new OperationsClientImpl(this); this.schemaRegistries = new SchemaRegistriesClientImpl(this); this.applicationGroups = new ApplicationGroupsClientImpl(this); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespaceImpl.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespaceImpl.java index e0e9e6879a7b..b8a483fb0f9c 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespaceImpl.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubNamespaceImpl.java @@ -257,11 +257,6 @@ public boolean zoneRedundant() { return ResourceManagerUtils.toPrimitiveBoolean(this.innerModel().zoneRedundant()); } - @Override - public boolean localAuthDisabled() { - return ResourceManagerUtils.toPrimitiveBoolean(this.innerModel().disableLocalAuth()); - } - @Override protected Mono getInnerAsync() { return this.manager() @@ -294,16 +289,4 @@ public EventHubNamespaceImpl enableZoneRedundant() { this.innerModel().withZoneRedundant(true); return this; } - - @Override - public EventHubNamespaceImpl disableLocalAuth() { - this.innerModel().withDisableLocalAuth(true); - return this; - } - - @Override - public EventHubNamespaceImpl enableLocalAuth() { - this.innerModel().withDisableLocalAuth(false); - return this; - } } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubsClientImpl.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubsClientImpl.java index 68b81b2e3743..8834aabb1787 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubsClientImpl.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.implementation; @@ -33,8 +33,8 @@ import com.azure.resourcemanager.eventhubs.fluent.models.AccessKeysInner; import com.azure.resourcemanager.eventhubs.fluent.models.AuthorizationRuleInner; import com.azure.resourcemanager.eventhubs.fluent.models.EventhubInner; -import com.azure.resourcemanager.eventhubs.implementation.models.AuthorizationRuleListResult; -import com.azure.resourcemanager.eventhubs.implementation.models.EventHubListResult; +import com.azure.resourcemanager.eventhubs.models.AuthorizationRuleListResult; +import com.azure.resourcemanager.eventhubs.models.EventHubListResult; import com.azure.resourcemanager.eventhubs.models.RegenerateAccessKeyParameters; import reactor.core.publisher.Mono; @@ -67,116 +67,119 @@ public final class EventHubsClientImpl implements EventHubsClient { * The interface defining all the services for EventHubManagementClientEventHubs to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "EventHubManagementClientEventHubs") + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") public interface EventHubsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getAuthorizationRule(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listAuthorizationRules(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("eventHubName") String eventHubName, - @PathParam("authorizationRuleName") String authorizationRuleName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("eventHubName") String eventHubName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdateAuthorizationRule(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdateAuthorizationRule(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("eventHubName") String eventHubName, @PathParam("authorizationRuleName") String authorizationRuleName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") AuthorizationRuleInner parameters, Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") AuthorizationRuleInner parameters, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}") - @ExpectedResponses({ 200, 204 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> deleteAuthorizationRule(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> getAuthorizationRule(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("eventHubName") String eventHubName, - @PathParam("authorizationRuleName") String authorizationRuleName, Context context); + @PathParam("authorizationRuleName") String authorizationRuleName, + @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/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules") - @ExpectedResponses({ 200 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAuthorizationRules(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> deleteAuthorizationRule(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("eventHubName") String eventHubName, @HeaderParam("Accept") String accept, Context context); + @PathParam("eventHubName") String eventHubName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listKeys(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("eventHubName") String eventHubName, - @PathParam("authorizationRuleName") String authorizationRuleName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("authorizationRuleName") String authorizationRuleName, + @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.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> regenerateKeys(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> regenerateKeys(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("eventHubName") String eventHubName, @PathParam("authorizationRuleName") String authorizationRuleName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") RegenerateAccessKeyParameters parameters, Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") RegenerateAccessKeyParameters parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByNamespace(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("eventHubName") String eventHubName, @HeaderParam("Accept") String accept, Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$skip") Integer skip, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("eventHubName") String eventHubName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") EventhubInner parameters, - Context context); + @PathParam("eventHubName") String eventHubName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @BodyParam("application/json") EventhubInner parameters, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("eventHubName") String eventHubName, Context context); + @PathParam("eventHubName") String eventHubName, @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/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNamespace(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("$skip") Integer skip, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + @PathParam("eventHubName") String eventHubName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listAuthorizationRulesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -184,34 +187,29 @@ Mono> listAuthorizationRulesNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByNamespaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets an AuthorizationRule for an Event Hub by rule name. + * Gets the authorization rules for an Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. - * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an AuthorizationRule for an Event Hub by rule name along with {@link Response} on successful completion - * of {@link Mono}. + * @return the authorization rules for an Event Hub along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, - String namespaceName, String eventHubName, String authorizationRuleName) { + private Mono> listAuthorizationRulesSinglePageAsync(String resourceGroupName, + String namespaceName, String eventHubName) { 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.")); @@ -222,43 +220,40 @@ public Mono> getAuthorizationRuleWithResponseAs if (eventHubName == null) { return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); } - if (authorizationRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter authorizationRuleName 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"; return FluxUtil - .withContext(context -> service.getAuthorizationRule(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, authorizationRuleName, - accept, context)) + .withContext( + context -> service.listAuthorizationRules(this.client.getEndpoint(), resourceGroupName, namespaceName, + eventHubName, 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)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets an AuthorizationRule for an Event Hub by rule name. + * Gets the authorization rules for an Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. - * @param authorizationRuleName The authorization rule name. * @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 an AuthorizationRule for an Event Hub by rule name along with {@link Response} on successful completion - * of {@link Mono}. + * @return the authorization rules for an Event Hub along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, - String namespaceName, String eventHubName, String authorizationRuleName, Context context) { + private Mono> listAuthorizationRulesSinglePageAsync(String resourceGroupName, + String namespaceName, String eventHubName, 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.")); @@ -269,80 +264,99 @@ private Mono> getAuthorizationRuleWithResponseA if (eventHubName == null) { return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); } - if (authorizationRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter authorizationRuleName 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.getAuthorizationRule(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, authorizationRuleName, - accept, context); + return service + .listAuthorizationRules(this.client.getEndpoint(), resourceGroupName, namespaceName, eventHubName, + 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)); } /** - * Gets an AuthorizationRule for an Event Hub by rule name. + * Gets the authorization rules for an Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. - * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an AuthorizationRule for an Event Hub by rule name on successful completion of {@link Mono}. + * @return the authorization rules for an Event Hub as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, - String eventHubName, String authorizationRuleName) { - return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, eventHubName, - authorizationRuleName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAuthorizationRulesAsync(String resourceGroupName, String namespaceName, + String eventHubName) { + return new PagedFlux<>( + () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, eventHubName), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink)); } /** - * Gets an AuthorizationRule for an Event Hub by rule name. + * Gets the authorization rules for an Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. - * @param authorizationRuleName The authorization rule name. * @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 an AuthorizationRule for an Event Hub by rule name along with {@link Response}. + * @return the authorization rules for an Event Hub as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAuthorizationRuleWithResponse(String resourceGroupName, - String namespaceName, String eventHubName, String authorizationRuleName, Context context) { - return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, eventHubName, - authorizationRuleName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAuthorizationRulesAsync(String resourceGroupName, + String namespaceName, String eventHubName, Context context) { + return new PagedFlux<>( + () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, eventHubName, context), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink, context)); } /** - * Gets an AuthorizationRule for an Event Hub by rule name. + * Gets the authorization rules for an Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. - * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an AuthorizationRule for an Event Hub by rule name. + * @return the authorization rules for an Event Hub as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, - String eventHubName, String authorizationRuleName) { - return getAuthorizationRuleWithResponse(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, - Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, + String eventHubName) { + return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, eventHubName)); + } + + /** + * Gets the authorization rules for an Event Hub. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. + * @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 authorization rules for an Event Hub as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, + String eventHubName, Context context) { + return new PagedIterable<>( + listAuthorizationRulesAsync(resourceGroupName, namespaceName, eventHubName, context)); } /** * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule * will take a few seconds to take effect. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -361,10 +375,6 @@ public Mono> createOrUpdateAuthorizationRuleWit 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.")); @@ -379,17 +389,20 @@ public Mono> createOrUpdateAuthorizationRuleWit return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdateAuthorizationRule(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, namespaceName, - eventHubName, authorizationRuleName, contentType, accept, parameters, context)) + resourceGroupName, namespaceName, eventHubName, authorizationRuleName, this.client.getApiVersion(), + this.client.getSubscriptionId(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -397,7 +410,7 @@ public Mono> createOrUpdateAuthorizationRuleWit * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule * will take a few seconds to take effect. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -417,10 +430,6 @@ private Mono> createOrUpdateAuthorizationRuleWi 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.")); @@ -435,24 +444,27 @@ private Mono> createOrUpdateAuthorizationRuleWi return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdateAuthorizationRule(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, authorizationRuleName, - contentType, accept, parameters, context); + return service.createOrUpdateAuthorizationRule(this.client.getEndpoint(), resourceGroupName, namespaceName, + eventHubName, authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), + parameters, accept, context); } /** * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule * will take a few seconds to take effect. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -473,7 +485,7 @@ public Mono createOrUpdateAuthorizationRuleAsync(String * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule * will take a few seconds to take effect. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -496,7 +508,7 @@ public Response createOrUpdateAuthorizationRuleWithRespo * Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule * will take a few seconds to take effect. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -514,28 +526,25 @@ public AuthorizationRuleInner createOrUpdateAuthorizationRule(String resourceGro } /** - * Deletes an Event Hub AuthorizationRule. + * Gets an AuthorizationRule for an Event Hub by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an AuthorizationRule for an Event Hub by rule name along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteAuthorizationRuleWithResponseAsync(String resourceGroupName, String namespaceName, - String eventHubName, String authorizationRuleName) { + public Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, + String namespaceName, String eventHubName, String authorizationRuleName) { 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.")); @@ -550,17 +559,22 @@ public Mono> deleteAuthorizationRuleWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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"; return FluxUtil - .withContext(context -> service.deleteAuthorizationRule(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, namespaceName, - eventHubName, authorizationRuleName, context)) + .withContext(context -> service.getAuthorizationRule(this.client.getEndpoint(), resourceGroupName, + namespaceName, eventHubName, authorizationRuleName, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes an Event Hub AuthorizationRule. + * Gets an AuthorizationRule for an Event Hub by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -568,19 +582,16 @@ public Mono> deleteAuthorizationRuleWithResponseAsync(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 the {@link Response} on successful completion of {@link Mono}. + * @return an AuthorizationRule for an Event Hub by rule name along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteAuthorizationRuleWithResponseAsync(String resourceGroupName, + private Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName, 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.")); @@ -595,35 +606,39 @@ private Mono> deleteAuthorizationRuleWithResponseAsync(String res return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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.deleteAuthorizationRule(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, authorizationRuleName, - context); + return service.getAuthorizationRule(this.client.getEndpoint(), resourceGroupName, namespaceName, eventHubName, + authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** - * Deletes an Event Hub AuthorizationRule. + * Gets an AuthorizationRule for an Event Hub by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an AuthorizationRule for an Event Hub by rule name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, - String authorizationRuleName) { - return deleteAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, eventHubName, - authorizationRuleName).flatMap(ignored -> Mono.empty()); + public Mono getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, + String eventHubName, String authorizationRuleName) { + return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, eventHubName, + authorizationRuleName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Deletes an Event Hub AuthorizationRule. + * Gets an AuthorizationRule for an Event Hub by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -631,56 +646,53 @@ public Mono deleteAuthorizationRuleAsync(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 the {@link Response}. + * @return an AuthorizationRule for an Event Hub by rule name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteAuthorizationRuleWithResponse(String resourceGroupName, String namespaceName, - String eventHubName, String authorizationRuleName, Context context) { - return deleteAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, eventHubName, + public Response getAuthorizationRuleWithResponse(String resourceGroupName, + String namespaceName, String eventHubName, String authorizationRuleName, Context context) { + return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, context).block(); } /** - * Deletes an Event Hub AuthorizationRule. + * Gets an AuthorizationRule for an Event Hub by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an AuthorizationRule for an Event Hub by rule name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String eventHubName, - String authorizationRuleName) { - deleteAuthorizationRuleWithResponse(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, - Context.NONE); + public AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, + String eventHubName, String authorizationRuleName) { + return getAuthorizationRuleWithResponse(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, + Context.NONE).getValue(); } /** - * Gets the authorization rules for an Event Hub. + * Deletes an Event Hub AuthorizationRule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the authorization rules for an Event Hub 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> listAuthorizationRulesSinglePageAsync(String resourceGroupName, - String namespaceName, String eventHubName) { + public Mono> deleteAuthorizationRuleWithResponseAsync(String resourceGroupName, String namespaceName, + String eventHubName, String authorizationRuleName) { 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.")); @@ -691,40 +703,42 @@ private Mono> listAuthorizationRulesSingle if (eventHubName == null) { return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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"; return FluxUtil - .withContext( - context -> service.listAuthorizationRules(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.deleteAuthorizationRule(this.client.getEndpoint(), resourceGroupName, + namespaceName, eventHubName, authorizationRuleName, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the authorization rules for an Event Hub. + * Deletes an Event Hub AuthorizationRule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. * @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 authorization rules for an Event Hub 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> listAuthorizationRulesSinglePageAsync(String resourceGroupName, - String namespaceName, String eventHubName, Context context) { + private Mono> deleteAuthorizationRuleWithResponseAsync(String resourceGroupName, + String namespaceName, String eventHubName, String authorizationRuleName, 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.")); @@ -735,94 +749,82 @@ private Mono> listAuthorizationRulesSingle if (eventHubName == null) { return Mono.error(new IllegalArgumentException("Parameter eventHubName is required and cannot be null.")); } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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 - .listAuthorizationRules(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.deleteAuthorizationRule(this.client.getEndpoint(), resourceGroupName, namespaceName, + eventHubName, authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context); } /** - * Gets the authorization rules for an Event Hub. + * Deletes an Event Hub AuthorizationRule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the authorization rules for an Event Hub as paginated response with {@link PagedFlux}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAuthorizationRulesAsync(String resourceGroupName, String namespaceName, - String eventHubName) { - return new PagedFlux<>( - () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, eventHubName), - nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, + String authorizationRuleName) { + return deleteAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, eventHubName, + authorizationRuleName).flatMap(ignored -> Mono.empty()); } /** - * Gets the authorization rules for an Event Hub. + * Deletes an Event Hub AuthorizationRule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. + * @param authorizationRuleName The authorization rule name. * @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 authorization rules for an Event Hub as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAuthorizationRulesAsync(String resourceGroupName, - String namespaceName, String eventHubName, Context context) { - return new PagedFlux<>( - () -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, eventHubName, context), - nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the authorization rules for an Event Hub. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param eventHubName The Event Hub name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the authorization rules for an Event Hub as paginated response with {@link PagedIterable}. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, - String eventHubName) { - return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, eventHubName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteAuthorizationRuleWithResponse(String resourceGroupName, String namespaceName, + String eventHubName, String authorizationRuleName, Context context) { + return deleteAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, eventHubName, + authorizationRuleName, context).block(); } /** - * Gets the authorization rules for an Event Hub. + * Deletes an Event Hub AuthorizationRule. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. - * @param context The context to associate with this operation. + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the authorization rules for an Event Hub as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, - String eventHubName, Context context) { - return new PagedIterable<>( - listAuthorizationRulesAsync(resourceGroupName, namespaceName, eventHubName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String eventHubName, + String authorizationRuleName) { + deleteAuthorizationRuleWithResponse(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, + Context.NONE); } /** * Gets the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -839,10 +841,6 @@ public Mono> listKeysWithResponseAsync(String resource 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.")); @@ -857,10 +855,14 @@ public Mono> listKeysWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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"; return FluxUtil - .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, authorizationRuleName, + .withContext(context -> service.listKeys(this.client.getEndpoint(), resourceGroupName, namespaceName, + eventHubName, authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -868,7 +870,7 @@ public Mono> listKeysWithResponseAsync(String resource /** * Gets the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -886,10 +888,6 @@ private Mono> listKeysWithResponseAsync(String resourc 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.")); @@ -904,16 +902,20 @@ private Mono> listKeysWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, eventHubName, authorizationRuleName, accept, context); + return service.listKeys(this.client.getEndpoint(), resourceGroupName, namespaceName, eventHubName, + authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** * Gets the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -932,7 +934,7 @@ public Mono listKeysAsync(String resourceGroupName, String name /** * Gets the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -952,7 +954,7 @@ public Response listKeysWithResponse(String resourceGroupName, /** * Gets the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -971,7 +973,7 @@ public AccessKeysInner listKeys(String resourceGroupName, String namespaceName, /** * Regenerates the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -990,10 +992,6 @@ public Mono> regenerateKeysWithResponseAsync(String re 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.")); @@ -1008,24 +1006,27 @@ public Mono> regenerateKeysWithResponseAsync(String re return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.regenerateKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, authorizationRuleName, - contentType, accept, parameters, context)) + .withContext(context -> service.regenerateKeys(this.client.getEndpoint(), resourceGroupName, namespaceName, + eventHubName, authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Regenerates the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -1045,10 +1046,6 @@ private Mono> regenerateKeysWithResponseAsync(String r 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.")); @@ -1063,23 +1060,26 @@ private Mono> regenerateKeysWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.regenerateKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, authorizationRuleName, - contentType, accept, parameters, context); + return service.regenerateKeys(this.client.getEndpoint(), resourceGroupName, namespaceName, eventHubName, + authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, + context); } /** * Regenerates the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -1099,7 +1099,7 @@ public Mono regenerateKeysAsync(String resourceGroupName, Strin /** * Regenerates the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -1120,7 +1120,7 @@ public Response regenerateKeysWithResponse(String resourceGroup /** * Regenerates the ACS and SAS connection strings for the Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param authorizationRuleName The authorization rule name. @@ -1138,28 +1138,27 @@ public AccessKeysInner regenerateKeys(String resourceGroupName, String namespace } /** - * Gets an Event Hubs description for the specified Event Hub. + * Gets all the Event Hubs in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param eventHubName The Event Hub name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Event Hubs description for the specified Event Hub along with {@link Response} on successful - * completion of {@link Mono}. + * @return all the Event Hubs in a Namespace along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, - String eventHubName) { + private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, + String namespaceName, Integer skip, Integer top) { 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.")); @@ -1167,40 +1166,42 @@ public Mono> getWithResponseAsync(String resourceGroupNa if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } - if (eventHubName == null) { - return Mono.error(new IllegalArgumentException("Parameter eventHubName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, accept, context)) + .withContext(context -> service.listByNamespace(this.client.getEndpoint(), resourceGroupName, namespaceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), skip, top, 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 an Event Hubs description for the specified Event Hub. + * Gets all the Event Hubs in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param eventHubName The Event Hub name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. * @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 an Event Hubs description for the specified Event Hub along with {@link Response} on successful - * completion of {@link Mono}. + * @return all the Event Hubs in a Namespace along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, - String eventHubName, Context context) { + private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, + String namespaceName, Integer skip, Integer top, 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.")); @@ -1208,70 +1209,123 @@ private Mono> getWithResponseAsync(String resourceGroupN if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } - if (eventHubName == null) { - return Mono.error(new IllegalArgumentException("Parameter eventHubName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, eventHubName, accept, context); + return service + .listByNamespace(this.client.getEndpoint(), resourceGroupName, namespaceName, this.client.getApiVersion(), + this.client.getSubscriptionId(), skip, top, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 the Event Hubs in a Namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, Integer skip, + Integer top) { + return new PagedFlux<>(() -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); } /** - * Gets an Event Hubs description for the specified Event Hub. + * Gets all the Event Hubs in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Event Hubs description for the specified Event Hub on successful completion of {@link Mono}. + * @return all the Event Hubs in a Namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String namespaceName, String eventHubName) { - return getWithResponseAsync(resourceGroupName, namespaceName, eventHubName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { + final Integer skip = null; + final Integer top = null; + return new PagedFlux<>(() -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); } /** - * Gets an Event Hubs description for the specified Event Hub. + * Gets all the Event Hubs in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param eventHubName The Event Hub name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. * @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 an Event Hubs description for the specified Event Hub along with {@link Response}. + * @return all the Event Hubs in a Namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String namespaceName, String eventHubName, - Context context) { - return getWithResponseAsync(resourceGroupName, namespaceName, eventHubName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, Integer skip, + Integer top, Context context) { + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top, context), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink, context)); } /** - * Gets an Event Hubs description for the specified Event Hub. + * Gets all the Event Hubs in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Event Hubs description for the specified Event Hub. + * @return all the Event Hubs in a Namespace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EventhubInner get(String resourceGroupName, String namespaceName, String eventHubName) { - return getWithResponse(resourceGroupName, namespaceName, eventHubName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + final Integer skip = null; + final Integer top = null; + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, skip, top)); + } + + /** + * Gets all the Event Hubs in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 all the Event Hubs in a Namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, Integer skip, + Integer top, Context context) { + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, skip, top, context)); } /** * Creates or updates a new Event Hub as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -1288,10 +1342,6 @@ public Mono> createOrUpdateWithResponseAsync(String reso 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.")); @@ -1302,24 +1352,27 @@ public Mono> createOrUpdateWithResponseAsync(String reso if (eventHubName == null) { return Mono.error(new IllegalArgumentException("Parameter eventHubName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, contentType, accept, - parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, namespaceName, + eventHubName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a new Event Hub as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -1337,10 +1390,6 @@ private Mono> createOrUpdateWithResponseAsync(String res 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.")); @@ -1351,23 +1400,25 @@ private Mono> createOrUpdateWithResponseAsync(String res if (eventHubName == null) { return Mono.error(new IllegalArgumentException("Parameter eventHubName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, namespaceName, eventHubName, + this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); } /** * Creates or updates a new Event Hub as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -1386,7 +1437,7 @@ public Mono createOrUpdateAsync(String resourceGroupName, String /** * Creates or updates a new Event Hub as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -1406,7 +1457,7 @@ public Response createOrUpdateWithResponse(String resourceGroupNa /** * Creates or updates a new Event Hub as a nested resource within a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -1425,7 +1476,7 @@ public EventhubInner createOrUpdate(String resourceGroupName, String namespaceNa /** * Deletes an Event Hub from the specified Namespace and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1440,10 +1491,6 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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.")); @@ -1454,16 +1501,21 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St if (eventHubName == null) { return Mono.error(new IllegalArgumentException("Parameter eventHubName 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"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, eventHubName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, namespaceName, + eventHubName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an Event Hub from the specified Namespace and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param context The context to associate with this operation. @@ -1479,10 +1531,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -1493,15 +1541,20 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (eventHubName == null) { return Mono.error(new IllegalArgumentException("Parameter eventHubName 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.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, eventHubName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, namespaceName, eventHubName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** * Deletes an Event Hub from the specified Namespace and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1517,7 +1570,7 @@ public Mono deleteAsync(String resourceGroupName, String namespaceName, St /** * Deletes an Event Hub from the specified Namespace and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @param context The context to associate with this operation. @@ -1535,7 +1588,7 @@ public Response deleteWithResponse(String resourceGroupName, String namesp /** * Deletes an Event Hub from the specified Namespace and resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1548,31 +1601,24 @@ public void delete(String resourceGroupName, String namespaceName, String eventH } /** - * Gets all the Event Hubs in a Namespace. + * Gets an Event Hubs description for the specified Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains - * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting - * point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. + * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 the Event Hubs in a Namespace along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return an Event Hubs description for the specified Event Hub along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, - String namespaceName, Integer skip, Integer top) { + public Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, + String eventHubName) { 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.")); @@ -1580,42 +1626,40 @@ private Mono> listByNamespaceSinglePageAsync(String if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName 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"; return FluxUtil - .withContext(context -> service.listByNamespace(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, skip, top, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, namespaceName, + eventHubName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets all the Event Hubs in a Namespace. + * Gets an Event Hubs description for the specified Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains - * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting - * point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. + * @param eventHubName The Event Hub name. * @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 all the Event Hubs in a Namespace along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return an Event Hubs description for the specified Event Hub along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, - String namespaceName, Integer skip, Integer top, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, + String eventHubName, 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.")); @@ -1623,113 +1667,68 @@ private Mono> listByNamespaceSinglePageAsync(String if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } + if (eventHubName == null) { + return Mono.error(new IllegalArgumentException("Parameter eventHubName 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 - .listByNamespace(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, skip, top, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets all the Event Hubs in a Namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains - * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting - * point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 the Event Hubs in a Namespace as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, Integer skip, - Integer top) { - return new PagedFlux<>(() -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top), - nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + return service.get(this.client.getEndpoint(), resourceGroupName, namespaceName, eventHubName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** - * Gets all the Event Hubs in a Namespace. + * Gets an Event Hubs description for the specified Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 the Event Hubs in a Namespace as paginated response with {@link PagedFlux}. + * @return an Event Hubs description for the specified Event Hub on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { - final Integer skip = null; - final Integer top = null; - return new PagedFlux<>(() -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top), - nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String namespaceName, String eventHubName) { + return getWithResponseAsync(resourceGroupName, namespaceName, eventHubName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets all the Event Hubs in a Namespace. + * Gets an Event Hubs description for the specified Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains - * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting - * point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. + * @param eventHubName The Event Hub name. * @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 all the Event Hubs in a Namespace as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, Integer skip, - Integer top, Context context) { - return new PagedFlux<>( - () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top, context), - nextLink -> listByNamespaceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all the Event Hubs in a Namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 the Event Hubs in a Namespace as paginated response with {@link PagedIterable}. + * @return an Event Hubs description for the specified Event Hub along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { - final Integer skip = null; - final Integer top = null; - return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, skip, top)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String namespaceName, String eventHubName, + Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, eventHubName, context).block(); } /** - * Gets all the Event Hubs in a Namespace. + * Gets an Event Hubs description for the specified Event Hub. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains - * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting - * point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. - * @param context The context to associate with this operation. + * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 the Event Hubs in a Namespace as paginated response with {@link PagedIterable}. + * @return an Event Hubs description for the specified Event Hub. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, Integer skip, - Integer top, Context context) { - return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, skip, top, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public EventhubInner get(String resourceGroupName, String namespaceName, String eventHubName) { + return getWithResponse(resourceGroupName, namespaceName, eventHubName, Context.NONE).getValue(); } /** @@ -1739,8 +1738,8 @@ public PagedIterable listByNamespace(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the authorization rules for an Event Hub along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response from the List namespace operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAuthorizationRulesNextSinglePageAsync(String nextLink) { @@ -1768,8 +1767,8 @@ private Mono> listAuthorizationRulesNextSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the authorization rules for an Event Hub along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response from the List namespace operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAuthorizationRulesNextSinglePageAsync(String nextLink, @@ -1795,7 +1794,7 @@ private Mono> listAuthorizationRulesNextSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 the Event Hubs in a Namespace along with {@link PagedResponse} on successful completion of + * @return the result of the List EventHubs operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1823,7 +1822,7 @@ private Mono> listByNamespaceNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 the Event Hubs in a Namespace along with {@link PagedResponse} on successful completion of + * @return the result of the List EventHubs operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/NamespacesClientImpl.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/NamespacesClientImpl.java index 472087eaf957..6d3b2fe6b905 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/NamespacesClientImpl.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/NamespacesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.implementation; @@ -40,10 +40,9 @@ import com.azure.resourcemanager.eventhubs.fluent.models.EHNamespaceInner; import com.azure.resourcemanager.eventhubs.fluent.models.NetworkRuleSetInner; import com.azure.resourcemanager.eventhubs.fluent.models.NetworkRuleSetListResultInner; -import com.azure.resourcemanager.eventhubs.implementation.models.AuthorizationRuleListResult; -import com.azure.resourcemanager.eventhubs.implementation.models.EHNamespaceListResult; +import com.azure.resourcemanager.eventhubs.models.AuthorizationRuleListResult; import com.azure.resourcemanager.eventhubs.models.CheckNameAvailabilityParameter; -import com.azure.resourcemanager.eventhubs.models.FailOver; +import com.azure.resourcemanager.eventhubs.models.EHNamespaceListResult; import com.azure.resourcemanager.eventhubs.models.RegenerateAccessKeyParameters; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; @@ -82,203 +81,195 @@ public final class NamespacesClientImpl implements InnerSupportsGet> getByResourceGroup(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EHNamespaceInner parameters, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") EHNamespaceInner parameters, Context context); + @BodyParam("application/json") EHNamespaceInner parameters, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/failover") - @ExpectedResponses({ 202 }) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failover(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") FailOver parameters, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") EHNamespaceInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getNetworkRuleSet(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdateNetworkRuleSet(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") NetworkRuleSetInner parameters, @HeaderParam("Accept") String accept, + Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default") + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdateNetworkRuleSet(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> getNetworkRuleSet(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") NetworkRuleSetInner parameters, Context context); + @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/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNetworkRuleSet(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listNetworkRuleSet(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, + @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/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getAuthorizationRule(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listAuthorizationRules(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("authorizationRuleName") String authorizationRuleName, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdateAuthorizationRule(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdateAuthorizationRule(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("authorizationRuleName") String authorizationRuleName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") AuthorizationRuleInner parameters, Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") AuthorizationRuleInner parameters, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> deleteAuthorizationRule(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> deleteAuthorizationRule(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("authorizationRuleName") String authorizationRuleName, Context context); + @PathParam("authorizationRuleName") String authorizationRuleName, + @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/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAuthorizationRules(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> getAuthorizationRule(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, + @PathParam("authorizationRuleName") String authorizationRuleName, + @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.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listKeys(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("authorizationRuleName") String authorizationRuleName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("authorizationRuleName") String authorizationRuleName, + @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.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> regenerateKeys(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> regenerateKeys(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("authorizationRuleName") String authorizationRuleName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") RegenerateAccessKeyParameters parameters, Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") RegenerateAccessKeyParameters parameters, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/checkNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability(@HostParam("endpoint") String endpoint, + Mono> checkNameAvailability(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") CheckNameAvailabilityParameter parameters, Context context); + @BodyParam("application/json") CheckNameAvailabilityParameter parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + 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) Mono> listAuthorizationRulesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets the description of the specified namespace. + * Lists all the available Namespaces within a subscription, irrespective of the resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the specified namespace along with {@link Response} on successful completion of + * @return the response of the List Namespace operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String namespaceName) { + private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -287,35 +278,27 @@ public Mono> getByResourceGroupWithResponseAsync(Stri 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 (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context)) + .withContext(context -> 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)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the description of the specified namespace. + * Lists all the available Namespaces within a subscription, irrespective of the resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. * @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 description of the specified namespace along with {@link Response} on successful completion of + * @return the response of the List Namespace operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String namespaceName, Context context) { + 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.")); @@ -324,321 +307,203 @@ private Mono> getByResourceGroupWithResponseAsync(Str 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 (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName 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, namespaceName, accept, 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)); } /** - * Gets the description of the specified namespace. + * Lists all the available Namespaces within a subscription, irrespective of the resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the specified namespace on successful completion of {@link Mono}. + * @return the response of the List Namespace operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String namespaceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, namespaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Gets the description of the specified namespace. + * Lists all the available Namespaces within a subscription, irrespective of the resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. * @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 description of the specified namespace along with {@link Response}. + * @return the response of the List Namespace operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String namespaceName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, namespaceName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Gets the description of the specified namespace. + * Lists all the available Namespaces within a subscription, irrespective of the resource groups. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. + * @throws ManagementException 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 the List Namespace operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Lists all the available Namespaces within a subscription, irrespective of the resource groups. + * + * @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 description of the specified namespace. + * @return the response of the List Namespace operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EHNamespaceInner getByResourceGroup(String resourceGroupName, String namespaceName) { - return getByResourceGroupWithResponse(resourceGroupName, namespaceName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. + * Lists the available Namespaces within a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for creating a namespace resource. + * @param resourceGroupName Name of the resource group within the azure subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return single Namespace item in List or Get Operation along with {@link Response} on successful completion of + * @return the response of the List Namespace operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String namespaceName, EHNamespaceInner parameters) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { 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 (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, parameters, - context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, + 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)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. + * Lists the available Namespaces within a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for creating a namespace resource. + * @param resourceGroupName Name of the resource group within the azure 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 single Namespace item in List or Get Operation along with {@link Response} on successful completion of + * @return the response of the List Namespace operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String namespaceName, EHNamespaceInner parameters, Context context) { + 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.")); } - if (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, parameters, - context); + return service + .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, 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)); } /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. + * Lists the available Namespaces within a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for creating a namespace resource. + * @param resourceGroupName Name of the resource group within the azure subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 single Namespace item in List or Get Operation. + * @return the response of the List Namespace operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, EHNamespaceInner> beginCreateOrUpdateAsync(String resourceGroupName, - String namespaceName, EHNamespaceInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - EHNamespaceInner.class, EHNamespaceInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. + * Lists the available Namespaces within a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for creating a namespace resource. + * @param resourceGroupName Name of the resource group within the azure 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 {@link PollerFlux} for polling of single Namespace item in List or Get Operation. + * @return the response of the List Namespace operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EHNamespaceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String namespaceName, EHNamespaceInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - EHNamespaceInner.class, EHNamespaceInner.class, context); - } - - /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for creating a namespace 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 {@link SyncPoller} for polling of single Namespace item in List or Get Operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EHNamespaceInner> beginCreateOrUpdate(String resourceGroupName, - String namespaceName, EHNamespaceInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters).getSyncPoller(); - } - - /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for creating a namespace 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 {@link SyncPoller} for polling of single Namespace item in List or Get Operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EHNamespaceInner> beginCreateOrUpdate(String resourceGroupName, - String namespaceName, EHNamespaceInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. + * Lists the available Namespaces within a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for creating a namespace resource. + * @param resourceGroupName Name of the resource group within the azure subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return single Namespace item in List or Get Operation on successful completion of {@link Mono}. + * @return the response of the List Namespace operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String namespaceName, - EHNamespaceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. + * Lists the available Namespaces within a resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for creating a namespace resource. + * @param resourceGroupName Name of the resource group within the azure 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 single Namespace item in List or Get Operation on successful completion of {@link Mono}. + * @return the response of the List Namespace operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String namespaceName, - EHNamespaceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for creating a namespace 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 single Namespace item in List or Get Operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EHNamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, - EHNamespaceInner parameters) { - return createOrUpdateAsync(resourceGroupName, namespaceName, parameters).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters for creating a namespace 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 single Namespace item in List or Get Operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EHNamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, EHNamespaceInner parameters, - Context context) { - return createOrUpdateAsync(resourceGroupName, namespaceName, parameters, context).block(); - } - - /** - * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is - * idempotent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace 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. @@ -646,16 +511,12 @@ public EHNamespaceInner createOrUpdate(String resourceGroupName, String namespac * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String namespaceName, - EHNamespaceInner parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String namespaceName, EHNamespaceInner 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.")); @@ -663,17 +524,19 @@ public Mono>> updateWithResponseAsync(String resourceG if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, parameters, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, namespaceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -681,9 +544,9 @@ public Mono>> updateWithResponseAsync(String resourceG * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters Parameters for creating a namespace 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. @@ -692,16 +555,12 @@ public Mono>> updateWithResponseAsync(String resourceG * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String namespaceName, - EHNamespaceInner parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String namespaceName, EHNamespaceInner 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.")); @@ -709,34 +568,38 @@ private Mono>> updateWithResponseAsync(String resource if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, contentType, accept, parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, namespaceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); } /** * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters Parameters for creating a namespace 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 {@link PollerFlux} for polling of single Namespace item in List or Get Operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, EHNamespaceInner> beginUpdateAsync(String resourceGroupName, + public PollerFlux, EHNamespaceInner> beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, namespaceName, parameters); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), EHNamespaceInner.class, EHNamespaceInner.class, this.client.getContext()); } @@ -745,9 +608,9 @@ public PollerFlux, EHNamespaceInner> beginUpdateAsy * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters Parameters for creating a namespace 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. @@ -755,11 +618,11 @@ public PollerFlux, EHNamespaceInner> beginUpdateAsy * @return the {@link PollerFlux} for polling of single Namespace item in List or Get Operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EHNamespaceInner> beginUpdateAsync(String resourceGroupName, - String namespaceName, EHNamespaceInner parameters, Context context) { + private PollerFlux, EHNamespaceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String namespaceName, EHNamespaceInner parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateWithResponseAsync(resourceGroupName, namespaceName, parameters, context); + = createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, parameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), EHNamespaceInner.class, EHNamespaceInner.class, context); } @@ -768,27 +631,27 @@ private PollerFlux, EHNamespaceInner> beginUpdateAs * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters Parameters for creating a namespace 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 {@link SyncPoller} for polling of single Namespace item in List or Get Operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EHNamespaceInner> beginUpdate(String resourceGroupName, + public SyncPoller, EHNamespaceInner> beginCreateOrUpdate(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { - return this.beginUpdateAsync(resourceGroupName, namespaceName, parameters).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters).getSyncPoller(); } /** * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters Parameters for creating a namespace 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. @@ -796,27 +659,27 @@ public SyncPoller, EHNamespaceInner> beginUpdate(St * @return the {@link SyncPoller} for polling of single Namespace item in List or Get Operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EHNamespaceInner> beginUpdate(String resourceGroupName, + public SyncPoller, EHNamespaceInner> beginCreateOrUpdate(String resourceGroupName, String namespaceName, EHNamespaceInner parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, namespaceName, parameters, context).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters, context).getSyncPoller(); } /** * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters Parameters for creating a namespace 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 single Namespace item in List or Get Operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String namespaceName, + public Mono createOrUpdateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { - return beginUpdateAsync(resourceGroupName, namespaceName, parameters).last() + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -824,9 +687,9 @@ public Mono updateAsync(String resourceGroupName, String names * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters Parameters for creating a namespace 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. @@ -834,9 +697,9 @@ public Mono updateAsync(String resourceGroupName, String names * @return single Namespace item in List or Get Operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String namespaceName, + private Mono createOrUpdateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters, Context context) { - return beginUpdateAsync(resourceGroupName, namespaceName, parameters, context).last() + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -844,26 +707,27 @@ private Mono updateAsync(String resourceGroupName, String name * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters Parameters for creating a namespace 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 single Namespace item in List or Get Operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { - return updateAsync(resourceGroupName, namespaceName, parameters).block(); + public EHNamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, + EHNamespaceInner parameters) { + return createOrUpdateAsync(resourceGroupName, namespaceName, parameters).block(); } /** * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace resource. + * @param parameters Parameters for creating a namespace 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. @@ -871,15 +735,15 @@ public EHNamespaceInner update(String resourceGroupName, String namespaceName, E * @return single Namespace item in List or Get Operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamespaceInner parameters, + public EHNamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, EHNamespaceInner parameters, Context context) { - return updateAsync(resourceGroupName, namespaceName, parameters, context).block(); + return createOrUpdateAsync(resourceGroupName, namespaceName, parameters, context).block(); } /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -892,10 +756,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -903,16 +763,21 @@ public Mono>> deleteWithResponseAsync(String resourceG if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, namespaceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -927,10 +792,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -938,15 +799,20 @@ private Mono>> deleteWithResponseAsync(String resource if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, namespaceName, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); } /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -963,7 +829,7 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -983,7 +849,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -998,7 +864,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1015,7 +881,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1030,7 +896,7 @@ public Mono deleteAsync(String resourceGroupName, String namespaceName) { /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1047,7 +913,7 @@ private Mono deleteAsync(String resourceGroupName, String namespaceName, C /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1061,7 +927,7 @@ public void delete(String resourceGroupName, String namespaceName) { /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1074,264 +940,145 @@ public void delete(String resourceGroupName, String namespaceName, Context conte } /** - * Lists the available Namespaces within a resource group. + * Gets the description of the specified namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 EHNamespace list operation along with {@link PagedResponse} on successful completion of + * @return the description of the specified namespace along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String namespaceName) { 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 (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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"; return FluxUtil - .withContext(context -> 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)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, + namespaceName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists the available Namespaces within a resource group. + * Gets the description of the specified namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. * @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 EHNamespace list operation along with {@link PagedResponse} on successful completion of + * @return the description of the specified namespace along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String namespaceName, 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)); - } - - /** - * Lists the available Namespaces within a 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 EHNamespace list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists the available Namespaces within 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 EHNamespace list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the available Namespaces within a 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 EHNamespace list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Lists the available Namespaces within 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 EHNamespace list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Lists all the available Namespaces within a subscription, irrespective of the resource groups. - * - * @throws ManagementException 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 EHNamespace list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName 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"; - return FluxUtil - .withContext(context -> 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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, namespaceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** - * Lists all the available Namespaces within a subscription, irrespective of the resource groups. + * Gets the description of the specified namespace. * - * @param context The context to associate with this operation. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 EHNamespace list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the description of the specified namespace 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)); - } - - /** - * Lists all the available Namespaces within a subscription, irrespective of the resource groups. - * - * @throws ManagementException 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 EHNamespace list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + public Mono getByResourceGroupAsync(String resourceGroupName, String namespaceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, namespaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists all the available Namespaces within a subscription, irrespective of the resource groups. + * Gets the description of the specified namespace. * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. * @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 EHNamespace list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the available Namespaces within a subscription, irrespective of the resource groups. - * - * @throws ManagementException 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 EHNamespace list operation as paginated response with {@link PagedIterable}. + * @return the description of the specified namespace along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String namespaceName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, namespaceName, context).block(); } /** - * Lists all the available Namespaces within a subscription, irrespective of the resource groups. + * Gets the description of the specified namespace. * - * @param context The context to associate with this operation. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 EHNamespace list operation as paginated response with {@link PagedIterable}. + * @return the description of the specified namespace. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public EHNamespaceInner getByResourceGroup(String resourceGroupName, String namespaceName) { + return getByResourceGroupWithResponse(resourceGroupName, namespaceName, Context.NONE).getValue(); } /** - * GeoDR Failover. + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters for updating a namespace 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 {@link Response} on successful completion of {@link Mono}. + * @return single Namespace item in List or Get Operation along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> failoverWithResponseAsync(String resourceGroupName, String namespaceName, - FailOver parameters) { + public Mono> updateWithResponseAsync(String resourceGroupName, String namespaceName, + EHNamespaceInner 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.")); @@ -1339,41 +1086,43 @@ public Mono>> failoverWithResponseAsync(String resourc if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 contentType = "application/json"; + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.failover(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, parameters, context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, namespaceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * GeoDR Failover. + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters for updating a namespace 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 {@link Response} on successful completion of {@link Mono}. + * @return single Namespace item in List or Get Operation along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverWithResponseAsync(String resourceGroupName, String namespaceName, - FailOver parameters, Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String namespaceName, + EHNamespaceInner 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.")); @@ -1381,183 +1130,94 @@ private Mono>> failoverWithResponseAsync(String resour if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 contentType = "application/json"; - context = this.client.mergeContext(context); - return service.failover(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, contentType, parameters, context); - } - - /** - * GeoDR Failover. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace 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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, FailOver> beginFailoverAsync(String resourceGroupName, String namespaceName, - FailOver parameters) { - Mono>> mono = failoverWithResponseAsync(resourceGroupName, namespaceName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), FailOver.class, - FailOver.class, this.client.getContext()); - } - - /** - * GeoDR Failover. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace 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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FailOver> beginFailoverAsync(String resourceGroupName, - String namespaceName, FailOver parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = failoverWithResponseAsync(resourceGroupName, namespaceName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), FailOver.class, - FailOver.class, context); - } - - /** - * GeoDR Failover. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace 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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FailOver> beginFailover(String resourceGroupName, String namespaceName, - FailOver parameters) { - return this.beginFailoverAsync(resourceGroupName, namespaceName, parameters).getSyncPoller(); - } - - /** - * GeoDR Failover. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace 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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FailOver> beginFailover(String resourceGroupName, String namespaceName, - FailOver parameters, Context context) { - return this.beginFailoverAsync(resourceGroupName, namespaceName, parameters, context).getSyncPoller(); - } - - /** - * GeoDR Failover. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param parameters Parameters for updating a namespace 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono failoverAsync(String resourceGroupName, String namespaceName, FailOver parameters) { - return beginFailoverAsync(resourceGroupName, namespaceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + 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"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), resourceGroupName, namespaceName, this.client.getApiVersion(), + this.client.getSubscriptionId(), parameters, accept, context); } /** - * GeoDR Failover. + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters for updating a namespace 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 on successful completion of {@link Mono}. + * @return single Namespace item in List or Get Operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverAsync(String resourceGroupName, String namespaceName, FailOver parameters, - Context context) { - return beginFailoverAsync(resourceGroupName, namespaceName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono updateAsync(String resourceGroupName, String namespaceName, + EHNamespaceInner parameters) { + return updateWithResponseAsync(resourceGroupName, namespaceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * GeoDR Failover. + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters for updating a namespace 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. + * @return single Namespace item in List or Get Operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FailOver failover(String resourceGroupName, String namespaceName, FailOver parameters) { - return failoverAsync(resourceGroupName, namespaceName, parameters).block(); + public Response updateWithResponse(String resourceGroupName, String namespaceName, + EHNamespaceInner parameters, Context context) { + return updateWithResponseAsync(resourceGroupName, namespaceName, parameters, context).block(); } /** - * GeoDR Failover. + * Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is + * idempotent. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param parameters Parameters for updating a namespace 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. + * @return single Namespace item in List or Get Operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FailOver failover(String resourceGroupName, String namespaceName, FailOver parameters, Context context) { - return failoverAsync(resourceGroupName, namespaceName, parameters, context).block(); + public EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) { + return updateWithResponse(resourceGroupName, namespaceName, parameters, Context.NONE).getValue(); } /** - * Gets NetworkRuleSet for a Namespace. + * Create or update NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param parameters The Namespace IpFilterRule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return networkRuleSet for a Namespace along with {@link Response} on successful completion of {@link Mono}. + * @return description of topic resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getNetworkRuleSetWithResponseAsync(String resourceGroupName, - String namespaceName) { + public Mono> createOrUpdateNetworkRuleSetWithResponseAsync(String resourceGroupName, + String namespaceName, NetworkRuleSetInner 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.")); @@ -1565,35 +1225,42 @@ public Mono> getNetworkRuleSetWithResponseAsync(St if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.getNetworkRuleSet(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context)) + .withContext(context -> service.createOrUpdateNetworkRuleSet(this.client.getEndpoint(), resourceGroupName, + namespaceName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets NetworkRuleSet for a Namespace. + * Create or update NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param parameters The Namespace IpFilterRule. * @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 networkRuleSet for a Namespace along with {@link Response} on successful completion of {@link Mono}. + * @return description of topic resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getNetworkRuleSetWithResponseAsync(String resourceGroupName, - String namespaceName, Context context) { + private Mono> createOrUpdateNetworkRuleSetWithResponseAsync(String resourceGroupName, + String namespaceName, NetworkRuleSetInner 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.")); @@ -1601,82 +1268,93 @@ private Mono> getNetworkRuleSetWithResponseAsync(S if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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"; context = this.client.mergeContext(context); - return service.getNetworkRuleSet(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context); + return service.createOrUpdateNetworkRuleSet(this.client.getEndpoint(), resourceGroupName, namespaceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); } /** - * Gets NetworkRuleSet for a Namespace. + * Create or update NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param parameters The Namespace IpFilterRule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return networkRuleSet for a Namespace on successful completion of {@link Mono}. + * @return description of topic resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getNetworkRuleSetAsync(String resourceGroupName, String namespaceName) { - return getNetworkRuleSetWithResponseAsync(resourceGroupName, namespaceName) + public Mono createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, + NetworkRuleSetInner parameters) { + return createOrUpdateNetworkRuleSetWithResponseAsync(resourceGroupName, namespaceName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets NetworkRuleSet for a Namespace. + * Create or update NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param parameters The Namespace IpFilterRule. * @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 networkRuleSet for a Namespace along with {@link Response}. + * @return description of topic resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getNetworkRuleSetWithResponse(String resourceGroupName, String namespaceName, - Context context) { - return getNetworkRuleSetWithResponseAsync(resourceGroupName, namespaceName, context).block(); + public Response createOrUpdateNetworkRuleSetWithResponse(String resourceGroupName, + String namespaceName, NetworkRuleSetInner parameters, Context context) { + return createOrUpdateNetworkRuleSetWithResponseAsync(resourceGroupName, namespaceName, parameters, context) + .block(); } /** - * Gets NetworkRuleSet for a Namespace. + * Create or update NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param parameters The Namespace IpFilterRule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return networkRuleSet for a Namespace. + * @return description of topic resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkRuleSetInner getNetworkRuleSet(String resourceGroupName, String namespaceName) { - return getNetworkRuleSetWithResponse(resourceGroupName, namespaceName, Context.NONE).getValue(); + public NetworkRuleSetInner createOrUpdateNetworkRuleSet(String resourceGroupName, String namespaceName, + NetworkRuleSetInner parameters) { + return createOrUpdateNetworkRuleSetWithResponse(resourceGroupName, namespaceName, parameters, Context.NONE) + .getValue(); } /** - * Create or update NetworkRuleSet for a Namespace. + * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters The Namespace IpFilterRule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return description of topic resource along with {@link Response} on successful completion of {@link Mono}. + * @return networkRuleSet for a Namespace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateNetworkRuleSetWithResponseAsync(String resourceGroupName, - String namespaceName, NetworkRuleSetInner parameters) { + public Mono> getNetworkRuleSetWithResponseAsync(String resourceGroupName, + String namespaceName) { 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.")); @@ -1684,43 +1362,35 @@ public Mono> createOrUpdateNetworkRuleSetWithRespo if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdateNetworkRuleSet(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, namespaceName, - contentType, accept, parameters, context)) + .withContext(context -> service.getNetworkRuleSet(this.client.getEndpoint(), resourceGroupName, + namespaceName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update NetworkRuleSet for a Namespace. + * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters The Namespace IpFilterRule. * @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 description of topic resource along with {@link Response} on successful completion of {@link Mono}. + * @return networkRuleSet for a Namespace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateNetworkRuleSetWithResponseAsync(String resourceGroupName, - String namespaceName, NetworkRuleSetInner parameters, Context context) { + private Mono> getNetworkRuleSetWithResponseAsync(String resourceGroupName, + String namespaceName, 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.")); @@ -1728,78 +1398,68 @@ private Mono> createOrUpdateNetworkRuleSetWithResp if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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(); + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdateNetworkRuleSet(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, contentType, accept, parameters, - context); + return service.getNetworkRuleSet(this.client.getEndpoint(), resourceGroupName, namespaceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** - * Create or update NetworkRuleSet for a Namespace. + * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters The Namespace IpFilterRule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return description of topic resource on successful completion of {@link Mono}. + * @return networkRuleSet for a Namespace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, - NetworkRuleSetInner parameters) { - return createOrUpdateNetworkRuleSetWithResponseAsync(resourceGroupName, namespaceName, parameters) + public Mono getNetworkRuleSetAsync(String resourceGroupName, String namespaceName) { + return getNetworkRuleSetWithResponseAsync(resourceGroupName, namespaceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create or update NetworkRuleSet for a Namespace. + * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters The Namespace IpFilterRule. * @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 description of topic resource along with {@link Response}. + * @return networkRuleSet for a Namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateNetworkRuleSetWithResponse(String resourceGroupName, - String namespaceName, NetworkRuleSetInner parameters, Context context) { - return createOrUpdateNetworkRuleSetWithResponseAsync(resourceGroupName, namespaceName, parameters, context) - .block(); + public Response getNetworkRuleSetWithResponse(String resourceGroupName, String namespaceName, + Context context) { + return getNetworkRuleSetWithResponseAsync(resourceGroupName, namespaceName, context).block(); } /** - * Create or update NetworkRuleSet for a Namespace. + * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param parameters The Namespace IpFilterRule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return description of topic resource. + * @return networkRuleSet for a Namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkRuleSetInner createOrUpdateNetworkRuleSet(String resourceGroupName, String namespaceName, - NetworkRuleSetInner parameters) { - return createOrUpdateNetworkRuleSetWithResponse(resourceGroupName, namespaceName, parameters, Context.NONE) - .getValue(); + public NetworkRuleSetInner getNetworkRuleSet(String resourceGroupName, String namespaceName) { + return getNetworkRuleSetWithResponse(resourceGroupName, namespaceName, Context.NONE).getValue(); } /** * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1813,10 +1473,6 @@ public Mono> listNetworkRuleSetWithRespo 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.")); @@ -1824,17 +1480,21 @@ public Mono> listNetworkRuleSetWithRespo if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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"; return FluxUtil - .withContext(context -> service.listNetworkRuleSet(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context)) + .withContext(context -> service.listNetworkRuleSet(this.client.getEndpoint(), resourceGroupName, + namespaceName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1849,10 +1509,6 @@ private Mono> listNetworkRuleSetWithResp 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.")); @@ -1860,16 +1516,20 @@ private Mono> listNetworkRuleSetWithResp if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.listNetworkRuleSet(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context); + return service.listNetworkRuleSet(this.client.getEndpoint(), resourceGroupName, namespaceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1885,7 +1545,7 @@ public Mono listNetworkRuleSetAsync(String resour /** * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1902,7 +1562,7 @@ public Response listNetworkRuleSetWithResponse(St /** * Gets NetworkRuleSet for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1915,28 +1575,23 @@ public NetworkRuleSetListResultInner listNetworkRuleSet(String resourceGroupName } /** - * Gets an AuthorizationRule for a Namespace by rule name. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an AuthorizationRule for a Namespace by rule name along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of authorization rules for a Namespace along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, - String namespaceName, String authorizationRuleName) { + private Mono> listAuthorizationRulesSinglePageAsync(String resourceGroupName, + String namespaceName) { 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.")); @@ -1944,42 +1599,38 @@ public Mono> getAuthorizationRuleWithResponseAs if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } - if (authorizationRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter authorizationRuleName 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"; return FluxUtil - .withContext(context -> service.getAuthorizationRule(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, authorizationRuleName, accept, - context)) + .withContext(context -> service.listAuthorizationRules(this.client.getEndpoint(), resourceGroupName, + namespaceName, 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)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets an AuthorizationRule for a Namespace by rule name. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param authorizationRuleName The authorization rule name. * @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 an AuthorizationRule for a Namespace by rule name along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of authorization rules for a Namespace along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, - String namespaceName, String authorizationRuleName, Context context) { + private Mono> listAuthorizationRulesSinglePageAsync(String resourceGroupName, + String namespaceName, 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.")); @@ -1987,75 +1638,91 @@ private Mono> getAuthorizationRuleWithResponseA if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } - if (authorizationRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter authorizationRuleName 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.getAuthorizationRule(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, authorizationRuleName, accept, context); + return service + .listAuthorizationRules(this.client.getEndpoint(), resourceGroupName, namespaceName, + 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)); + } + + /** + * Gets a list of authorization rules for a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 authorization rules for a Namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAuthorizationRulesAsync(String resourceGroupName, + String namespaceName) { + return new PagedFlux<>(() -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink)); } /** - * Gets an AuthorizationRule for a Namespace by rule name. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for a Namespace by rule name on successful completion of {@link Mono}. + * @return a list of authorization rules for a Namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, - String authorizationRuleName) { - return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAuthorizationRulesAsync(String resourceGroupName, + String namespaceName, Context context) { + return new PagedFlux<>(() -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, context), + nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink, context)); } /** - * Gets an AuthorizationRule for a Namespace by rule name. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param authorizationRuleName The authorization rule name. - * @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 an AuthorizationRule for a Namespace by rule name along with {@link Response}. + * @return a list of authorization rules for a Namespace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAuthorizationRuleWithResponse(String resourceGroupName, - String namespaceName, String authorizationRuleName, Context context) { - return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules(String resourceGroupName, + String namespaceName) { + return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName)); } /** - * Gets an AuthorizationRule for a Namespace by rule name. + * Gets a list of authorization rules for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param authorizationRuleName The authorization rule name. + * @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 an AuthorizationRule for a Namespace by rule name. + * @return a list of authorization rules for a Namespace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, - String authorizationRuleName) { - return getAuthorizationRuleWithResponse(resourceGroupName, namespaceName, authorizationRuleName, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, + Context context) { + return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, context)); } /** * Creates or updates an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters The shared access AuthorizationRule. @@ -2073,10 +1740,6 @@ public Mono> createOrUpdateAuthorizationRuleWit 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.")); @@ -2088,24 +1751,27 @@ public Mono> createOrUpdateAuthorizationRuleWit return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdateAuthorizationRule(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, namespaceName, - authorizationRuleName, contentType, accept, parameters, context)) + resourceGroupName, namespaceName, authorizationRuleName, this.client.getApiVersion(), + this.client.getSubscriptionId(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters The shared access AuthorizationRule. @@ -2124,10 +1790,6 @@ private Mono> createOrUpdateAuthorizationRuleWi 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.")); @@ -2139,23 +1801,26 @@ private Mono> createOrUpdateAuthorizationRuleWi return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdateAuthorizationRule(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, authorizationRuleName, contentType, - accept, parameters, context); + return service.createOrUpdateAuthorizationRule(this.client.getEndpoint(), resourceGroupName, namespaceName, + authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, + context); } /** * Creates or updates an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters The shared access AuthorizationRule. @@ -2174,7 +1839,7 @@ public Mono createOrUpdateAuthorizationRuleAsync(String /** * Creates or updates an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters The shared access AuthorizationRule. @@ -2194,7 +1859,7 @@ public Response createOrUpdateAuthorizationRuleWithRespo /** * Creates or updates an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters The shared access AuthorizationRule. @@ -2213,7 +1878,7 @@ public AuthorizationRuleInner createOrUpdateAuthorizationRule(String resourceGro /** * Deletes an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2228,10 +1893,6 @@ public Mono> deleteAuthorizationRuleWithResponseAsync(String reso 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.")); @@ -2243,17 +1904,22 @@ public Mono> deleteAuthorizationRuleWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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"; return FluxUtil - .withContext( - context -> service.deleteAuthorizationRule(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, authorizationRuleName, context)) + .withContext(context -> service.deleteAuthorizationRule(this.client.getEndpoint(), resourceGroupName, + namespaceName, authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param context The context to associate with this operation. @@ -2269,10 +1935,6 @@ private Mono> deleteAuthorizationRuleWithResponseAsync(String res 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.")); @@ -2284,15 +1946,20 @@ private Mono> deleteAuthorizationRuleWithResponseAsync(String res return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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.deleteAuthorizationRule(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, authorizationRuleName, context); + return service.deleteAuthorizationRule(this.client.getEndpoint(), resourceGroupName, namespaceName, + authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** * Deletes an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2310,7 +1977,7 @@ public Mono deleteAuthorizationRuleAsync(String resourceGroupName, String /** * Deletes an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param context The context to associate with this operation. @@ -2329,7 +1996,7 @@ public Response deleteAuthorizationRuleWithResponse(String resourceGroupNa /** * Deletes an AuthorizationRule for a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2342,27 +2009,24 @@ public void deleteAuthorizationRule(String resourceGroupName, String namespaceNa } /** - * Gets a list of authorization rules for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 authorization rules for a Namespace along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return an AuthorizationRule for a Namespace by rule name along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAuthorizationRulesSinglePageAsync(String resourceGroupName, - String namespaceName) { + public Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, + String namespaceName, String authorizationRuleName) { 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.")); @@ -2370,39 +2034,42 @@ private Mono> listAuthorizationRulesSingle if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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"; return FluxUtil - .withContext( - context -> service.listAuthorizationRules(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getAuthorizationRule(this.client.getEndpoint(), resourceGroupName, + namespaceName, authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of authorization rules for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. * @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 authorization rules for a Namespace along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return an AuthorizationRule for a Namespace by rule name along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAuthorizationRulesSinglePageAsync(String resourceGroupName, - String namespaceName, Context context) { + private Mono> getAuthorizationRuleWithResponseAsync(String resourceGroupName, + String namespaceName, String authorizationRuleName, 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.")); @@ -2410,87 +2077,79 @@ private Mono> listAuthorizationRulesSingle if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } + if (authorizationRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter authorizationRuleName 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 - .listAuthorizationRules(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getAuthorizationRule(this.client.getEndpoint(), resourceGroupName, namespaceName, + authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** - * Gets a list of authorization rules for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 authorization rules for a Namespace as paginated response with {@link PagedFlux}. + * @return an AuthorizationRule for a Namespace by rule name on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAuthorizationRulesAsync(String resourceGroupName, - String namespaceName) { - return new PagedFlux<>(() -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName), - nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, + String authorizationRuleName) { + return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of authorization rules for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param authorizationRuleName The authorization rule name. * @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 authorization rules for a Namespace as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAuthorizationRulesAsync(String resourceGroupName, - String namespaceName, Context context) { - return new PagedFlux<>(() -> listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, context), - nextLink -> listAuthorizationRulesNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of authorization rules for a Namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 authorization rules for a Namespace as paginated response with {@link PagedIterable}. + * @return an AuthorizationRule for a Namespace by rule name along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAuthorizationRules(String resourceGroupName, - String namespaceName) { - return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAuthorizationRuleWithResponse(String resourceGroupName, + String namespaceName, String authorizationRuleName, Context context) { + return getAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, context) + .block(); } /** - * Gets a list of authorization rules for a Namespace. + * Gets an AuthorizationRule for a Namespace by rule name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param context The context to associate with this operation. + * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 authorization rules for a Namespace as paginated response with {@link PagedIterable}. + * @return an AuthorizationRule for a Namespace by rule name. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName, - Context context) { - return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, + String authorizationRuleName) { + return getAuthorizationRuleWithResponse(resourceGroupName, namespaceName, authorizationRuleName, Context.NONE) + .getValue(); } /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2506,10 +2165,6 @@ public Mono> listKeysWithResponseAsync(String resource 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.")); @@ -2521,16 +2176,21 @@ public Mono> listKeysWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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"; - return FluxUtil.withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, authorizationRuleName, accept, context)) + return FluxUtil + .withContext(context -> service.listKeys(this.client.getEndpoint(), resourceGroupName, namespaceName, + authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param context The context to associate with this operation. @@ -2547,10 +2207,6 @@ private Mono> listKeysWithResponseAsync(String resourc 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.")); @@ -2562,16 +2218,20 @@ private Mono> listKeysWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, authorizationRuleName, accept, context); + return service.listKeys(this.client.getEndpoint(), resourceGroupName, namespaceName, authorizationRuleName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2589,7 +2249,7 @@ public Mono listKeysAsync(String resourceGroupName, String name /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param context The context to associate with this operation. @@ -2607,7 +2267,7 @@ public Response listKeysWithResponse(String resourceGroupName, /** * Gets the primary and secondary connection strings for the Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2623,7 +2283,7 @@ public AccessKeysInner listKeys(String resourceGroupName, String namespaceName, /** * Regenerates the primary or secondary connection strings for the specified Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters Parameters required to regenerate the connection string. @@ -2640,10 +2300,6 @@ public Mono> regenerateKeysWithResponseAsync(String re 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.")); @@ -2655,24 +2311,27 @@ public Mono> regenerateKeysWithResponseAsync(String re return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.regenerateKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, authorizationRuleName, contentType, - accept, parameters, context)) + .withContext(context -> service.regenerateKeys(this.client.getEndpoint(), resourceGroupName, namespaceName, + authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Regenerates the primary or secondary connection strings for the specified Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters Parameters required to regenerate the connection string. @@ -2690,10 +2349,6 @@ private Mono> regenerateKeysWithResponseAsync(String r 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.")); @@ -2705,23 +2360,26 @@ private Mono> regenerateKeysWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter authorizationRuleName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.regenerateKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, authorizationRuleName, contentType, - accept, parameters, context); + return service.regenerateKeys(this.client.getEndpoint(), resourceGroupName, namespaceName, + authorizationRuleName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, + context); } /** * Regenerates the primary or secondary connection strings for the specified Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters Parameters required to regenerate the connection string. @@ -2740,7 +2398,7 @@ public Mono regenerateKeysAsync(String resourceGroupName, Strin /** * Regenerates the primary or secondary connection strings for the specified Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters Parameters required to regenerate the connection string. @@ -2760,7 +2418,7 @@ public Response regenerateKeysWithResponse(String resourceGroup /** * Regenerates the primary or secondary connection strings for the specified Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param authorizationRuleName The authorization rule name. * @param parameters Parameters required to regenerate the connection string. @@ -2779,7 +2437,7 @@ public AccessKeysInner regenerateKeys(String resourceGroupName, String namespace /** * Check the give Namespace name availability. * - * @param parameters The request body. + * @param parameters Parameters to check availability of the given Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2802,18 +2460,17 @@ public AccessKeysInner regenerateKeys(String resourceGroupName, String namespace } else { parameters.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), contentType, accept, parameters, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Check the give Namespace name availability. * - * @param parameters The request body. + * @param parameters Parameters to check availability of the given Namespace name. * @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. @@ -2837,17 +2494,16 @@ public AccessKeysInner regenerateKeys(String resourceGroupName, String namespace } else { parameters.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), contentType, accept, parameters, context); + this.client.getSubscriptionId(), parameters, accept, context); } /** * Check the give Namespace name availability. * - * @param parameters The request body. + * @param parameters Parameters to check availability of the given Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2862,7 +2518,7 @@ public AccessKeysInner regenerateKeys(String resourceGroupName, String namespace /** * Check the give Namespace name availability. * - * @param parameters The request body. + * @param parameters Parameters to check availability of the given Namespace name. * @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. @@ -2878,7 +2534,7 @@ public AccessKeysInner regenerateKeys(String resourceGroupName, String namespace /** * Check the give Namespace name availability. * - * @param parameters The request body. + * @param parameters Parameters to check availability of the given Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2896,11 +2552,11 @@ public CheckNameAvailabilityResultInner checkNameAvailability(CheckNameAvailabil * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 EHNamespace list operation along with {@link PagedResponse} on successful completion of + * @return the response of the List Namespace operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2909,9 +2565,7 @@ private Mono> listByResourceGroupNextSinglePageA new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -2925,12 +2579,11 @@ private Mono> listByResourceGroupNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 EHNamespace list operation along with {@link PagedResponse} on successful completion of + * @return the response of the List Namespace operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2940,7 +2593,7 @@ private Mono> listByResourceGroupNextSinglePageA } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, 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)); } @@ -2952,11 +2605,11 @@ private Mono> listByResourceGroupNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 EHNamespace list operation along with {@link PagedResponse} on successful completion of + * @return the response of the List Namespace operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2965,7 +2618,9 @@ private Mono> listNextSinglePageAsync(String nex 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.listByResourceGroupNext(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())); @@ -2979,11 +2634,12 @@ private Mono> listNextSinglePageAsync(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 the response of a EHNamespace list operation along with {@link PagedResponse} on successful completion of + * @return the response of the List Namespace operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2993,7 +2649,7 @@ private Mono> listNextSinglePageAsync(String nex } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, 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)); } @@ -3005,7 +2661,7 @@ private Mono> listNextSinglePageAsync(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 a list of authorization rules for a Namespace along with {@link PagedResponse} on successful completion + * @return the response from the List namespace operation along with {@link PagedResponse} on successful completion * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -3034,7 +2690,7 @@ private Mono> listAuthorizationRulesNextSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 authorization rules for a Namespace along with {@link PagedResponse} on successful completion + * @return the response from the List namespace operation along with {@link PagedResponse} on successful completion * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java index b5b91208c9d3..dfc442ec1f82 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.implementation; @@ -11,7 +11,6 @@ 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; @@ -20,16 +19,10 @@ 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.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventhubs.fluent.NetworkSecurityPerimeterConfigurationsClient; import com.azure.resourcemanager.eventhubs.fluent.models.NetworkSecurityPerimeterConfigurationListInner; -import com.azure.resourcemanager.eventhubs.models.NetworkSecurityPerimeterConfiguration; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -63,183 +56,23 @@ public final class NetworkSecurityPerimeterConfigurationsClientImpl * The interface defining all the services for EventHubManagementClientNetworkSecurityPerimeterConfigurations to be * used by the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "EventHubManagementClientNetworkSecurityPerimeterConfigurations") + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") public interface NetworkSecurityPerimeterConfigurationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkSecurityPerimeterConfigurations/{resourceAssociationName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getResourceAssociationName( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("resourceAssociationName") String resourceAssociationName, @HeaderParam("Accept") String accept, - Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkSecurityPerimeterConfigurations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkSecurityPerimeterConfigurations/{resourceAssociationName}/reconcile") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("resourceAssociationName") String resourceAssociationName, Context context); - } - - /** - * Return a NetworkSecurityPerimeterConfigurations resourceAssociationName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Security Perimeter related configurations of a given namespace along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getResourceAssociationNameWithResponseAsync( - String resourceGroupName, String namespaceName, String resourceAssociationName) { - 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 (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (resourceAssociationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter resourceAssociationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getResourceAssociationName(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, namespaceName, - resourceAssociationName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Return a NetworkSecurityPerimeterConfigurations resourceAssociationName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @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 network Security Perimeter related configurations of a given namespace along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getResourceAssociationNameWithResponseAsync( - String resourceGroupName, String namespaceName, String resourceAssociationName, 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 (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (resourceAssociationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter resourceAssociationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getResourceAssociationName(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, resourceAssociationName, accept, - context); - } - - /** - * Return a NetworkSecurityPerimeterConfigurations resourceAssociationName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Security Perimeter related configurations of a given namespace on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getResourceAssociationNameAsync(String resourceGroupName, - String namespaceName, String resourceAssociationName) { - return getResourceAssociationNameWithResponseAsync(resourceGroupName, namespaceName, resourceAssociationName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Return a NetworkSecurityPerimeterConfigurations resourceAssociationName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @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 network Security Perimeter related configurations of a given namespace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getResourceAssociationNameWithResponse( - String resourceGroupName, String namespaceName, String resourceAssociationName, Context context) { - return getResourceAssociationNameWithResponseAsync(resourceGroupName, namespaceName, resourceAssociationName, - context).block(); - } - - /** - * Return a NetworkSecurityPerimeterConfigurations resourceAssociationName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Security Perimeter related configurations of a given namespace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkSecurityPerimeterConfiguration getResourceAssociationName(String resourceGroupName, - String namespaceName, String resourceAssociationName) { - return getResourceAssociationNameWithResponse(resourceGroupName, namespaceName, resourceAssociationName, - Context.NONE).getValue(); + @HeaderParam("Accept") String accept, Context context); } /** * Gets list of current NetworkSecurityPerimeterConfiguration for Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -254,10 +87,6 @@ public NetworkSecurityPerimeterConfiguration getResourceAssociationName(String r 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.")); @@ -265,17 +94,21 @@ public NetworkSecurityPerimeterConfiguration getResourceAssociationName(String r if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, namespaceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets list of current NetworkSecurityPerimeterConfiguration for Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -291,10 +124,6 @@ public NetworkSecurityPerimeterConfiguration getResourceAssociationName(String r 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.")); @@ -302,16 +131,20 @@ public NetworkSecurityPerimeterConfiguration getResourceAssociationName(String r if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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(), - resourceGroupName, namespaceName, accept, context); + return service.list(this.client.getEndpoint(), resourceGroupName, namespaceName, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); } /** * Gets list of current NetworkSecurityPerimeterConfiguration for Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -328,7 +161,7 @@ public Mono listAsync(String res /** * Gets list of current NetworkSecurityPerimeterConfiguration for Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -345,7 +178,7 @@ public Response listWithResponse /** * Gets list of current NetworkSecurityPerimeterConfiguration for Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -356,236 +189,4 @@ public Response listWithResponse public NetworkSecurityPerimeterConfigurationListInner list(String resourceGroupName, String namespaceName) { return listWithResponse(resourceGroupName, namespaceName, Context.NONE).getValue(); } - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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>> createOrUpdateWithResponseAsync(String resourceGroupName, - String namespaceName, String resourceAssociationName) { - 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 (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (resourceAssociationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter resourceAssociationName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, resourceAssociationName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String namespaceName, String resourceAssociationName, 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 (namespaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); - } - if (resourceAssociationName == null) { - return Mono.error( - new IllegalArgumentException("Parameter resourceAssociationName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, resourceAssociationName, context); - } - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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, NetworkSecurityPerimeterConfiguration> - beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, String resourceAssociationName) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, resourceAssociationName); - return this.client.getLroResult( - mono, this.client.getHttpPipeline(), NetworkSecurityPerimeterConfiguration.class, - NetworkSecurityPerimeterConfiguration.class, this.client.getContext()); - } - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @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, NetworkSecurityPerimeterConfiguration> - beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, String resourceAssociationName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, resourceAssociationName, context); - return this.client.getLroResult( - mono, this.client.getHttpPipeline(), NetworkSecurityPerimeterConfiguration.class, - NetworkSecurityPerimeterConfiguration.class, context); - } - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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, NetworkSecurityPerimeterConfiguration> - beginCreateOrUpdate(String resourceGroupName, String namespaceName, String resourceAssociationName) { - return this.beginCreateOrUpdateAsync(resourceGroupName, namespaceName, resourceAssociationName).getSyncPoller(); - } - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @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, NetworkSecurityPerimeterConfiguration> - beginCreateOrUpdate(String resourceGroupName, String namespaceName, String resourceAssociationName, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, namespaceName, resourceAssociationName, context) - .getSyncPoller(); - } - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, - String namespaceName, String resourceAssociationName) { - return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, resourceAssociationName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String namespaceName, String resourceAssociationName, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, resourceAssociationName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkSecurityPerimeterConfiguration createOrUpdate(String resourceGroupName, String namespaceName, - String resourceAssociationName) { - return createOrUpdateAsync(resourceGroupName, namespaceName, resourceAssociationName).block(); - } - - /** - * Refreshes any information about the association. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param resourceAssociationName The ResourceAssociation Name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkSecurityPerimeterConfiguration createOrUpdate(String resourceGroupName, String namespaceName, - String resourceAssociationName, Context context) { - return createOrUpdateAsync(resourceGroupName, namespaceName, resourceAssociationName, context).block(); - } } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/NetworkSecurityPerimeterConfigurationsOperationsClientImpl.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/NetworkSecurityPerimeterConfigurationsOperationsClientImpl.java new file mode 100644 index 000000000000..65313a0c6bba --- /dev/null +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/NetworkSecurityPerimeterConfigurationsOperationsClientImpl.java @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventhubs.implementation; + +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.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventhubs.fluent.NetworkSecurityPerimeterConfigurationsOperationsClient; +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 + * NetworkSecurityPerimeterConfigurationsOperationsClient. + */ +public final class NetworkSecurityPerimeterConfigurationsOperationsClientImpl + implements NetworkSecurityPerimeterConfigurationsOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final NetworkSecurityPerimeterConfigurationsOperationsService service; + + /** + * The service client containing this operation class. + */ + private final EventHubManagementClientImpl client; + + /** + * Initializes an instance of NetworkSecurityPerimeterConfigurationsOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NetworkSecurityPerimeterConfigurationsOperationsClientImpl(EventHubManagementClientImpl client) { + this.service = RestProxy.create(NetworkSecurityPerimeterConfigurationsOperationsService.class, + client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for + * EventHubManagementClientNetworkSecurityPerimeterConfigurationsOperations to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") + public interface NetworkSecurityPerimeterConfigurationsOperationsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkSecurityPerimeterConfigurations/{resourceAssociationName}/reconcile") + @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("namespaceName") String namespaceName, + @PathParam("resourceAssociationName") String resourceAssociationName, @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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>> createOrUpdateWithResponseAsync(String resourceGroupName, + String namespaceName, String resourceAssociationName) { + 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 (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (resourceAssociationName == null) { + return Mono.error( + new IllegalArgumentException("Parameter resourceAssociationName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, resourceAssociationName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String namespaceName, String resourceAssociationName, 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 (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (resourceAssociationName == null) { + return Mono.error( + new IllegalArgumentException("Parameter resourceAssociationName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, namespaceName, resourceAssociationName, accept, + context); + } + + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, + String resourceAssociationName) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, resourceAssociationName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @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> beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, + String resourceAssociationName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, resourceAssociationName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginCreateOrUpdate(String resourceGroupName, String namespaceName, + String resourceAssociationName) { + return this.beginCreateOrUpdateAsync(resourceGroupName, namespaceName, resourceAssociationName).getSyncPoller(); + } + + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @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> beginCreateOrUpdate(String resourceGroupName, String namespaceName, + String resourceAssociationName, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, namespaceName, resourceAssociationName, context) + .getSyncPoller(); + } + + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 createOrUpdateAsync(String resourceGroupName, String namespaceName, + String resourceAssociationName) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, resourceAssociationName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @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 createOrUpdateAsync(String resourceGroupName, String namespaceName, + String resourceAssociationName, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, resourceAssociationName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 createOrUpdate(String resourceGroupName, String namespaceName, String resourceAssociationName) { + createOrUpdateAsync(resourceGroupName, namespaceName, resourceAssociationName).block(); + } + + /** + * Refreshes any information about the association. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param resourceAssociationName The ResourceAssociation Name. + * @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 createOrUpdate(String resourceGroupName, String namespaceName, String resourceAssociationName, + Context context) { + createOrUpdateAsync(resourceGroupName, namespaceName, resourceAssociationName, context).block(); + } +} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/OperationsClientImpl.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/OperationsClientImpl.java index 4ea5f7a8ed08..2a00db814f26 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/OperationsClientImpl.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.eventhubs.fluent.OperationsClient; import com.azure.resourcemanager.eventhubs.fluent.models.OperationInner; -import com.azure.resourcemanager.eventhubs.implementation.models.OperationListResult; +import com.azure.resourcemanager.eventhubs.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -59,14 +59,14 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for EventHubManagementClientOperations to be used by the proxy service to * perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "EventHubManagementClientOperations") + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.EventHub/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,7 +74,7 @@ Mono> list(@HostParam("endpoint") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -82,8 +82,8 @@ Mono> listNext(@PathParam(value = "nextLink", enco * * @throws 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 Operation items along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return result of the request to list Event Hub operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -107,8 +107,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Operation items along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return result of the request to list Event Hub operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -128,7 +128,7 @@ 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 paged collection of Operation items as paginated response with {@link PagedFlux}. + * @return result of the request to list Event Hub operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync() { @@ -142,7 +142,7 @@ public 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 paged collection of Operation items as paginated response with {@link PagedFlux}. + * @return result of the request to list Event Hub operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -155,7 +155,7 @@ private PagedFlux listAsync(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 paged collection of Operation items as paginated response with {@link PagedIterable}. + * @return result of the request to list Event Hub operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -169,7 +169,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Operation items as paginated response with {@link PagedIterable}. + * @return result of the request to list Event Hub operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -183,8 +183,8 @@ 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 paged collection of Operation items along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return result of the request to list Event Hub operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -210,8 +210,8 @@ 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 paged collection of Operation items along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return result of the request to list Event Hub operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/PrivateEndpointConnectionsClientImpl.java index 2a383aea22a4..9b4b5bdf11d4 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/PrivateEndpointConnectionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.eventhubs.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.eventhubs.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.eventhubs.implementation.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.eventhubs.models.PrivateEndpointConnectionListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,45 +67,47 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi * The interface defining all the services for EventHubManagementClientPrivateEndpointConnections to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "EventHubManagementClientPrivateEndpointConnections") + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") public interface PrivateEndpointConnectionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") PrivateEndpointConnectionInner parameters, Context context); + @BodyParam("application/json") PrivateEndpointConnectionInner parameters, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -113,33 +115,28 @@ Mono> list(@HostParam("endpoint") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets a description for the specified Private Endpoint Connection name. + * Gets the available PrivateEndpointConnections within a namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a description for the specified Private Endpoint Connection name along with {@link Response} on + * @return the available PrivateEndpointConnections within a namespace along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String namespaceName, String privateEndpointConnectionName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String namespaceName) { 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.")); @@ -147,42 +144,38 @@ public Mono> getWithResponseAsync(Strin if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } - if (privateEndpointConnectionName == null) { + if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + "Parameter this.client.getSubscriptionId() 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, namespaceName, privateEndpointConnectionName, - accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, namespaceName, + 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)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a description for the specified Private Endpoint Connection name. + * Gets the available PrivateEndpointConnections within a namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @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 description for the specified Private Endpoint Connection name along with {@link Response} on + * @return the available PrivateEndpointConnections within a namespace along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String namespaceName, String privateEndpointConnectionName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String namespaceName, 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.")); @@ -190,75 +183,91 @@ private Mono> getWithResponseAsync(Stri if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } - if (privateEndpointConnectionName == null) { + if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + "Parameter this.client.getSubscriptionId() 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, namespaceName, privateEndpointConnectionName, accept, context); + return service + .list(this.client.getEndpoint(), resourceGroupName, namespaceName, 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)); } /** - * Gets a description for the specified Private Endpoint Connection name. + * Gets the available PrivateEndpointConnections within a namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a description for the specified Private Endpoint Connection name on successful completion of - * {@link Mono}. + * @return the available PrivateEndpointConnections within a namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String namespaceName, - String privateEndpointConnectionName) { - return getWithResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String namespaceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, namespaceName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Gets a description for the specified Private Endpoint Connection name. + * Gets the available PrivateEndpointConnections within a namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @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 description for the specified Private Endpoint Connection name along with {@link Response}. + * @return the available PrivateEndpointConnections within a namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String namespaceName, - String privateEndpointConnectionName, Context context) { - return getWithResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String namespaceName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, namespaceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Gets a description for the specified Private Endpoint Connection name. + * Gets the available PrivateEndpointConnections within a namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a description for the specified Private Endpoint Connection name. + * @return the available PrivateEndpointConnections within a namespace as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get(String resourceGroupName, String namespaceName, - String privateEndpointConnectionName) { - return getWithResponse(resourceGroupName, namespaceName, privateEndpointConnectionName, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String namespaceName) { + return new PagedIterable<>(listAsync(resourceGroupName, namespaceName)); + } + + /** + * Gets the available PrivateEndpointConnections within a namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @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 available PrivateEndpointConnections within a namespace as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String namespaceName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, namespaceName, context)); } /** * Creates or updates PrivateEndpointConnections of service namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. @@ -295,19 +304,18 @@ public Mono> createOrUpdateWithResponse } else { parameters.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, namespaceName, privateEndpointConnectionName, - contentType, accept, parameters, context)) + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates PrivateEndpointConnections of service namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. @@ -346,18 +354,17 @@ private Mono> createOrUpdateWithRespons } else { parameters.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, namespaceName, privateEndpointConnectionName, - contentType, accept, parameters, context); + parameters, accept, context); } /** * Creates or updates PrivateEndpointConnections of service namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. @@ -376,7 +383,7 @@ public Mono createOrUpdateAsync(String resourceG /** * Creates or updates PrivateEndpointConnections of service namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. @@ -397,7 +404,7 @@ public Response createOrUpdateWithResponse(Strin /** * Creates or updates PrivateEndpointConnections of service namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @param parameters Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. @@ -416,7 +423,7 @@ public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, S /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -431,10 +438,6 @@ public Mono>> deleteWithResponseAsync(String resourceG 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.")); @@ -442,19 +445,26 @@ public Mono>> deleteWithResponseAsync(String resourceG if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 (privateEndpointConnectionName == null) { return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, privateEndpointConnectionName, context)) + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, namespaceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), privateEndpointConnectionName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @param context The context to associate with this operation. @@ -470,10 +480,6 @@ private Mono>> deleteWithResponseAsync(String resource 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.")); @@ -481,19 +487,24 @@ private Mono>> deleteWithResponseAsync(String resource if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 (privateEndpointConnectionName == null) { return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName 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, namespaceName, privateEndpointConnectionName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, namespaceName, this.client.getApiVersion(), + this.client.getSubscriptionId(), privateEndpointConnectionName, accept, context); } /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -513,7 +524,7 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @param context The context to associate with this operation. @@ -535,7 +546,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -552,7 +563,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @param context The context to associate with this operation. @@ -571,7 +582,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -589,7 +600,7 @@ public Mono deleteAsync(String resourceGroupName, String namespaceName, /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @param context The context to associate with this operation. @@ -608,7 +619,7 @@ private Mono deleteAsync(String resourceGroupName, String namespaceName, S /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -623,7 +634,7 @@ public void delete(String resourceGroupName, String namespaceName, String privat /** * Deletes an existing namespace. This operation also removes all associated resources under the namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @param context The context to associate with this operation. @@ -638,27 +649,24 @@ public void delete(String resourceGroupName, String namespaceName, String privat } /** - * Gets the available PrivateEndpointConnections within a namespace. + * Gets a description for the specified Private Endpoint Connection name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available PrivateEndpointConnections within a namespace along with {@link PagedResponse} on + * @return a description for the specified Private Endpoint Connection name along with {@link Response} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String namespaceName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String namespaceName, 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.")); @@ -666,38 +674,42 @@ private Mono> listSinglePageAsync( if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName 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"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, namespaceName, + privateEndpointConnectionName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the available PrivateEndpointConnections within a namespace. + * Gets a description for the specified Private Endpoint Connection name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @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 available PrivateEndpointConnections within a namespace along with {@link PagedResponse} on + * @return a description for the specified Private Endpoint Connection name along with {@link Response} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String namespaceName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String namespaceName, String privateEndpointConnectionName, 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.")); @@ -705,81 +717,73 @@ private Mono> listSinglePageAsync( if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName 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(), - resourceGroupName, namespaceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), resourceGroupName, namespaceName, privateEndpointConnectionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** - * Gets the available PrivateEndpointConnections within a namespace. + * Gets a description for the specified Private Endpoint Connection name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available PrivateEndpointConnections within a namespace as paginated response with {@link PagedFlux}. + * @return a description for the specified Private Endpoint Connection name on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String namespaceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, namespaceName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String namespaceName, + String privateEndpointConnectionName) { + return getWithResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets the available PrivateEndpointConnections within a namespace. + * Gets a description for the specified Private Endpoint Connection name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @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 available PrivateEndpointConnections within a namespace as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String namespaceName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, namespaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the available PrivateEndpointConnections within a namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available PrivateEndpointConnections within a namespace as paginated response with - * {@link PagedIterable}. + * @return a description for the specified Private Endpoint Connection name along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String namespaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, namespaceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String namespaceName, + String privateEndpointConnectionName, Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName, context).block(); } /** - * Gets the available PrivateEndpointConnections within a namespace. + * Gets a description for the specified Private Endpoint Connection name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param context The context to associate with this operation. + * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available PrivateEndpointConnections within a namespace as paginated response with - * {@link PagedIterable}. + * @return a description for the specified Private Endpoint Connection name. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String namespaceName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, namespaceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner get(String resourceGroupName, String namespaceName, + String privateEndpointConnectionName) { + return getWithResponse(resourceGroupName, namespaceName, privateEndpointConnectionName, Context.NONE) + .getValue(); } /** @@ -789,7 +793,7 @@ public PagedIterable list(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 the available PrivateEndpointConnections within a namespace along with {@link PagedResponse} on + * @return result of the list of all private endpoint connections operation along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -816,7 +820,7 @@ private Mono> listNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available PrivateEndpointConnections within a namespace along with {@link PagedResponse} on + * @return result of the list of all private endpoint connections operation along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/PrivateLinkResourcesClientImpl.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/PrivateLinkResourcesClientImpl.java index f59eb854cdf1..897e1b477dc2 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/PrivateLinkResourcesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.implementation; @@ -54,23 +54,23 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource * The interface defining all the services for EventHubManagementClientPrivateLinkResources to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "EventHubManagementClientPrivateLinkResources") + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") public interface PrivateLinkResourcesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); } /** * Gets lists of resources that supports Privatelinks. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -85,10 +85,6 @@ public Mono> getWithResponseAsync( 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.")); @@ -96,17 +92,21 @@ public Mono> getWithResponseAsync( if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, namespaceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets lists of resources that supports Privatelinks. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -122,10 +122,6 @@ private Mono> getWithResponseAsync 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.")); @@ -133,16 +129,20 @@ private Mono> getWithResponseAsync if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, accept, context); + return service.get(this.client.getEndpoint(), resourceGroupName, namespaceName, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); } /** * Gets lists of resources that supports Privatelinks. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -157,7 +157,7 @@ public Mono getAsync(String resourceGroupNa /** * Gets lists of resources that supports Privatelinks. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -174,7 +174,7 @@ public Response getWithResponse(String reso /** * Gets lists of resources that supports Privatelinks. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/SchemaRegistriesClientImpl.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/SchemaRegistriesClientImpl.java index 2e869729d1ec..adcd3c3ea6e4 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/SchemaRegistriesClientImpl.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/SchemaRegistriesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.eventhubs.fluent.SchemaRegistriesClient; import com.azure.resourcemanager.eventhubs.fluent.models.SchemaGroupInner; -import com.azure.resourcemanager.eventhubs.implementation.models.SchemaGroupListResult; +import com.azure.resourcemanager.eventhubs.models.SchemaGroupListResult; import reactor.core.publisher.Mono; /** @@ -62,80 +62,79 @@ public final class SchemaRegistriesClientImpl implements SchemaRegistriesClient * The interface defining all the services for EventHubManagementClientSchemaRegistries to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "EventHubManagementClientSchemaRegistries") + @Host("{$host}") + @ServiceInterface(name = "EventHubManagementCl") public interface SchemaRegistriesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listByNamespace(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("schemaGroupName") String schemaGroupName, @HeaderParam("Accept") String accept, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$skip") Integer skip, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("schemaGroupName") String schemaGroupName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") SchemaGroupInner parameters, + @PathParam("schemaGroupName") String schemaGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") SchemaGroupInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @PathParam("schemaGroupName") String schemaGroupName, Context context); + @PathParam("schemaGroupName") String schemaGroupName, @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/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNamespace(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName, - @QueryParam("$skip") Integer skip, @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, - Context context); + @PathParam("schemaGroupName") String schemaGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByNamespaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets the details of an EventHub schema group. + * Gets all the Schema Groups in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param schemaGroupName The Schema Group name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an EventHub schema group along with {@link Response} on successful completion of + * @return all the Schema Groups in a Namespace along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, - String schemaGroupName) { + private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, + String namespaceName, Integer skip, Integer top) { 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.")); @@ -143,41 +142,42 @@ public Mono> getWithResponseAsync(String resourceGrou if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } - if (schemaGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter schemaGroupName 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"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, schemaGroupName, accept, context)) + .withContext(context -> service.listByNamespace(this.client.getEndpoint(), resourceGroupName, namespaceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), skip, top, 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 details of an EventHub schema group. + * Gets all the Schema Groups in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param schemaGroupName The Schema Group name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. * @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 details of an EventHub schema group along with {@link Response} on successful completion of + * @return all the Schema Groups in a Namespace along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, - String schemaGroupName, Context context) { + private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, + String namespaceName, Integer skip, Integer top, 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.")); @@ -185,71 +185,123 @@ private Mono> getWithResponseAsync(String resourceGro if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } - if (schemaGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter schemaGroupName 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, schemaGroupName, accept, context); + return service + .listByNamespace(this.client.getEndpoint(), resourceGroupName, namespaceName, this.client.getApiVersion(), + this.client.getSubscriptionId(), skip, top, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets the details of an EventHub schema group. + * Gets all the Schema Groups in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param schemaGroupName The Schema Group name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an EventHub schema group on successful completion of {@link Mono}. + * @return all the Schema Groups in a Namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String namespaceName, String schemaGroupName) { - return getWithResponseAsync(resourceGroupName, namespaceName, schemaGroupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, + Integer skip, Integer top) { + return new PagedFlux<>(() -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); } /** - * Gets the details of an EventHub schema group. + * Gets all the Schema Groups in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param schemaGroupName The Schema Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 the Schema Groups in a Namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { + final Integer skip = null; + final Integer top = null; + return new PagedFlux<>(() -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + } + + /** + * Gets all the Schema Groups in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. * @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 details of an EventHub schema group along with {@link Response}. + * @return all the Schema Groups in a Namespace as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String namespaceName, - String schemaGroupName, Context context) { - return getWithResponseAsync(resourceGroupName, namespaceName, schemaGroupName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, + Integer skip, Integer top, Context context) { + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top, context), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink, context)); } /** - * Gets the details of an EventHub schema group. + * Gets all the Schema Groups in a Namespace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param schemaGroupName The Schema Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an EventHub schema group. + * @return all the Schema Groups in a Namespace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SchemaGroupInner get(String resourceGroupName, String namespaceName, String schemaGroupName) { - return getWithResponse(resourceGroupName, namespaceName, schemaGroupName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + final Integer skip = null; + final Integer top = null; + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, skip, top)); + } + + /** + * Gets all the Schema Groups in a Namespace. + * + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param namespaceName The Namespace name. + * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains + * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting + * point to use for subsequent calls. + * @param top May be used to limit the number of results to the most recent N usageDetails. + * @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 all the Schema Groups in a Namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, Integer skip, + Integer top, Context context) { + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, skip, top, context)); } /** * Creates or Updates an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -266,10 +318,6 @@ public Mono> createOrUpdateWithResponseAsync(String r 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.")); @@ -281,24 +329,27 @@ public Mono> createOrUpdateWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter schemaGroupName 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 contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, schemaGroupName, contentType, accept, - parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, namespaceName, + schemaGroupName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or Updates an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -316,10 +367,6 @@ private Mono> createOrUpdateWithResponseAsync(String 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.")); @@ -331,23 +378,25 @@ private Mono> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter schemaGroupName 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 contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, schemaGroupName, contentType, accept, - parameters, context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, namespaceName, schemaGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); } /** * Creates or Updates an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -366,7 +415,7 @@ public Mono createOrUpdateAsync(String resourceGroupName, Stri /** * Creates or Updates an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -386,7 +435,7 @@ public Response createOrUpdateWithResponse(String resourceGrou /** * Creates or Updates an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @param parameters Parameters supplied to create an Event Hub resource. @@ -405,7 +454,7 @@ public SchemaGroupInner createOrUpdate(String resourceGroupName, String namespac /** * Deletes an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -420,10 +469,6 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St 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.")); @@ -435,16 +480,21 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono .error(new IllegalArgumentException("Parameter schemaGroupName 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"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, schemaGroupName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, namespaceName, + schemaGroupName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @param context The context to associate with this operation. @@ -460,10 +510,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -475,15 +521,20 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono .error(new IllegalArgumentException("Parameter schemaGroupName 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.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, schemaGroupName, context); + return service.delete(this.client.getEndpoint(), resourceGroupName, namespaceName, schemaGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** * Deletes an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -500,7 +551,7 @@ public Mono deleteAsync(String resourceGroupName, String namespaceName, St /** * Deletes an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @param context The context to associate with this operation. @@ -518,7 +569,7 @@ public Response deleteWithResponse(String resourceGroupName, String namesp /** * Deletes an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param schemaGroupName The Schema Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -531,31 +582,24 @@ public void delete(String resourceGroupName, String namespaceName, String schema } /** - * Gets all the Schema Groups in a Namespace. + * Gets the details of an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains - * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting - * point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. + * @param schemaGroupName The Schema Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 the Schema Groups in a Namespace along with {@link PagedResponse} on successful completion of + * @return the details of an EventHub schema group along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, - String namespaceName, Integer skip, Integer top) { + public Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, + String schemaGroupName) { 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.")); @@ -563,42 +607,41 @@ private Mono> listByNamespaceSinglePageAsync(Str if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } + if (schemaGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter schemaGroupName 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"; return FluxUtil - .withContext(context -> service.listByNamespace(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, namespaceName, skip, top, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, namespaceName, + schemaGroupName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets all the Schema Groups in a Namespace. + * Gets the details of an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains - * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting - * point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. + * @param schemaGroupName The Schema Group name. * @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 all the Schema Groups in a Namespace along with {@link PagedResponse} on successful completion of + * @return the details of an EventHub schema group along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNamespaceSinglePageAsync(String resourceGroupName, - String namespaceName, Integer skip, Integer top, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String namespaceName, + String schemaGroupName, 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.")); @@ -606,113 +649,69 @@ private Mono> listByNamespaceSinglePageAsync(Str if (namespaceName == null) { return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); } + if (schemaGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter schemaGroupName 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 - .listByNamespace(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, namespaceName, skip, top, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.get(this.client.getEndpoint(), resourceGroupName, namespaceName, schemaGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** - * Gets all the Schema Groups in a Namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains - * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting - * point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 the Schema Groups in a Namespace as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, - Integer skip, Integer top) { - return new PagedFlux<>(() -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top), - nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); - } - - /** - * Gets all the Schema Groups in a Namespace. + * Gets the details of an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. + * @param schemaGroupName The Schema Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 the Schema Groups in a Namespace as paginated response with {@link PagedFlux}. + * @return the details of an EventHub schema group on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { - final Integer skip = null; - final Integer top = null; - return new PagedFlux<>(() -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top), - nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String namespaceName, String schemaGroupName) { + return getWithResponseAsync(resourceGroupName, namespaceName, schemaGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets all the Schema Groups in a Namespace. + * Gets the details of an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains - * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting - * point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. + * @param schemaGroupName The Schema Group name. * @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 all the Schema Groups in a Namespace as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName, - Integer skip, Integer top, Context context) { - return new PagedFlux<>( - () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top, context), - nextLink -> listByNamespaceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all the Schema Groups in a Namespace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param namespaceName The Namespace name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 the Schema Groups in a Namespace as paginated response with {@link PagedIterable}. + * @return the details of an EventHub schema group along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { - final Integer skip = null; - final Integer top = null; - return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, skip, top)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String namespaceName, + String schemaGroupName, Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, schemaGroupName, context).block(); } /** - * Gets all the Schema Groups in a Namespace. + * Gets the details of an EventHub schema group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. - * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains - * a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting - * point to use for subsequent calls. - * @param top May be used to limit the number of results to the most recent N usageDetails. - * @param context The context to associate with this operation. + * @param schemaGroupName The Schema Group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 the Schema Groups in a Namespace as paginated response with {@link PagedIterable}. + * @return the details of an EventHub schema group. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByNamespace(String resourceGroupName, String namespaceName, Integer skip, - Integer top, Context context) { - return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, skip, top, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public SchemaGroupInner get(String resourceGroupName, String namespaceName, String schemaGroupName) { + return getWithResponse(resourceGroupName, namespaceName, schemaGroupName, Context.NONE).getValue(); } /** @@ -722,7 +721,7 @@ public PagedIterable listByNamespace(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 all the Schema Groups in a Namespace along with {@link PagedResponse} on successful completion of + * @return the result of the List SchemaGroup operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -750,7 +749,7 @@ private Mono> listByNamespaceNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 the Schema Groups in a Namespace along with {@link PagedResponse} on successful completion of + * @return the result of the List SchemaGroup operation along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AccessRights.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AccessRights.java index 498e486dfb60..22b770edbfb1 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AccessRights.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AccessRights.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/ApplicationGroupListResult.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ApplicationGroupListResult.java similarity index 73% rename from sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/ApplicationGroupListResult.java rename to sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ApplicationGroupListResult.java index d35c95fec399..a18426c3f9b2 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/ApplicationGroupListResult.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ApplicationGroupListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.eventhubs.implementation.models; +package com.azure.resourcemanager.eventhubs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a ApplicationGroup list operation. + * The response from the List Application Groups operation. */ -@Immutable +@Fluent public final class ApplicationGroupListResult implements JsonSerializable { /* - * The ApplicationGroup items on this page + * Result of the List Application Groups operation. */ private List value; /* - * The link to the next page of items + * Link to the next set of results. Not empty if Value contains an incomplete list of Authorization Rules */ private String nextLink; /** * Creates an instance of ApplicationGroupListResult class. */ - private ApplicationGroupListResult() { + public ApplicationGroupListResult() { } /** - * Get the value property: The ApplicationGroup items on this page. + * Get the value property: Result of the List Application Groups operation. * * @return the value value. */ @@ -45,7 +44,19 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: Result of the List Application Groups operation. + * + * @param value the value value to set. + * @return the ApplicationGroupListResult object itself. + */ + public ApplicationGroupListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains an incomplete list of + * Authorization Rules. * * @return the nextLink value. */ @@ -59,17 +70,11 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ApplicationGroupListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ApplicationGroupListResult.class); - /** * {@inheritDoc} */ @@ -77,7 +82,6 @@ public void validate() { 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(); } @@ -87,7 +91,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ApplicationGroupListResult 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 ApplicationGroupListResult. */ public static ApplicationGroupListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ApplicationGroupPolicy.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ApplicationGroupPolicy.java index 094fd130940d..42f0bb41d0e7 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ApplicationGroupPolicy.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ApplicationGroupPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ApplicationGroupPolicyType.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ApplicationGroupPolicyType.java index 0b1f3c5f108b..fe8d352b7ea6 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ApplicationGroupPolicyType.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ApplicationGroupPolicyType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/ArmDisasterRecoveryListResult.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ArmDisasterRecoveryListResult.java similarity index 73% rename from sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/ArmDisasterRecoveryListResult.java rename to sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ArmDisasterRecoveryListResult.java index 8d7721003753..a5a6e33dddd0 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/ArmDisasterRecoveryListResult.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ArmDisasterRecoveryListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.eventhubs.implementation.models; +package com.azure.resourcemanager.eventhubs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,29 @@ import java.util.List; /** - * The response of a ArmDisasterRecovery list operation. + * The result of the List Alias(Disaster Recovery configuration) operation. */ -@Immutable +@Fluent public final class ArmDisasterRecoveryListResult implements JsonSerializable { /* - * The ArmDisasterRecovery items on this page + * List of Alias(Disaster Recovery configurations) */ private List value; /* - * The link to the next page of items + * Link to the next set of results. Not empty if Value contains incomplete list of Alias(Disaster Recovery + * configuration) */ private String nextLink; /** * Creates an instance of ArmDisasterRecoveryListResult class. */ - private ArmDisasterRecoveryListResult() { + public ArmDisasterRecoveryListResult() { } /** - * Get the value property: The ArmDisasterRecovery items on this page. + * Get the value property: List of Alias(Disaster Recovery configurations). * * @return the value value. */ @@ -45,7 +45,19 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: List of Alias(Disaster Recovery configurations). + * + * @param value the value value to set. + * @return the ArmDisasterRecoveryListResult object itself. + */ + public ArmDisasterRecoveryListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * Alias(Disaster Recovery configuration). * * @return the nextLink value. */ @@ -59,17 +71,11 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ArmDisasterRecoveryListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ArmDisasterRecoveryListResult.class); - /** * {@inheritDoc} */ @@ -77,7 +83,6 @@ public void validate() { 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(); } @@ -87,7 +92,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ArmDisasterRecoveryListResult 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 ArmDisasterRecoveryListResult. */ public static ArmDisasterRecoveryListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/AuthorizationRuleListResult.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AuthorizationRuleListResult.java similarity index 67% rename from sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/AuthorizationRuleListResult.java rename to sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AuthorizationRuleListResult.java index 001920942a4d..1efe3d89a00b 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/AuthorizationRuleListResult.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AuthorizationRuleListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.eventhubs.implementation.models; +package com.azure.resourcemanager.eventhubs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a AuthorizationRule list operation. + * The response from the List namespace operation. */ -@Immutable +@Fluent public final class AuthorizationRuleListResult implements JsonSerializable { /* - * The AuthorizationRule items on this page + * Result of the List Authorization Rules operation. */ private List value; /* - * The link to the next page of items + * Link to the next set of results. Not empty if Value contains an incomplete list of Authorization Rules */ private String nextLink; /** * Creates an instance of AuthorizationRuleListResult class. */ - private AuthorizationRuleListResult() { + public AuthorizationRuleListResult() { } /** - * Get the value property: The AuthorizationRule items on this page. + * Get the value property: Result of the List Authorization Rules operation. * * @return the value value. */ @@ -45,7 +44,19 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: Result of the List Authorization Rules operation. + * + * @param value the value value to set. + * @return the AuthorizationRuleListResult object itself. + */ + public AuthorizationRuleListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains an incomplete list of + * Authorization Rules. * * @return the nextLink value. */ @@ -53,23 +64,29 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: Link to the next set of results. Not empty if Value contains an incomplete list of + * Authorization Rules. + * + * @param nextLink the nextLink value to set. + * @return the AuthorizationRuleListResult object itself. + */ + public AuthorizationRuleListResult 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model AuthorizationRuleListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(AuthorizationRuleListResult.class); - /** * {@inheritDoc} */ @@ -87,7 +104,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AuthorizationRuleListResult 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 AuthorizationRuleListResult. */ public static AuthorizationRuleListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AvailableCluster.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AvailableCluster.java index 2dfb10e89c83..d65b13ecd668 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AvailableCluster.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/AvailableCluster.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.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,7 +14,7 @@ /** * Pre-provisioned and readily available Event Hubs Cluster count per region. */ -@Immutable +@Fluent public final class AvailableCluster implements JsonSerializable { /* * Location fo the Available Cluster @@ -24,7 +24,7 @@ public final class AvailableCluster implements JsonSerializable { /* - * The Cluster items on this page + * The Event Hubs Clusters present in the List Event Hubs operation results. */ private List value; /* - * The link to the next page of items + * Link to the next set of results. Empty unless the value parameter contains an incomplete list of Event Hubs + * Clusters. */ private String nextLink; /** * Creates an instance of ClusterListResult class. */ - private ClusterListResult() { + public ClusterListResult() { } /** - * Get the value property: The Cluster items on this page. + * Get the value property: The Event Hubs Clusters present in the List Event Hubs operation results. * * @return the value value. */ @@ -45,7 +45,19 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: The Event Hubs Clusters present in the List Event Hubs operation results. + * + * @param value the value value to set. + * @return the ClusterListResult object itself. + */ + public ClusterListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Empty unless the value parameter contains an + * incomplete list of Event Hubs Clusters. * * @return the nextLink value. */ @@ -53,22 +65,29 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: Link to the next set of results. Empty unless the value parameter contains an + * incomplete list of Event Hubs Clusters. + * + * @param nextLink the nextLink value to set. + * @return the ClusterListResult object itself. + */ + public ClusterListResult 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model ClusterListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ClusterListResult.class); - /** * {@inheritDoc} */ @@ -86,7 +105,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ClusterListResult 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 ClusterListResult. */ public static ClusterListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ClusterSku.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ClusterSku.java index 1b0b7cc0965c..25320e96d87f 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ClusterSku.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ClusterSku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ClusterSkuName.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ClusterSkuName.java index c12b46d4d68f..6aa52f225a73 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ClusterSkuName.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ClusterSkuName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ConfidentialCompute.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ConfidentialCompute.java deleted file mode 100644 index 409aa2dbebec..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ConfidentialCompute.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.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; - -/** - * The ConfidentialCompute model. - */ -@Fluent -public final class ConfidentialCompute implements JsonSerializable { - /* - * Setting to Enable or Disable Confidential Compute - */ - private Mode mode; - - /** - * Creates an instance of ConfidentialCompute class. - */ - public ConfidentialCompute() { - } - - /** - * Get the mode property: Setting to Enable or Disable Confidential Compute. - * - * @return the mode value. - */ - public Mode mode() { - return this.mode; - } - - /** - * Set the mode property: Setting to Enable or Disable Confidential Compute. - * - * @param mode the mode value to set. - * @return the ConfidentialCompute object itself. - */ - public ConfidentialCompute withMode(Mode mode) { - this.mode = mode; - 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()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfidentialCompute from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfidentialCompute 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 ConfidentialCompute. - */ - public static ConfidentialCompute fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfidentialCompute deserializedConfidentialCompute = new ConfidentialCompute(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedConfidentialCompute.mode = Mode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedConfidentialCompute; - }); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ConnectionState.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ConnectionState.java index 8cdc53183707..0dd70fa119a1 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ConnectionState.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ConnectionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/ConsumerGroupListResult.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ConsumerGroupListResult.java similarity index 67% rename from sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/ConsumerGroupListResult.java rename to sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ConsumerGroupListResult.java index a6ccd4fef11f..96877b7a96e8 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/ConsumerGroupListResult.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ConsumerGroupListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.eventhubs.implementation.models; +package com.azure.resourcemanager.eventhubs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a ConsumerGroup list operation. + * The result to the List Consumer Group operation. */ -@Immutable +@Fluent public final class ConsumerGroupListResult implements JsonSerializable { /* - * The ConsumerGroup items on this page + * Result of the List Consumer Group operation. */ private List value; /* - * The link to the next page of items + * Link to the next set of results. Not empty if Value contains incomplete list of Consumer Group */ private String nextLink; /** * Creates an instance of ConsumerGroupListResult class. */ - private ConsumerGroupListResult() { + public ConsumerGroupListResult() { } /** - * Get the value property: The ConsumerGroup items on this page. + * Get the value property: Result of the List Consumer Group operation. * * @return the value value. */ @@ -45,7 +44,19 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: Result of the List Consumer Group operation. + * + * @param value the value value to set. + * @return the ConsumerGroupListResult object itself. + */ + public ConsumerGroupListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * Consumer Group. * * @return the nextLink value. */ @@ -53,22 +64,29 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * Consumer Group. + * + * @param nextLink the nextLink value to set. + * @return the ConsumerGroupListResult object itself. + */ + public ConsumerGroupListResult 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model ConsumerGroupListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ConsumerGroupListResult.class); - /** * {@inheritDoc} */ @@ -86,7 +104,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ConsumerGroupListResult 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 ConsumerGroupListResult. */ public static ConsumerGroupListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DefaultAction.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DefaultAction.java index 70ad1812d5d6..b85b2af1e361 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DefaultAction.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/DefaultAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Destination.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Destination.java index 430b587a26bd..7e5f3b56dc4a 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Destination.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Destination.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EHNamespaceIdContainer.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EHNamespaceIdContainer.java index 31c889cdc832..61b0ef70e0ed 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EHNamespaceIdContainer.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EHNamespaceIdContainer.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.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,7 +14,7 @@ /** * The full ARM ID of an Event Hubs Namespace. */ -@Immutable +@Fluent public final class EHNamespaceIdContainer implements JsonSerializable { /* * id parameter @@ -24,7 +24,7 @@ public final class EHNamespaceIdContainer implements JsonSerializable { /* - * The EHNamespace items on this page + * Result of the List Namespace operation */ private List value; /* - * The link to the next page of items + * Link to the next set of results. Not empty if Value contains incomplete list of namespaces. */ private String nextLink; /** * Creates an instance of EHNamespaceListResult class. */ - private EHNamespaceListResult() { + public EHNamespaceListResult() { } /** - * Get the value property: The EHNamespace items on this page. + * Get the value property: Result of the List Namespace operation. * * @return the value value. */ @@ -45,7 +44,19 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: Result of the List Namespace operation. + * + * @param value the value value to set. + * @return the EHNamespaceListResult object itself. + */ + public EHNamespaceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * namespaces. * * @return the nextLink value. */ @@ -53,22 +64,29 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * namespaces. + * + * @param nextLink the nextLink value to set. + * @return the EHNamespaceListResult object itself. + */ + public EHNamespaceListResult 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model EHNamespaceListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(EHNamespaceListResult.class); - /** * {@inheritDoc} */ @@ -86,7 +104,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of EHNamespaceListResult 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 EHNamespaceListResult. */ public static EHNamespaceListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EncodingCaptureDescription.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EncodingCaptureDescription.java index 836c492d4a61..03d0b19826f8 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EncodingCaptureDescription.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EncodingCaptureDescription.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Encryption.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Encryption.java index fc145d0a5172..ef5adea3c678 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Encryption.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Encryption.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EndPointProvisioningState.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EndPointProvisioningState.java index ee3ec7df09e3..e214e7bc81bb 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EndPointProvisioningState.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EndPointProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EntityStatus.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EntityStatus.java index dbaf53b69266..8536c422ab39 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EntityStatus.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EntityStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/EventHubListResult.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubListResult.java similarity index 68% rename from sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/EventHubListResult.java rename to sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubListResult.java index a451c31b28d3..15541bd38392 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/EventHubListResult.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.eventhubs.implementation.models; +package com.azure.resourcemanager.eventhubs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * Paged collection of Eventhub items. + * The result of the List EventHubs operation. */ -@Immutable +@Fluent public final class EventHubListResult implements JsonSerializable { /* - * The Eventhub items on this page + * Result of the List EventHubs operation. */ private List value; /* - * The link to the next page of items + * Link to the next set of results. Not empty if Value contains incomplete list of EventHubs. */ private String nextLink; /** * Creates an instance of EventHubListResult class. */ - private EventHubListResult() { + public EventHubListResult() { } /** - * Get the value property: The Eventhub items on this page. + * Get the value property: Result of the List EventHubs operation. * * @return the value value. */ @@ -45,7 +44,19 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: Result of the List EventHubs operation. + * + * @param value the value value to set. + * @return the EventHubListResult object itself. + */ + public EventHubListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * EventHubs. * * @return the nextLink value. */ @@ -53,22 +64,29 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of + * EventHubs. + * + * @param nextLink the nextLink value to set. + * @return the EventHubListResult object itself. + */ + public EventHubListResult 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model EventHubListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(EventHubListResult.class); - /** * {@inheritDoc} */ @@ -86,7 +104,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of EventHubListResult 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 EventHubListResult. */ public static EventHubListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespace.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespace.java index 272c6a2829cf..53c6cfb1b9cd 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespace.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/EventHubNamespace.java @@ -128,15 +128,6 @@ public interface EventHubNamespace extends GroupableResource, Resource.DefinitionWi EventHubNamespace.DefinitionStages.WithAuthorizationRule, EventHubNamespace.DefinitionStages.WithThroughputConfiguration, EventHubNamespace.DefinitionStages.WithMinimumTlsVersion, - EventHubNamespace.DefinitionStages.WithZoneRedundant, EventHubNamespace.DefinitionStages.WithLocalAuth { + EventHubNamespace.DefinitionStages.WithZoneRedundant { } } @@ -328,7 +305,7 @@ interface Update extends Appliable, Resource.UpdateWithTags, EventHubNamespace.UpdateStages.WithSku, EventHubNamespace.UpdateStages.WithEventHub, EventHubNamespace.UpdateStages.WithAuthorizationRule, EventHubNamespace.UpdateStages.WithThroughputConfiguration, - EventHubNamespace.UpdateStages.WithMinimumTlsVersion, EventHubNamespace.UpdateStages.WithLocalAuth { + EventHubNamespace.UpdateStages.WithMinimumTlsVersion { } /** @@ -457,29 +434,6 @@ interface WithThroughputConfiguration { Update withThroughputUnitsUpperLimit(int units); } - /** - * The stage of the event hub namespace update allowing to disable local auth. - */ - interface WithLocalAuth { - /** - * Disables SAS authentication for the Event Hubs namespace. - * - * @return next stage of the event hub namespace update - */ - default Update disableLocalAuth() { - throw new UnsupportedOperationException("[disableLocalAuth] is not supported in " + getClass()); - } - - /** - * Enables SAS authentication for the Event Hubs namespace. - * - * @return next stage of the event hub namespace update - */ - default Update enableLocalAuth() { - throw new UnsupportedOperationException("[enableLocalAuth] is not supported in " + getClass()); - } - } - /** * The stage of the event hub namespace update allowing to change minimum tls version. */ diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/FailOver.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/FailOver.java deleted file mode 100644 index a632f78bda69..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/FailOver.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.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.eventhubs.fluent.models.FailOverProperties; -import java.io.IOException; - -/** - * The FailOver model. - */ -@Fluent -public final class FailOver implements JsonSerializable { - /* - * The properties property. - */ - private FailOverProperties innerProperties; - - /** - * Creates an instance of FailOver class. - */ - public FailOver() { - } - - /** - * Get the innerProperties property: The properties property. - * - * @return the innerProperties value. - */ - private FailOverProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the primaryLocation property: Query parameter for the new primary location after failover. - * - * @return the primaryLocation value. - */ - public String primaryLocation() { - return this.innerProperties() == null ? null : this.innerProperties().primaryLocation(); - } - - /** - * Set the primaryLocation property: Query parameter for the new primary location after failover. - * - * @param primaryLocation the primaryLocation value to set. - * @return the FailOver object itself. - */ - public FailOver withPrimaryLocation(String primaryLocation) { - if (this.innerProperties() == null) { - this.innerProperties = new FailOverProperties(); - } - this.innerProperties().withPrimaryLocation(primaryLocation); - return this; - } - - /** - * Get the force property: If Force is false then graceful failover is attempted after ensuring no data loss. If - * Force flag is set to true, Forced failover is attempted with possible data loss. - * - * @return the force value. - */ - public Boolean force() { - return this.innerProperties() == null ? null : this.innerProperties().force(); - } - - /** - * Set the force property: If Force is false then graceful failover is attempted after ensuring no data loss. If - * Force flag is set to true, Forced failover is attempted with possible data loss. - * - * @param force the force value to set. - * @return the FailOver object itself. - */ - public FailOver withForce(Boolean force) { - if (this.innerProperties() == null) { - this.innerProperties = new FailOverProperties(); - } - this.innerProperties().withForce(force); - 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.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FailOver from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FailOver 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 FailOver. - */ - public static FailOver fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FailOver deserializedFailOver = new FailOver(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedFailOver.innerProperties = FailOverProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFailOver; - }); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/GeoDRRoleType.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/GeoDRRoleType.java deleted file mode 100644 index 5bb57c0540bf..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/GeoDRRoleType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * GeoDR Role Types. - */ -public final class GeoDRRoleType extends ExpandableStringEnum { - /** - * Static value Primary for GeoDRRoleType. - */ - public static final GeoDRRoleType PRIMARY = fromString("Primary"); - - /** - * Static value Secondary for GeoDRRoleType. - */ - public static final GeoDRRoleType SECONDARY = fromString("Secondary"); - - /** - * Creates a new instance of GeoDRRoleType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public GeoDRRoleType() { - } - - /** - * Creates or finds a GeoDRRoleType from its string representation. - * - * @param name a name to look for. - * @return the corresponding GeoDRRoleType. - */ - public static GeoDRRoleType fromString(String name) { - return fromString(name, GeoDRRoleType.class); - } - - /** - * Gets known GeoDRRoleType values. - * - * @return known GeoDRRoleType values. - */ - public static Collection values() { - return values(GeoDRRoleType.class); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/GeoDataReplicationProperties.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/GeoDataReplicationProperties.java deleted file mode 100644 index b8ce98f5ac1f..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/GeoDataReplicationProperties.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.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; - -/** - * GeoDR Replication properties. - */ -@Fluent -public final class GeoDataReplicationProperties implements JsonSerializable { - /* - * The maximum acceptable lag for data replication operations from the primary replica to a quorum of secondary - * replicas. When the lag exceeds the configured amount, operations on the primary replica will be failed. The - * allowed values are 0 and 5 minutes to 1 day. - */ - private Integer maxReplicationLagDurationInSeconds; - - /* - * A list of regions where replicas of the namespace are maintained. - */ - private List locations; - - /** - * Creates an instance of GeoDataReplicationProperties class. - */ - public GeoDataReplicationProperties() { - } - - /** - * Get the maxReplicationLagDurationInSeconds property: The maximum acceptable lag for data replication operations - * from the primary replica to a quorum of secondary replicas. When the lag exceeds the configured amount, - * operations on the primary replica will be failed. The allowed values are 0 and 5 minutes to 1 day. - * - * @return the maxReplicationLagDurationInSeconds value. - */ - public Integer maxReplicationLagDurationInSeconds() { - return this.maxReplicationLagDurationInSeconds; - } - - /** - * Set the maxReplicationLagDurationInSeconds property: The maximum acceptable lag for data replication operations - * from the primary replica to a quorum of secondary replicas. When the lag exceeds the configured amount, - * operations on the primary replica will be failed. The allowed values are 0 and 5 minutes to 1 day. - * - * @param maxReplicationLagDurationInSeconds the maxReplicationLagDurationInSeconds value to set. - * @return the GeoDataReplicationProperties object itself. - */ - public GeoDataReplicationProperties - withMaxReplicationLagDurationInSeconds(Integer maxReplicationLagDurationInSeconds) { - this.maxReplicationLagDurationInSeconds = maxReplicationLagDurationInSeconds; - return this; - } - - /** - * Get the locations property: A list of regions where replicas of the namespace are maintained. - * - * @return the locations value. - */ - public List locations() { - return this.locations; - } - - /** - * Set the locations property: A list of regions where replicas of the namespace are maintained. - * - * @param locations the locations value to set. - * @return the GeoDataReplicationProperties object itself. - */ - public GeoDataReplicationProperties withLocations(List locations) { - this.locations = locations; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (locations() != null) { - locations().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("maxReplicationLagDurationInSeconds", this.maxReplicationLagDurationInSeconds); - jsonWriter.writeArrayField("locations", this.locations, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GeoDataReplicationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GeoDataReplicationProperties 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 GeoDataReplicationProperties. - */ - public static GeoDataReplicationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GeoDataReplicationProperties deserializedGeoDataReplicationProperties = new GeoDataReplicationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxReplicationLagDurationInSeconds".equals(fieldName)) { - deserializedGeoDataReplicationProperties.maxReplicationLagDurationInSeconds - = reader.getNullable(JsonReader::getInt); - } else if ("locations".equals(fieldName)) { - List locations - = reader.readArray(reader1 -> NamespaceReplicaLocation.fromJson(reader1)); - deserializedGeoDataReplicationProperties.locations = locations; - } else { - reader.skipChildren(); - } - } - - return deserializedGeoDataReplicationProperties; - }); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Identity.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Identity.java index 5b8721b8ba97..08db078d5625 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Identity.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Identity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/KeySource.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/KeySource.java index f032474fd0af..33848b311f4b 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/KeySource.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/KeySource.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; /** - * Defines values for KeySource. + * Enumerates the possible value of keySource for Encryption. */ public enum KeySource { /** diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/KeyType.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/KeyType.java index d483d1a22409..f2f3e843a9da 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/KeyType.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/KeyType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/KeyVaultProperties.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/KeyVaultProperties.java index 277bdf201fbb..35016a417c51 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/KeyVaultProperties.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/KeyVaultProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ManagedServiceIdentityType.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ManagedServiceIdentityType.java index 679129cb346e..07d2b76f36e2 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ManagedServiceIdentityType.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ManagedServiceIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/MessageTimestampDescription.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/MessageTimestampDescription.java deleted file mode 100644 index 29aa88a36edf..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/MessageTimestampDescription.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.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; - -/** - * Properties of MessageTimestamp Description. - */ -@Fluent -public final class MessageTimestampDescription implements JsonSerializable { - /* - * Denotes the type of timestamp the message will hold.Two types of timestamp types - "AppendTime" and "CreateTime". - * AppendTime refers the time in which message got appended inside broker log. CreateTime refers to the time in - * which the message was generated on source side and producers can set this timestamp while sending the message. - * Default value is AppendTime. If you are using AMQP protocol, CreateTime equals AppendTime and its behavior - * remains the same. - */ - private TimestampType timestampType; - - /** - * Creates an instance of MessageTimestampDescription class. - */ - public MessageTimestampDescription() { - } - - /** - * Get the timestampType property: Denotes the type of timestamp the message will hold.Two types of timestamp types - * - "AppendTime" and "CreateTime". AppendTime refers the time in which message got appended inside broker log. - * CreateTime refers to the time in which the message was generated on source side and producers can set this - * timestamp while sending the message. Default value is AppendTime. If you are using AMQP protocol, CreateTime - * equals AppendTime and its behavior remains the same. - * - * @return the timestampType value. - */ - public TimestampType timestampType() { - return this.timestampType; - } - - /** - * Set the timestampType property: Denotes the type of timestamp the message will hold.Two types of timestamp types - * - "AppendTime" and "CreateTime". AppendTime refers the time in which message got appended inside broker log. - * CreateTime refers to the time in which the message was generated on source side and producers can set this - * timestamp while sending the message. Default value is AppendTime. If you are using AMQP protocol, CreateTime - * equals AppendTime and its behavior remains the same. - * - * @param timestampType the timestampType value to set. - * @return the MessageTimestampDescription object itself. - */ - public MessageTimestampDescription withTimestampType(TimestampType timestampType) { - this.timestampType = timestampType; - 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("timestampType", this.timestampType == null ? null : this.timestampType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MessageTimestampDescription from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MessageTimestampDescription 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 MessageTimestampDescription. - */ - public static MessageTimestampDescription fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MessageTimestampDescription deserializedMessageTimestampDescription = new MessageTimestampDescription(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("timestampType".equals(fieldName)) { - deserializedMessageTimestampDescription.timestampType - = TimestampType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMessageTimestampDescription; - }); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/MetricId.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/MetricId.java index 553cfbedcd0c..e2bafe1b2efe 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/MetricId.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/MetricId.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Mode.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Mode.java deleted file mode 100644 index 2c25fb3e853c..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Mode.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Setting to Enable or Disable Confidential Compute. - */ -public final class Mode extends ExpandableStringEnum { - /** - * Static value Disabled for Mode. - */ - public static final Mode DISABLED = fromString("Disabled"); - - /** - * Static value Enabled for Mode. - */ - public static final Mode ENABLED = fromString("Enabled"); - - /** - * Creates a new instance of Mode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Mode() { - } - - /** - * Creates or finds a Mode from its string representation. - * - * @param name a name to look for. - * @return the corresponding Mode. - */ - public static Mode fromString(String name) { - return fromString(name, Mode.class); - } - - /** - * Gets known Mode values. - * - * @return known Mode values. - */ - public static Collection values() { - return values(Mode.class); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetIpRules.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetIpRules.java index eef04d3101a2..aa7060f5d9fb 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetIpRules.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetIpRules.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetVirtualNetworkRules.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetVirtualNetworkRules.java index 7737a74a0340..25e8c97e8177 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetVirtualNetworkRules.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetVirtualNetworkRules.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NamespaceReplicaLocation.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NamespaceReplicaLocation.java deleted file mode 100644 index 11408d844b5d..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NamespaceReplicaLocation.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.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; - -/** - * Namespace replication properties. - */ -@Fluent -public final class NamespaceReplicaLocation implements JsonSerializable { - /* - * Azure regions where a replica of the namespace is maintained - */ - private String locationName; - - /* - * GeoDR Role Types - */ - private GeoDRRoleType roleType; - - /* - * state of Namespace replica. - */ - private String replicaState; - - /* - * Optional property that denotes the ARM ID of the Cluster. This is required, if a namespace replica should be - * placed in a Dedicated Event Hub Cluster - */ - private String clusterArmId; - - /** - * Creates an instance of NamespaceReplicaLocation class. - */ - public NamespaceReplicaLocation() { - } - - /** - * Get the locationName property: Azure regions where a replica of the namespace is maintained. - * - * @return the locationName value. - */ - public String locationName() { - return this.locationName; - } - - /** - * Set the locationName property: Azure regions where a replica of the namespace is maintained. - * - * @param locationName the locationName value to set. - * @return the NamespaceReplicaLocation object itself. - */ - public NamespaceReplicaLocation withLocationName(String locationName) { - this.locationName = locationName; - return this; - } - - /** - * Get the roleType property: GeoDR Role Types. - * - * @return the roleType value. - */ - public GeoDRRoleType roleType() { - return this.roleType; - } - - /** - * Set the roleType property: GeoDR Role Types. - * - * @param roleType the roleType value to set. - * @return the NamespaceReplicaLocation object itself. - */ - public NamespaceReplicaLocation withRoleType(GeoDRRoleType roleType) { - this.roleType = roleType; - return this; - } - - /** - * Get the replicaState property: state of Namespace replica. - * - * @return the replicaState value. - */ - public String replicaState() { - return this.replicaState; - } - - /** - * Get the clusterArmId property: Optional property that denotes the ARM ID of the Cluster. This is required, if a - * namespace replica should be placed in a Dedicated Event Hub Cluster. - * - * @return the clusterArmId value. - */ - public String clusterArmId() { - return this.clusterArmId; - } - - /** - * Set the clusterArmId property: Optional property that denotes the ARM ID of the Cluster. This is required, if a - * namespace replica should be placed in a Dedicated Event Hub Cluster. - * - * @param clusterArmId the clusterArmId value to set. - * @return the NamespaceReplicaLocation object itself. - */ - public NamespaceReplicaLocation withClusterArmId(String clusterArmId) { - this.clusterArmId = clusterArmId; - 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("locationName", this.locationName); - jsonWriter.writeStringField("roleType", this.roleType == null ? null : this.roleType.toString()); - jsonWriter.writeStringField("clusterArmId", this.clusterArmId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NamespaceReplicaLocation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NamespaceReplicaLocation 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 NamespaceReplicaLocation. - */ - public static NamespaceReplicaLocation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NamespaceReplicaLocation deserializedNamespaceReplicaLocation = new NamespaceReplicaLocation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("locationName".equals(fieldName)) { - deserializedNamespaceReplicaLocation.locationName = reader.getString(); - } else if ("roleType".equals(fieldName)) { - deserializedNamespaceReplicaLocation.roleType = GeoDRRoleType.fromString(reader.getString()); - } else if ("replicaState".equals(fieldName)) { - deserializedNamespaceReplicaLocation.replicaState = reader.getString(); - } else if ("clusterArmId".equals(fieldName)) { - deserializedNamespaceReplicaLocation.clusterArmId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNamespaceReplicaLocation; - }); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkRuleIpAction.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkRuleIpAction.java index d9b0f3e93bbd..f483de1c4cdd 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkRuleIpAction.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkRuleIpAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeter.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeter.java index 11c930e14c02..55a019a189ce 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeter.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeter.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.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,7 +14,7 @@ /** * NetworkSecurityPerimeter related information. */ -@Immutable +@Fluent public final class NetworkSecurityPerimeter implements JsonSerializable { /* * Fully qualified identifier of the resource @@ -34,7 +34,7 @@ public final class NetworkSecurityPerimeter implements JsonSerializable provisioningIssues() { return this.innerProperties() == null ? null : this.innerProperties().provisioningIssues(); } + /** + * Set the provisioningIssues property: List of Provisioning Issues if any. + * + * @param provisioningIssues the provisioningIssues value to set. + * @return the NetworkSecurityPerimeterConfiguration object itself. + */ + public NetworkSecurityPerimeterConfiguration withProvisioningIssues(List provisioningIssues) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkSecurityPerimeterConfigurationProperties(); + } + this.innerProperties().withProvisioningIssues(provisioningIssues); + return this; + } + /** * Get the networkSecurityPerimeter property: NetworkSecurityPerimeter related information. * @@ -212,7 +226,6 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } @@ -244,8 +257,6 @@ public static NetworkSecurityPerimeterConfiguration fromJson(JsonReader jsonRead = NetworkSecurityPerimeterConfigurationProperties.fromJson(reader); } else if ("location".equals(fieldName)) { deserializedNetworkSecurityPerimeterConfiguration.location = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfiguration.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeterConfigurationPropertiesProfile.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeterConfigurationPropertiesProfile.java index cd7ec9cc9774..3cb9802b2474 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeterConfigurationPropertiesProfile.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeterConfigurationPropertiesProfile.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.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; @@ -15,7 +15,7 @@ /** * Information about current network profile. */ -@Immutable +@Fluent public final class NetworkSecurityPerimeterConfigurationPropertiesProfile implements JsonSerializable { /* @@ -36,7 +36,7 @@ public final class NetworkSecurityPerimeterConfigurationPropertiesProfile /** * Creates an instance of NetworkSecurityPerimeterConfigurationPropertiesProfile class. */ - private NetworkSecurityPerimeterConfigurationPropertiesProfile() { + public NetworkSecurityPerimeterConfigurationPropertiesProfile() { } /** @@ -48,6 +48,17 @@ public String name() { return this.name; } + /** + * Set the name property: Name of the resource. + * + * @param name the name value to set. + * @return the NetworkSecurityPerimeterConfigurationPropertiesProfile object itself. + */ + public NetworkSecurityPerimeterConfigurationPropertiesProfile withName(String name) { + this.name = name; + return this; + } + /** * Get the accessRulesVersion property: Current access rules version. * @@ -57,6 +68,17 @@ public String accessRulesVersion() { return this.accessRulesVersion; } + /** + * Set the accessRulesVersion property: Current access rules version. + * + * @param accessRulesVersion the accessRulesVersion value to set. + * @return the NetworkSecurityPerimeterConfigurationPropertiesProfile object itself. + */ + public NetworkSecurityPerimeterConfigurationPropertiesProfile withAccessRulesVersion(String accessRulesVersion) { + this.accessRulesVersion = accessRulesVersion; + return this; + } + /** * Get the accessRules property: List of Access Rules. * @@ -66,6 +88,17 @@ public List accessRules() { return this.accessRules; } + /** + * Set the accessRules property: List of Access Rules. + * + * @param accessRules the accessRules value to set. + * @return the NetworkSecurityPerimeterConfigurationPropertiesProfile object itself. + */ + public NetworkSecurityPerimeterConfigurationPropertiesProfile withAccessRules(List accessRules) { + this.accessRules = accessRules; + return this; + } + /** * Validates the instance. * diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.java index 379ac3ca6eeb..bae07574b3b8 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.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,7 +14,7 @@ /** * Information about resource association. */ -@Immutable +@Fluent public final class NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation implements JsonSerializable { /* @@ -30,7 +30,7 @@ public final class NetworkSecurityPerimeterConfigurationPropertiesResourceAssoci /** * Creates an instance of NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation class. */ - private NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation() { + public NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation() { } /** @@ -42,6 +42,17 @@ public String name() { return this.name; } + /** + * Set the name property: Name of the resource association. + * + * @param name the name value to set. + * @return the NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation object itself. + */ + public NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation withName(String name) { + this.name = name; + return this; + } + /** * Get the accessMode property: Access Mode of the resource association. * @@ -51,6 +62,18 @@ public ResourceAssociationAccessMode accessMode() { return this.accessMode; } + /** + * Set the accessMode property: Access Mode of the resource association. + * + * @param accessMode the accessMode value to set. + * @return the NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation object itself. + */ + public NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation + withAccessMode(ResourceAssociationAccessMode accessMode) { + this.accessMode = accessMode; + return this; + } + /** * Validates the instance. * diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeterConfigurationProvisioningState.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeterConfigurationProvisioningState.java index 9d420d458abe..f9aa85d4c5c2 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeterConfigurationProvisioningState.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeterConfigurationProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRule.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRule.java index a887893f4681..c75524c916b1 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRule.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRule.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.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,7 +14,7 @@ /** * Information of Access Rule in Network Profile. */ -@Immutable +@Fluent public final class NspAccessRule implements JsonSerializable { /* * Fully qualified identifier of the resource @@ -39,7 +39,7 @@ public final class NspAccessRule implements JsonSerializable { /** * Creates an instance of NspAccessRule class. */ - private NspAccessRule() { + public NspAccessRule() { } /** @@ -51,6 +51,17 @@ public String id() { return this.id; } + /** + * Set the id property: Fully qualified identifier of the resource. + * + * @param id the id value to set. + * @return the NspAccessRule object itself. + */ + public NspAccessRule withId(String id) { + this.id = id; + return this; + } + /** * Get the name property: Name of the resource. * @@ -60,6 +71,17 @@ public String name() { return this.name; } + /** + * Set the name property: Name of the resource. + * + * @param name the name value to set. + * @return the NspAccessRule object itself. + */ + public NspAccessRule withName(String name) { + this.name = name; + return this; + } + /** * Get the type property: Type of the resource. * @@ -69,6 +91,17 @@ public String type() { return this.type; } + /** + * Set the type property: Type of the resource. + * + * @param type the type value to set. + * @return the NspAccessRule object itself. + */ + public NspAccessRule withType(String type) { + this.type = type; + return this; + } + /** * Get the properties property: Properties of Access Rule. * diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRuleDirection.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRuleDirection.java index d12eed5774c0..c92718cc559d 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRuleDirection.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRuleDirection.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRuleProperties.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRuleProperties.java index e33ad592817c..25b054f1a8d9 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRuleProperties.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRuleProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.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; @@ -15,7 +15,7 @@ /** * Properties of Access Rule. */ -@Immutable +@Fluent public final class NspAccessRuleProperties implements JsonSerializable { /* * Direction of Access Rule @@ -45,7 +45,7 @@ public final class NspAccessRuleProperties implements JsonSerializable addressPrefixes() { return this.addressPrefixes; } + /** + * Set the addressPrefixes property: Address prefixes in the CIDR format for inbound rules. + * + * @param addressPrefixes the addressPrefixes value to set. + * @return the NspAccessRuleProperties object itself. + */ + public NspAccessRuleProperties withAddressPrefixes(List addressPrefixes) { + this.addressPrefixes = addressPrefixes; + return this; + } + /** * Get the subscriptions property: Subscriptions for inbound rules. * @@ -75,6 +97,17 @@ public List subscriptions() { return this.subscriptions; } + /** + * Set the subscriptions property: Subscriptions for inbound rules. + * + * @param subscriptions the subscriptions value to set. + * @return the NspAccessRuleProperties object itself. + */ + public NspAccessRuleProperties withSubscriptions(List subscriptions) { + this.subscriptions = subscriptions; + return this; + } + /** * Get the networkSecurityPerimeters property: NetworkSecurityPerimeters for inbound rules. * diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRulePropertiesSubscriptionsItem.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRulePropertiesSubscriptionsItem.java index 8f8184feb4bb..8777e5c5a50c 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRulePropertiesSubscriptionsItem.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRulePropertiesSubscriptionsItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.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,7 +14,7 @@ /** * Subscription for inbound rule. */ -@Immutable +@Fluent public final class NspAccessRulePropertiesSubscriptionsItem implements JsonSerializable { /* @@ -25,7 +25,7 @@ public final class NspAccessRulePropertiesSubscriptionsItem /** * Creates an instance of NspAccessRulePropertiesSubscriptionsItem class. */ - private NspAccessRulePropertiesSubscriptionsItem() { + public NspAccessRulePropertiesSubscriptionsItem() { } /** @@ -37,6 +37,17 @@ public String id() { return this.id; } + /** + * Set the id property: Fully qualified identifier of subscription. + * + * @param id the id value to set. + * @return the NspAccessRulePropertiesSubscriptionsItem object itself. + */ + public NspAccessRulePropertiesSubscriptionsItem withId(String id) { + this.id = id; + return this; + } + /** * Validates the instance. * diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/OperationDisplay.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/OperationDisplay.java index 1e76addb88dd..6734aa75c570 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/OperationDisplay.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/OperationDisplay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; @@ -39,7 +39,7 @@ public final class OperationDisplay implements JsonSerializable { /* - * The Operation items on this page + * List of Event Hub operations supported by the Microsoft.EventHub resource provider. */ private List value; /* - * The link to the next page of items + * URL to get the next set of operation list results if there are any. */ private String nextLink; /** * Creates an instance of OperationListResult class. */ - private OperationListResult() { + public OperationListResult() { } /** - * Get the value property: The Operation items on this page. + * Get the value property: List of Event Hub operations supported by the Microsoft.EventHub resource provider. * * @return the value value. */ @@ -44,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: URL to get the next set of operation list results if there are any. * * @return the nextLink value. */ @@ -69,7 +70,6 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -79,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 * 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 OperationListResult. */ public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PlatformCapabilities.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PlatformCapabilities.java deleted file mode 100644 index 3f802413fc6e..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PlatformCapabilities.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.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; - -/** - * The PlatformCapabilities model. - */ -@Fluent -public final class PlatformCapabilities implements JsonSerializable { - /* - * The confidentialCompute property. - */ - private ConfidentialCompute confidentialCompute; - - /** - * Creates an instance of PlatformCapabilities class. - */ - public PlatformCapabilities() { - } - - /** - * Get the confidentialCompute property: The confidentialCompute property. - * - * @return the confidentialCompute value. - */ - public ConfidentialCompute confidentialCompute() { - return this.confidentialCompute; - } - - /** - * Set the confidentialCompute property: The confidentialCompute property. - * - * @param confidentialCompute the confidentialCompute value to set. - * @return the PlatformCapabilities object itself. - */ - public PlatformCapabilities withConfidentialCompute(ConfidentialCompute confidentialCompute) { - this.confidentialCompute = confidentialCompute; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (confidentialCompute() != null) { - confidentialCompute().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("confidentialCompute", this.confidentialCompute); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PlatformCapabilities from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PlatformCapabilities 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 PlatformCapabilities. - */ - public static PlatformCapabilities fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PlatformCapabilities deserializedPlatformCapabilities = new PlatformCapabilities(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("confidentialCompute".equals(fieldName)) { - deserializedPlatformCapabilities.confidentialCompute = ConfidentialCompute.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPlatformCapabilities; - }); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateEndpoint.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateEndpoint.java index ed7e9e41627e..0a7d37ddbc3a 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateEndpoint.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateEndpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/PrivateEndpointConnectionListResult.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateEndpointConnectionListResult.java similarity index 69% rename from sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/PrivateEndpointConnectionListResult.java rename to sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateEndpointConnectionListResult.java index 71165ab894f2..bb8ee315e3a3 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/PrivateEndpointConnectionListResult.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateEndpointConnectionListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.eventhubs.implementation.models; +package com.azure.resourcemanager.eventhubs.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,29 +14,29 @@ import java.util.List; /** - * The response of a PrivateEndpointConnection list operation. + * Result of the list of all private endpoint connections operation. */ -@Immutable +@Fluent public final class PrivateEndpointConnectionListResult implements JsonSerializable { /* - * The PrivateEndpointConnection items on this page + * A collection of private endpoint connection resources. */ private List value; /* - * The link to the next page of items + * A link for the next page of private endpoint connection resources. */ private String nextLink; /** * Creates an instance of PrivateEndpointConnectionListResult class. */ - private PrivateEndpointConnectionListResult() { + public PrivateEndpointConnectionListResult() { } /** - * Get the value property: The PrivateEndpointConnection items on this page. + * Get the value property: A collection of private endpoint connection resources. * * @return the value value. */ @@ -46,7 +45,18 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: A collection of private endpoint connection resources. + * + * @param value the value value to set. + * @return the PrivateEndpointConnectionListResult object itself. + */ + public PrivateEndpointConnectionListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: A link for the next page of private endpoint connection resources. * * @return the nextLink value. */ @@ -54,23 +64,28 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: A link for the next page of private endpoint connection resources. + * + * @param nextLink the nextLink value to set. + * @return the PrivateEndpointConnectionListResult object itself. + */ + public PrivateEndpointConnectionListResult 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model PrivateEndpointConnectionListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionListResult.class); - /** * {@inheritDoc} */ @@ -88,7 +103,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PrivateEndpointConnectionListResult. */ public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateLinkConnectionStatus.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateLinkConnectionStatus.java index f7978fbd107d..b41863d5bc4e 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateLinkConnectionStatus.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateLinkConnectionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateLinkResource.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateLinkResource.java index f3ab2fa3e577..7c60a75a2b31 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateLinkResource.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateLinkResource.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.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,7 +16,7 @@ /** * Information of the private link resource. */ -@Immutable +@Fluent public final class PrivateLinkResource implements JsonSerializable { /* * Properties of the private link resource. @@ -41,7 +41,7 @@ public final class PrivateLinkResource implements JsonSerializable requiredMembers() { return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); } + /** + * Set the requiredMembers property: The private link resource required member names. + * + * @param requiredMembers the requiredMembers value to set. + * @return the PrivateLinkResource object itself. + */ + public PrivateLinkResource withRequiredMembers(List requiredMembers) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateLinkResourceProperties(); + } + this.innerProperties().withRequiredMembers(requiredMembers); + return this; + } + /** * Get the requiredZoneNames property: The private link resource Private link DNS zone name. * @@ -107,6 +168,20 @@ public List requiredZoneNames() { return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); } + /** + * Set the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @param requiredZoneNames the requiredZoneNames value to set. + * @return the PrivateLinkResource object itself. + */ + public PrivateLinkResource withRequiredZoneNames(List requiredZoneNames) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateLinkResourceProperties(); + } + this.innerProperties().withRequiredZoneNames(requiredZoneNames); + return this; + } + /** * Validates the instance. * diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ProvisioningIssue.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ProvisioningIssue.java index 5320d904d7af..45deb7fe9579 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ProvisioningIssue.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ProvisioningIssue.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.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,7 +14,7 @@ /** * Describes Provisioning issue for given NetworkSecurityPerimeterConfiguration. */ -@Immutable +@Fluent public final class ProvisioningIssue implements JsonSerializable { /* * Name of the issue @@ -29,7 +29,7 @@ public final class ProvisioningIssue implements JsonSerializable { /* * Type of Issue @@ -29,7 +29,7 @@ public final class ProvisioningIssueProperties implements JsonSerializable { /* - * The SchemaGroup items on this page + * Result of the List SchemaGroups operation. */ private List value; /* - * The link to the next page of items + * Link to the next set of results. Not empty if Value contains incomplete list of Schema Groups. */ private String nextLink; /** * Creates an instance of SchemaGroupListResult class. */ - private SchemaGroupListResult() { + public SchemaGroupListResult() { } /** - * Get the value property: The SchemaGroup items on this page. + * Get the value property: Result of the List SchemaGroups operation. * * @return the value value. */ @@ -45,7 +44,19 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: Result of the List SchemaGroups operation. + * + * @param value the value value to set. + * @return the SchemaGroupListResult object itself. + */ + public SchemaGroupListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of Schema + * Groups. * * @return the nextLink value. */ @@ -53,22 +64,29 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of Schema + * Groups. + * + * @param nextLink the nextLink value to set. + * @return the SchemaGroupListResult object itself. + */ + public SchemaGroupListResult 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model SchemaGroupListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(SchemaGroupListResult.class); - /** * {@inheritDoc} */ @@ -86,7 +104,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SchemaGroupListResult 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 SchemaGroupListResult. */ public static SchemaGroupListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SchemaType.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SchemaType.java index 45556c87fc82..8e47885b0052 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SchemaType.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SchemaType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; @@ -21,16 +21,6 @@ public final class SchemaType extends ExpandableStringEnum { */ public static final SchemaType AVRO = fromString("Avro"); - /** - * Static value ProtoBuf for SchemaType. - */ - public static final SchemaType PROTO_BUF = fromString("ProtoBuf"); - - /** - * Static value Json for SchemaType. - */ - public static final SchemaType JSON = fromString("Json"); - /** * Creates a new instance of SchemaType value. * diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Sku.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Sku.java index de9a336d8233..d037bd014dc1 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Sku.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Sku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SkuName.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SkuName.java index 0b3f300efbd9..44819a72a6db 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SkuName.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SkuName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SkuTier.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SkuTier.java index 70dc80f29b8c..9b00e9d350b2 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SkuTier.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/SkuTier.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Subnet.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Subnet.java index 8caa9a7f42d5..fb6151c1cbce 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Subnet.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/Subnet.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ThrottlingPolicy.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ThrottlingPolicy.java index e70fdf087e8f..4e2d309c9e8a 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ThrottlingPolicy.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/ThrottlingPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; @@ -108,14 +108,11 @@ public ThrottlingPolicy withName(String name) { */ @Override public void validate() { + super.validate(); if (metricId() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property metricId in model ThrottlingPolicy")); } - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model ThrottlingPolicy")); - } } private static final ClientLogger LOGGER = new ClientLogger(ThrottlingPolicy.class); diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/TimestampType.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/TimestampType.java deleted file mode 100644 index 4ff01f6ef19d..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/TimestampType.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Denotes the type of timestamp the message will hold.Two types of timestamp types - "AppendTime" and "CreateTime". - * AppendTime refers the time in which message got appended inside broker log. CreateTime refers to the time in which - * the message was generated on source side and producers can set this timestamp while sending the message. Default - * value is AppendTime. If you are using AMQP protocol, CreateTime equals AppendTime and its behavior remains the same. - */ -public final class TimestampType extends ExpandableStringEnum { - /** - * Static value LogAppend for TimestampType. - */ - public static final TimestampType LOG_APPEND = fromString("LogAppend"); - - /** - * Static value Create for TimestampType. - */ - public static final TimestampType CREATE = fromString("Create"); - - /** - * Creates a new instance of TimestampType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TimestampType() { - } - - /** - * Creates or finds a TimestampType from its string representation. - * - * @param name a name to look for. - * @return the corresponding TimestampType. - */ - public static TimestampType fromString(String name) { - return fromString(name, TimestampType.class); - } - - /** - * Gets known TimestampType values. - * - * @return known TimestampType values. - */ - public static Collection values() { - return values(TimestampType.class); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/TlsVersion.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/TlsVersion.java index 2a6d4f0cec0c..f01d8805b755 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/TlsVersion.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/TlsVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; @@ -26,11 +26,6 @@ public final class TlsVersion extends ExpandableStringEnum { */ public static final TlsVersion ONE_TWO = fromString("1.2"); - /** - * Static value 1.3 for TlsVersion. - */ - public static final TlsVersion ONE_THREE = fromString("1.3"); - /** * Creates a new instance of TlsVersion value. * diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/UnavailableReason.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/UnavailableReason.java index 3e72640311d6..f0a4b55eacaf 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/UnavailableReason.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/UnavailableReason.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/UserAssignedIdentity.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/UserAssignedIdentity.java index df58a7be02b2..fe59a9ea22e9 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/UserAssignedIdentity.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/UserAssignedIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/UserAssignedIdentityProperties.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/UserAssignedIdentityProperties.java index bd05ba281da0..4b4c3dfe04fc 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/UserAssignedIdentityProperties.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/UserAssignedIdentityProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/package-info.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/package-info.java index 17ad78e9ff29..5d520358d84e 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/package-info.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/models/package-info.java @@ -1,8 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for EventHubsManagementClient. + * Package containing the data models for EventHubManagementClient. + * Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and VirtualNetworkRules resources. */ package com.azure.resourcemanager.eventhubs.models; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/package-info.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/package-info.java index 5f7ca1085ef4..c91a94a96075 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/package-info.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/package-info.java @@ -1,8 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the classes for EventHubsManagementClient. + * Package containing the classes for EventHubManagementClient. + * Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and VirtualNetworkRules resources. */ package com.azure.resourcemanager.eventhubs; diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/module-info.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/module-info.java index ec3751403917..5ec5b224c8b9 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/module-info.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/java/module-info.java @@ -13,6 +13,5 @@ // open packages specifically for azure core opens com.azure.resourcemanager.eventhubs.fluent.models to com.azure.core; - opens com.azure.resourcemanager.eventhubs.implementation.models to com.azure.core; opens com.azure.resourcemanager.eventhubs.models to com.azure.core; } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/resources/META-INF/azure-resourcemanager-eventhubs_metadata.json b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/resources/META-INF/azure-resourcemanager-eventhubs_metadata.json deleted file mode 100644 index c8a629577ce6..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/resources/META-INF/azure-resourcemanager-eventhubs_metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"flavor":"azure","apiVersions":{"Microsoft.EventHub":"2025-05-01-preview"},"generatedFiles":["src/main/java/com/azure/resourcemanager/eventhubs/fluent/ApplicationGroupsClient.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/ClustersClient.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConfigurationsClient.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/ConsumerGroupsClient.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/DisasterRecoveryConfigsClient.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubManagementClient.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/EventHubsClient.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/NamespacesClient.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/NetworkSecurityPerimeterConfigurationsClient.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/SchemaRegistriesClient.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AccessKeysInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ApplicationGroupInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ApplicationGroupProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ArmDisasterRecoveryInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ArmDisasterRecoveryProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AuthorizationRuleInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AuthorizationRuleProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/AvailableClustersListInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/CheckNameAvailabilityResultInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ClusterInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ClusterProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ClusterQuotaConfigurationPropertiesInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ConsumerGroupInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/ConsumerGroupProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/DestinationProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EHNamespaceIdListResultInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EHNamespaceInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EHNamespaceProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EventhubInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/EventhubProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/FailOverProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkRuleSetInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkRuleSetListResultInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkRuleSetProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkSecurityPerimeterConfigurationListInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/PrivateLinkResourcesListResultInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/SchemaGroupInner.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/SchemaGroupProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/eventhubs/fluent/package-info.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/ApplicationGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/ClustersClientImpl.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/ConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/ConsumerGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryConfigsClientImpl.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubManagementClientImpl.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubsClientImpl.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/NamespacesClientImpl.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/SchemaRegistriesClientImpl.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/ApplicationGroupListResult.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/ArmDisasterRecoveryListResult.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/AuthorizationRuleListResult.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/ClusterListResult.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/ConsumerGroupListResult.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/EHNamespaceListResult.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/EventHubListResult.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/eventhubs/implementation/models/SchemaGroupListResult.java","src/main/java/com/azure/resourcemanager/eventhubs/models/AccessRights.java","src/main/java/com/azure/resourcemanager/eventhubs/models/ApplicationGroupPolicy.java","src/main/java/com/azure/resourcemanager/eventhubs/models/ApplicationGroupPolicyType.java","src/main/java/com/azure/resourcemanager/eventhubs/models/AvailableCluster.java","src/main/java/com/azure/resourcemanager/eventhubs/models/CaptureDescription.java","src/main/java/com/azure/resourcemanager/eventhubs/models/CaptureIdentity.java","src/main/java/com/azure/resourcemanager/eventhubs/models/CaptureIdentityType.java","src/main/java/com/azure/resourcemanager/eventhubs/models/CheckNameAvailabilityParameter.java","src/main/java/com/azure/resourcemanager/eventhubs/models/CleanupPolicyRetentionDescription.java","src/main/java/com/azure/resourcemanager/eventhubs/models/ClusterSku.java","src/main/java/com/azure/resourcemanager/eventhubs/models/ClusterSkuName.java","src/main/java/com/azure/resourcemanager/eventhubs/models/ConfidentialCompute.java","src/main/java/com/azure/resourcemanager/eventhubs/models/ConnectionState.java","src/main/java/com/azure/resourcemanager/eventhubs/models/DefaultAction.java","src/main/java/com/azure/resourcemanager/eventhubs/models/Destination.java","src/main/java/com/azure/resourcemanager/eventhubs/models/EHNamespaceIdContainer.java","src/main/java/com/azure/resourcemanager/eventhubs/models/EncodingCaptureDescription.java","src/main/java/com/azure/resourcemanager/eventhubs/models/Encryption.java","src/main/java/com/azure/resourcemanager/eventhubs/models/EndPointProvisioningState.java","src/main/java/com/azure/resourcemanager/eventhubs/models/EntityStatus.java","src/main/java/com/azure/resourcemanager/eventhubs/models/FailOver.java","src/main/java/com/azure/resourcemanager/eventhubs/models/GeoDRRoleType.java","src/main/java/com/azure/resourcemanager/eventhubs/models/GeoDataReplicationProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/models/Identity.java","src/main/java/com/azure/resourcemanager/eventhubs/models/KeySource.java","src/main/java/com/azure/resourcemanager/eventhubs/models/KeyType.java","src/main/java/com/azure/resourcemanager/eventhubs/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/eventhubs/models/MessageTimestampDescription.java","src/main/java/com/azure/resourcemanager/eventhubs/models/MetricId.java","src/main/java/com/azure/resourcemanager/eventhubs/models/Mode.java","src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetIpRules.java","src/main/java/com/azure/resourcemanager/eventhubs/models/NWRuleSetVirtualNetworkRules.java","src/main/java/com/azure/resourcemanager/eventhubs/models/NamespaceReplicaLocation.java","src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkRuleIpAction.java","src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeter.java","src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeterConfiguration.java","src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeterConfigurationPropertiesProfile.java","src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation.java","src/main/java/com/azure/resourcemanager/eventhubs/models/NetworkSecurityPerimeterConfigurationProvisioningState.java","src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRule.java","src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRuleDirection.java","src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRuleProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/models/NspAccessRulePropertiesSubscriptionsItem.java","src/main/java/com/azure/resourcemanager/eventhubs/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/eventhubs/models/PlatformCapabilities.java","src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateLinkConnectionStatus.java","src/main/java/com/azure/resourcemanager/eventhubs/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/eventhubs/models/ProvisioningIssue.java","src/main/java/com/azure/resourcemanager/eventhubs/models/ProvisioningIssueProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/eventhubs/models/ProvisioningStateDR.java","src/main/java/com/azure/resourcemanager/eventhubs/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/eventhubs/models/PublicNetworkAccessFlag.java","src/main/java/com/azure/resourcemanager/eventhubs/models/RegenerateAccessKeyParameters.java","src/main/java/com/azure/resourcemanager/eventhubs/models/ResourceAssociationAccessMode.java","src/main/java/com/azure/resourcemanager/eventhubs/models/RetentionDescription.java","src/main/java/com/azure/resourcemanager/eventhubs/models/RoleDisasterRecovery.java","src/main/java/com/azure/resourcemanager/eventhubs/models/SchemaCompatibility.java","src/main/java/com/azure/resourcemanager/eventhubs/models/SchemaType.java","src/main/java/com/azure/resourcemanager/eventhubs/models/Sku.java","src/main/java/com/azure/resourcemanager/eventhubs/models/SkuName.java","src/main/java/com/azure/resourcemanager/eventhubs/models/SkuTier.java","src/main/java/com/azure/resourcemanager/eventhubs/models/Subnet.java","src/main/java/com/azure/resourcemanager/eventhubs/models/ThrottlingPolicy.java","src/main/java/com/azure/resourcemanager/eventhubs/models/TimestampType.java","src/main/java/com/azure/resourcemanager/eventhubs/models/TlsVersion.java","src/main/java/com/azure/resourcemanager/eventhubs/models/UnavailableReason.java","src/main/java/com/azure/resourcemanager/eventhubs/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/eventhubs/models/UserAssignedIdentityProperties.java","src/main/java/com/azure/resourcemanager/eventhubs/models/package-info.java","src/main/java/com/azure/resourcemanager/eventhubs/package-info.java"]} \ No newline at end of file diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-eventhubs/proxy-config.json b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-eventhubs/proxy-config.json index 1764ff5a3bc3..3bd82c78fae7 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-eventhubs/proxy-config.json +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-eventhubs/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.eventhubs.implementation.ApplicationGroupsClientImpl$ApplicationGroupsService"],["com.azure.resourcemanager.eventhubs.implementation.ClustersClientImpl$ClustersService"],["com.azure.resourcemanager.eventhubs.implementation.ConfigurationsClientImpl$ConfigurationsService"],["com.azure.resourcemanager.eventhubs.implementation.ConsumerGroupsClientImpl$ConsumerGroupsService"],["com.azure.resourcemanager.eventhubs.implementation.DisasterRecoveryConfigsClientImpl$DisasterRecoveryConfigsService"],["com.azure.resourcemanager.eventhubs.implementation.EventHubsClientImpl$EventHubsService"],["com.azure.resourcemanager.eventhubs.implementation.NamespacesClientImpl$NamespacesService"],["com.azure.resourcemanager.eventhubs.implementation.NetworkSecurityPerimeterConfigurationsClientImpl$NetworkSecurityPerimeterConfigurationsService"],["com.azure.resourcemanager.eventhubs.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.eventhubs.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.eventhubs.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.eventhubs.implementation.SchemaRegistriesClientImpl$SchemaRegistriesService"]] \ No newline at end of file +[["com.azure.resourcemanager.eventhubs.implementation.ApplicationGroupsClientImpl$ApplicationGroupsService"],["com.azure.resourcemanager.eventhubs.implementation.ClustersClientImpl$ClustersService"],["com.azure.resourcemanager.eventhubs.implementation.ConfigurationsClientImpl$ConfigurationsService"],["com.azure.resourcemanager.eventhubs.implementation.ConsumerGroupsClientImpl$ConsumerGroupsService"],["com.azure.resourcemanager.eventhubs.implementation.DisasterRecoveryConfigsClientImpl$DisasterRecoveryConfigsService"],["com.azure.resourcemanager.eventhubs.implementation.EventHubsClientImpl$EventHubsService"],["com.azure.resourcemanager.eventhubs.implementation.NamespacesClientImpl$NamespacesService"],["com.azure.resourcemanager.eventhubs.implementation.NetworkSecurityPerimeterConfigurationsClientImpl$NetworkSecurityPerimeterConfigurationsService"],["com.azure.resourcemanager.eventhubs.implementation.NetworkSecurityPerimeterConfigurationsOperationsClientImpl$NetworkSecurityPerimeterConfigurationsOperationsService"],["com.azure.resourcemanager.eventhubs.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.eventhubs.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.eventhubs.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.eventhubs.implementation.SchemaRegistriesClientImpl$SchemaRegistriesService"]] \ No newline at end of file diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ApplicationGroupCreateOrUpdateApplicationGroupSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ApplicationGroupCreateOrUpdateApplicationGroupSamples.java deleted file mode 100644 index 56974163bf9e..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ApplicationGroupCreateOrUpdateApplicationGroupSamples.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.fluent.models.ApplicationGroupInner; -import com.azure.resourcemanager.eventhubs.models.MetricId; -import com.azure.resourcemanager.eventhubs.models.ThrottlingPolicy; -import java.util.Arrays; - -/** - * Samples for ApplicationGroup CreateOrUpdateApplicationGroup. - */ -public final class ApplicationGroupCreateOrUpdateApplicationGroupSamples { - /* - * x-ms-original-file: 2025-05-01-preview/ApplicationGroup/ApplicationGroupCreate.json - */ - /** - * Sample code: ApplicationGroupCreate. - * - * @param manager Entry point to EventHubsManager. - */ - public static void applicationGroupCreate(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getApplicationGroups() - .createOrUpdateApplicationGroupWithResponse("contosotest", "contoso-ua-test-eh-system-1", "appGroup1", - new ApplicationGroupInner().withIsEnabled(true) - .withClientAppGroupIdentifier("SASKeyName=KeyName") - .withPolicies(Arrays.asList( - new ThrottlingPolicy().withName("ThrottlingPolicy1") - .withRateLimitThreshold(7912L) - .withMetricId(MetricId.INCOMING_MESSAGES), - new ThrottlingPolicy().withName("ThrottlingPolicy2") - .withRateLimitThreshold(3951729L) - .withMetricId(MetricId.INCOMING_BYTES), - new ThrottlingPolicy().withName("ThrottlingPolicy3") - .withRateLimitThreshold(245175L) - .withMetricId(MetricId.OUTGOING_BYTES))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ApplicationGroupDeleteSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ApplicationGroupDeleteSamples.java deleted file mode 100644 index 77420a6ef80a..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ApplicationGroupDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for ApplicationGroup Delete. - */ -public final class ApplicationGroupDeleteSamples { - /* - * x-ms-original-file: 2025-05-01-preview/ApplicationGroup/ApplicationGroupDelete.json - */ - /** - * Sample code: ApplicationGroupDelete. - * - * @param manager Entry point to EventHubsManager. - */ - public static void applicationGroupDelete(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getApplicationGroups() - .deleteWithResponse("contosotest", "contoso-ua-test-eh-system-1", "appGroup1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ApplicationGroupGetSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ApplicationGroupGetSamples.java deleted file mode 100644 index 59a12afbd34d..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ApplicationGroupGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for ApplicationGroup Get. - */ -public final class ApplicationGroupGetSamples { - /* - * x-ms-original-file: 2025-05-01-preview/ApplicationGroup/ApplicationGroupGet.json - */ - /** - * Sample code: ApplicationGroupGet. - * - * @param manager Entry point to EventHubsManager. - */ - public static void applicationGroupGet(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getApplicationGroups() - .getWithResponse("contosotest", "contoso-ua-test-eh-system-1", "appGroup1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ApplicationGroupListByNamespaceSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ApplicationGroupListByNamespaceSamples.java deleted file mode 100644 index 5ef310712ba5..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ApplicationGroupListByNamespaceSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for ApplicationGroup ListByNamespace. - */ -public final class ApplicationGroupListByNamespaceSamples { - /* - * x-ms-original-file: 2025-05-01-preview/ApplicationGroup/ApplicationGroupListByNamespace.json - */ - /** - * Sample code: ListApplicationGroups. - * - * @param manager Entry point to EventHubsManager. - */ - public static void listApplicationGroups(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getApplicationGroups() - .listByNamespace("contosotest", "contoso-ua-test-eh-system-1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersCreateOrUpdateSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersCreateOrUpdateSamples.java deleted file mode 100644 index bdeff1de00a5..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersCreateOrUpdateSamples.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.fluent.models.ClusterInner; -import com.azure.resourcemanager.eventhubs.models.ClusterSku; -import com.azure.resourcemanager.eventhubs.models.ClusterSkuName; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Clusters CreateOrUpdate. - */ -public final class ClustersCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-05-01-preview/Clusters/ClusterPut.json - */ - /** - * Sample code: ClusterPut. - * - * @param manager Entry point to EventHubsManager. - */ - public static void clusterPut(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getClusters() - .createOrUpdate("myResourceGroup", "testCluster", - new ClusterInner().withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withLocation("South Central US") - .withSku(new ClusterSku().withName(ClusterSkuName.DEDICATED).withCapacity(1)), - 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; - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersDeleteSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersDeleteSamples.java deleted file mode 100644 index 371f1e319061..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Clusters Delete. - */ -public final class ClustersDeleteSamples { - /* - * x-ms-original-file: 2025-05-01-preview/Clusters/ClusterDelete.json - */ - /** - * Sample code: ClusterDelete. - * - * @param manager Entry point to EventHubsManager. - */ - public static void clusterDelete(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getClusters() - .delete("myResourceGroup", "testCluster", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersGetByResourceGroupSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersGetByResourceGroupSamples.java deleted file mode 100644 index 7a75253a0517..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersGetByResourceGroupSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Clusters GetByResourceGroup. - */ -public final class ClustersGetByResourceGroupSamples { - /* - * x-ms-original-file: 2025-05-01-preview/Clusters/ClusterGet.json - */ - /** - * Sample code: ClusterGet. - * - * @param manager Entry point to EventHubsManager. - */ - public static void clusterGet(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getClusters() - .getByResourceGroupWithResponse("myResourceGroup", "testCluster", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersListAvailableClusterRegionSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersListAvailableClusterRegionSamples.java deleted file mode 100644 index 849f5486d473..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersListAvailableClusterRegionSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Clusters ListAvailableClusterRegion. - */ -public final class ClustersListAvailableClusterRegionSamples { - /* - * x-ms-original-file: 2025-05-01-preview/Clusters/ListAvailableClustersGet.json - */ - /** - * Sample code: ListAvailableClusters. - * - * @param manager Entry point to EventHubsManager. - */ - public static void listAvailableClusters(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient().getClusters().listAvailableClusterRegionWithResponse(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersListByResourceGroupSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersListByResourceGroupSamples.java deleted file mode 100644 index b5b4339c21c3..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersListByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Clusters ListByResourceGroup. - */ -public final class ClustersListByResourceGroupSamples { - /* - * x-ms-original-file: 2025-05-01-preview/Clusters/ClustersListByResourceGroup.json - */ - /** - * Sample code: ClustersListByResourceGroup. - * - * @param manager Entry point to EventHubsManager. - */ - public static void clustersListByResourceGroup(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient().getClusters().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersListNamespacesSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersListNamespacesSamples.java deleted file mode 100644 index 6b28f028beb9..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersListNamespacesSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Clusters ListNamespaces. - */ -public final class ClustersListNamespacesSamples { - /* - * x-ms-original-file: 2025-05-01-preview/Clusters/ListNamespacesInClusterGet.json - */ - /** - * Sample code: ListNamespacesInCluster. - * - * @param manager Entry point to EventHubsManager. - */ - public static void listNamespacesInCluster(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getClusters() - .listNamespacesWithResponse("myResourceGroup", "testCluster", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersListSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersListSamples.java deleted file mode 100644 index 44aa05a8a573..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Clusters List. - */ -public final class ClustersListSamples { - /* - * x-ms-original-file: 2025-05-01-preview/Clusters/ClustersListBySubscription.json - */ - /** - * Sample code: ClustersListBySubscription. - * - * @param manager Entry point to EventHubsManager. - */ - public static void clustersListBySubscription(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient().getClusters().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersUpdateSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersUpdateSamples.java deleted file mode 100644 index 022dac8a4335..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ClustersUpdateSamples.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.fluent.models.ClusterInner; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Clusters Update. - */ -public final class ClustersUpdateSamples { - /* - * x-ms-original-file: 2025-05-01-preview/Clusters/ClusterPatch.json - */ - /** - * Sample code: ClusterPatch. - * - * @param manager Entry point to EventHubsManager. - */ - public static void clusterPatch(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getClusters() - .update("myResourceGroup", "testCluster", - new ClusterInner().withTags(mapOf("tag3", "value3", "tag4", "value4")).withLocation("South Central US"), - 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; - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConfigurationGetSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConfigurationGetSamples.java deleted file mode 100644 index f79a1a0a6690..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConfigurationGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Configuration Get. - */ -public final class ConfigurationGetSamples { - /* - * x-ms-original-file: 2025-05-01-preview/Clusters/ClusterQuotaConfigurationGet.json - */ - /** - * Sample code: ClustersQuotasConfigurationGet. - * - * @param manager Entry point to EventHubsManager. - */ - public static void clustersQuotasConfigurationGet(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getConfigurations() - .getWithResponse("myResourceGroup", "testCluster", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConfigurationPatchSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConfigurationPatchSamples.java deleted file mode 100644 index f041ed2d272b..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConfigurationPatchSamples.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.fluent.models.ClusterQuotaConfigurationPropertiesInner; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Configuration Patch. - */ -public final class ConfigurationPatchSamples { - /* - * x-ms-original-file: 2025-05-01-preview/Clusters/ClusterQuotaConfigurationPatch.json - */ - /** - * Sample code: ClustersQuotasConfigurationPatch. - * - * @param manager Entry point to EventHubsManager. - */ - public static void clustersQuotasConfigurationPatch(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getConfigurations() - .patchWithResponse("ArunMonocle", "testCluster", - new ClusterQuotaConfigurationPropertiesInner() - .withSettings(mapOf("eventhub-per-namespace-quota", "20", "namespaces-per-cluster-quota", "200")), - 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; - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsCreateOrUpdateSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsCreateOrUpdateSamples.java deleted file mode 100644 index 1ac7326b2584..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsCreateOrUpdateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.fluent.models.ConsumerGroupInner; - -/** - * Samples for ConsumerGroups CreateOrUpdate. - */ -public final class ConsumerGroupsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-05-01-preview/ConsumerGroup/EHConsumerGroupCreate.json - */ - /** - * Sample code: ConsumerGroupCreate. - * - * @param manager Entry point to EventHubsManager. - */ - public static void consumerGroupCreate(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getConsumerGroups() - .createOrUpdateWithResponse("ArunMonocle", "sdk-Namespace-2661", "sdk-EventHub-6681", - "sdk-ConsumerGroup-5563", new ConsumerGroupInner().withUserMetadata("New consumergroup"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsDeleteSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsDeleteSamples.java deleted file mode 100644 index bed5de4ba5af..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for ConsumerGroups Delete. - */ -public final class ConsumerGroupsDeleteSamples { - /* - * x-ms-original-file: 2025-05-01-preview/ConsumerGroup/EHConsumerGroupDelete.json - */ - /** - * Sample code: ConsumerGroupDelete. - * - * @param manager Entry point to EventHubsManager. - */ - public static void consumerGroupDelete(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getConsumerGroups() - .deleteWithResponse("ArunMonocle", "sdk-Namespace-2661", "sdk-EventHub-6681", "sdk-ConsumerGroup-5563", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsGetSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsGetSamples.java deleted file mode 100644 index e4d3c77b0f69..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for ConsumerGroups Get. - */ -public final class ConsumerGroupsGetSamples { - /* - * x-ms-original-file: 2025-05-01-preview/ConsumerGroup/EHConsumerGroupGet.json - */ - /** - * Sample code: ConsumerGroupGet. - * - * @param manager Entry point to EventHubsManager. - */ - public static void consumerGroupGet(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getConsumerGroups() - .getWithResponse("ArunMonocle", "sdk-Namespace-2661", "sdk-EventHub-6681", "sdk-ConsumerGroup-5563", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsListByEventHubSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsListByEventHubSamples.java deleted file mode 100644 index bad09fdefd0a..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsListByEventHubSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for ConsumerGroups ListByEventHub. - */ -public final class ConsumerGroupsListByEventHubSamples { - /* - * x-ms-original-file: 2025-05-01-preview/ConsumerGroup/EHConsumerGroupListByEventHub.json - */ - /** - * Sample code: ConsumerGroupsListAll. - * - * @param manager Entry point to EventHubsManager. - */ - public static void consumerGroupsListAll(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getConsumerGroups() - .listByEventHub("ArunMonocle", "sdk-Namespace-2661", "sdk-EventHub-6681", null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsBreakPairingSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsBreakPairingSamples.java deleted file mode 100644 index 486638892b38..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsBreakPairingSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for DisasterRecoveryConfigs BreakPairing. - */ -public final class DisasterRecoveryConfigsBreakPairingSamples { - /* - * x-ms-original-file: 2025-05-01-preview/disasterRecoveryConfigs/EHAliasBreakPairing.json - */ - /** - * Sample code: EHAliasBreakPairing. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eHAliasBreakPairing(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getDisasterRecoveryConfigs() - .breakPairingWithResponse("exampleResourceGroup", "sdk-Namespace-8859", "sdk-DisasterRecovery-3814", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsCheckNameAvailabilitySamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsCheckNameAvailabilitySamples.java deleted file mode 100644 index f73818eaaa34..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsCheckNameAvailabilitySamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.models.CheckNameAvailabilityParameter; - -/** - * Samples for DisasterRecoveryConfigs CheckNameAvailability. - */ -public final class DisasterRecoveryConfigsCheckNameAvailabilitySamples { - /* - * x-ms-original-file: 2025-05-01-preview/disasterRecoveryConfigs/EHAliasCheckNameAvailability.json - */ - /** - * Sample code: NamespacesCheckNameAvailability. - * - * @param manager Entry point to EventHubsManager. - */ - public static void namespacesCheckNameAvailability(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getDisasterRecoveryConfigs() - .checkNameAvailabilityWithResponse("exampleResourceGroup", "sdk-Namespace-9080", - new CheckNameAvailabilityParameter().withName("sdk-DisasterRecovery-9474"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsCreateOrUpdateSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsCreateOrUpdateSamples.java deleted file mode 100644 index abb79867f1fe..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsCreateOrUpdateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.fluent.models.ArmDisasterRecoveryInner; - -/** - * Samples for DisasterRecoveryConfigs CreateOrUpdate. - */ -public final class DisasterRecoveryConfigsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-05-01-preview/disasterRecoveryConfigs/EHAliasCreate.json - */ - /** - * Sample code: EHAliasCreate. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eHAliasCreate(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getDisasterRecoveryConfigs() - .createOrUpdateWithResponse("exampleResourceGroup", "sdk-Namespace-8859", "sdk-DisasterRecovery-3814", - new ArmDisasterRecoveryInner().withPartnerNamespace("sdk-Namespace-37"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsDeleteSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsDeleteSamples.java deleted file mode 100644 index 57881d5436c4..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for DisasterRecoveryConfigs Delete. - */ -public final class DisasterRecoveryConfigsDeleteSamples { - /* - * x-ms-original-file: 2025-05-01-preview/disasterRecoveryConfigs/EHAliasDelete.json - */ - /** - * Sample code: EHAliasDelete. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eHAliasDelete(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getDisasterRecoveryConfigs() - .deleteWithResponse("exampleResourceGroup", "sdk-Namespace-5849", "sdk-DisasterRecovery-3814", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsFailOverSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsFailOverSamples.java deleted file mode 100644 index 438e233848d9..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsFailOverSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for DisasterRecoveryConfigs FailOver. - */ -public final class DisasterRecoveryConfigsFailOverSamples { - /* - * x-ms-original-file: 2025-05-01-preview/disasterRecoveryConfigs/EHAliasFailOver.json - */ - /** - * Sample code: EHAliasFailOver. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eHAliasFailOver(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getDisasterRecoveryConfigs() - .failOverWithResponse("exampleResourceGroup", "sdk-Namespace-8859", "sdk-DisasterRecovery-3814", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsGetAuthorizationRuleSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsGetAuthorizationRuleSamples.java deleted file mode 100644 index e2a51ce177de..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsGetAuthorizationRuleSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for DisasterRecoveryConfigs GetAuthorizationRule. - */ -public final class DisasterRecoveryConfigsGetAuthorizationRuleSamples { - /* - * x-ms-original-file: 2025-05-01-preview/disasterRecoveryConfigs/EHAliasAuthorizationRuleGet.json - */ - /** - * Sample code: NameSpaceAuthorizationRuleGet. - * - * @param manager Entry point to EventHubsManager. - */ - public static void nameSpaceAuthorizationRuleGet(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getDisasterRecoveryConfigs() - .getAuthorizationRuleWithResponse("exampleResourceGroup", "sdk-Namespace-9080", "sdk-DisasterRecovery-4879", - "sdk-Authrules-4879", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsGetSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsGetSamples.java deleted file mode 100644 index bbf3a568cf65..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for DisasterRecoveryConfigs Get. - */ -public final class DisasterRecoveryConfigsGetSamples { - /* - * x-ms-original-file: 2025-05-01-preview/disasterRecoveryConfigs/EHAliasGet.json - */ - /** - * Sample code: EHAliasGet. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eHAliasGet(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getDisasterRecoveryConfigs() - .getWithResponse("exampleResourceGroup", "sdk-Namespace-8859", "sdk-DisasterRecovery-3814", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsListAuthorizationRulesSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsListAuthorizationRulesSamples.java deleted file mode 100644 index 90c65e19f67d..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsListAuthorizationRulesSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for DisasterRecoveryConfigs ListAuthorizationRules. - */ -public final class DisasterRecoveryConfigsListAuthorizationRulesSamples { - /* - * x-ms-original-file: 2025-05-01-preview/disasterRecoveryConfigs/EHAliasAuthorizationRuleListAll.json - */ - /** - * Sample code: ListAuthorizationRules. - * - * @param manager Entry point to EventHubsManager. - */ - public static void listAuthorizationRules(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getDisasterRecoveryConfigs() - .listAuthorizationRules("exampleResourceGroup", "sdk-Namespace-9080", "sdk-DisasterRecovery-4047", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsListKeysSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsListKeysSamples.java deleted file mode 100644 index e951d7f7f590..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsListKeysSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for DisasterRecoveryConfigs ListKeys. - */ -public final class DisasterRecoveryConfigsListKeysSamples { - /* - * x-ms-original-file: 2025-05-01-preview/disasterRecoveryConfigs/EHAliasAuthorizationRuleListKey.json - */ - /** - * Sample code: NameSpaceAuthorizationRuleListKey. - * - * @param manager Entry point to EventHubsManager. - */ - public static void nameSpaceAuthorizationRuleListKey(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getDisasterRecoveryConfigs() - .listKeysWithResponse("exampleResourceGroup", "sdk-Namespace-2702", "sdk-DisasterRecovery-4047", - "sdk-Authrules-1746", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsListSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsListSamples.java deleted file mode 100644 index d8173634a0c5..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/DisasterRecoveryConfigsListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for DisasterRecoveryConfigs List. - */ -public final class DisasterRecoveryConfigsListSamples { - /* - * x-ms-original-file: 2025-05-01-preview/disasterRecoveryConfigs/EHAliasList.json - */ - /** - * Sample code: EHAliasList. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eHAliasList(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getDisasterRecoveryConfigs() - .list("exampleResourceGroup", "sdk-Namespace-8859", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsCreateOrUpdateAuthorizationRuleSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsCreateOrUpdateAuthorizationRuleSamples.java deleted file mode 100644 index a3a4f2f8ef53..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsCreateOrUpdateAuthorizationRuleSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.fluent.models.AuthorizationRuleInner; -import com.azure.resourcemanager.eventhubs.models.AccessRights; -import java.util.Arrays; - -/** - * Samples for EventHubs CreateOrUpdateAuthorizationRule. - */ -public final class EventHubsCreateOrUpdateAuthorizationRuleSamples { - /* - * x-ms-original-file: 2025-05-01-preview/EventHubs/EHEventHubAuthorizationRuleCreate.json - */ - /** - * Sample code: EventHubAuthorizationRuleCreate. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eventHubAuthorizationRuleCreate(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getEventHubs() - .createOrUpdateAuthorizationRuleWithResponse("ArunMonocle", "sdk-Namespace-960", "sdk-EventHub-532", - "sdk-Authrules-2513", - new AuthorizationRuleInner().withRights(Arrays.asList(AccessRights.LISTEN, AccessRights.SEND)), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsCreateOrUpdateSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsCreateOrUpdateSamples.java deleted file mode 100644 index 201ec276cc0a..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsCreateOrUpdateSamples.java +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.fluent.models.EventhubInner; -import com.azure.resourcemanager.eventhubs.models.CaptureDescription; -import com.azure.resourcemanager.eventhubs.models.CaptureIdentity; -import com.azure.resourcemanager.eventhubs.models.CaptureIdentityType; -import com.azure.resourcemanager.eventhubs.models.CleanupPolicyRetentionDescription; -import com.azure.resourcemanager.eventhubs.models.Destination; -import com.azure.resourcemanager.eventhubs.models.EncodingCaptureDescription; -import com.azure.resourcemanager.eventhubs.models.EntityStatus; -import com.azure.resourcemanager.eventhubs.models.MessageTimestampDescription; -import com.azure.resourcemanager.eventhubs.models.RetentionDescription; -import com.azure.resourcemanager.eventhubs.models.TimestampType; - -/** - * Samples for EventHubs CreateOrUpdate. - */ -public final class EventHubsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-05-01-preview/EventHubs/EHEventHubWithDeletePolicyCreate.json - */ - /** - * Sample code: EHEventHubWithDeletePolicyCreate. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eHEventHubWithDeletePolicyCreate(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getEventHubs() - .createOrUpdateWithResponse("Default-NotificationHubs-AustraliaEast", "sdk-Namespace-5357", - "sdk-EventHub-6547", - new EventhubInner().withMessageRetentionInDays(4L) - .withPartitionCount(4L) - .withStatus(EntityStatus.ACTIVE) - .withCaptureDescription(new CaptureDescription().withEnabled(true) - .withEncoding(EncodingCaptureDescription.AVRO) - .withIntervalInSeconds(120) - .withSizeLimitInBytes(10485763) - .withDestination(new Destination().withName("EventHubArchive.AzureBlockBlob") - .withIdentity(new CaptureIdentity().withType(CaptureIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity( - "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2")) - .withStorageAccountResourceId( - "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage") - .withBlobContainer("container") - .withArchiveNameFormat( - "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"))) - .withRetentionDescription( - new RetentionDescription().withCleanupPolicy(CleanupPolicyRetentionDescription.DELETE) - .withRetentionTimeInHours(24L)) - .withMessageTimestampDescription( - new MessageTimestampDescription().withTimestampType(TimestampType.LOG_APPEND)) - .withUserMetadata("key"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-05-01-preview/EventHubs/EHEventHubCreate.json - */ - /** - * Sample code: EHEventHubCreate. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eHEventHubCreate(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getEventHubs() - .createOrUpdateWithResponse("Default-NotificationHubs-AustraliaEast", "sdk-Namespace-5357", - "sdk-EventHub-6547", - new EventhubInner().withPartitionCount(4L) - .withStatus(EntityStatus.ACTIVE) - .withCaptureDescription(new CaptureDescription().withEnabled(true) - .withEncoding(EncodingCaptureDescription.AVRO) - .withIntervalInSeconds(120) - .withSizeLimitInBytes(10485763) - .withDestination(new Destination().withName("EventHubArchive.AzureBlockBlob") - .withIdentity(new CaptureIdentity().withType(CaptureIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity( - "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2")) - .withStorageAccountResourceId( - "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage") - .withBlobContainer("container") - .withArchiveNameFormat( - "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"))) - .withUserMetadata("key"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-05-01-preview/EventHubs/EHEventHubWithCompactPolicyCreate.json - */ - /** - * Sample code: EHEventHubWithCompactPolicyCreate. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eHEventHubWithCompactPolicyCreate(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getEventHubs() - .createOrUpdateWithResponse("Default-NotificationHubs-AustraliaEast", "sdk-Namespace-5357", - "sdk-EventHub-6547", - new EventhubInner().withMessageRetentionInDays(4L) - .withPartitionCount(4L) - .withStatus(EntityStatus.ACTIVE) - .withCaptureDescription(new CaptureDescription().withEnabled(true) - .withEncoding(EncodingCaptureDescription.AVRO) - .withIntervalInSeconds(120) - .withSizeLimitInBytes(10485763) - .withDestination(new Destination().withName("EventHubArchive.AzureBlockBlob") - .withIdentity(new CaptureIdentity().withType(CaptureIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity( - "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2")) - .withStorageAccountResourceId( - "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage") - .withBlobContainer("container") - .withArchiveNameFormat( - "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"))) - .withRetentionDescription( - new RetentionDescription().withCleanupPolicy(CleanupPolicyRetentionDescription.COMPACT) - .withMinCompactionLagTimeInMinutes(10L) - .withTombstoneRetentionTimeInHours(1)) - .withMessageTimestampDescription( - new MessageTimestampDescription().withTimestampType(TimestampType.LOG_APPEND)) - .withUserMetadata("key"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-05-01-preview/EventHubs/EHEventHubWithDeleteOrCompactPolicyCreate.json - */ - /** - * Sample code: EHEventHubWithDeleteOrCompactPolicyCreate. - * - * @param manager Entry point to EventHubsManager. - */ - public static void - eHEventHubWithDeleteOrCompactPolicyCreate(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getEventHubs() - .createOrUpdateWithResponse("Default-NotificationHubs-AustraliaEast", "sdk-Namespace-5357", - "sdk-EventHub-6547", - new EventhubInner().withMessageRetentionInDays(4L) - .withPartitionCount(4L) - .withStatus(EntityStatus.ACTIVE) - .withCaptureDescription(new CaptureDescription().withEnabled(true) - .withEncoding(EncodingCaptureDescription.AVRO) - .withIntervalInSeconds(120) - .withSizeLimitInBytes(10485763) - .withDestination(new Destination().withName("EventHubArchive.AzureBlockBlob") - .withIdentity(new CaptureIdentity().withType(CaptureIdentityType.USER_ASSIGNED) - .withUserAssignedIdentity( - "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2")) - .withStorageAccountResourceId( - "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage") - .withBlobContainer("container") - .withArchiveNameFormat( - "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"))) - .withRetentionDescription(new RetentionDescription() - .withCleanupPolicy(CleanupPolicyRetentionDescription.DELETE_OR_COMPACT) - .withRetentionTimeInHours(24L)) - .withMessageTimestampDescription( - new MessageTimestampDescription().withTimestampType(TimestampType.LOG_APPEND)) - .withUserMetadata("key"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsDeleteAuthorizationRuleSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsDeleteAuthorizationRuleSamples.java deleted file mode 100644 index a2ac2f1bee28..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsDeleteAuthorizationRuleSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for EventHubs DeleteAuthorizationRule. - */ -public final class EventHubsDeleteAuthorizationRuleSamples { - /* - * x-ms-original-file: 2025-05-01-preview/EventHubs/EHEventHubAuthorizationRuleDelete.json - */ - /** - * Sample code: EventHubAuthorizationRuleDelete. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eventHubAuthorizationRuleDelete(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getEventHubs() - .deleteAuthorizationRuleWithResponse("ArunMonocle", "sdk-Namespace-960", "sdk-EventHub-532", - "sdk-Authrules-2513", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsDeleteSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsDeleteSamples.java deleted file mode 100644 index e761adbf3214..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for EventHubs Delete. - */ -public final class EventHubsDeleteSamples { - /* - * x-ms-original-file: 2025-05-01-preview/EventHubs/EHEventHubDelete.json - */ - /** - * Sample code: EventHubDelete. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eventHubDelete(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getEventHubs() - .deleteWithResponse("ArunMonocle", "sdk-Namespace-5357", "sdk-EventHub-6547", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsGetAuthorizationRuleSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsGetAuthorizationRuleSamples.java deleted file mode 100644 index c377e2ae9a3b..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsGetAuthorizationRuleSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for EventHubs GetAuthorizationRule. - */ -public final class EventHubsGetAuthorizationRuleSamples { - /* - * x-ms-original-file: 2025-05-01-preview/EventHubs/EHEventHubAuthorizationRuleGet.json - */ - /** - * Sample code: EventHubAuthorizationRuleGet. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eventHubAuthorizationRuleGet(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getEventHubs() - .getAuthorizationRuleWithResponse("ArunMonocle", "sdk-Namespace-960", "sdk-EventHub-532", - "sdk-Authrules-2513", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsGetSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsGetSamples.java deleted file mode 100644 index 3cdfffc29f70..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for EventHubs Get. - */ -public final class EventHubsGetSamples { - /* - * x-ms-original-file: 2025-05-01-preview/EventHubs/EHEventHubGet.json - */ - /** - * Sample code: EventHubGet. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eventHubGet(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getEventHubs() - .getWithResponse("Default-NotificationHubs-AustraliaEast", "sdk-Namespace-716", "sdk-EventHub-10", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsListAuthorizationRulesSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsListAuthorizationRulesSamples.java deleted file mode 100644 index 39c73364e670..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsListAuthorizationRulesSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for EventHubs ListAuthorizationRules. - */ -public final class EventHubsListAuthorizationRulesSamples { - /* - * x-ms-original-file: 2025-05-01-preview/EventHubs/EHEventHubAuthorizationRuleListAll.json - */ - /** - * Sample code: EventHubAuthorizationRuleListAll. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eventHubAuthorizationRuleListAll(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getEventHubs() - .listAuthorizationRules("ArunMonocle", "sdk-Namespace-960", "sdk-EventHub-532", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsListByNamespaceSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsListByNamespaceSamples.java deleted file mode 100644 index 3a5650c8aa91..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsListByNamespaceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for EventHubs ListByNamespace. - */ -public final class EventHubsListByNamespaceSamples { - /* - * x-ms-original-file: 2025-05-01-preview/EventHubs/EHEventHubListByNameSpace.json - */ - /** - * Sample code: EventHubsListAll. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eventHubsListAll(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getEventHubs() - .listByNamespace("Default-NotificationHubs-AustraliaEast", "sdk-Namespace-5357", null, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsListKeysSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsListKeysSamples.java deleted file mode 100644 index 749997056490..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsListKeysSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for EventHubs ListKeys. - */ -public final class EventHubsListKeysSamples { - /* - * x-ms-original-file: 2025-05-01-preview/EventHubs/EHEventHubAuthorizationRuleListKey.json - */ - /** - * Sample code: EventHubAuthorizationRuleListKey. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eventHubAuthorizationRuleListKey(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getEventHubs() - .listKeysWithResponse("ArunMonocle", "sdk-namespace-960", "sdk-EventHub-532", "sdk-Authrules-2513", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsRegenerateKeysSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsRegenerateKeysSamples.java deleted file mode 100644 index e4ac4d240a81..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/EventHubsRegenerateKeysSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.models.KeyType; -import com.azure.resourcemanager.eventhubs.models.RegenerateAccessKeyParameters; - -/** - * Samples for EventHubs RegenerateKeys. - */ -public final class EventHubsRegenerateKeysSamples { - /* - * x-ms-original-file: 2025-05-01-preview/EventHubs/EHEventHubAuthorizationRuleRegenerateKey.json - */ - /** - * Sample code: EventHubAuthorizationRuleRegenerateKey. - * - * @param manager Entry point to EventHubsManager. - */ - public static void - eventHubAuthorizationRuleRegenerateKey(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getEventHubs() - .regenerateKeysWithResponse("ArunMonocle", "sdk-namespace-960", "sdk-EventHub-532", "sdk-Authrules-1534", - new RegenerateAccessKeyParameters().withKeyType(KeyType.PRIMARY_KEY), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesCheckNameAvailabilitySamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesCheckNameAvailabilitySamples.java deleted file mode 100644 index 71abd95dacdf..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesCheckNameAvailabilitySamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.models.CheckNameAvailabilityParameter; - -/** - * Samples for Namespaces CheckNameAvailability. - */ -public final class NamespacesCheckNameAvailabilitySamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/EHNameSpaceCheckNameAvailability.json - */ - /** - * Sample code: NamespacesCheckNameAvailability. - * - * @param manager Entry point to EventHubsManager. - */ - public static void namespacesCheckNameAvailability(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .checkNameAvailabilityWithResponse(new CheckNameAvailabilityParameter().withName("sdk-Namespace-8458"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesCreateOrUpdateAuthorizationRuleSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesCreateOrUpdateAuthorizationRuleSamples.java deleted file mode 100644 index 29bd02131cba..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesCreateOrUpdateAuthorizationRuleSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.fluent.models.AuthorizationRuleInner; -import com.azure.resourcemanager.eventhubs.models.AccessRights; -import java.util.Arrays; - -/** - * Samples for Namespaces CreateOrUpdateAuthorizationRule. - */ -public final class NamespacesCreateOrUpdateAuthorizationRuleSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/EHNameSpaceAuthorizationRuleCreate.json - */ - /** - * Sample code: NameSpaceAuthorizationRuleCreate. - * - * @param manager Entry point to EventHubsManager. - */ - public static void nameSpaceAuthorizationRuleCreate(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .createOrUpdateAuthorizationRuleWithResponse("ArunMonocle", "sdk-Namespace-2702", "sdk-Authrules-1746", - new AuthorizationRuleInner().withRights(Arrays.asList(AccessRights.LISTEN, AccessRights.SEND)), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesCreateOrUpdateNetworkRuleSetSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesCreateOrUpdateNetworkRuleSetSamples.java deleted file mode 100644 index 5fda90c068aa..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesCreateOrUpdateNetworkRuleSetSamples.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.fluent.models.NetworkRuleSetInner; -import com.azure.resourcemanager.eventhubs.models.DefaultAction; -import com.azure.resourcemanager.eventhubs.models.NWRuleSetIpRules; -import com.azure.resourcemanager.eventhubs.models.NWRuleSetVirtualNetworkRules; -import com.azure.resourcemanager.eventhubs.models.NetworkRuleIpAction; -import com.azure.resourcemanager.eventhubs.models.Subnet; -import java.util.Arrays; - -/** - * Samples for Namespaces CreateOrUpdateNetworkRuleSet. - */ -public final class NamespacesCreateOrUpdateNetworkRuleSetSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetCreate.json - */ - /** - * Sample code: NameSpaceNetworkRuleSetCreate. - * - * @param manager Entry point to EventHubsManager. - */ - public static void nameSpaceNetworkRuleSetCreate(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .createOrUpdateNetworkRuleSetWithResponse("ResourceGroup", "sdk-Namespace-6019", new NetworkRuleSetInner() - .withDefaultAction(DefaultAction.DENY) - .withVirtualNetworkRules(Arrays.asList( - new NWRuleSetVirtualNetworkRules().withSubnet(new Subnet().withId( - "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2")) - .withIgnoreMissingVnetServiceEndpoint(true), - new NWRuleSetVirtualNetworkRules().withSubnet(new Subnet().withId( - "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3")) - .withIgnoreMissingVnetServiceEndpoint(false), - new NWRuleSetVirtualNetworkRules().withSubnet(new Subnet().withId( - "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6")) - .withIgnoreMissingVnetServiceEndpoint(false))) - .withIpRules( - Arrays.asList(new NWRuleSetIpRules().withIpMask("1.1.1.1").withAction(NetworkRuleIpAction.ALLOW), - new NWRuleSetIpRules().withIpMask("1.1.1.2").withAction(NetworkRuleIpAction.ALLOW), - new NWRuleSetIpRules().withIpMask("1.1.1.3").withAction(NetworkRuleIpAction.ALLOW), - new NWRuleSetIpRules().withIpMask("1.1.1.4").withAction(NetworkRuleIpAction.ALLOW), - new NWRuleSetIpRules().withIpMask("1.1.1.5").withAction(NetworkRuleIpAction.ALLOW))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesCreateOrUpdateSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesCreateOrUpdateSamples.java deleted file mode 100644 index a80e4079b7bd..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesCreateOrUpdateSamples.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.fluent.models.EHNamespaceInner; -import com.azure.resourcemanager.eventhubs.models.Encryption; -import com.azure.resourcemanager.eventhubs.models.GeoDRRoleType; -import com.azure.resourcemanager.eventhubs.models.GeoDataReplicationProperties; -import com.azure.resourcemanager.eventhubs.models.Identity; -import com.azure.resourcemanager.eventhubs.models.KeySource; -import com.azure.resourcemanager.eventhubs.models.KeyVaultProperties; -import com.azure.resourcemanager.eventhubs.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.eventhubs.models.NamespaceReplicaLocation; -import com.azure.resourcemanager.eventhubs.models.UserAssignedIdentity; -import com.azure.resourcemanager.eventhubs.models.UserAssignedIdentityProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Namespaces CreateOrUpdate. - */ -public final class NamespacesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/EHNameSpaceCreate.json - */ - /** - * Sample code: NamespaceCreate. - * - * @param manager Entry point to EventHubsManager. - */ - public static void namespaceCreate(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .createOrUpdate("ResurceGroupSample", "NamespaceSample", new EHNamespaceInner().withLocation("East US") - .withIdentity(new Identity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1", - new UserAssignedIdentity(), - "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2", - new UserAssignedIdentity()))) - .withClusterArmId( - "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/clusters/enc-test") - .withEncryption(new Encryption().withKeyVaultProperties(Arrays.asList(new KeyVaultProperties() - .withKeyName("fakeTokenPlaceholder") - .withKeyVaultUri("fakeTokenPlaceholder") - .withIdentity(new UserAssignedIdentityProperties().withUserAssignedIdentity( - "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1")))) - .withKeySource(KeySource.MICROSOFT_KEY_VAULT)) - .withGeoDataReplication(new GeoDataReplicationProperties().withMaxReplicationLagDurationInSeconds(300) - .withLocations(Arrays.asList( - new NamespaceReplicaLocation().withLocationName("eastus").withRoleType(GeoDRRoleType.PRIMARY), - new NamespaceReplicaLocation().withLocationName("southcentralus") - .withRoleType(GeoDRRoleType.SECONDARY)))), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/NamespaceWithGeoDRCreate.json - */ - /** - * Sample code: NamespaceWithGeoDRCreate. - * - * @param manager Entry point to EventHubsManager. - */ - public static void namespaceWithGeoDRCreate(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .createOrUpdate("ResurceGroupSample", "NamespaceGeoDRCreateSample", new EHNamespaceInner() - .withLocation("East US") - .withGeoDataReplication(new GeoDataReplicationProperties().withMaxReplicationLagDurationInSeconds(60) - .withLocations(Arrays.asList( - new NamespaceReplicaLocation().withLocationName("eastus").withRoleType(GeoDRRoleType.PRIMARY), - new NamespaceReplicaLocation().withLocationName("westus").withRoleType(GeoDRRoleType.SECONDARY), - new NamespaceReplicaLocation().withLocationName("centralus") - .withRoleType(GeoDRRoleType.SECONDARY)))), - 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; - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesDeleteAuthorizationRuleSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesDeleteAuthorizationRuleSamples.java deleted file mode 100644 index b6b2e59c339f..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesDeleteAuthorizationRuleSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Namespaces DeleteAuthorizationRule. - */ -public final class NamespacesDeleteAuthorizationRuleSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/EHNameSpaceAuthorizationRuleDelete.json - */ - /** - * Sample code: NameSpaceAuthorizationRuleDelete. - * - * @param manager Entry point to EventHubsManager. - */ - public static void nameSpaceAuthorizationRuleDelete(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .deleteAuthorizationRuleWithResponse("ArunMonocle", "sdk-Namespace-8980", "sdk-Authrules-8929", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesDeleteSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesDeleteSamples.java deleted file mode 100644 index 3eee69697961..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Namespaces Delete. - */ -public final class NamespacesDeleteSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/EHNameSpaceDelete.json - */ - /** - * Sample code: NameSpaceDelete. - * - * @param manager Entry point to EventHubsManager. - */ - public static void nameSpaceDelete(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .delete("ResurceGroupSample", "NamespaceSample", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesFailoverSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesFailoverSamples.java deleted file mode 100644 index 255b1ce2e697..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesFailoverSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.models.FailOver; - -/** - * Samples for Namespaces Failover. - */ -public final class NamespacesFailoverSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/EHNamespaceFailover.json - */ - /** - * Sample code: NameSpaceCreate. - * - * @param manager Entry point to EventHubsManager. - */ - public static void nameSpaceCreate(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .failover("ResurceGroupSample", "NamespaceGeoDRFailoverSample", - new FailOver().withPrimaryLocation("centralus").withForce(true), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesGetAuthorizationRuleSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesGetAuthorizationRuleSamples.java deleted file mode 100644 index 99bbb91c1a10..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesGetAuthorizationRuleSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Namespaces GetAuthorizationRule. - */ -public final class NamespacesGetAuthorizationRuleSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/EHNameSpaceAuthorizationRuleGet.json - */ - /** - * Sample code: NameSpaceAuthorizationRuleGet. - * - * @param manager Entry point to EventHubsManager. - */ - public static void nameSpaceAuthorizationRuleGet(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .getAuthorizationRuleWithResponse("ArunMonocle", "sdk-Namespace-2702", "sdk-Authrules-1746", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesGetByResourceGroupSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesGetByResourceGroupSamples.java deleted file mode 100644 index 0a4de9993643..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesGetByResourceGroupSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Namespaces GetByResourceGroup. - */ -public final class NamespacesGetByResourceGroupSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/EHNameSpaceGet.json - */ - /** - * Sample code: NameSpaceGet. - * - * @param manager Entry point to EventHubsManager. - */ - public static void nameSpaceGet(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .getByResourceGroupWithResponse("ResurceGroupSample", "NamespaceSample", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesGetNetworkRuleSetSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesGetNetworkRuleSetSamples.java deleted file mode 100644 index b05827cfc4d7..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesGetNetworkRuleSetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Namespaces GetNetworkRuleSet. - */ -public final class NamespacesGetNetworkRuleSetSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetGet.json - */ - /** - * Sample code: NameSpaceNetworkRuleSetGet. - * - * @param manager Entry point to EventHubsManager. - */ - public static void nameSpaceNetworkRuleSetGet(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .getNetworkRuleSetWithResponse("ResourceGroup", "sdk-Namespace-6019", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListAuthorizationRulesSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListAuthorizationRulesSamples.java deleted file mode 100644 index c342bbd60400..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListAuthorizationRulesSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Namespaces ListAuthorizationRules. - */ -public final class NamespacesListAuthorizationRulesSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/EHNameSpaceAuthorizationRuleListAll.json - */ - /** - * Sample code: ListAuthorizationRules. - * - * @param manager Entry point to EventHubsManager. - */ - public static void listAuthorizationRules(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .listAuthorizationRules("ArunMonocle", "sdk-Namespace-2702", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListByResourceGroupSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListByResourceGroupSamples.java deleted file mode 100644 index c5457ef38533..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListByResourceGroupSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Namespaces ListByResourceGroup. - */ -public final class NamespacesListByResourceGroupSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/EHNameSpaceListByResourceGroup.json - */ - /** - * Sample code: NamespaceListByResourceGroup. - * - * @param manager Entry point to EventHubsManager. - */ - public static void namespaceListByResourceGroup(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .listByResourceGroup("ResurceGroupSample", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListKeysSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListKeysSamples.java deleted file mode 100644 index 329c45b41404..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListKeysSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Namespaces ListKeys. - */ -public final class NamespacesListKeysSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/EHNameSpaceAuthorizationRuleListKey.json - */ - /** - * Sample code: NameSpaceAuthorizationRuleListKey. - * - * @param manager Entry point to EventHubsManager. - */ - public static void nameSpaceAuthorizationRuleListKey(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .listKeysWithResponse("ArunMonocle", "sdk-Namespace-2702", "sdk-Authrules-1746", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListNetworkRuleSetSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListNetworkRuleSetSamples.java deleted file mode 100644 index cd14e129cb77..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListNetworkRuleSetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Namespaces ListNetworkRuleSet. - */ -public final class NamespacesListNetworkRuleSetSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetList.json - */ - /** - * Sample code: NameSpaceNetworkRuleSetList. - * - * @param manager Entry point to EventHubsManager. - */ - public static void nameSpaceNetworkRuleSetList(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .listNetworkRuleSetWithResponse("ResourceGroup", "sdk-Namespace-6019", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListSamples.java deleted file mode 100644 index 417747baedcf..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Namespaces List. - */ -public final class NamespacesListSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/EHNameSpaceList.json - */ - /** - * Sample code: NamespacesListBySubscription. - * - * @param manager Entry point to EventHubsManager. - */ - public static void namespacesListBySubscription(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient().getNamespaces().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesRegenerateKeysSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesRegenerateKeysSamples.java deleted file mode 100644 index a7fb67e069a7..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesRegenerateKeysSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.models.KeyType; -import com.azure.resourcemanager.eventhubs.models.RegenerateAccessKeyParameters; - -/** - * Samples for Namespaces RegenerateKeys. - */ -public final class NamespacesRegenerateKeysSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/EHNameSpaceAuthorizationRuleRegenerateKey.json - */ - /** - * Sample code: NameSpaceAuthorizationRuleRegenerateKey. - * - * @param manager Entry point to EventHubsManager. - */ - public static void - nameSpaceAuthorizationRuleRegenerateKey(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .regenerateKeysWithResponse("ArunMonocle", "sdk-Namespace-8980", "sdk-Authrules-8929", - new RegenerateAccessKeyParameters().withKeyType(KeyType.PRIMARY_KEY), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesUpdateSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesUpdateSamples.java deleted file mode 100644 index 71594dca4354..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NamespacesUpdateSamples.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.fluent.models.EHNamespaceInner; -import com.azure.resourcemanager.eventhubs.models.Identity; -import com.azure.resourcemanager.eventhubs.models.ManagedServiceIdentityType; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Namespaces Update. - */ -public final class NamespacesUpdateSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/EHNameSpaceUpdate.json - */ - /** - * Sample code: NamespacesUpdate. - * - * @param manager Entry point to EventHubsManager. - */ - public static void namespacesUpdate(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNamespaces() - .update("ResurceGroupSample", "NamespaceSample", new EHNamespaceInner().withLocation("East US") - .withIdentity(new Identity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2", - null))), - 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; - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NetworkSecurityPerimeterConfigurationsCreateOrUpdateSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NetworkSecurityPerimeterConfigurationsCreateOrUpdateSamples.java deleted file mode 100644 index 390e7d33b00d..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NetworkSecurityPerimeterConfigurationsCreateOrUpdateSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for NetworkSecurityPerimeterConfigurations CreateOrUpdate. - */ -public final class NetworkSecurityPerimeterConfigurationsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/NetworkSecurityPerimeterConfigurationReconcile.json - */ - /** - * Sample code: NetworkSecurityPerimeterConfigurationList. - * - * @param manager Entry point to EventHubsManager. - */ - public static void - networkSecurityPerimeterConfigurationList(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNetworkSecurityPerimeterConfigurations() - .createOrUpdate("SDK-EventHub-4794", "sdk-Namespace-5828", "resourceAssociation1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NetworkSecurityPerimeterConfigurationsGetResourceAssociationNameSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NetworkSecurityPerimeterConfigurationsGetResourceAssociationNameSamples.java deleted file mode 100644 index fe768f59b857..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/NetworkSecurityPerimeterConfigurationsGetResourceAssociationNameSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for NetworkSecurityPerimeterConfigurations GetResourceAssociationName. - */ -public final class NetworkSecurityPerimeterConfigurationsGetResourceAssociationNameSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/NetworkSecurityPerimeterConfigurationAssociationproxy.json - */ - /** - * Sample code: NetworkSecurityPerimeterConfigurationassociationProxyName. - * - * @param manager Entry point to EventHubsManager. - */ - public static void networkSecurityPerimeterConfigurationassociationProxyName( - com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getNetworkSecurityPerimeterConfigurations() - .getResourceAssociationNameWithResponse("SDK-EventHub-4794", "sdk-Namespace-5828", "resourceAssociation1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/OperationsListSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/OperationsListSamples.java deleted file mode 100644 index 1fe78c3c56a5..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/OperationsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: 2025-05-01-preview/EHOperations_List.json - */ - /** - * Sample code: EHOperations_List. - * - * @param manager Entry point to EventHubsManager. - */ - public static void eHOperationsList(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient().getOperations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java deleted file mode 100644 index 8608d7670e92..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.eventhubs.models.ConnectionState; -import com.azure.resourcemanager.eventhubs.models.EndPointProvisioningState; -import com.azure.resourcemanager.eventhubs.models.PrivateEndpoint; -import com.azure.resourcemanager.eventhubs.models.PrivateLinkConnectionStatus; - -/** - * Samples for PrivateEndpointConnections CreateOrUpdate. - */ -public final class PrivateEndpointConnectionsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/PrivateEndPointConnectionCreate.json - */ - /** - * Sample code: NameSpacePrivateEndPointConnectionCreate. - * - * @param manager Entry point to EventHubsManager. - */ - public static void - nameSpacePrivateEndPointConnectionCreate(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getPrivateEndpointConnections() - .createOrUpdateWithResponse("ArunMonocle", "sdk-Namespace-2924", "privateEndpointConnectionName", - new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint().withId( - "/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-EventHub-8396/providers/Microsoft.Network/privateEndpoints/sdk-Namespace-2847")) - .withPrivateLinkServiceConnectionState( - new ConnectionState().withStatus(PrivateLinkConnectionStatus.REJECTED) - .withDescription("testing")) - .withProvisioningState(EndPointProvisioningState.SUCCEEDED), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateEndpointConnectionsDeleteSamples.java deleted file mode 100644 index d75b4e2fd983..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateEndpointConnectionsDeleteSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for PrivateEndpointConnections Delete. - */ -public final class PrivateEndpointConnectionsDeleteSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/PrivateEndPointConnectionDelete.json - */ - /** - * Sample code: NameSpacePrivateEndPointConnectionDelete. - * - * @param manager Entry point to EventHubsManager. - */ - public static void - nameSpacePrivateEndPointConnectionDelete(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getPrivateEndpointConnections() - .delete("ArunMonocle", "sdk-Namespace-3285", "928c44d5-b7c6-423b-b6fa-811e0c27b3e0", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateEndpointConnectionsGetSamples.java deleted file mode 100644 index 3b3aa8caddac..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateEndpointConnectionsGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for PrivateEndpointConnections Get. - */ -public final class PrivateEndpointConnectionsGetSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/PrivateEndPointConnectionGet.json - */ - /** - * Sample code: NameSpacePrivateEndPointConnectionGet. - * - * @param manager Entry point to EventHubsManager. - */ - public static void - nameSpacePrivateEndPointConnectionGet(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getPrivateEndpointConnections() - .getWithResponse("SDK-EventHub-4794", "sdk-Namespace-5828", "privateEndpointConnectionName", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateEndpointConnectionsListSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateEndpointConnectionsListSamples.java deleted file mode 100644 index 731bdc8794a9..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateEndpointConnectionsListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for PrivateEndpointConnections List. - */ -public final class PrivateEndpointConnectionsListSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/PrivateEndPointConnectionList.json - */ - /** - * Sample code: PrivateEndPointConnectionList. - * - * @param manager Entry point to EventHubsManager. - */ - public static void privateEndPointConnectionList(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getPrivateEndpointConnections() - .list("SDK-EventHub-4794", "sdk-Namespace-5828", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateLinkResourcesGetSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateLinkResourcesGetSamples.java deleted file mode 100644 index 04d5016d9199..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/PrivateLinkResourcesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for PrivateLinkResources Get. - */ -public final class PrivateLinkResourcesGetSamples { - /* - * x-ms-original-file: 2025-05-01-preview/NameSpaces/PrivateLinkResourcesGet.json - */ - /** - * Sample code: NameSpacePrivateLinkResourcesGet. - * - * @param manager Entry point to EventHubsManager. - */ - public static void nameSpacePrivateLinkResourcesGet(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getPrivateLinkResources() - .getWithResponse("ArunMonocle", "sdk-Namespace-2924", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/SchemaRegistryCreateOrUpdateSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/SchemaRegistryCreateOrUpdateSamples.java deleted file mode 100644 index 36a402eff5c0..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/SchemaRegistryCreateOrUpdateSamples.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -import com.azure.resourcemanager.eventhubs.fluent.models.SchemaGroupInner; -import com.azure.resourcemanager.eventhubs.models.SchemaCompatibility; -import com.azure.resourcemanager.eventhubs.models.SchemaType; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for SchemaRegistry CreateOrUpdate. - */ -public final class SchemaRegistryCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-05-01-preview/SchemaRegistry/SchemaRegistryCreate.json - */ - /** - * Sample code: SchemaRegistryCreate. - * - * @param manager Entry point to EventHubsManager. - */ - public static void schemaRegistryCreate(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getSchemaRegistries() - .createOrUpdateWithResponse("alitest", "ali-ua-test-eh-system-1", "testSchemaGroup1", - new SchemaGroupInner().withGroupProperties(mapOf()) - .withSchemaCompatibility(SchemaCompatibility.FORWARD) - .withSchemaType(SchemaType.AVRO), - 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; - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/SchemaRegistryDeleteSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/SchemaRegistryDeleteSamples.java deleted file mode 100644 index 6f8c1e953ffd..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/SchemaRegistryDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for SchemaRegistry Delete. - */ -public final class SchemaRegistryDeleteSamples { - /* - * x-ms-original-file: 2025-05-01-preview/SchemaRegistry/SchemaRegistryDelete.json - */ - /** - * Sample code: SchemaRegistryDelete. - * - * @param manager Entry point to EventHubsManager. - */ - public static void schemaRegistryDelete(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getSchemaRegistries() - .deleteWithResponse("alitest", "ali-ua-test-eh-system-1", "testSchemaGroup1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/SchemaRegistryGetSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/SchemaRegistryGetSamples.java deleted file mode 100644 index cb1e2ef3ab9b..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/SchemaRegistryGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for SchemaRegistry Get. - */ -public final class SchemaRegistryGetSamples { - /* - * x-ms-original-file: 2025-05-01-preview/SchemaRegistry/SchemaRegistryGet.json - */ - /** - * Sample code: SchemaRegistryGet. - * - * @param manager Entry point to EventHubsManager. - */ - public static void schemaRegistryGet(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getSchemaRegistries() - .getWithResponse("alitest", "ali-ua-test-eh-system-1", "testSchemaGroup1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/SchemaRegistryListByNamespaceSamples.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/SchemaRegistryListByNamespaceSamples.java deleted file mode 100644 index ce5567216415..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/samples/java/com/azure/resourcemanager/eventhubs/generated/SchemaRegistryListByNamespaceSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.eventhubs.generated; - -/** - * Samples for SchemaRegistry ListByNamespace. - */ -public final class SchemaRegistryListByNamespaceSamples { - /* - * x-ms-original-file: 2025-05-01-preview/SchemaRegistry/SchemaRegistryListByNamespace.json - */ - /** - * Sample code: SchemaRegistryListAll. - * - * @param manager Entry point to EventHubsManager. - */ - public static void schemaRegistryListAll(com.azure.resourcemanager.eventhubs.EventHubsManager manager) { - manager.serviceClient() - .getSchemaRegistries() - .listByNamespace("alitest", "ali-ua-test-eh-system-1", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/test/java/com/azure/resourcemanager/eventhubs/EventHubTests.java b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/test/java/com/azure/resourcemanager/eventhubs/EventHubTests.java index 002c2cb95e35..d05bbe762fea 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/src/test/java/com/azure/resourcemanager/eventhubs/EventHubTests.java +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/src/test/java/com/azure/resourcemanager/eventhubs/EventHubTests.java @@ -34,8 +34,8 @@ import com.azure.resourcemanager.storage.models.StorageAccountSkuType; import com.azure.resourcemanager.test.ResourceManagerTestProxyTestBase; import com.azure.resourcemanager.test.utils.TestDelayProvider; +import com.azure.resourcemanager.test.utils.TestUtilities; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import reactor.core.Exceptions; @@ -46,7 +46,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.stream.Collectors; public class EventHubTests extends ResourceManagerTestProxyTestBase { protected EventHubsManager eventHubsManager; @@ -90,7 +89,6 @@ public void canManageEventHubNamespaceBasicSettings() { .withNewResourceGroup(rgName) // SDK should use Sku as 'Standard' and set capacity.capacity in it as 1 .withAutoScaling() - .disableLocalAuth() .create(); Assertions.assertNotNull(namespace1); @@ -107,7 +105,6 @@ public void canManageEventHubNamespaceBasicSettings() { .withExistingResourceGroup(rgName) // SDK should use Sku as 'Standard' and set capacity.capacity in it as 11 .withCurrentThroughputUnits(11) - .disableLocalAuth() .create(); Assertions.assertNotNull(namespace2); @@ -123,7 +120,6 @@ public void canManageEventHubNamespaceBasicSettings() { .withRegion(region) .withExistingResourceGroup(rgName) .withSku(EventHubNamespaceSkuType.BASIC) - .disableLocalAuth() .create(); Assertions.assertNotNull(namespace3); @@ -153,7 +149,6 @@ public void canManageEventHubNamespaceEventHubs() { .withNewResourceGroup(rgName) .withNewEventHub(eventHubName1) .withNewEventHub(eventHubName2) - .disableLocalAuth() .create(); Assertions.assertNotNull(namespace); @@ -207,7 +202,6 @@ public void canManageEventHubNamespaceAuthorizationRules() { .withNewResourceGroup(rgName) .withNewManageRule("mngRule1") .withNewSendRule("sndRule1") - .disableLocalAuth() .create(); Assertions.assertNotNull(namespace); @@ -271,11 +265,8 @@ public void canManageEventHubConsumerGroups() { final String namespaceName = generateRandomResourceName("ns", 14); final String eventHubName = generateRandomResourceName("eh", 14); - Creatable namespaceCreatable = eventHubsManager.namespaces() - .define(namespaceName) - .withRegion(region) - .withNewResourceGroup(rgName) - .disableLocalAuth(); + Creatable namespaceCreatable + = eventHubsManager.namespaces().define(namespaceName).withRegion(region).withNewResourceGroup(rgName); EventHub eventHub = eventHubsManager.eventHubs() .define(eventHubName) @@ -329,11 +320,8 @@ public void canManageEventHubAuthorizationRules() { final String namespaceName = generateRandomResourceName("ns", 14); final String eventHubName = generateRandomResourceName("eh", 14); - Creatable namespaceCreatable = eventHubsManager.namespaces() - .define(namespaceName) - .withRegion(region) - .withNewResourceGroup(rgName) - .disableLocalAuth(); + Creatable namespaceCreatable + = eventHubsManager.namespaces().define(namespaceName).withRegion(region).withNewResourceGroup(rgName); EventHub eventHub = eventHubsManager.eventHubs() .define(eventHubName) @@ -393,14 +381,10 @@ public void canConfigureEventHubDataCapturing() { .define(stgName) .withRegion(region) .withNewResourceGroup(rgName) - .withSku(StorageAccountSkuType.STANDARD_LRS) - .disableSharedKeyAccess(); + .withSku(StorageAccountSkuType.STANDARD_LRS); - Creatable namespaceCreatable = eventHubsManager.namespaces() - .define(namespaceName) - .withRegion(region) - .withNewResourceGroup(rgName) - .disableLocalAuth(); + Creatable namespaceCreatable + = eventHubsManager.namespaces().define(namespaceName).withRegion(region).withNewResourceGroup(rgName); final String containerName1 = "eventsctr1"; @@ -461,11 +445,8 @@ public void canEnableEventHubDataCaptureOnUpdate() { final String namespaceName = generateRandomResourceName("ns", 14); final String eventHubName = generateRandomResourceName("eh", 14); - Creatable namespaceCreatable = eventHubsManager.namespaces() - .define(namespaceName) - .withRegion(region) - .withNewResourceGroup(rgName) - .disableLocalAuth(); + Creatable namespaceCreatable + = eventHubsManager.namespaces().define(namespaceName).withRegion(region).withNewResourceGroup(rgName); EventHub eventHub = eventHubsManager.eventHubs().define(eventHubName).withNewNamespace(namespaceCreatable).create(); @@ -484,8 +465,7 @@ public void canEnableEventHubDataCaptureOnUpdate() { .define(stgName) .withRegion(region) .withNewResourceGroup(rgName) - .withSku(StorageAccountSkuType.STANDARD_LRS) - .disableSharedKeyAccess(); + .withSku(StorageAccountSkuType.STANDARD_LRS); eventHub.update() .withDataCaptureEnabled() @@ -499,7 +479,6 @@ public void canEnableEventHubDataCaptureOnUpdate() { Assertions.assertTrue(eventHub.captureDestination().blobContainer().equalsIgnoreCase("eventctr")); } - @Disabled("pairing.listAuthorizationRules() returns rule ID without '/disasterRecoveryConfigs/{}/' segment") @Test public void canManageGeoDisasterRecoveryPairing() throws Throwable { rgName = generateRandomResourceName("javacsmrg", 15); @@ -511,14 +490,12 @@ public void canManageGeoDisasterRecoveryPairing() throws Throwable { .define(namespaceName1) .withRegion(Region.US_SOUTH_CENTRAL) .withNewResourceGroup(rgName) - .disableLocalAuth() .create(); EventHubNamespace secondaryNamespace = eventHubsManager.namespaces() .define(namespaceName2) .withRegion(Region.US_NORTH_CENTRAL) .withExistingResourceGroup(rgName) - .disableLocalAuth() .create(); Exception exception = null; @@ -535,7 +512,7 @@ public void canManageGeoDisasterRecoveryPairing() throws Throwable { pairing = pairing.refresh(); ResourceManagerUtils.sleep(Duration.ofSeconds(15)); if (pairing.provisioningState() == ProvisioningStateDR.FAILED) { - Assertions.fail("Provisioning state of the pairing is FAILED"); + Assertions.assertTrue(false, "Provisioning state of the pairing is FAILED"); } } @@ -544,9 +521,8 @@ public void canManageGeoDisasterRecoveryPairing() throws Throwable { Assertions.assertTrue(pairing.primaryNamespaceName().equalsIgnoreCase(primaryNamespace.name())); assertResourceIdEquals(pairing.secondaryNamespaceId(), secondaryNamespace.id()); - List rules - = pairing.listAuthorizationRules().stream().collect(Collectors.toList()); - Assertions.assertFalse(rules.isEmpty()); + PagedIterable rules = pairing.listAuthorizationRules(); + Assertions.assertTrue(TestUtilities.getSize(rules) > 0); for (DisasterRecoveryPairingAuthorizationRule rule : rules) { DisasterRecoveryPairingAuthorizationKey keys = rule.getKeys(); Assertions.assertNotNull(keys.aliasPrimaryConnectionString()); @@ -556,11 +532,10 @@ public void canManageGeoDisasterRecoveryPairing() throws Throwable { } EventHubDisasterRecoveryPairings pairingsCol = eventHubsManager.eventHubDisasterRecoveryPairings(); - List pairings - = pairingsCol.listByNamespace(primaryNamespace.resourceGroupName(), primaryNamespace.name()) - .stream() - .collect(Collectors.toList()); - Assertions.assertFalse(pairings.isEmpty()); + PagedIterable pairings + = pairingsCol.listByNamespace(primaryNamespace.resourceGroupName(), primaryNamespace.name()); + + Assertions.assertTrue(TestUtilities.getSize(pairings) > 0); boolean found = false; for (EventHubDisasterRecoveryPairing pairing1 : pairings) { @@ -610,7 +585,6 @@ public void testWithMinimumTlsVersion() { // SDK should use Sku as 'Standard' and set capacity.capacity in it as 1 .withAutoScaling() .withMinimumTlsVersion(TlsVersion.ONE_ONE) - .disableLocalAuth() .create(); Assertions.assertEquals(TlsVersion.ONE_ONE, namespace.minimumTlsVersion()); @@ -624,8 +598,6 @@ public void testWithZoneRedundant() { final String namespaceName1 = generateRandomResourceName("ns", 14); final String namespaceName2 = generateRandomResourceName("ns", 14); - // zone redundancy is by default true - // https://learn.microsoft.com/azure/reliability/reliability-event-hubs#resilience-to-availability-zone-failures resourceManager.resourceGroups().define(rgName).withRegion(region).create(); EventHubNamespace namespace1 = eventHubsManager.namespaces() .define(namespaceName1) @@ -633,21 +605,17 @@ public void testWithZoneRedundant() { .withExistingResourceGroup(rgName) // SDK should use Sku as 'Standard' and set capacity.capacity in it as 1 .withAutoScaling() - .disableLocalAuth() .create(); - Assertions.assertTrue(namespace1.zoneRedundant()); + Assertions.assertFalse(namespace1.zoneRedundant()); - // and seems cannot be disabled - /* EventHubNamespace namespace2 = eventHubsManager.namespaces() .define(namespaceName2) .withRegion(region) .withExistingResourceGroup(rgName) // SDK should use Sku as 'Standard' and set capacity.capacity in it as 1 .withAutoScaling() - .disableLocalAuth() + .enableZoneRedundant() .create(); - Assertions.assertFalse(namespace2.zoneRedundant()); - */ + Assertions.assertTrue(namespace2.zoneRedundant()); } } diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/tsp-location.yaml b/sdk/eventhubs/azure-resourcemanager-eventhubs/tsp-location.yaml deleted file mode 100644 index 2468fb1bc034..000000000000 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/tsp-location.yaml +++ /dev/null @@ -1,4 +0,0 @@ -directory: specification/eventhub/resource-manager/Microsoft.EventHub/Eventhub -commit: 2128b7c4388866501a9590c9d4bc2afb32fc8d32 -repo: Azure/azure-rest-api-specs -additionalDirectories: From ce6b7020a9f7f5e3b31f403bdea903c15cdfe93a Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 2 Jun 2026 04:06:11 +0000 Subject: [PATCH 13/16] Prepare azure-resourcemanager-eventhubs for 2.53.9 patch release. --- eng/versioning/version_client.txt | 2 +- .../azure-resourcemanager-eventhubs/CHANGELOG.md | 10 ++++++++++ sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml | 6 +++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index fe9f64c0c4d3..c234f72f6510 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -287,7 +287,7 @@ com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.55.2;2.56.0- com.azure.resourcemanager:azure-resourcemanager-containerservice;2.60.0;2.61.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-cosmos;2.54.3;2.55.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-dns;2.53.8;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.53.8;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.53.8;2.53.9 com.azure.resourcemanager:azure-resourcemanager-keyvault;2.55.2;2.55.3 com.azure.resourcemanager:azure-resourcemanager-monitor;2.53.8;2.54.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-msi;2.53.8;2.54.0-beta.2 diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/CHANGELOG.md b/sdk/eventhubs/azure-resourcemanager-eventhubs/CHANGELOG.md index 35dd014a020d..519620f24888 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/CHANGELOG.md +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 2.53.9 (2026-06-02) + +### Other Changes + +#### Dependency Updates + +- Upgraded `azure-resourcemanager-storage` from `2.55.4` to version `2.56.0`. +- Upgraded `azure-resourcemanager-resources` from `2.54.0` to version `2.54.1`. + + ## 2.53.8 (2026-05-05) ### Other Changes diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml b/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml index 388e12dd9120..aca2967a47ff 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-eventhubs - 2.53.8 + 2.53.9 jar Microsoft Azure SDK for EventHubs Management @@ -59,12 +59,12 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.54.0 + 2.54.1 com.azure.resourcemanager azure-resourcemanager-storage - 2.55.4 + 2.56.0 org.junit.jupiter From ead601e1d209e7a82c06948e4569d9021d14fc4a Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 2 Jun 2026 04:06:13 +0000 Subject: [PATCH 14/16] Reset sources for azure-resourcemanager-containerinstance to the release version 2.53.10. --- .../CHANGELOG.md | 11 +- .../README.md | 2 +- .../pom.xml | 14 +- .../fluent/CGProfilesClient.java | 445 ---- .../fluent/CGProfilesOperationsClient.java | 99 - .../fluent/ContainerGroupsClient.java | 352 ++- .../ContainerInstanceManagementClient.java | 54 +- .../fluent/ContainersClient.java | 44 +- .../fluent/LocationsClient.java | 44 +- .../fluent/NGroupsClient.java | 806 ------- .../fluent/OperationsClient.java | 17 +- .../SubnetServiceAssociationLinksClient.java | 16 +- .../models/ContainerAttachResponseInner.java | 31 +- .../models/ContainerExecResponseInner.java | 30 +- .../fluent/models/ContainerGroupInner.java | 156 +- .../models/ContainerGroupProfileInner.java | 678 ------ .../ContainerGroupProfileProperties.java | 673 ------ .../models/ContainerGroupProperties.java | 165 +- .../fluent/models/ContainerProperties.java | 53 +- .../DeploymentExtensionSpecProperties.java | 10 +- .../InitContainerPropertiesDefinition.java | 2 +- .../fluent/models/LogsInner.java | 19 +- .../fluent/models/NGroupInner.java | 384 ---- .../fluent/models/NGroupProperties.java | 221 -- .../fluent/models/UsageInner.java | 4 +- .../fluent/models/package-info.java | 6 +- .../fluent/package-info.java | 6 +- .../implementation/CGProfilesClientImpl.java | 1142 ---------- .../CGProfilesOperationsClientImpl.java | 483 ---- .../ContainerGroupsClientImpl.java | 1217 +++++----- ...tainerInstanceManagementClientBuilder.java | 30 +- ...ContainerInstanceManagementClientImpl.java | 127 +- .../implementation/ContainersClientImpl.java | 103 +- .../implementation/LocationsClientImpl.java | 251 +-- .../implementation/NGroupsClientImpl.java | 1991 ----------------- .../implementation/OperationsClientImpl.java | 52 +- ...bnetServiceAssociationLinksClientImpl.java | 45 +- .../ContainerGroupProfileListResult.java | 115 - .../models/NGroupsListResult.java | 112 - .../models/ApiEntityReference.java | 95 - .../models/ApplicationGateway.java | 128 -- .../ApplicationGatewayBackendAddressPool.java | 95 - .../models/AzureFileShareAccessTier.java | 68 - .../models/AzureFileShareAccessType.java | 57 - .../models/AzureFileVolume.java | 32 +- .../CGProfilesCreateOrUpdateHeaders.java | 50 - .../CGProfilesCreateOrUpdateResponse.java | 40 - .../models/CGProfilesUpdateHeaders.java | 50 - .../models/CGProfilesUpdateResponse.java | 39 - .../models/CachedImages.java | 30 +- .../models/CachedImagesListResult.java | 41 +- .../models/Capabilities.java | 4 +- .../models/CapabilitiesCapabilities.java | 4 +- .../models/CapabilitiesListResult.java | 37 +- .../models/ConfidentialComputeProperties.java | 2 +- .../containerinstance/models/ConfigMap.java | 95 - .../containerinstance/models/Container.java | 25 +- .../models/ContainerExec.java | 2 +- .../models/ContainerExecRequest.java | 2 +- .../ContainerExecRequestTerminalSize.java | 2 +- .../models/ContainerGroupDiagnostics.java | 2 +- .../models/ContainerGroupIdentity.java | 2 +- ...erGroupIdentityUserAssignedIdentities.java | 2 +- .../models/ContainerGroupIpAddressType.java | 6 +- .../models/ContainerGroupListResult.java | 51 +- .../models/ContainerGroupNetworkProtocol.java | 6 +- .../models/ContainerGroupPriority.java | 6 +- .../models/ContainerGroupProfilePatch.java | 95 - ...tainerGroupProfileReferenceDefinition.java | 128 -- .../models/ContainerGroupProfileStub.java | 224 -- .../ContainerGroupPropertiesInstanceView.java | 4 +- .../models/ContainerGroupRestartPolicy.java | 8 +- .../models/ContainerGroupSku.java | 13 +- .../models/ContainerGroupSubnetId.java | 2 +- .../models/ContainerHttpGet.java | 2 +- .../ContainerInstanceOperationsOrigin.java | 6 +- .../models/ContainerNetworkProtocol.java | 6 +- .../models/ContainerPort.java | 2 +- .../models/ContainerProbe.java | 2 +- .../ContainerPropertiesInstanceView.java | 4 +- .../models/ContainerState.java | 4 +- .../models/DeploymentExtensionSpec.java | 2 +- .../models/DnsConfiguration.java | 2 +- .../models/DnsNameLabelReusePolicy.java | 12 +- .../models/ElasticProfile.java | 163 -- ...sticProfileContainerGroupNamingPolicy.java | 101 - ...inerGroupNamingPolicyGuidNamingPolicy.java | 103 - .../models/EncryptionProperties.java | 2 +- .../models/EnvironmentVariable.java | 30 +- .../containerinstance/models/Event.java | 4 +- .../containerinstance/models/FileShare.java | 180 -- .../models/FileShareProperties.java | 134 -- .../models/GitRepoVolume.java | 2 +- .../containerinstance/models/GpuResource.java | 2 +- .../containerinstance/models/GpuSku.java | 8 +- .../containerinstance/models/HttpHeader.java | 2 +- .../models/IdentityAccessControl.java | 121 - .../models/IdentityAccessLevel.java | 56 - .../models/IdentityAcls.java | 127 -- .../models/ImageRegistryCredential.java | 30 +- .../models/InitContainerDefinition.java | 2 +- ...ainerPropertiesDefinitionInstanceView.java | 4 +- .../containerinstance/models/IpAddress.java | 2 +- .../models/LoadBalancer.java | 100 - .../LoadBalancerBackendAddressPool.java | 94 - .../models/LogAnalytics.java | 2 +- .../models/LogAnalyticsLogType.java | 6 +- .../models/NGroupCGPropertyContainer.java | 125 -- .../NGroupCGPropertyContainerProperties.java | 100 - .../models/NGroupCGPropertyVolume.java | 132 -- .../NGroupContainerGroupProperties.java | 170 -- .../models/NGroupIdentity.java | 173 -- .../containerinstance/models/NGroupPatch.java | 299 --- .../models/NGroupProvisioningState.java | 76 - .../models/NGroupUpdateMode.java | 51 - .../models/NetworkProfile.java | 130 -- .../models/OperatingSystemTypes.java | 6 +- .../containerinstance/models/Operation.java | 56 +- .../models/OperationDisplay.java | 52 +- .../models/OperationListResult.java | 52 +- .../models/PlacementProfile.java | 98 - .../containerinstance/models/Port.java | 2 +- .../models/ResourceIdentityType.java | 10 +- .../models/ResourceLimits.java | 2 +- .../models/ResourceRequests.java | 2 +- .../models/ResourceRequirements.java | 2 +- .../containerinstance/models/Scheme.java | 6 +- .../models/SecretReference.java | 168 -- ...SecurityContextCapabilitiesDefinition.java | 2 +- .../models/SecurityContextDefinition.java | 2 +- .../models/StandbyPoolProfileDefinition.java | 131 -- .../models/StorageProfile.java | 98 - .../models/UpdateProfile.java | 124 - .../UpdateProfileRollingUpdateProfile.java | 193 -- .../models/UsageListResult.java | 23 +- .../containerinstance/models/UsageName.java | 4 +- .../containerinstance/models/Volume.java | 36 +- .../containerinstance/models/VolumeMount.java | 2 +- .../models/package-info.java | 6 +- .../containerinstance/package-info.java | 6 +- .../src/main/java/module-info.java | 1 - ...rcemanager-containerinstance_metadata.json | 1 - .../proxy-config.json | 2 +- .../CGProfileCreateOrUpdateSamples.java | 217 -- .../generated/CGProfileDeleteSamples.java | 23 - .../CGProfileGetByResourceGroupSamples.java | 40 - .../CGProfileGetByRevisionNumberSamples.java | 25 - .../CGProfileListAllRevisionsSamples.java | 23 - .../generated/CGProfileUpdateSamples.java | 44 - ...esOperationListByResourceGroupSamples.java | 23 - .../CGProfilesOperationListSamples.java | 23 - .../ContainerGroupsCreateOrUpdateSamples.java | 377 ---- .../ContainerGroupsDeleteSamples.java | 23 - ...tainerGroupsGetByResourceGroupSamples.java | 55 - ...ainerGroupsListByResourceGroupSamples.java | 23 - .../generated/ContainerGroupsListSamples.java | 23 - .../ContainerGroupsRestartSamples.java | 22 - .../ContainerGroupsStartSamples.java | 22 - .../generated/ContainerGroupsStopSamples.java | 24 - .../ContainerGroupsUpdateSamples.java | 43 - .../generated/ContainersAttachSamples.java | 24 - .../ContainersExecuteCommandSamples.java | 30 - .../generated/ContainersListLogsSamples.java | 24 - .../LocationListCachedImagesSamples.java | 22 - .../LocationListCapabilitiesSamples.java | 22 - .../generated/LocationListUsageSamples.java | 22 - .../generated/OperationsListSamples.java | 22 - ...etServiceAssociationLinkDeleteSamples.java | 25 - .../tsp-location.yaml | 4 - 169 files changed, 1534 insertions(+), 14808 deletions(-) delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/CGProfilesClient.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/CGProfilesOperationsClient.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/NGroupsClient.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerGroupProfileInner.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerGroupProfileProperties.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/NGroupInner.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/NGroupProperties.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/CGProfilesClientImpl.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/CGProfilesOperationsClientImpl.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/NGroupsClientImpl.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/ContainerGroupProfileListResult.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/NGroupsListResult.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ApiEntityReference.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ApplicationGateway.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ApplicationGatewayBackendAddressPool.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileShareAccessTier.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileShareAccessType.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesCreateOrUpdateHeaders.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesCreateOrUpdateResponse.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesUpdateHeaders.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesUpdateResponse.java rename sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/{implementation => }/models/CachedImagesListResult.java (72%) rename sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/{implementation => }/models/CapabilitiesListResult.java (74%) delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ConfigMap.java rename sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/{implementation => }/models/ContainerGroupListResult.java (70%) delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupProfilePatch.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupProfileReferenceDefinition.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupProfileStub.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ElasticProfile.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ElasticProfileContainerGroupNamingPolicy.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/FileShare.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/FileShareProperties.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/IdentityAccessControl.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/IdentityAccessLevel.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/IdentityAcls.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/LoadBalancer.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/LoadBalancerBackendAddressPool.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupCGPropertyContainer.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupCGPropertyContainerProperties.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupCGPropertyVolume.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupContainerGroupProperties.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupIdentity.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupPatch.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupProvisioningState.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupUpdateMode.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NetworkProfile.java rename sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/{implementation => }/models/OperationListResult.java (69%) delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/PlacementProfile.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/SecretReference.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/StandbyPoolProfileDefinition.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/StorageProfile.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/UpdateProfile.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/UpdateProfileRollingUpdateProfile.java rename sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/{implementation => }/models/UsageListResult.java (78%) delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/resources/META-INF/azure-resourcemanager-containerinstance_metadata.json delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileCreateOrUpdateSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileDeleteSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileGetByResourceGroupSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileGetByRevisionNumberSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileListAllRevisionsSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileUpdateSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfilesOperationListByResourceGroupSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfilesOperationListSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsCreateOrUpdateSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsDeleteSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsGetByResourceGroupSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsListByResourceGroupSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsListSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsRestartSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsStartSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsStopSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsUpdateSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainersAttachSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainersExecuteCommandSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainersListLogsSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/LocationListCachedImagesSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/LocationListCapabilitiesSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/LocationListUsageSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/OperationsListSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/SubnetServiceAssociationLinkDeleteSamples.java delete mode 100644 sdk/containerinstance/azure-resourcemanager-containerinstance/tsp-location.yaml diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md b/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md index 74dc42caae89..ffe6862c1521 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md @@ -1,15 +1,5 @@ # Release History -## 2.54.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - ## 2.53.10 (2026-05-05) ### Other Changes @@ -23,6 +13,7 @@ - Upgraded `azure-resourcemanager-msi` from `2.53.6` to version `2.53.8`. - Upgraded `azure-resourcemanager-resources` from `2.54.0` to version `2.54.1`. + ## 2.53.9 (2026-03-30) ### Other Changes diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/README.md b/sdk/containerinstance/azure-resourcemanager-containerinstance/README.md index b8f15499c339..71f56f7f0bcd 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/README.md +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-containerinstance - 2.54.0-beta.1 + 2.53.10 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml b/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml index bc9faabb74e6..5ed3b2d8385c 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml @@ -10,7 +10,7 @@ com.azure.resourcemanager azure-resourcemanager-containerinstance - 2.54.0-beta.1 + 2.53.10 jar Microsoft Azure SDK for Container Instance Management @@ -60,32 +60,32 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.54.1 + 2.54.0 com.azure.resourcemanager azure-resourcemanager-storage - 2.56.0 + 2.55.4 com.azure.resourcemanager azure-resourcemanager-authorization - 2.53.9 + 2.53.8 com.azure.resourcemanager azure-resourcemanager-msi - 2.53.8 + 2.53.7 com.azure.resourcemanager azure-resourcemanager-network - 2.58.2 + 2.58.1 com.azure azure-storage-file-share - 12.30.0 + 12.29.2 com.azure diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/CGProfilesClient.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/CGProfilesClient.java deleted file mode 100644 index 8a880e6404fe..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/CGProfilesClient.java +++ /dev/null @@ -1,445 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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.containerinstance.fluent.models.ContainerGroupProfileInner; -import com.azure.resourcemanager.containerinstance.models.CGProfilesCreateOrUpdateResponse; -import com.azure.resourcemanager.containerinstance.models.CGProfilesUpdateResponse; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupProfilePatch; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in CGProfilesClient. - */ -public interface CGProfilesClient extends InnerSupportsGet, InnerSupportsDelete { - /** - * Get the properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group. The operation returns the properties of container group profile including containers, image - * registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param revisionNumber The revision number of the container group profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByRevisionNumberWithResponseAsync(String resourceGroupName, - String containerGroupProfileName, String revisionNumber); - - /** - * Get the properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group. The operation returns the properties of container group profile including containers, image - * registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param revisionNumber The revision number of the container group profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByRevisionNumberAsync(String resourceGroupName, - String containerGroupProfileName, String revisionNumber); - - /** - * Get the properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group. The operation returns the properties of container group profile including containers, image - * registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param revisionNumber The revision number of the container group profile. - * @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 properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByRevisionNumberWithResponse(String resourceGroupName, - String containerGroupProfileName, String revisionNumber, Context context); - - /** - * Get the properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group. The operation returns the properties of container group profile including containers, image - * registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param revisionNumber The revision number of the container group profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerGroupProfileInner getByRevisionNumber(String resourceGroupName, String containerGroupProfileName, - String revisionNumber); - - /** - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. This operation returns properties of each revision of the specified container group profile including - * containers, image registry credentials, restart policy, IP address type, OS type volumes, revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 all the revisions of the specified container group profile in the given subscription and - * resource group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAllRevisionsAsync(String resourceGroupName, - String containerGroupProfileName); - - /** - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. This operation returns properties of each revision of the specified container group profile including - * containers, image registry credentials, restart policy, IP address type, OS type volumes, revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 all the revisions of the specified container group profile in the given subscription and - * resource group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAllRevisions(String resourceGroupName, - String containerGroupProfileName); - - /** - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. This operation returns properties of each revision of the specified container group profile including - * containers, image registry credentials, restart policy, IP address type, OS type volumes, revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @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 all the revisions of the specified container group profile in the given subscription and - * resource group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAllRevisions(String resourceGroupName, - String containerGroupProfileName, Context context); - - /** - * Display information about a specified ContainerGroupProfile. - * - * Get the properties of the specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container group profile object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String containerGroupProfileName); - - /** - * Display information about a specified ContainerGroupProfile. - * - * Get the properties of the specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container group profile object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, - String containerGroupProfileName); - - /** - * Display information about a specified ContainerGroupProfile. - * - * Get the properties of the specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @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 container group profile object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String containerGroupProfileName, Context context); - - /** - * Display information about a specified ContainerGroupProfile. - * - * Get the properties of the specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container group profile object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerGroupProfileInner getByResourceGroup(String resourceGroupName, String containerGroupProfileName); - - /** - * Create or Update a ContainerGroupProfile - * - * Create a CGProfile if it doesn't exist or update an existing CGProfile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param containerGroupProfile The ContainerGroupProfile object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container group profile object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateWithResponseAsync(String resourceGroupName, - String containerGroupProfileName, ContainerGroupProfileInner containerGroupProfile); - - /** - * Create or Update a ContainerGroupProfile - * - * Create a CGProfile if it doesn't exist or update an existing CGProfile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param containerGroupProfile The ContainerGroupProfile object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container group profile object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String containerGroupProfileName, - ContainerGroupProfileInner containerGroupProfile); - - /** - * Create or Update a ContainerGroupProfile - * - * Create a CGProfile if it doesn't exist or update an existing CGProfile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param containerGroupProfile The ContainerGroupProfile object. - * @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 container group profile object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CGProfilesCreateOrUpdateResponse createOrUpdateWithResponse(String resourceGroupName, - String containerGroupProfileName, ContainerGroupProfileInner containerGroupProfile, Context context); - - /** - * Create or Update a ContainerGroupProfile - * - * Create a CGProfile if it doesn't exist or update an existing CGProfile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param containerGroupProfile The ContainerGroupProfile object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container group profile object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerGroupProfileInner createOrUpdate(String resourceGroupName, String containerGroupProfileName, - ContainerGroupProfileInner containerGroupProfile); - - /** - * Container group profile PATCH REST API. - * - * Update a specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param properties The container group profile properties that need 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 a container group profile object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateWithResponseAsync(String resourceGroupName, String containerGroupProfileName, - ContainerGroupProfilePatch properties); - - /** - * Container group profile PATCH REST API. - * - * Update a specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param properties The container group profile properties that need 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 a container group profile object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String containerGroupProfileName, - ContainerGroupProfilePatch properties); - - /** - * Container group profile PATCH REST API. - * - * Update a specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param properties The container group profile properties that need 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 container group profile object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CGProfilesUpdateResponse updateWithResponse(String resourceGroupName, String containerGroupProfileName, - ContainerGroupProfilePatch properties, Context context); - - /** - * Container group profile PATCH REST API. - * - * Update a specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param properties The container group profile properties that need 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 a container group profile object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerGroupProfileInner update(String resourceGroupName, String containerGroupProfileName, - ContainerGroupProfilePatch properties); - - /** - * Container group profile DELETE REST API. - * - * Deletes a container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 containerGroupProfileName); - - /** - * Container group profile DELETE REST API. - * - * Deletes a container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 containerGroupProfileName); - - /** - * Container group profile DELETE REST API. - * - * Deletes a container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String containerGroupProfileName, Context context); - - /** - * Container group profile DELETE REST API. - * - * Deletes a container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 containerGroupProfileName); -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/CGProfilesOperationsClient.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/CGProfilesOperationsClient.java deleted file mode 100644 index 60ad31da858c..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/CGProfilesOperationsClient.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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.containerinstance.fluent.models.ContainerGroupProfileInner; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; - -/** - * An instance of this class provides access to all the operations defined in CGProfilesOperationsClient. - */ -public interface CGProfilesOperationsClient extends InnerSupportsListing { - /** - * List container group profiles in a subscription. - * - * Gets a list of all container group profiles under 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. - * @return the response of a ContainerGroupProfile list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); - - /** - * List container group profiles in a subscription. - * - * Gets a list of all container group profiles under 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. - * @return the response of a ContainerGroupProfile list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List container group profiles in a subscription. - * - * Gets a list of all container group profiles under a subscription. - * - * @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 response of a ContainerGroupProfile list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * List container group profiles in a resource group. - * - * Gets a list of all container group profiles under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 ContainerGroupProfile list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - - /** - * List container group profiles in a resource group. - * - * Gets a list of all container group profiles under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 ContainerGroupProfile list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List container group profiles in a resource group. - * - * Gets a list of all container group profiles under 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 ContainerGroupProfile list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerGroupsClient.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerGroupsClient.java index 7d3a9cf1fe7a..a89c614bea5d 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerGroupsClient.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerGroupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.fluent; @@ -27,7 +27,105 @@ * An instance of this class provides access to all the operations defined in ContainerGroupsClient. */ public interface ContainerGroupsClient extends InnerSupportsGet, - InnerSupportsListing, InnerSupportsDelete { + InnerSupportsListing, InnerSupportsDelete { + /** + * Get a list of container groups in the specified subscription. + * + * Get a list of container groups in the specified subscription. This operation returns properties of each container + * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and + * volumes. + * + * @throws com.azure.core.management.exception.ManagementException 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 container groups in the specified subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); + + /** + * Get a list of container groups in the specified subscription. + * + * Get a list of container groups in the specified subscription. This operation returns properties of each container + * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and + * volumes. + * + * @throws com.azure.core.management.exception.ManagementException 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 container groups in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get a list of container groups in the specified subscription. + * + * Get a list of container groups in the specified subscription. This operation returns properties of each container + * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and + * volumes. + * + * @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 container groups in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Get a list of container groups in the specified subscription and resource group. + * + * Get a list of container groups in a specified subscription and resource group. This operation returns properties + * of each container group including containers, image registry credentials, restart policy, IP address type, OS + * type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 container groups in a specified subscription and resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); + + /** + * Get a list of container groups in the specified subscription and resource group. + * + * Get a list of container groups in a specified subscription and resource group. This operation returns properties + * of each container group including containers, image registry credentials, restart policy, IP address type, OS + * type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 container groups in a specified subscription and resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get a list of container groups in the specified subscription and resource group. + * + * Get a list of container groups in a specified subscription and resource group. This operation returns properties + * of each container group including containers, image registry credentials, restart policy, IP address type, OS + * type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @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 container groups in a specified subscription and resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + /** * Get the properties of the specified container group. * @@ -35,15 +133,13 @@ public interface ContainerGroupsClient extends InnerSupportsGet> getByResourceGroupWithResponseAsync(String resourceGroupName, @@ -56,14 +152,12 @@ Mono> getByResourceGroupWithResponseAsync(String r * operation returns the properties of each container group including containers, image registry credentials, * restart policy, IP address type, OS type, state, and volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified container group. - * - * Gets the properties of the specified container group in the specified subscription and resource group on + * @return the properties of the specified container group in the specified subscription and resource group on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -76,16 +170,14 @@ Mono> getByResourceGroupWithResponseAsync(String r * operation returns the properties of each container group including containers, image registry credentials, * restart policy, IP address type, OS type, state, and volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @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 properties of the specified container group. - * - * Gets the properties of the specified container group in the specified subscription and resource group along with - * {@link Response}. + * @return the properties of the specified container group in the specified subscription and resource group along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, String containerGroupName, @@ -98,14 +190,12 @@ Response getByResourceGroupWithResponse(String resourceGrou * operation returns the properties of each container group including containers, image registry credentials, * restart policy, IP address type, OS type, state, and volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified container group. - * - * Gets the properties of the specified container group in the specified subscription and resource group. + * @return the properties of the specified container group in the specified subscription and resource group. */ @ServiceMethod(returns = ReturnType.SINGLE) ContainerGroupInner getByResourceGroup(String resourceGroupName, String containerGroupName); @@ -115,7 +205,7 @@ Response getByResourceGroupWithResponse(String resourceGrou * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -132,7 +222,7 @@ Mono>> createOrUpdateWithResponseAsync(String resource * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -149,7 +239,7 @@ PollerFlux, ContainerGroupInner> beginCreateOrUp * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -166,7 +256,7 @@ SyncPoller, ContainerGroupInner> beginCreateOrUp * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @param context The context to associate with this operation. @@ -184,7 +274,7 @@ SyncPoller, ContainerGroupInner> beginCreateOrUp * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -201,7 +291,7 @@ Mono createOrUpdateAsync(String resourceGroupName, String c * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -218,7 +308,7 @@ ContainerGroupInner createOrUpdate(String resourceGroupName, String containerGro * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @param context The context to associate with this operation. @@ -236,7 +326,7 @@ ContainerGroupInner createOrUpdate(String resourceGroupName, String containerGro * * Updates container group tags with specified values. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param resource The container group resource with just the tags to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -253,7 +343,7 @@ Mono> updateWithResponseAsync(String resourceGroup * * Updates container group tags with specified values. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param resource The container group resource with just the tags to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -269,7 +359,7 @@ Mono> updateWithResponseAsync(String resourceGroup * * Updates container group tags with specified values. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param resource The container group resource with just the tags to be updated. * @param context The context to associate with this operation. @@ -287,7 +377,7 @@ Response updateWithResponse(String resourceGroupName, Strin * * Updates container group tags with specified values. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param resource The container group resource with just the tags to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -304,7 +394,7 @@ Response updateWithResponse(String resourceGroupName, Strin * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -320,7 +410,7 @@ Response updateWithResponse(String resourceGroupName, Strin * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -328,7 +418,8 @@ Response updateWithResponse(String resourceGroupName, Strin * @return the {@link PollerFlux} for polling of a container group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String containerGroupName); + PollerFlux, ContainerGroupInner> beginDeleteAsync(String resourceGroupName, + String containerGroupName); /** * Delete the specified container group. @@ -336,7 +427,7 @@ Response updateWithResponse(String resourceGroupName, Strin * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -344,7 +435,8 @@ Response updateWithResponse(String resourceGroupName, Strin * @return the {@link SyncPoller} for polling of a container group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String containerGroupName); + SyncPoller, ContainerGroupInner> beginDelete(String resourceGroupName, + String containerGroupName); /** * Delete the specified container group. @@ -352,7 +444,7 @@ Response updateWithResponse(String resourceGroupName, Strin * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -361,8 +453,8 @@ Response updateWithResponse(String resourceGroupName, Strin * @return the {@link SyncPoller} for polling of a container group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String containerGroupName, - Context context); + SyncPoller, ContainerGroupInner> beginDelete(String resourceGroupName, + String containerGroupName, Context context); /** * Delete the specified container group. @@ -370,7 +462,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -378,7 +470,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @return a container group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String containerGroupName); + Mono deleteAsync(String resourceGroupName, String containerGroupName); /** * Delete the specified container group. @@ -386,14 +478,15 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String containerGroupName); + ContainerGroupInner delete(String resourceGroupName, String containerGroupName); /** * Delete the specified container group. @@ -401,15 +494,16 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @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 container group. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String containerGroupName, Context context); + ContainerGroupInner delete(String resourceGroupName, String containerGroupName, Context context); /** * Restarts all containers in a container group. @@ -417,7 +511,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -433,7 +527,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -449,7 +543,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -465,7 +559,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -483,7 +577,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -499,7 +593,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -514,7 +608,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -529,7 +623,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * * Stops all containers in a container group. Compute resources will be deallocated and billing will stop. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -544,7 +638,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * * Stops all containers in a container group. Compute resources will be deallocated and billing will stop. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -559,7 +653,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * * Stops all containers in a container group. Compute resources will be deallocated and billing will stop. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -575,7 +669,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * * Stops all containers in a container group. Compute resources will be deallocated and billing will stop. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -589,7 +683,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * * Starts all containers in a container group. Compute resources will be allocated and billing will start. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -604,7 +698,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * * Starts all containers in a container group. Compute resources will be allocated and billing will start. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -619,7 +713,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * * Starts all containers in a container group. Compute resources will be allocated and billing will start. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -634,7 +728,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * * Starts all containers in a container group. Compute resources will be allocated and billing will start. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -650,7 +744,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * * Starts all containers in a container group. Compute resources will be allocated and billing will start. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -665,7 +759,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * * Starts all containers in a container group. Compute resources will be allocated and billing will start. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -679,7 +773,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * * Starts all containers in a container group. Compute resources will be allocated and billing will start. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -695,14 +789,12 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * Gets all the network dependencies for this container group to allow complete control of network setting and * configuration. For container groups, this will always be an empty list. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 network dependencies for container group. - * - * Gets all the network dependencies for this container group to allow complete control of network setting and + * @return all the network dependencies for this container group to allow complete control of network setting and * configuration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -715,14 +807,12 @@ Mono>> getOutboundNetworkDependenciesEndpointsWithResponse * Gets all the network dependencies for this container group to allow complete control of network setting and * configuration. For container groups, this will always be an empty list. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 network dependencies for container group. - * - * Gets all the network dependencies for this container group to allow complete control of network setting and + * @return all the network dependencies for this container group to allow complete control of network setting and * configuration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -735,15 +825,13 @@ Mono> getOutboundNetworkDependenciesEndpointsAsync(String resourceG * Gets all the network dependencies for this container group to allow complete control of network setting and * configuration. For container groups, this will always be an empty list. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @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 all network dependencies for container group. - * - * Gets all the network dependencies for this container group to allow complete control of network setting and + * @return all the network dependencies for this container group to allow complete control of network setting and * configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -756,124 +844,14 @@ Response> getOutboundNetworkDependenciesEndpointsWithResponse(Strin * Gets all the network dependencies for this container group to allow complete control of network setting and * configuration. For container groups, this will always be an empty list. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 network dependencies for container group. - * - * Gets all the network dependencies for this container group to allow complete control of network setting and + * @return all the network dependencies for this container group to allow complete control of network setting and * configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) List getOutboundNetworkDependenciesEndpoints(String resourceGroupName, String containerGroupName); - - /** - * Get a list of container groups in the specified subscription. - * - * Get a list of container groups in the specified subscription. This operation returns properties of each container - * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and - * volumes. - * - * @throws com.azure.core.management.exception.ManagementException 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 container groups in the specified subscription. - * - * Get a list of container groups in the specified subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); - - /** - * Get a list of container groups in the specified subscription. - * - * Get a list of container groups in the specified subscription. This operation returns properties of each container - * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and - * volumes. - * - * @throws com.azure.core.management.exception.ManagementException 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 container groups in the specified subscription. - * - * Get a list of container groups in the specified subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Get a list of container groups in the specified subscription. - * - * Get a list of container groups in the specified subscription. This operation returns properties of each container - * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and - * volumes. - * - * @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 container groups in the specified subscription. - * - * Get a list of container groups in the specified subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Get a list of container groups in the specified subscription and resource group. - * - * Get a list of container groups in a specified subscription and resource group. This operation returns properties - * of each container group including containers, image registry credentials, restart policy, IP address type, OS - * type, state, and volumes. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 container groups in the specified subscription and resource group. - * - * Get a list of container groups in a specified subscription and resource group as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - - /** - * Get a list of container groups in the specified subscription and resource group. - * - * Get a list of container groups in a specified subscription and resource group. This operation returns properties - * of each container group including containers, image registry credentials, restart policy, IP address type, OS - * type, state, and volumes. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 container groups in the specified subscription and resource group. - * - * Get a list of container groups in a specified subscription and resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get a list of container groups in the specified subscription and resource group. - * - * Get a list of container groups in a specified subscription and resource group. This operation returns properties - * of each container group including containers, image registry credentials, restart policy, IP address type, OS - * type, state, and volumes. - * - * @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 com.azure.core.management.exception.ManagementException 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 container groups in the specified subscription and resource group. - * - * Get a list of container groups in a specified subscription and resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); } diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerInstanceManagementClient.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerInstanceManagementClient.java index 9a65352a73f5..59402562a5d2 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerInstanceManagementClient.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerInstanceManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.fluent; @@ -12,25 +12,26 @@ */ public interface ContainerInstanceManagementClient { /** - * Gets Service host. + * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. * - * @return the endpoint value. + * @return the subscriptionId value. */ - String getEndpoint(); + String getSubscriptionId(); /** - * Gets Version parameter. + * Gets server parameter. * - * @return the apiVersion value. + * @return the endpoint value. */ - String getApiVersion(); + String getEndpoint(); /** - * Gets The ID of the target subscription. The value must be an UUID. + * Gets Api Version. * - * @return the subscriptionId value. + * @return the apiVersion value. */ - String getSubscriptionId(); + String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. @@ -46,13 +47,6 @@ public interface ContainerInstanceManagementClient { */ Duration getDefaultPollInterval(); - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - /** * Gets the ContainerGroupsClient object to access its operations. * @@ -61,18 +55,18 @@ public interface ContainerInstanceManagementClient { ContainerGroupsClient getContainerGroups(); /** - * Gets the NGroupsClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the NGroupsClient object. + * @return the OperationsClient object. */ - NGroupsClient getNGroups(); + OperationsClient getOperations(); /** - * Gets the CGProfilesClient object to access its operations. + * Gets the LocationsClient object to access its operations. * - * @return the CGProfilesClient object. + * @return the LocationsClient object. */ - CGProfilesClient getCGProfiles(); + LocationsClient getLocations(); /** * Gets the ContainersClient object to access its operations. @@ -81,20 +75,6 @@ public interface ContainerInstanceManagementClient { */ ContainersClient getContainers(); - /** - * Gets the CGProfilesOperationsClient object to access its operations. - * - * @return the CGProfilesOperationsClient object. - */ - CGProfilesOperationsClient getCGProfilesOperations(); - - /** - * Gets the LocationsClient object to access its operations. - * - * @return the LocationsClient object. - */ - LocationsClient getLocations(); - /** * Gets the SubnetServiceAssociationLinksClient object to access its operations. * diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainersClient.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainersClient.java index 3b9b0f21ea3c..2161ca3fdb10 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainersClient.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.fluent; @@ -23,7 +23,7 @@ public interface ContainersClient { * * Get the logs for a specified container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param tail The number of lines to show from the tail of the container instance log. If not provided, all @@ -33,9 +33,7 @@ public interface ContainersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the logs for a specified container instance. - * - * Get the logs for a specified container instance in a specified resource group and container group along with + * @return the logs for a specified container instance in a specified resource group and container group along with * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -47,16 +45,14 @@ Mono> listLogsWithResponseAsync(String resourceGroupName, St * * Get the logs for a specified container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the logs for a specified container instance. - * - * Get the logs for a specified container instance in a specified resource group and container group on successful - * completion of {@link Mono}. + * @return the logs for a specified container instance in a specified resource group and container group on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono listLogsAsync(String resourceGroupName, String containerGroupName, String containerName); @@ -66,7 +62,7 @@ Mono> listLogsWithResponseAsync(String resourceGroupName, St * * Get the logs for a specified container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param tail The number of lines to show from the tail of the container instance log. If not provided, all @@ -77,9 +73,7 @@ Mono> listLogsWithResponseAsync(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 the logs for a specified container instance. - * - * Get the logs for a specified container instance in a specified resource group and container group along with + * @return the logs for a specified container instance in a specified resource group and container group along with * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -91,15 +85,13 @@ Response listLogsWithResponse(String resourceGroupName, String contai * * Get the logs for a specified container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the logs for a specified container instance. - * - * Get the logs for a specified container instance in a specified resource group and container group. + * @return the logs for a specified container instance in a specified resource group and container group. */ @ServiceMethod(returns = ReturnType.SINGLE) LogsInner listLogs(String resourceGroupName, String containerGroupName, String containerName); @@ -109,7 +101,7 @@ Response listLogsWithResponse(String resourceGroupName, String contai * * Executes a command for a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param containerExecRequest The request for the exec command. @@ -128,7 +120,7 @@ Mono> executeCommandWithResponseAsync(Strin * * Executes a command for a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param containerExecRequest The request for the exec command. @@ -146,7 +138,7 @@ Mono executeCommandAsync(String resourceGroupName, S * * Executes a command for a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param containerExecRequest The request for the exec command. @@ -165,7 +157,7 @@ Response executeCommandWithResponse(String resourceG * * Executes a command for a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param containerExecRequest The request for the exec command. @@ -183,7 +175,7 @@ ContainerExecResponseInner executeCommand(String resourceGroupName, String conta * * Attach to the output stream of a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -201,7 +193,7 @@ Mono> attachWithResponseAsync(String reso * * Attach to the output stream of a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -218,7 +210,7 @@ Mono attachAsync(String resourceGroupName, String * * Attach to the output stream of a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param context The context to associate with this operation. @@ -236,7 +228,7 @@ Response attachWithResponse(String resourceGroupNa * * Attach to the output stream of a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/LocationsClient.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/LocationsClient.java index 95181449222e..bd4b0d95fcb0 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/LocationsClient.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/LocationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.fluent; @@ -20,7 +20,7 @@ public interface LocationsClient { /** * Get the usage for a subscription. * - * @param location The location name. + * @param location The identifier for the physical azure 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. @@ -32,7 +32,7 @@ public interface LocationsClient { /** * Get the usage for a subscription. * - * @param location The location name. + * @param location The identifier for the physical azure 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. @@ -44,7 +44,7 @@ public interface LocationsClient { /** * Get the usage for a subscription. * - * @param location The location name. + * @param location The identifier for the physical azure 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. @@ -59,13 +59,11 @@ public interface LocationsClient { * * Get the list of cached images on specific OS type for a subscription in a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of cached images. - * - * Get the list of cached images on specific OS type for a subscription in a region as paginated response with + * @return the list of cached images on specific OS type for a subscription in a region as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -76,13 +74,11 @@ public interface LocationsClient { * * Get the list of cached images on specific OS type for a subscription in a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of cached images. - * - * Get the list of cached images on specific OS type for a subscription in a region as paginated response with + * @return the list of cached images on specific OS type for a subscription in a region as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -93,14 +89,12 @@ public interface LocationsClient { * * Get the list of cached images on specific OS type for a subscription in a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of cached images. - * - * Get the list of cached images on specific OS type for a subscription in a region as paginated response with + * @return the list of cached images on specific OS type for a subscription in a region as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -111,13 +105,11 @@ public interface LocationsClient { * * Get the list of CPU/memory/GPU capabilities of a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of capabilities of the location. - * - * Get the list of CPU/memory/GPU capabilities of a region as paginated response with {@link PagedFlux}. + * @return the list of CPU/memory/GPU capabilities of a region as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listCapabilitiesAsync(String location); @@ -127,13 +119,11 @@ public interface LocationsClient { * * Get the list of CPU/memory/GPU capabilities of a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of capabilities of the location. - * - * Get the list of CPU/memory/GPU capabilities of a region as paginated response with {@link PagedIterable}. + * @return the list of CPU/memory/GPU capabilities of a region as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listCapabilities(String location); @@ -143,14 +133,12 @@ public interface LocationsClient { * * Get the list of CPU/memory/GPU capabilities of a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of capabilities of the location. - * - * Get the list of CPU/memory/GPU capabilities of a region as paginated response with {@link PagedIterable}. + * @return the list of CPU/memory/GPU capabilities of a region as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listCapabilities(String location, Context context); diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/NGroupsClient.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/NGroupsClient.java deleted file mode 100644 index 5e24aff4d7dc..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/NGroupsClient.java +++ /dev/null @@ -1,806 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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.containerinstance.fluent.models.NGroupInner; -import com.azure.resourcemanager.containerinstance.models.NGroupPatch; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -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 NGroupsClient. - */ -public interface NGroupsClient - extends InnerSupportsGet, InnerSupportsListing, InnerSupportsDelete { - /** - * NGroups GET REST API - * - * Get the properties of the specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String ngroupsName); - - /** - * NGroups GET REST API - * - * Get the properties of the specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String ngroupsName); - - /** - * NGroups GET REST API - * - * Get the properties of the specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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 describes the NGroups resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String ngroupsName, Context context); - - /** - * NGroups GET REST API - * - * Get the properties of the specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NGroupInner getByResourceGroup(String resourceGroupName, String ngroupsName); - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String ngroupsName, - NGroupInner nGroup); - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, NGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, - String ngroupsName, NGroupInner nGroup); - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NGroupInner> beginCreateOrUpdate(String resourceGroupName, String ngroupsName, - NGroupInner nGroup); - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NGroupInner> beginCreateOrUpdate(String resourceGroupName, String ngroupsName, - NGroupInner nGroup, Context context); - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String ngroupsName, NGroupInner nGroup); - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NGroupInner createOrUpdate(String resourceGroupName, String ngroupsName, NGroupInner nGroup); - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NGroupInner createOrUpdate(String resourceGroupName, String ngroupsName, NGroupInner nGroup, Context context); - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String ngroupsName, - NGroupPatch nGroup); - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, NGroupInner> beginUpdateAsync(String resourceGroupName, String ngroupsName, - NGroupPatch nGroup); - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NGroupInner> beginUpdate(String resourceGroupName, String ngroupsName, - NGroupPatch nGroup); - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NGroupInner> beginUpdate(String resourceGroupName, String ngroupsName, - NGroupPatch nGroup, Context context); - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String ngroupsName, NGroupPatch nGroup); - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NGroupInner update(String resourceGroupName, String ngroupsName, NGroupPatch nGroup); - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NGroupInner update(String resourceGroupName, String ngroupsName, NGroupPatch nGroup, Context context); - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 ngroupsName); - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 ngroupsName); - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 ngroupsName); - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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 ngroupsName, Context context); - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 ngroupsName); - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 ngroupsName); - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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 ngroupsName, Context context); - - /** - * GET NGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - - /** - * GET NGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * GET NGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List NGroups in a subscription. - * - * Gets a list of all NGroups resources under 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. - * @return the response of a NGroups list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); - - /** - * List NGroups in a subscription. - * - * Gets a list of all NGroups resources under 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. - * @return the response of a NGroups list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List NGroups in a subscription. - * - * Gets a list of all NGroups resources under a subscription. - * - * @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 response of a NGroups list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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>> startWithResponseAsync(String resourceGroupName, String ngroupsName); - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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> beginStartAsync(String resourceGroupName, String ngroupsName); - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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> beginStart(String resourceGroupName, String ngroupsName); - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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> beginStart(String resourceGroupName, String ngroupsName, Context context); - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 startAsync(String resourceGroupName, String ngroupsName); - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 start(String resourceGroupName, String ngroupsName); - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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 start(String resourceGroupName, String ngroupsName, Context context); - - /** - * Stops all container groups in the specified NGroups resource. - * - * Stops all container groups in the specified NGroups resource. Compute resources will be deallocated and billing - * will stop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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> stopWithResponseAsync(String resourceGroupName, String ngroupsName); - - /** - * Stops all container groups in the specified NGroups resource. - * - * Stops all container groups in the specified NGroups resource. Compute resources will be deallocated and billing - * will stop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 stopAsync(String resourceGroupName, String ngroupsName); - - /** - * Stops all container groups in the specified NGroups resource. - * - * Stops all container groups in the specified NGroups resource. Compute resources will be deallocated and billing - * will stop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response stopWithResponse(String resourceGroupName, String ngroupsName, Context context); - - /** - * Stops all container groups in the specified NGroups resource. - * - * Stops all container groups in the specified NGroups resource. Compute resources will be deallocated and billing - * will stop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 stop(String resourceGroupName, String ngroupsName); - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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>> restartWithResponseAsync(String resourceGroupName, String ngroupsName); - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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> beginRestartAsync(String resourceGroupName, String ngroupsName); - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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> beginRestart(String resourceGroupName, String ngroupsName); - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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> beginRestart(String resourceGroupName, String ngroupsName, Context context); - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 restartAsync(String resourceGroupName, String ngroupsName); - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 restart(String resourceGroupName, String ngroupsName); - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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 restart(String resourceGroupName, String ngroupsName, Context context); -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/OperationsClient.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/OperationsClient.java index f83ba4025e86..c04b3851cfb8 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/OperationsClient.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.fluent; @@ -16,33 +16,36 @@ */ public interface OperationsClient { /** - * List the operations for the provider. + * List the operations for Azure Container Instance service. * * @throws com.azure.core.management.exception.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 Operation items as paginated response with {@link PagedFlux}. + * @return the operation list response that contains all operations for Azure Container Instance service as + * paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listAsync(); /** - * List the operations for the provider. + * List the operations for Azure Container Instance service. * * @throws com.azure.core.management.exception.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 Operation items as paginated response with {@link PagedIterable}. + * @return the operation list response that contains all operations for Azure Container Instance service as + * paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List the operations for the provider. + * List the operations for Azure Container Instance service. * * @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 paged collection of Operation items as paginated response with {@link PagedIterable}. + * @return the operation list response that contains all operations for Azure Container Instance service as + * paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/SubnetServiceAssociationLinksClient.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/SubnetServiceAssociationLinksClient.java index bc6984bca1f4..ff4d75573b23 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/SubnetServiceAssociationLinksClient.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/SubnetServiceAssociationLinksClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.fluent; @@ -25,7 +25,7 @@ public interface SubnetServiceAssociationLinksClient { * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -43,7 +43,7 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -61,7 +61,7 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,7 +79,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @param context The context to associate with this operation. @@ -98,7 +98,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -115,7 +115,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,7 +131,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @param context The context to associate with this operation. diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerAttachResponseInner.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerAttachResponseInner.java index 7b06e00ade15..edbf2d3c734f 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerAttachResponseInner.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerAttachResponseInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.fluent.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,7 +14,7 @@ /** * The information for the output stream from container attach. */ -@Immutable +@Fluent public final class ContainerAttachResponseInner implements JsonSerializable { /* * The uri for the output stream from the attach. @@ -30,7 +30,7 @@ public final class ContainerAttachResponseInner implements JsonSerializable { /* * The uri for the exec websocket. @@ -29,7 +29,7 @@ public final class ContainerExecResponseInner implements JsonSerializable zones; @@ -57,14 +52,9 @@ public final class ContainerGroupInner extends Resource { private ContainerGroupProperties innerProperties = new ContainerGroupProperties(); /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /* * The name of the resource. @@ -72,9 +62,9 @@ public final class ContainerGroupInner extends Resource { private String name; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /** * Creates an instance of ContainerGroupInner class. @@ -83,7 +73,7 @@ public ContainerGroupInner() { } /** - * Get the zones property: The availability zones. + * Get the zones property: The zones for the container group. * * @return the zones value. */ @@ -92,7 +82,7 @@ public List zones() { } /** - * Set the zones property: The availability zones. + * Set the zones property: The zones for the container group. * * @param zones the zones value to set. * @return the ContainerGroupInner object itself. @@ -132,22 +122,13 @@ private ContainerGroupProperties 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. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -161,13 +142,13 @@ public String name() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -198,29 +179,6 @@ public String provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Get the secretReferences property: The secret references that will be referenced within the container group. - * - * @return the secretReferences value. - */ - public List secretReferences() { - return this.innerProperties() == null ? null : this.innerProperties().secretReferences(); - } - - /** - * Set the secretReferences property: The secret references that will be referenced within the container group. - * - * @param secretReferences the secretReferences value to set. - * @return the ContainerGroupInner object itself. - */ - public ContainerGroupInner withSecretReferences(List secretReferences) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProperties(); - } - this.innerProperties().withSecretReferences(secretReferences); - return this; - } - /** * Get the containers property: The containers within the container group. * @@ -584,86 +542,6 @@ public ContainerGroupInner withPriority(ContainerGroupPriority priority) { return this; } - /** - * Get the identityAcls property: The access control levels of the identities. - * - * @return the identityAcls value. - */ - public IdentityAcls identityAcls() { - return this.innerProperties() == null ? null : this.innerProperties().identityAcls(); - } - - /** - * Set the identityAcls property: The access control levels of the identities. - * - * @param identityAcls the identityAcls value to set. - * @return the ContainerGroupInner object itself. - */ - public ContainerGroupInner withIdentityAcls(IdentityAcls identityAcls) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProperties(); - } - this.innerProperties().withIdentityAcls(identityAcls); - return this; - } - - /** - * Get the containerGroupProfile property: The reference container group profile properties. - * - * @return the containerGroupProfile value. - */ - public ContainerGroupProfileReferenceDefinition containerGroupProfile() { - return this.innerProperties() == null ? null : this.innerProperties().containerGroupProfile(); - } - - /** - * Set the containerGroupProfile property: The reference container group profile properties. - * - * @param containerGroupProfile the containerGroupProfile value to set. - * @return the ContainerGroupInner object itself. - */ - public ContainerGroupInner - withContainerGroupProfile(ContainerGroupProfileReferenceDefinition containerGroupProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProperties(); - } - this.innerProperties().withContainerGroupProfile(containerGroupProfile); - return this; - } - - /** - * Get the standbyPoolProfile property: The reference standby pool profile properties. - * - * @return the standbyPoolProfile value. - */ - public StandbyPoolProfileDefinition standbyPoolProfile() { - return this.innerProperties() == null ? null : this.innerProperties().standbyPoolProfile(); - } - - /** - * Set the standbyPoolProfile property: The reference standby pool profile properties. - * - * @param standbyPoolProfile the standbyPoolProfile value to set. - * @return the ContainerGroupInner object itself. - */ - public ContainerGroupInner withStandbyPoolProfile(StandbyPoolProfileDefinition standbyPoolProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProperties(); - } - this.innerProperties().withStandbyPoolProfile(standbyPoolProfile); - return this; - } - - /** - * Get the isCreatedFromStandbyPool property: The flag to determine whether the container group is created from - * standby pool. - * - * @return the isCreatedFromStandbyPool value. - */ - public Boolean isCreatedFromStandbyPool() { - return this.innerProperties() == null ? null : this.innerProperties().isCreatedFromStandbyPool(); - } - /** * Validates the instance. * @@ -732,8 +610,6 @@ public static ContainerGroupInner fromJson(JsonReader jsonReader) throws IOExcep deserializedContainerGroupInner.zones = zones; } else if ("identity".equals(fieldName)) { deserializedContainerGroupInner.identity = ContainerGroupIdentity.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedContainerGroupInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerGroupProfileInner.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerGroupProfileInner.java deleted file mode 100644 index e55c525eff9e..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerGroupProfileInner.java +++ /dev/null @@ -1,678 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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.containerinstance.models.ConfidentialComputeProperties; -import com.azure.resourcemanager.containerinstance.models.Container; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupDiagnostics; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupPriority; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupRestartPolicy; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupSku; -import com.azure.resourcemanager.containerinstance.models.DeploymentExtensionSpec; -import com.azure.resourcemanager.containerinstance.models.EncryptionProperties; -import com.azure.resourcemanager.containerinstance.models.ImageRegistryCredential; -import com.azure.resourcemanager.containerinstance.models.InitContainerDefinition; -import com.azure.resourcemanager.containerinstance.models.IpAddress; -import com.azure.resourcemanager.containerinstance.models.OperatingSystemTypes; -import com.azure.resourcemanager.containerinstance.models.SecurityContextDefinition; -import com.azure.resourcemanager.containerinstance.models.Volume; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** - * A container group profile object. - */ -@Fluent -public final class ContainerGroupProfileInner extends ProxyResource { - /* - * The container group profile properties - */ - private ContainerGroupProfileProperties innerProperties; - - /* - * Resource tags. - */ - private Map tags; - - /* - * The geo-location where the resource lives - */ - private String location; - - /* - * The availability zones. - */ - private List zones; - - /* - * 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 ContainerGroupProfileInner class. - */ - public ContainerGroupProfileInner() { - } - - /** - * Get the innerProperties property: The container group profile properties. - * - * @return the innerProperties value. - */ - private ContainerGroupProfileProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The geo-location where the resource lives. - * - * @param location the location value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the zones property: The availability zones. - * - * @return the zones value. - */ - public List zones() { - return this.zones; - } - - /** - * Set the zones property: The availability zones. - * - * @param zones the zones value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withZones(List zones) { - this.zones = zones; - return this; - } - - /** - * 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 sku property: The SKU for a container group. - * - * @return the sku value. - */ - public ContainerGroupSku sku() { - return this.innerProperties() == null ? null : this.innerProperties().sku(); - } - - /** - * Set the sku property: The SKU for a container group. - * - * @param sku the sku value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withSku(ContainerGroupSku sku) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withSku(sku); - return this; - } - - /** - * Get the encryptionProperties property: The encryption properties for a container group. - * - * @return the encryptionProperties value. - */ - public EncryptionProperties encryptionProperties() { - return this.innerProperties() == null ? null : this.innerProperties().encryptionProperties(); - } - - /** - * Set the encryptionProperties property: The encryption properties for a container group. - * - * @param encryptionProperties the encryptionProperties value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withEncryptionProperties(EncryptionProperties encryptionProperties) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withEncryptionProperties(encryptionProperties); - return this; - } - - /** - * Get the containers property: The containers within the container group. - * - * @return the containers value. - */ - public List containers() { - return this.innerProperties() == null ? null : this.innerProperties().containers(); - } - - /** - * Set the containers property: The containers within the container group. - * - * @param containers the containers value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withContainers(List containers) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withContainers(containers); - return this; - } - - /** - * Get the initContainers property: The init containers for a container group. - * - * @return the initContainers value. - */ - public List initContainers() { - return this.innerProperties() == null ? null : this.innerProperties().initContainers(); - } - - /** - * Set the initContainers property: The init containers for a container group. - * - * @param initContainers the initContainers value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withInitContainers(List initContainers) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withInitContainers(initContainers); - return this; - } - - /** - * Get the extensions property: extensions used by virtual kubelet. - * - * @return the extensions value. - */ - public List extensions() { - return this.innerProperties() == null ? null : this.innerProperties().extensions(); - } - - /** - * Set the extensions property: extensions used by virtual kubelet. - * - * @param extensions the extensions value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withExtensions(List extensions) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withExtensions(extensions); - return this; - } - - /** - * Get the imageRegistryCredentials property: The image registry credentials by which the container group is created - * from. - * - * @return the imageRegistryCredentials value. - */ - public List imageRegistryCredentials() { - return this.innerProperties() == null ? null : this.innerProperties().imageRegistryCredentials(); - } - - /** - * Set the imageRegistryCredentials property: The image registry credentials by which the container group is created - * from. - * - * @param imageRegistryCredentials the imageRegistryCredentials value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner - withImageRegistryCredentials(List imageRegistryCredentials) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withImageRegistryCredentials(imageRegistryCredentials); - return this; - } - - /** - * Get the restartPolicy property: Restart policy for all containers within the container group. - * - `Always` Always restart - * - `OnFailure` Restart on failure - * - `Never` Never restart. - * - * @return the restartPolicy value. - */ - public ContainerGroupRestartPolicy restartPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().restartPolicy(); - } - - /** - * Set the restartPolicy property: Restart policy for all containers within the container group. - * - `Always` Always restart - * - `OnFailure` Restart on failure - * - `Never` Never restart. - * - * @param restartPolicy the restartPolicy value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withRestartPolicy(ContainerGroupRestartPolicy restartPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withRestartPolicy(restartPolicy); - return this; - } - - /** - * Get the shutdownGracePeriod property: Shutdown grace period for containers in a container group. - * - * @return the shutdownGracePeriod value. - */ - public OffsetDateTime shutdownGracePeriod() { - return this.innerProperties() == null ? null : this.innerProperties().shutdownGracePeriod(); - } - - /** - * Set the shutdownGracePeriod property: Shutdown grace period for containers in a container group. - * - * @param shutdownGracePeriod the shutdownGracePeriod value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withShutdownGracePeriod(OffsetDateTime shutdownGracePeriod) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withShutdownGracePeriod(shutdownGracePeriod); - return this; - } - - /** - * Get the ipAddress property: The IP address type of the container group. - * - * @return the ipAddress value. - */ - public IpAddress ipAddress() { - return this.innerProperties() == null ? null : this.innerProperties().ipAddress(); - } - - /** - * Set the ipAddress property: The IP address type of the container group. - * - * @param ipAddress the ipAddress value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withIpAddress(IpAddress ipAddress) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withIpAddress(ipAddress); - return this; - } - - /** - * Get the timeToLive property: Post completion time to live for containers of a CG. - * - * @return the timeToLive value. - */ - public OffsetDateTime timeToLive() { - return this.innerProperties() == null ? null : this.innerProperties().timeToLive(); - } - - /** - * Set the timeToLive property: Post completion time to live for containers of a CG. - * - * @param timeToLive the timeToLive value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withTimeToLive(OffsetDateTime timeToLive) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withTimeToLive(timeToLive); - return this; - } - - /** - * Get the osType property: The operating system type required by the containers in the container group. - * - * @return the osType value. - */ - public OperatingSystemTypes osType() { - return this.innerProperties() == null ? null : this.innerProperties().osType(); - } - - /** - * Set the osType property: The operating system type required by the containers in the container group. - * - * @param osType the osType value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withOsType(OperatingSystemTypes osType) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withOsType(osType); - return this; - } - - /** - * Get the volumes property: The list of volumes that can be mounted by containers in this container group. - * - * @return the volumes value. - */ - public List volumes() { - return this.innerProperties() == null ? null : this.innerProperties().volumes(); - } - - /** - * Set the volumes property: The list of volumes that can be mounted by containers in this container group. - * - * @param volumes the volumes value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withVolumes(List volumes) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withVolumes(volumes); - return this; - } - - /** - * Get the diagnostics property: The diagnostic information for a container group. - * - * @return the diagnostics value. - */ - public ContainerGroupDiagnostics diagnostics() { - return this.innerProperties() == null ? null : this.innerProperties().diagnostics(); - } - - /** - * Set the diagnostics property: The diagnostic information for a container group. - * - * @param diagnostics the diagnostics value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withDiagnostics(ContainerGroupDiagnostics diagnostics) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withDiagnostics(diagnostics); - return this; - } - - /** - * Get the priority property: The priority of the container group. - * - * @return the priority value. - */ - public ContainerGroupPriority priority() { - return this.innerProperties() == null ? null : this.innerProperties().priority(); - } - - /** - * Set the priority property: The priority of the container group. - * - * @param priority the priority value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withPriority(ContainerGroupPriority priority) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withPriority(priority); - return this; - } - - /** - * Get the confidentialComputeProperties property: The properties for confidential container group. - * - * @return the confidentialComputeProperties value. - */ - public ConfidentialComputeProperties confidentialComputeProperties() { - return this.innerProperties() == null ? null : this.innerProperties().confidentialComputeProperties(); - } - - /** - * Set the confidentialComputeProperties property: The properties for confidential container group. - * - * @param confidentialComputeProperties the confidentialComputeProperties value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner - withConfidentialComputeProperties(ConfidentialComputeProperties confidentialComputeProperties) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withConfidentialComputeProperties(confidentialComputeProperties); - return this; - } - - /** - * Get the securityContext property: The container security properties. - * - * @return the securityContext value. - */ - public SecurityContextDefinition securityContext() { - return this.innerProperties() == null ? null : this.innerProperties().securityContext(); - } - - /** - * Set the securityContext property: The container security properties. - * - * @param securityContext the securityContext value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withSecurityContext(SecurityContextDefinition securityContext) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withSecurityContext(securityContext); - return this; - } - - /** - * Get the revision property: Container group profile current revision number. - * - * @return the revision value. - */ - public Integer revision() { - return this.innerProperties() == null ? null : this.innerProperties().revision(); - } - - /** - * Get the registeredRevisions property: Registered revisions are calculated at request time based off the records - * in the table logs. - * - * @return the registeredRevisions value. - */ - public List registeredRevisions() { - return this.innerProperties() == null ? null : this.innerProperties().registeredRevisions(); - } - - /** - * Get the useKrypton property: Gets or sets Krypton use property. - * - * @return the useKrypton value. - */ - public Boolean useKrypton() { - return this.innerProperties() == null ? null : this.innerProperties().useKrypton(); - } - - /** - * Set the useKrypton property: Gets or sets Krypton use property. - * - * @param useKrypton the useKrypton value to set. - * @return the ContainerGroupProfileInner object itself. - */ - public ContainerGroupProfileInner withUseKrypton(Boolean useKrypton) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerGroupProfileProperties(); - } - this.innerProperties().withUseKrypton(useKrypton); - 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.writeJsonField("properties", this.innerProperties); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerGroupProfileInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerGroupProfileInner 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 ContainerGroupProfileInner. - */ - public static ContainerGroupProfileInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerGroupProfileInner deserializedContainerGroupProfileInner = new ContainerGroupProfileInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedContainerGroupProfileInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedContainerGroupProfileInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedContainerGroupProfileInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedContainerGroupProfileInner.innerProperties - = ContainerGroupProfileProperties.fromJson(reader); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedContainerGroupProfileInner.tags = tags; - } else if ("location".equals(fieldName)) { - deserializedContainerGroupProfileInner.location = reader.getString(); - } else if ("zones".equals(fieldName)) { - List zones = reader.readArray(reader1 -> reader1.getString()); - deserializedContainerGroupProfileInner.zones = zones; - } else if ("systemData".equals(fieldName)) { - deserializedContainerGroupProfileInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerGroupProfileInner; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerGroupProfileProperties.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerGroupProfileProperties.java deleted file mode 100644 index 2118f3119129..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerGroupProfileProperties.java +++ /dev/null @@ -1,673 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -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 com.azure.resourcemanager.containerinstance.models.ConfidentialComputeProperties; -import com.azure.resourcemanager.containerinstance.models.Container; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupDiagnostics; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupPriority; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupRestartPolicy; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupSku; -import com.azure.resourcemanager.containerinstance.models.DeploymentExtensionSpec; -import com.azure.resourcemanager.containerinstance.models.EncryptionProperties; -import com.azure.resourcemanager.containerinstance.models.ImageRegistryCredential; -import com.azure.resourcemanager.containerinstance.models.InitContainerDefinition; -import com.azure.resourcemanager.containerinstance.models.IpAddress; -import com.azure.resourcemanager.containerinstance.models.OperatingSystemTypes; -import com.azure.resourcemanager.containerinstance.models.SecurityContextDefinition; -import com.azure.resourcemanager.containerinstance.models.Volume; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.List; - -/** - * The container group profile properties. - */ -@Fluent -public final class ContainerGroupProfileProperties implements JsonSerializable { - /* - * The SKU for a container group. - */ - private ContainerGroupSku sku; - - /* - * The encryption properties for a container group. - */ - private EncryptionProperties encryptionProperties; - - /* - * The containers within the container group. - */ - private List containers; - - /* - * The init containers for a container group. - */ - private List initContainers; - - /* - * extensions used by virtual kubelet - */ - private List extensions; - - /* - * The image registry credentials by which the container group is created from. - */ - private List imageRegistryCredentials; - - /* - * Restart policy for all containers within the container group. - * - `Always` Always restart - * - `OnFailure` Restart on failure - * - `Never` Never restart - */ - private ContainerGroupRestartPolicy restartPolicy; - - /* - * Shutdown grace period for containers in a container group. - */ - private OffsetDateTime shutdownGracePeriod; - - /* - * The IP address type of the container group. - */ - private IpAddress ipAddress; - - /* - * Post completion time to live for containers of a CG - */ - private OffsetDateTime timeToLive; - - /* - * The operating system type required by the containers in the container group. - */ - private OperatingSystemTypes osType; - - /* - * The list of volumes that can be mounted by containers in this container group. - */ - private List volumes; - - /* - * The diagnostic information for a container group. - */ - private ContainerGroupDiagnostics diagnostics; - - /* - * The priority of the container group. - */ - private ContainerGroupPriority priority; - - /* - * The properties for confidential container group - */ - private ConfidentialComputeProperties confidentialComputeProperties; - - /* - * The container security properties. - */ - private SecurityContextDefinition securityContext; - - /* - * Container group profile current revision number - */ - private Integer revision; - - /* - * Registered revisions are calculated at request time based off the records in the table logs. - */ - private List registeredRevisions; - - /* - * Gets or sets Krypton use property. - */ - private Boolean useKrypton; - - /** - * Creates an instance of ContainerGroupProfileProperties class. - */ - public ContainerGroupProfileProperties() { - } - - /** - * Get the sku property: The SKU for a container group. - * - * @return the sku value. - */ - public ContainerGroupSku sku() { - return this.sku; - } - - /** - * Set the sku property: The SKU for a container group. - * - * @param sku the sku value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties withSku(ContainerGroupSku sku) { - this.sku = sku; - return this; - } - - /** - * Get the encryptionProperties property: The encryption properties for a container group. - * - * @return the encryptionProperties value. - */ - public EncryptionProperties encryptionProperties() { - return this.encryptionProperties; - } - - /** - * Set the encryptionProperties property: The encryption properties for a container group. - * - * @param encryptionProperties the encryptionProperties value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties withEncryptionProperties(EncryptionProperties encryptionProperties) { - this.encryptionProperties = encryptionProperties; - return this; - } - - /** - * Get the containers property: The containers within the container group. - * - * @return the containers value. - */ - public List containers() { - return this.containers; - } - - /** - * Set the containers property: The containers within the container group. - * - * @param containers the containers value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties withContainers(List containers) { - this.containers = containers; - return this; - } - - /** - * Get the initContainers property: The init containers for a container group. - * - * @return the initContainers value. - */ - public List initContainers() { - return this.initContainers; - } - - /** - * Set the initContainers property: The init containers for a container group. - * - * @param initContainers the initContainers value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties withInitContainers(List initContainers) { - this.initContainers = initContainers; - return this; - } - - /** - * Get the extensions property: extensions used by virtual kubelet. - * - * @return the extensions value. - */ - public List extensions() { - return this.extensions; - } - - /** - * Set the extensions property: extensions used by virtual kubelet. - * - * @param extensions the extensions value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties withExtensions(List extensions) { - this.extensions = extensions; - return this; - } - - /** - * Get the imageRegistryCredentials property: The image registry credentials by which the container group is created - * from. - * - * @return the imageRegistryCredentials value. - */ - public List imageRegistryCredentials() { - return this.imageRegistryCredentials; - } - - /** - * Set the imageRegistryCredentials property: The image registry credentials by which the container group is created - * from. - * - * @param imageRegistryCredentials the imageRegistryCredentials value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties - withImageRegistryCredentials(List imageRegistryCredentials) { - this.imageRegistryCredentials = imageRegistryCredentials; - return this; - } - - /** - * Get the restartPolicy property: Restart policy for all containers within the container group. - * - `Always` Always restart - * - `OnFailure` Restart on failure - * - `Never` Never restart. - * - * @return the restartPolicy value. - */ - public ContainerGroupRestartPolicy restartPolicy() { - return this.restartPolicy; - } - - /** - * Set the restartPolicy property: Restart policy for all containers within the container group. - * - `Always` Always restart - * - `OnFailure` Restart on failure - * - `Never` Never restart. - * - * @param restartPolicy the restartPolicy value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties withRestartPolicy(ContainerGroupRestartPolicy restartPolicy) { - this.restartPolicy = restartPolicy; - return this; - } - - /** - * Get the shutdownGracePeriod property: Shutdown grace period for containers in a container group. - * - * @return the shutdownGracePeriod value. - */ - public OffsetDateTime shutdownGracePeriod() { - return this.shutdownGracePeriod; - } - - /** - * Set the shutdownGracePeriod property: Shutdown grace period for containers in a container group. - * - * @param shutdownGracePeriod the shutdownGracePeriod value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties withShutdownGracePeriod(OffsetDateTime shutdownGracePeriod) { - this.shutdownGracePeriod = shutdownGracePeriod; - return this; - } - - /** - * Get the ipAddress property: The IP address type of the container group. - * - * @return the ipAddress value. - */ - public IpAddress ipAddress() { - return this.ipAddress; - } - - /** - * Set the ipAddress property: The IP address type of the container group. - * - * @param ipAddress the ipAddress value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties withIpAddress(IpAddress ipAddress) { - this.ipAddress = ipAddress; - return this; - } - - /** - * Get the timeToLive property: Post completion time to live for containers of a CG. - * - * @return the timeToLive value. - */ - public OffsetDateTime timeToLive() { - return this.timeToLive; - } - - /** - * Set the timeToLive property: Post completion time to live for containers of a CG. - * - * @param timeToLive the timeToLive value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties withTimeToLive(OffsetDateTime timeToLive) { - this.timeToLive = timeToLive; - return this; - } - - /** - * Get the osType property: The operating system type required by the containers in the container group. - * - * @return the osType value. - */ - public OperatingSystemTypes osType() { - return this.osType; - } - - /** - * Set the osType property: The operating system type required by the containers in the container group. - * - * @param osType the osType value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties withOsType(OperatingSystemTypes osType) { - this.osType = osType; - return this; - } - - /** - * Get the volumes property: The list of volumes that can be mounted by containers in this container group. - * - * @return the volumes value. - */ - public List volumes() { - return this.volumes; - } - - /** - * Set the volumes property: The list of volumes that can be mounted by containers in this container group. - * - * @param volumes the volumes value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties withVolumes(List volumes) { - this.volumes = volumes; - return this; - } - - /** - * Get the diagnostics property: The diagnostic information for a container group. - * - * @return the diagnostics value. - */ - public ContainerGroupDiagnostics diagnostics() { - return this.diagnostics; - } - - /** - * Set the diagnostics property: The diagnostic information for a container group. - * - * @param diagnostics the diagnostics value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties withDiagnostics(ContainerGroupDiagnostics diagnostics) { - this.diagnostics = diagnostics; - return this; - } - - /** - * Get the priority property: The priority of the container group. - * - * @return the priority value. - */ - public ContainerGroupPriority priority() { - return this.priority; - } - - /** - * Set the priority property: The priority of the container group. - * - * @param priority the priority value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties withPriority(ContainerGroupPriority priority) { - this.priority = priority; - return this; - } - - /** - * Get the confidentialComputeProperties property: The properties for confidential container group. - * - * @return the confidentialComputeProperties value. - */ - public ConfidentialComputeProperties confidentialComputeProperties() { - return this.confidentialComputeProperties; - } - - /** - * Set the confidentialComputeProperties property: The properties for confidential container group. - * - * @param confidentialComputeProperties the confidentialComputeProperties value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties - withConfidentialComputeProperties(ConfidentialComputeProperties confidentialComputeProperties) { - this.confidentialComputeProperties = confidentialComputeProperties; - return this; - } - - /** - * Get the securityContext property: The container security properties. - * - * @return the securityContext value. - */ - public SecurityContextDefinition securityContext() { - return this.securityContext; - } - - /** - * Set the securityContext property: The container security properties. - * - * @param securityContext the securityContext value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties withSecurityContext(SecurityContextDefinition securityContext) { - this.securityContext = securityContext; - return this; - } - - /** - * Get the revision property: Container group profile current revision number. - * - * @return the revision value. - */ - public Integer revision() { - return this.revision; - } - - /** - * Get the registeredRevisions property: Registered revisions are calculated at request time based off the records - * in the table logs. - * - * @return the registeredRevisions value. - */ - public List registeredRevisions() { - return this.registeredRevisions; - } - - /** - * Get the useKrypton property: Gets or sets Krypton use property. - * - * @return the useKrypton value. - */ - public Boolean useKrypton() { - return this.useKrypton; - } - - /** - * Set the useKrypton property: Gets or sets Krypton use property. - * - * @param useKrypton the useKrypton value to set. - * @return the ContainerGroupProfileProperties object itself. - */ - public ContainerGroupProfileProperties withUseKrypton(Boolean useKrypton) { - this.useKrypton = useKrypton; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (encryptionProperties() != null) { - encryptionProperties().validate(); - } - if (containers() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property containers in model ContainerGroupProfileProperties")); - } else { - containers().forEach(e -> e.validate()); - } - if (initContainers() != null) { - initContainers().forEach(e -> e.validate()); - } - if (extensions() != null) { - extensions().forEach(e -> e.validate()); - } - if (imageRegistryCredentials() != null) { - imageRegistryCredentials().forEach(e -> e.validate()); - } - if (ipAddress() != null) { - ipAddress().validate(); - } - if (osType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property osType in model ContainerGroupProfileProperties")); - } - if (volumes() != null) { - volumes().forEach(e -> e.validate()); - } - if (diagnostics() != null) { - diagnostics().validate(); - } - if (confidentialComputeProperties() != null) { - confidentialComputeProperties().validate(); - } - if (securityContext() != null) { - securityContext().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerGroupProfileProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("containers", this.containers, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); - jsonWriter.writeStringField("sku", this.sku == null ? null : this.sku.toString()); - jsonWriter.writeJsonField("encryptionProperties", this.encryptionProperties); - jsonWriter.writeArrayField("initContainers", this.initContainers, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("extensions", this.extensions, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("imageRegistryCredentials", this.imageRegistryCredentials, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("restartPolicy", this.restartPolicy == null ? null : this.restartPolicy.toString()); - jsonWriter.writeStringField("shutdownGracePeriod", - this.shutdownGracePeriod == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.shutdownGracePeriod)); - jsonWriter.writeJsonField("ipAddress", this.ipAddress); - jsonWriter.writeStringField("timeToLive", - this.timeToLive == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timeToLive)); - jsonWriter.writeArrayField("volumes", this.volumes, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("diagnostics", this.diagnostics); - jsonWriter.writeStringField("priority", this.priority == null ? null : this.priority.toString()); - jsonWriter.writeJsonField("confidentialComputeProperties", this.confidentialComputeProperties); - jsonWriter.writeJsonField("securityContext", this.securityContext); - jsonWriter.writeBooleanField("useKrypton", this.useKrypton); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerGroupProfileProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerGroupProfileProperties 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 ContainerGroupProfileProperties. - */ - public static ContainerGroupProfileProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerGroupProfileProperties deserializedContainerGroupProfileProperties - = new ContainerGroupProfileProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("containers".equals(fieldName)) { - List containers = reader.readArray(reader1 -> Container.fromJson(reader1)); - deserializedContainerGroupProfileProperties.containers = containers; - } else if ("osType".equals(fieldName)) { - deserializedContainerGroupProfileProperties.osType - = OperatingSystemTypes.fromString(reader.getString()); - } else if ("sku".equals(fieldName)) { - deserializedContainerGroupProfileProperties.sku = ContainerGroupSku.fromString(reader.getString()); - } else if ("encryptionProperties".equals(fieldName)) { - deserializedContainerGroupProfileProperties.encryptionProperties - = EncryptionProperties.fromJson(reader); - } else if ("initContainers".equals(fieldName)) { - List initContainers - = reader.readArray(reader1 -> InitContainerDefinition.fromJson(reader1)); - deserializedContainerGroupProfileProperties.initContainers = initContainers; - } else if ("extensions".equals(fieldName)) { - List extensions - = reader.readArray(reader1 -> DeploymentExtensionSpec.fromJson(reader1)); - deserializedContainerGroupProfileProperties.extensions = extensions; - } else if ("imageRegistryCredentials".equals(fieldName)) { - List imageRegistryCredentials - = reader.readArray(reader1 -> ImageRegistryCredential.fromJson(reader1)); - deserializedContainerGroupProfileProperties.imageRegistryCredentials = imageRegistryCredentials; - } else if ("restartPolicy".equals(fieldName)) { - deserializedContainerGroupProfileProperties.restartPolicy - = ContainerGroupRestartPolicy.fromString(reader.getString()); - } else if ("shutdownGracePeriod".equals(fieldName)) { - deserializedContainerGroupProfileProperties.shutdownGracePeriod = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("ipAddress".equals(fieldName)) { - deserializedContainerGroupProfileProperties.ipAddress = IpAddress.fromJson(reader); - } else if ("timeToLive".equals(fieldName)) { - deserializedContainerGroupProfileProperties.timeToLive = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("volumes".equals(fieldName)) { - List volumes = reader.readArray(reader1 -> Volume.fromJson(reader1)); - deserializedContainerGroupProfileProperties.volumes = volumes; - } else if ("diagnostics".equals(fieldName)) { - deserializedContainerGroupProfileProperties.diagnostics - = ContainerGroupDiagnostics.fromJson(reader); - } else if ("priority".equals(fieldName)) { - deserializedContainerGroupProfileProperties.priority - = ContainerGroupPriority.fromString(reader.getString()); - } else if ("confidentialComputeProperties".equals(fieldName)) { - deserializedContainerGroupProfileProperties.confidentialComputeProperties - = ConfidentialComputeProperties.fromJson(reader); - } else if ("securityContext".equals(fieldName)) { - deserializedContainerGroupProfileProperties.securityContext - = SecurityContextDefinition.fromJson(reader); - } else if ("revision".equals(fieldName)) { - deserializedContainerGroupProfileProperties.revision = reader.getNullable(JsonReader::getInt); - } else if ("registeredRevisions".equals(fieldName)) { - List registeredRevisions = reader.readArray(reader1 -> reader1.getInt()); - deserializedContainerGroupProfileProperties.registeredRevisions = registeredRevisions; - } else if ("useKrypton".equals(fieldName)) { - deserializedContainerGroupProfileProperties.useKrypton = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerGroupProfileProperties; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerGroupProperties.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerGroupProperties.java index c49d906b3bfb..4e85e2f90924 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerGroupProperties.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerGroupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.fluent.models; @@ -14,7 +14,6 @@ import com.azure.resourcemanager.containerinstance.models.Container; import com.azure.resourcemanager.containerinstance.models.ContainerGroupDiagnostics; import com.azure.resourcemanager.containerinstance.models.ContainerGroupPriority; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupProfileReferenceDefinition; import com.azure.resourcemanager.containerinstance.models.ContainerGroupPropertiesInstanceView; import com.azure.resourcemanager.containerinstance.models.ContainerGroupRestartPolicy; import com.azure.resourcemanager.containerinstance.models.ContainerGroupSku; @@ -22,13 +21,10 @@ import com.azure.resourcemanager.containerinstance.models.DeploymentExtensionSpec; import com.azure.resourcemanager.containerinstance.models.DnsConfiguration; import com.azure.resourcemanager.containerinstance.models.EncryptionProperties; -import com.azure.resourcemanager.containerinstance.models.IdentityAcls; import com.azure.resourcemanager.containerinstance.models.ImageRegistryCredential; import com.azure.resourcemanager.containerinstance.models.InitContainerDefinition; import com.azure.resourcemanager.containerinstance.models.IpAddress; import com.azure.resourcemanager.containerinstance.models.OperatingSystemTypes; -import com.azure.resourcemanager.containerinstance.models.SecretReference; -import com.azure.resourcemanager.containerinstance.models.StandbyPoolProfileDefinition; import com.azure.resourcemanager.containerinstance.models.Volume; import java.io.IOException; import java.util.List; @@ -43,11 +39,6 @@ public final class ContainerGroupProperties implements JsonSerializable secretReferences; - /* * The containers within the container group. */ @@ -131,26 +122,6 @@ public final class ContainerGroupProperties implements JsonSerializable secretReferences() { - return this.secretReferences; - } - - /** - * Set the secretReferences property: The secret references that will be referenced within the container group. - * - * @param secretReferences the secretReferences value to set. - * @return the ContainerGroupProperties object itself. - */ - public ContainerGroupProperties withSecretReferences(List secretReferences) { - this.secretReferences = secretReferences; - return this; - } - /** * Get the containers property: The containers within the container group. * @@ -506,86 +457,12 @@ public ContainerGroupProperties withPriority(ContainerGroupPriority priority) { return this; } - /** - * Get the identityAcls property: The access control levels of the identities. - * - * @return the identityAcls value. - */ - public IdentityAcls identityAcls() { - return this.identityAcls; - } - - /** - * Set the identityAcls property: The access control levels of the identities. - * - * @param identityAcls the identityAcls value to set. - * @return the ContainerGroupProperties object itself. - */ - public ContainerGroupProperties withIdentityAcls(IdentityAcls identityAcls) { - this.identityAcls = identityAcls; - return this; - } - - /** - * Get the containerGroupProfile property: The reference container group profile properties. - * - * @return the containerGroupProfile value. - */ - public ContainerGroupProfileReferenceDefinition containerGroupProfile() { - return this.containerGroupProfile; - } - - /** - * Set the containerGroupProfile property: The reference container group profile properties. - * - * @param containerGroupProfile the containerGroupProfile value to set. - * @return the ContainerGroupProperties object itself. - */ - public ContainerGroupProperties - withContainerGroupProfile(ContainerGroupProfileReferenceDefinition containerGroupProfile) { - this.containerGroupProfile = containerGroupProfile; - return this; - } - - /** - * Get the standbyPoolProfile property: The reference standby pool profile properties. - * - * @return the standbyPoolProfile value. - */ - public StandbyPoolProfileDefinition standbyPoolProfile() { - return this.standbyPoolProfile; - } - - /** - * Set the standbyPoolProfile property: The reference standby pool profile properties. - * - * @param standbyPoolProfile the standbyPoolProfile value to set. - * @return the ContainerGroupProperties object itself. - */ - public ContainerGroupProperties withStandbyPoolProfile(StandbyPoolProfileDefinition standbyPoolProfile) { - this.standbyPoolProfile = standbyPoolProfile; - return this; - } - - /** - * Get the isCreatedFromStandbyPool property: The flag to determine whether the container group is created from - * standby pool. - * - * @return the isCreatedFromStandbyPool value. - */ - public Boolean isCreatedFromStandbyPool() { - return this.isCreatedFromStandbyPool; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (secretReferences() != null) { - secretReferences().forEach(e -> e.validate()); - } if (containers() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -599,6 +476,11 @@ public void validate() { if (ipAddress() != null) { ipAddress().validate(); } + if (osType() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property osType in model ContainerGroupProperties")); + } if (volumes() != null) { volumes().forEach(e -> e.validate()); } @@ -626,15 +508,6 @@ public void validate() { if (confidentialComputeProperties() != null) { confidentialComputeProperties().validate(); } - if (identityAcls() != null) { - identityAcls().validate(); - } - if (containerGroupProfile() != null) { - containerGroupProfile().validate(); - } - if (standbyPoolProfile() != null) { - standbyPoolProfile().validate(); - } } private static final ClientLogger LOGGER = new ClientLogger(ContainerGroupProperties.class); @@ -646,13 +519,11 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("containers", this.containers, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("secretReferences", this.secretReferences, - (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); jsonWriter.writeArrayField("imageRegistryCredentials", this.imageRegistryCredentials, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("restartPolicy", this.restartPolicy == null ? null : this.restartPolicy.toString()); jsonWriter.writeJsonField("ipAddress", this.ipAddress); - jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); jsonWriter.writeArrayField("volumes", this.volumes, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("diagnostics", this.diagnostics); jsonWriter.writeArrayField("subnetIds", this.subnetIds, (writer, element) -> writer.writeJson(element)); @@ -664,9 +535,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("extensions", this.extensions, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("confidentialComputeProperties", this.confidentialComputeProperties); jsonWriter.writeStringField("priority", this.priority == null ? null : this.priority.toString()); - jsonWriter.writeJsonField("identityAcls", this.identityAcls); - jsonWriter.writeJsonField("containerGroupProfile", this.containerGroupProfile); - jsonWriter.writeJsonField("standbyPoolProfile", this.standbyPoolProfile); return jsonWriter.writeEndObject(); } @@ -689,12 +557,10 @@ public static ContainerGroupProperties fromJson(JsonReader jsonReader) throws IO if ("containers".equals(fieldName)) { List containers = reader.readArray(reader1 -> Container.fromJson(reader1)); deserializedContainerGroupProperties.containers = containers; + } else if ("osType".equals(fieldName)) { + deserializedContainerGroupProperties.osType = OperatingSystemTypes.fromString(reader.getString()); } else if ("provisioningState".equals(fieldName)) { deserializedContainerGroupProperties.provisioningState = reader.getString(); - } else if ("secretReferences".equals(fieldName)) { - List secretReferences - = reader.readArray(reader1 -> SecretReference.fromJson(reader1)); - deserializedContainerGroupProperties.secretReferences = secretReferences; } else if ("imageRegistryCredentials".equals(fieldName)) { List imageRegistryCredentials = reader.readArray(reader1 -> ImageRegistryCredential.fromJson(reader1)); @@ -704,8 +570,6 @@ public static ContainerGroupProperties fromJson(JsonReader jsonReader) throws IO = ContainerGroupRestartPolicy.fromString(reader.getString()); } else if ("ipAddress".equals(fieldName)) { deserializedContainerGroupProperties.ipAddress = IpAddress.fromJson(reader); - } else if ("osType".equals(fieldName)) { - deserializedContainerGroupProperties.osType = OperatingSystemTypes.fromString(reader.getString()); } else if ("volumes".equals(fieldName)) { List volumes = reader.readArray(reader1 -> Volume.fromJson(reader1)); deserializedContainerGroupProperties.volumes = volumes; @@ -738,17 +602,6 @@ public static ContainerGroupProperties fromJson(JsonReader jsonReader) throws IO } else if ("priority".equals(fieldName)) { deserializedContainerGroupProperties.priority = ContainerGroupPriority.fromString(reader.getString()); - } else if ("identityAcls".equals(fieldName)) { - deserializedContainerGroupProperties.identityAcls = IdentityAcls.fromJson(reader); - } else if ("containerGroupProfile".equals(fieldName)) { - deserializedContainerGroupProperties.containerGroupProfile - = ContainerGroupProfileReferenceDefinition.fromJson(reader); - } else if ("standbyPoolProfile".equals(fieldName)) { - deserializedContainerGroupProperties.standbyPoolProfile - = StandbyPoolProfileDefinition.fromJson(reader); - } else if ("isCreatedFromStandbyPool".equals(fieldName)) { - deserializedContainerGroupProperties.isCreatedFromStandbyPool - = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerProperties.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerProperties.java index dee5e4d149a5..ea226967c04d 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerProperties.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerProperties.java @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.fluent.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 com.azure.resourcemanager.containerinstance.models.ConfigMap; import com.azure.resourcemanager.containerinstance.models.ContainerPort; import com.azure.resourcemanager.containerinstance.models.ContainerProbe; import com.azure.resourcemanager.containerinstance.models.ContainerPropertiesInstanceView; @@ -75,11 +75,6 @@ public final class ContainerProperties implements JsonSerializable e.validate()); } @@ -310,7 +289,10 @@ public void validate() { if (instanceView() != null) { instanceView().validate(); } - if (resources() != null) { + if (resources() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property resources in model ContainerProperties")); + } else { resources().validate(); } if (volumeMounts() != null) { @@ -325,11 +307,10 @@ public void validate() { if (securityContext() != null) { securityContext().validate(); } - if (configMap() != null) { - configMap().validate(); - } } + private static final ClientLogger LOGGER = new ClientLogger(ContainerProperties.class); + /** * {@inheritDoc} */ @@ -337,16 +318,15 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("image", this.image); + jsonWriter.writeJsonField("resources", this.resources); jsonWriter.writeArrayField("command", this.command, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("ports", this.ports, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("environmentVariables", this.environmentVariables, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("resources", this.resources); jsonWriter.writeArrayField("volumeMounts", this.volumeMounts, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("livenessProbe", this.livenessProbe); jsonWriter.writeJsonField("readinessProbe", this.readinessProbe); jsonWriter.writeJsonField("securityContext", this.securityContext); - jsonWriter.writeJsonField("configMap", this.configMap); return jsonWriter.writeEndObject(); } @@ -356,6 +336,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ContainerProperties 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 ContainerProperties. */ public static ContainerProperties fromJson(JsonReader jsonReader) throws IOException { @@ -367,6 +348,8 @@ public static ContainerProperties fromJson(JsonReader jsonReader) throws IOExcep if ("image".equals(fieldName)) { deserializedContainerProperties.image = reader.getString(); + } else if ("resources".equals(fieldName)) { + deserializedContainerProperties.resources = ResourceRequirements.fromJson(reader); } else if ("command".equals(fieldName)) { List command = reader.readArray(reader1 -> reader1.getString()); deserializedContainerProperties.command = command; @@ -379,8 +362,6 @@ public static ContainerProperties fromJson(JsonReader jsonReader) throws IOExcep deserializedContainerProperties.environmentVariables = environmentVariables; } else if ("instanceView".equals(fieldName)) { deserializedContainerProperties.instanceView = ContainerPropertiesInstanceView.fromJson(reader); - } else if ("resources".equals(fieldName)) { - deserializedContainerProperties.resources = ResourceRequirements.fromJson(reader); } else if ("volumeMounts".equals(fieldName)) { List volumeMounts = reader.readArray(reader1 -> VolumeMount.fromJson(reader1)); deserializedContainerProperties.volumeMounts = volumeMounts; @@ -390,8 +371,6 @@ public static ContainerProperties fromJson(JsonReader jsonReader) throws IOExcep deserializedContainerProperties.readinessProbe = ContainerProbe.fromJson(reader); } else if ("securityContext".equals(fieldName)) { deserializedContainerProperties.securityContext = SecurityContextDefinition.fromJson(reader); - } else if ("configMap".equals(fieldName)) { - deserializedContainerProperties.configMap = ConfigMap.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/DeploymentExtensionSpecProperties.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/DeploymentExtensionSpecProperties.java index 022d57ba5dd4..ec7be6f4d2f7 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/DeploymentExtensionSpecProperties.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/DeploymentExtensionSpecProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.fluent.models; @@ -151,12 +151,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("extensionType", this.extensionType); jsonWriter.writeStringField("version", this.version); - if (this.settings != null) { - jsonWriter.writeUntypedField("settings", this.settings); - } - if (this.protectedSettings != null) { - jsonWriter.writeUntypedField("protectedSettings", this.protectedSettings); - } + jsonWriter.writeUntypedField("settings", this.settings); + jsonWriter.writeUntypedField("protectedSettings", this.protectedSettings); return jsonWriter.writeEndObject(); } diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/InitContainerPropertiesDefinition.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/InitContainerPropertiesDefinition.java index 54c8bf7864b8..23ead3045fd3 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/InitContainerPropertiesDefinition.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/InitContainerPropertiesDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.fluent.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/LogsInner.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/LogsInner.java index a7edb3acd1ef..4bb383316265 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/LogsInner.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/LogsInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.fluent.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,7 +14,7 @@ /** * The logs. */ -@Immutable +@Fluent public final class LogsInner implements JsonSerializable { /* * The content of the log. @@ -24,7 +24,7 @@ public final class LogsInner implements JsonSerializable { /** * Creates an instance of LogsInner class. */ - private LogsInner() { + public LogsInner() { } /** @@ -36,6 +36,17 @@ public String content() { return this.content; } + /** + * Set the content property: The content of the log. + * + * @param content the content value to set. + * @return the LogsInner object itself. + */ + public LogsInner withContent(String content) { + this.content = content; + return this; + } + /** * Validates the instance. * diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/NGroupInner.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/NGroupInner.java deleted file mode 100644 index fe39fb0680f1..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/NGroupInner.java +++ /dev/null @@ -1,384 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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.containerinstance.models.ContainerGroupProfileStub; -import com.azure.resourcemanager.containerinstance.models.ElasticProfile; -import com.azure.resourcemanager.containerinstance.models.NGroupIdentity; -import com.azure.resourcemanager.containerinstance.models.NGroupProvisioningState; -import com.azure.resourcemanager.containerinstance.models.PlacementProfile; -import com.azure.resourcemanager.containerinstance.models.UpdateProfile; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Describes the NGroups resource. - */ -@Fluent -public final class NGroupInner extends ProxyResource { - /* - * Describes the properties of the NGroups resource. - */ - private NGroupProperties innerProperties; - - /* - * Resource tags. - */ - private Map tags; - - /* - * The geo-location where the resource lives - */ - private String location; - - /* - * The availability zones. - */ - private List zones; - - /* - * The identity of the NGroup, if configured. - */ - private NGroupIdentity identity; - - /* - * 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 NGroupInner class. - */ - public NGroupInner() { - } - - /** - * Get the innerProperties property: Describes the properties of the NGroups resource. - * - * @return the innerProperties value. - */ - private NGroupProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the NGroupInner object itself. - */ - public NGroupInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The geo-location where the resource lives. - * - * @param location the location value to set. - * @return the NGroupInner object itself. - */ - public NGroupInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the zones property: The availability zones. - * - * @return the zones value. - */ - public List zones() { - return this.zones; - } - - /** - * Set the zones property: The availability zones. - * - * @param zones the zones value to set. - * @return the NGroupInner object itself. - */ - public NGroupInner withZones(List zones) { - this.zones = zones; - return this; - } - - /** - * Get the identity property: The identity of the NGroup, if configured. - * - * @return the identity value. - */ - public NGroupIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the NGroup, if configured. - * - * @param identity the identity value to set. - * @return the NGroupInner object itself. - */ - public NGroupInner withIdentity(NGroupIdentity identity) { - this.identity = identity; - return this; - } - - /** - * 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 elasticProfile property: The elastic profile. - * - * @return the elasticProfile value. - */ - public ElasticProfile elasticProfile() { - return this.innerProperties() == null ? null : this.innerProperties().elasticProfile(); - } - - /** - * Set the elasticProfile property: The elastic profile. - * - * @param elasticProfile the elasticProfile value to set. - * @return the NGroupInner object itself. - */ - public NGroupInner withElasticProfile(ElasticProfile elasticProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new NGroupProperties(); - } - this.innerProperties().withElasticProfile(elasticProfile); - return this; - } - - /** - * Get the placementProfile property: Provides options w.r.t allocation and management w.r.t certain placement - * policies. These utilize capabilities provided by the underlying Azure infrastructure. They are typically used for - * high availability scenarios. E.g., distributing CGs across fault domains. - * - * @return the placementProfile value. - */ - public PlacementProfile placementProfile() { - return this.innerProperties() == null ? null : this.innerProperties().placementProfile(); - } - - /** - * Set the placementProfile property: Provides options w.r.t allocation and management w.r.t certain placement - * policies. These utilize capabilities provided by the underlying Azure infrastructure. They are typically used for - * high availability scenarios. E.g., distributing CGs across fault domains. - * - * @param placementProfile the placementProfile value to set. - * @return the NGroupInner object itself. - */ - public NGroupInner withPlacementProfile(PlacementProfile placementProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new NGroupProperties(); - } - this.innerProperties().withPlacementProfile(placementProfile); - return this; - } - - /** - * Get the containerGroupProfiles property: The Container Group Profiles that could be used in the NGroups resource. - * - * @return the containerGroupProfiles value. - */ - public List containerGroupProfiles() { - return this.innerProperties() == null ? null : this.innerProperties().containerGroupProfiles(); - } - - /** - * Set the containerGroupProfiles property: The Container Group Profiles that could be used in the NGroups resource. - * - * @param containerGroupProfiles the containerGroupProfiles value to set. - * @return the NGroupInner object itself. - */ - public NGroupInner withContainerGroupProfiles(List containerGroupProfiles) { - if (this.innerProperties() == null) { - this.innerProperties = new NGroupProperties(); - } - this.innerProperties().withContainerGroupProfiles(containerGroupProfiles); - return this; - } - - /** - * Get the provisioningState property: The provisioning state, which only appears in the response. - * - * @return the provisioningState value. - */ - public NGroupProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the updateProfile property: Used by the customer to specify the way to update the Container Groups in NGroup. - * - * @return the updateProfile value. - */ - public UpdateProfile updateProfile() { - return this.innerProperties() == null ? null : this.innerProperties().updateProfile(); - } - - /** - * Set the updateProfile property: Used by the customer to specify the way to update the Container Groups in NGroup. - * - * @param updateProfile the updateProfile value to set. - * @return the NGroupInner object itself. - */ - public NGroupInner withUpdateProfile(UpdateProfile updateProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new NGroupProperties(); - } - this.innerProperties().withUpdateProfile(updateProfile); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (identity() != null) { - identity().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NGroupInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NGroupInner 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 NGroupInner. - */ - public static NGroupInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NGroupInner deserializedNGroupInner = new NGroupInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedNGroupInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedNGroupInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedNGroupInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedNGroupInner.innerProperties = NGroupProperties.fromJson(reader); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedNGroupInner.tags = tags; - } else if ("location".equals(fieldName)) { - deserializedNGroupInner.location = reader.getString(); - } else if ("zones".equals(fieldName)) { - List zones = reader.readArray(reader1 -> reader1.getString()); - deserializedNGroupInner.zones = zones; - } else if ("identity".equals(fieldName)) { - deserializedNGroupInner.identity = NGroupIdentity.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedNGroupInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNGroupInner; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/NGroupProperties.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/NGroupProperties.java deleted file mode 100644 index 7e17b79b204e..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/NGroupProperties.java +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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.containerinstance.models.ContainerGroupProfileStub; -import com.azure.resourcemanager.containerinstance.models.ElasticProfile; -import com.azure.resourcemanager.containerinstance.models.NGroupProvisioningState; -import com.azure.resourcemanager.containerinstance.models.PlacementProfile; -import com.azure.resourcemanager.containerinstance.models.UpdateProfile; -import java.io.IOException; -import java.util.List; - -/** - * Describes the properties of the NGroups resource. - */ -@Fluent -public final class NGroupProperties implements JsonSerializable { - /* - * The elastic profile. - */ - private ElasticProfile elasticProfile; - - /* - * Provides options w.r.t allocation and management w.r.t certain placement policies. These utilize capabilities - * provided by the underlying Azure infrastructure. They are typically used for high availability scenarios. E.g., - * distributing CGs across fault domains. - */ - private PlacementProfile placementProfile; - - /* - * The Container Group Profiles that could be used in the NGroups resource. - */ - private List containerGroupProfiles; - - /* - * The provisioning state, which only appears in the response. - */ - private NGroupProvisioningState provisioningState; - - /* - * Used by the customer to specify the way to update the Container Groups in NGroup. - */ - private UpdateProfile updateProfile; - - /** - * Creates an instance of NGroupProperties class. - */ - public NGroupProperties() { - } - - /** - * Get the elasticProfile property: The elastic profile. - * - * @return the elasticProfile value. - */ - public ElasticProfile elasticProfile() { - return this.elasticProfile; - } - - /** - * Set the elasticProfile property: The elastic profile. - * - * @param elasticProfile the elasticProfile value to set. - * @return the NGroupProperties object itself. - */ - public NGroupProperties withElasticProfile(ElasticProfile elasticProfile) { - this.elasticProfile = elasticProfile; - return this; - } - - /** - * Get the placementProfile property: Provides options w.r.t allocation and management w.r.t certain placement - * policies. These utilize capabilities provided by the underlying Azure infrastructure. They are typically used for - * high availability scenarios. E.g., distributing CGs across fault domains. - * - * @return the placementProfile value. - */ - public PlacementProfile placementProfile() { - return this.placementProfile; - } - - /** - * Set the placementProfile property: Provides options w.r.t allocation and management w.r.t certain placement - * policies. These utilize capabilities provided by the underlying Azure infrastructure. They are typically used for - * high availability scenarios. E.g., distributing CGs across fault domains. - * - * @param placementProfile the placementProfile value to set. - * @return the NGroupProperties object itself. - */ - public NGroupProperties withPlacementProfile(PlacementProfile placementProfile) { - this.placementProfile = placementProfile; - return this; - } - - /** - * Get the containerGroupProfiles property: The Container Group Profiles that could be used in the NGroups resource. - * - * @return the containerGroupProfiles value. - */ - public List containerGroupProfiles() { - return this.containerGroupProfiles; - } - - /** - * Set the containerGroupProfiles property: The Container Group Profiles that could be used in the NGroups resource. - * - * @param containerGroupProfiles the containerGroupProfiles value to set. - * @return the NGroupProperties object itself. - */ - public NGroupProperties withContainerGroupProfiles(List containerGroupProfiles) { - this.containerGroupProfiles = containerGroupProfiles; - return this; - } - - /** - * Get the provisioningState property: The provisioning state, which only appears in the response. - * - * @return the provisioningState value. - */ - public NGroupProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the updateProfile property: Used by the customer to specify the way to update the Container Groups in NGroup. - * - * @return the updateProfile value. - */ - public UpdateProfile updateProfile() { - return this.updateProfile; - } - - /** - * Set the updateProfile property: Used by the customer to specify the way to update the Container Groups in NGroup. - * - * @param updateProfile the updateProfile value to set. - * @return the NGroupProperties object itself. - */ - public NGroupProperties withUpdateProfile(UpdateProfile updateProfile) { - this.updateProfile = updateProfile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (elasticProfile() != null) { - elasticProfile().validate(); - } - if (placementProfile() != null) { - placementProfile().validate(); - } - if (containerGroupProfiles() != null) { - containerGroupProfiles().forEach(e -> e.validate()); - } - if (updateProfile() != null) { - updateProfile().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("elasticProfile", this.elasticProfile); - jsonWriter.writeJsonField("placementProfile", this.placementProfile); - jsonWriter.writeArrayField("containerGroupProfiles", this.containerGroupProfiles, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("updateProfile", this.updateProfile); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NGroupProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NGroupProperties 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 NGroupProperties. - */ - public static NGroupProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NGroupProperties deserializedNGroupProperties = new NGroupProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("elasticProfile".equals(fieldName)) { - deserializedNGroupProperties.elasticProfile = ElasticProfile.fromJson(reader); - } else if ("placementProfile".equals(fieldName)) { - deserializedNGroupProperties.placementProfile = PlacementProfile.fromJson(reader); - } else if ("containerGroupProfiles".equals(fieldName)) { - List containerGroupProfiles - = reader.readArray(reader1 -> ContainerGroupProfileStub.fromJson(reader1)); - deserializedNGroupProperties.containerGroupProfiles = containerGroupProfiles; - } else if ("provisioningState".equals(fieldName)) { - deserializedNGroupProperties.provisioningState - = NGroupProvisioningState.fromString(reader.getString()); - } else if ("updateProfile".equals(fieldName)) { - deserializedNGroupProperties.updateProfile = UpdateProfile.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNGroupProperties; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/UsageInner.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/UsageInner.java index 5f28c8f481d8..787a14e73448 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/UsageInner.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/UsageInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.fluent.models; @@ -45,7 +45,7 @@ public final class UsageInner implements JsonSerializable { /** * Creates an instance of UsageInner class. */ - private UsageInner() { + public UsageInner() { } /** diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/package-info.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/package-info.java index bf3200548a71..0c6352186401 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/package-info.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for ContainerInstance. - * ContainerInstance. + * Package containing the inner data models for ContainerInstanceManagementClient. + * null. */ package com.azure.resourcemanager.containerinstance.fluent.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/package-info.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/package-info.java index 1d934df2d0ae..fae52fe6c84d 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/package-info.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for ContainerInstance. - * ContainerInstance. + * Package containing the service clients for ContainerInstanceManagementClient. + * null. */ package com.azure.resourcemanager.containerinstance.fluent; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/CGProfilesClientImpl.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/CGProfilesClientImpl.java deleted file mode 100644 index d3717cd774ea..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/CGProfilesClientImpl.java +++ /dev/null @@ -1,1142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.containerinstance.fluent.CGProfilesClient; -import com.azure.resourcemanager.containerinstance.fluent.models.ContainerGroupProfileInner; -import com.azure.resourcemanager.containerinstance.implementation.models.ContainerGroupProfileListResult; -import com.azure.resourcemanager.containerinstance.models.CGProfilesCreateOrUpdateResponse; -import com.azure.resourcemanager.containerinstance.models.CGProfilesUpdateResponse; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupProfilePatch; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in CGProfilesClient. - */ -public final class CGProfilesClientImpl - implements InnerSupportsGet, InnerSupportsDelete, CGProfilesClient { - /** - * The proxy service used to perform REST calls. - */ - private final CGProfilesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerInstanceManagementClientImpl client; - - /** - * Initializes an instance of CGProfilesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - CGProfilesClientImpl(ContainerInstanceManagementClientImpl client) { - this.service - = RestProxy.create(CGProfilesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerInstanceManagementClientCGProfiles to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerInstanceManagementClientCGProfiles") - public interface CGProfilesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}/revisions/{revisionNumber}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByRevisionNumber(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerGroupProfileName") String containerGroupProfileName, - @PathParam("revisionNumber") String revisionNumber, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}/revisions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAllRevisions(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerGroupProfileName") String containerGroupProfileName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerGroupProfileName") String containerGroupProfileName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerGroupProfileName") String containerGroupProfileName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ContainerGroupProfileInner containerGroupProfile, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerGroupProfileName") String containerGroupProfileName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") ContainerGroupProfilePatch properties, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerGroupProfileName") String containerGroupProfileName, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAllRevisionsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group. The operation returns the properties of container group profile including containers, image - * registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param revisionNumber The revision number of the container group profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByRevisionNumberWithResponseAsync(String resourceGroupName, - String containerGroupProfileName, String revisionNumber) { - 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 (containerGroupProfileName == null) { - return Mono.error( - new IllegalArgumentException("Parameter containerGroupProfileName is required and cannot be null.")); - } - if (revisionNumber == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionNumber is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByRevisionNumber(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupProfileName, revisionNumber, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group. The operation returns the properties of container group profile including containers, image - * registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param revisionNumber The revision number of the container group profile. - * @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 properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByRevisionNumberWithResponseAsync(String resourceGroupName, - String containerGroupProfileName, String revisionNumber, 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 (containerGroupProfileName == null) { - return Mono.error( - new IllegalArgumentException("Parameter containerGroupProfileName is required and cannot be null.")); - } - if (revisionNumber == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionNumber is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByRevisionNumber(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupProfileName, revisionNumber, accept, - context); - } - - /** - * Get the properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group. The operation returns the properties of container group profile including containers, image - * registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param revisionNumber The revision number of the container group profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByRevisionNumberAsync(String resourceGroupName, - String containerGroupProfileName, String revisionNumber) { - return getByRevisionNumberWithResponseAsync(resourceGroupName, containerGroupProfileName, revisionNumber) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group. The operation returns the properties of container group profile including containers, image - * registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param revisionNumber The revision number of the container group profile. - * @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 properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByRevisionNumberWithResponse(String resourceGroupName, - String containerGroupProfileName, String revisionNumber, Context context) { - return getByRevisionNumberWithResponseAsync(resourceGroupName, containerGroupProfileName, revisionNumber, - context).block(); - } - - /** - * Get the properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group. The operation returns the properties of container group profile including containers, image - * registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param revisionNumber The revision number of the container group profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified revision of the container group profile. - * - * Gets the properties of the specified revision of the container group profile in the given subscription and - * resource group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerGroupProfileInner getByRevisionNumber(String resourceGroupName, String containerGroupProfileName, - String revisionNumber) { - return getByRevisionNumberWithResponse(resourceGroupName, containerGroupProfileName, revisionNumber, - Context.NONE).getValue(); - } - - /** - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. This operation returns properties of each revision of the specified container group profile including - * containers, image registry credentials, restart policy, IP address type, OS type volumes, revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 all the revisions of the specified container group profile in the given subscription and - * resource group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllRevisionsSinglePageAsync(String resourceGroupName, - String containerGroupProfileName) { - 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 (containerGroupProfileName == null) { - return Mono.error( - new IllegalArgumentException("Parameter containerGroupProfileName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listAllRevisions(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupProfileName, 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 all the revisions of the specified container group profile in the given subscription and resource - * group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. This operation returns properties of each revision of the specified container group profile including - * containers, image registry credentials, restart policy, IP address type, OS type volumes, revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @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 all the revisions of the specified container group profile in the given subscription and - * resource group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllRevisionsSinglePageAsync(String resourceGroupName, - String containerGroupProfileName, 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 (containerGroupProfileName == null) { - return Mono.error( - new IllegalArgumentException("Parameter containerGroupProfileName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listAllRevisions(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, containerGroupProfileName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. This operation returns properties of each revision of the specified container group profile including - * containers, image registry credentials, restart policy, IP address type, OS type volumes, revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 all the revisions of the specified container group profile in the given subscription and - * resource group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAllRevisionsAsync(String resourceGroupName, - String containerGroupProfileName) { - return new PagedFlux<>(() -> listAllRevisionsSinglePageAsync(resourceGroupName, containerGroupProfileName), - nextLink -> listAllRevisionsNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. This operation returns properties of each revision of the specified container group profile including - * containers, image registry credentials, restart policy, IP address type, OS type volumes, revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @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 all the revisions of the specified container group profile in the given subscription and - * resource group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAllRevisionsAsync(String resourceGroupName, - String containerGroupProfileName, Context context) { - return new PagedFlux<>( - () -> listAllRevisionsSinglePageAsync(resourceGroupName, containerGroupProfileName, context), - nextLink -> listAllRevisionsNextSinglePageAsync(nextLink, context)); - } - - /** - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. This operation returns properties of each revision of the specified container group profile including - * containers, image registry credentials, restart policy, IP address type, OS type volumes, revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 all the revisions of the specified container group profile in the given subscription and - * resource group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAllRevisions(String resourceGroupName, - String containerGroupProfileName) { - return new PagedIterable<>(listAllRevisionsAsync(resourceGroupName, containerGroupProfileName)); - } - - /** - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. This operation returns properties of each revision of the specified container group profile including - * containers, image registry credentials, restart policy, IP address type, OS type volumes, revision number, etc. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @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 all the revisions of the specified container group profile in the given subscription and - * resource group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAllRevisions(String resourceGroupName, - String containerGroupProfileName, Context context) { - return new PagedIterable<>(listAllRevisionsAsync(resourceGroupName, containerGroupProfileName, context)); - } - - /** - * Display information about a specified ContainerGroupProfile. - * - * Get the properties of the specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container group profile object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String containerGroupProfileName) { - 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 (containerGroupProfileName == null) { - return Mono.error( - new IllegalArgumentException("Parameter containerGroupProfileName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupProfileName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Display information about a specified ContainerGroupProfile. - * - * Get the properties of the specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @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 container group profile object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String containerGroupProfileName, 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 (containerGroupProfileName == null) { - return Mono.error( - new IllegalArgumentException("Parameter containerGroupProfileName 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, containerGroupProfileName, accept, context); - } - - /** - * Display information about a specified ContainerGroupProfile. - * - * Get the properties of the specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container group profile object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, - String containerGroupProfileName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, containerGroupProfileName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Display information about a specified ContainerGroupProfile. - * - * Get the properties of the specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @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 container group profile object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String containerGroupProfileName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, containerGroupProfileName, context).block(); - } - - /** - * Display information about a specified ContainerGroupProfile. - * - * Get the properties of the specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container group profile object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerGroupProfileInner getByResourceGroup(String resourceGroupName, String containerGroupProfileName) { - return getByResourceGroupWithResponse(resourceGroupName, containerGroupProfileName, Context.NONE).getValue(); - } - - /** - * Create or Update a ContainerGroupProfile - * - * Create a CGProfile if it doesn't exist or update an existing CGProfile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param containerGroupProfile The ContainerGroupProfile object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container group profile object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateWithResponseAsync(String resourceGroupName, - String containerGroupProfileName, ContainerGroupProfileInner containerGroupProfile) { - 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 (containerGroupProfileName == null) { - return Mono.error( - new IllegalArgumentException("Parameter containerGroupProfileName is required and cannot be null.")); - } - if (containerGroupProfile == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerGroupProfile is required and cannot be null.")); - } else { - containerGroupProfile.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupProfileName, contentType, accept, - containerGroupProfile, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or Update a ContainerGroupProfile - * - * Create a CGProfile if it doesn't exist or update an existing CGProfile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param containerGroupProfile The ContainerGroupProfile object. - * @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 container group profile object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateWithResponseAsync(String resourceGroupName, - String containerGroupProfileName, ContainerGroupProfileInner containerGroupProfile, 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 (containerGroupProfileName == null) { - return Mono.error( - new IllegalArgumentException("Parameter containerGroupProfileName is required and cannot be null.")); - } - if (containerGroupProfile == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerGroupProfile is required and cannot be null.")); - } else { - containerGroupProfile.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupProfileName, contentType, accept, - containerGroupProfile, context); - } - - /** - * Create or Update a ContainerGroupProfile - * - * Create a CGProfile if it doesn't exist or update an existing CGProfile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param containerGroupProfile The ContainerGroupProfile object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container group profile object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, - String containerGroupProfileName, ContainerGroupProfileInner containerGroupProfile) { - return createOrUpdateWithResponseAsync(resourceGroupName, containerGroupProfileName, containerGroupProfile) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or Update a ContainerGroupProfile - * - * Create a CGProfile if it doesn't exist or update an existing CGProfile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param containerGroupProfile The ContainerGroupProfile object. - * @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 container group profile object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CGProfilesCreateOrUpdateResponse createOrUpdateWithResponse(String resourceGroupName, - String containerGroupProfileName, ContainerGroupProfileInner containerGroupProfile, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, containerGroupProfileName, containerGroupProfile, - context).block(); - } - - /** - * Create or Update a ContainerGroupProfile - * - * Create a CGProfile if it doesn't exist or update an existing CGProfile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param containerGroupProfile The ContainerGroupProfile object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a container group profile object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerGroupProfileInner createOrUpdate(String resourceGroupName, String containerGroupProfileName, - ContainerGroupProfileInner containerGroupProfile) { - return createOrUpdateWithResponse(resourceGroupName, containerGroupProfileName, containerGroupProfile, - Context.NONE).getValue(); - } - - /** - * Container group profile PATCH REST API. - * - * Update a specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param properties The container group profile properties that need 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 container group profile object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateWithResponseAsync(String resourceGroupName, - String containerGroupProfileName, ContainerGroupProfilePatch 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 (containerGroupProfileName == null) { - return Mono.error( - new IllegalArgumentException("Parameter containerGroupProfileName 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 contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupProfileName, contentType, accept, - properties, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Container group profile PATCH REST API. - * - * Update a specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param properties The container group profile properties that need 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 container group profile object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateWithResponseAsync(String resourceGroupName, - String containerGroupProfileName, ContainerGroupProfilePatch 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 (containerGroupProfileName == null) { - return Mono.error( - new IllegalArgumentException("Parameter containerGroupProfileName 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 contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, containerGroupProfileName, contentType, accept, properties, context); - } - - /** - * Container group profile PATCH REST API. - * - * Update a specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param properties The container group profile properties that need 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 container group profile object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String containerGroupProfileName, - ContainerGroupProfilePatch properties) { - return updateWithResponseAsync(resourceGroupName, containerGroupProfileName, properties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Container group profile PATCH REST API. - * - * Update a specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param properties The container group profile properties that need 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 container group profile object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CGProfilesUpdateResponse updateWithResponse(String resourceGroupName, String containerGroupProfileName, - ContainerGroupProfilePatch properties, Context context) { - return updateWithResponseAsync(resourceGroupName, containerGroupProfileName, properties, context).block(); - } - - /** - * Container group profile PATCH REST API. - * - * Update a specified container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @param properties The container group profile properties that need 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 container group profile object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerGroupProfileInner update(String resourceGroupName, String containerGroupProfileName, - ContainerGroupProfilePatch properties) { - return updateWithResponse(resourceGroupName, containerGroupProfileName, properties, Context.NONE).getValue(); - } - - /** - * Container group profile DELETE REST API. - * - * Deletes a container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 containerGroupProfileName) { - 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 (containerGroupProfileName == null) { - return Mono.error( - new IllegalArgumentException("Parameter containerGroupProfileName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupProfileName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Container group profile DELETE REST API. - * - * Deletes a container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String containerGroupProfileName, - 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 (containerGroupProfileName == null) { - return Mono.error( - new IllegalArgumentException("Parameter containerGroupProfileName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, containerGroupProfileName, context); - } - - /** - * Container group profile DELETE REST API. - * - * Deletes a container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 containerGroupProfileName) { - return deleteWithResponseAsync(resourceGroupName, containerGroupProfileName).flatMap(ignored -> Mono.empty()); - } - - /** - * Container group profile DELETE REST API. - * - * Deletes a container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String containerGroupProfileName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, containerGroupProfileName, context).block(); - } - - /** - * Container group profile DELETE REST API. - * - * Deletes a container group profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupProfileName ContainerGroupProfile name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 containerGroupProfileName) { - deleteWithResponse(resourceGroupName, containerGroupProfileName, Context.NONE); - } - - /** - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group. - * - * 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 all the revisions of the specified container group profile in the given subscription and - * resource group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllRevisionsNextSinglePageAsync(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.listAllRevisionsNext(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 a list of all the revisions of the specified container group profile in the given subscription and resource - * group. - * - * 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 all the revisions of the specified container group profile in the given subscription and - * resource group. - * - * Get a list of all the revisions of the specified container group profile in the given subscription and resource - * group along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllRevisionsNextSinglePageAsync(String nextLink, - Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listAllRevisionsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/CGProfilesOperationsClientImpl.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/CGProfilesOperationsClientImpl.java deleted file mode 100644 index 6f98cd491cc5..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/CGProfilesOperationsClientImpl.java +++ /dev/null @@ -1,483 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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.resourcemanager.containerinstance.fluent.CGProfilesOperationsClient; -import com.azure.resourcemanager.containerinstance.fluent.models.ContainerGroupProfileInner; -import com.azure.resourcemanager.containerinstance.implementation.models.ContainerGroupProfileListResult; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in CGProfilesOperationsClient. - */ -public final class CGProfilesOperationsClientImpl - implements InnerSupportsListing, CGProfilesOperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final CGProfilesOperationsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerInstanceManagementClientImpl client; - - /** - * Initializes an instance of CGProfilesOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - CGProfilesOperationsClientImpl(ContainerInstanceManagementClientImpl client) { - this.service = RestProxy.create(CGProfilesOperationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerInstanceManagementClientCGProfilesOperations to be used by - * the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerInstanceManagementClientCGProfilesOperations") - public interface CGProfilesOperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroupProfiles") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") 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/Microsoft.ContainerInstance/containerGroupProfiles") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") 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("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List container group profiles in a subscription. - * - * Gets a list of all container group profiles under 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. - * @return the response of a ContainerGroupProfile list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - 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"; - return FluxUtil - .withContext(context -> 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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List container group profiles in a subscription. - * - * Gets a list of all container group profiles under a 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 ContainerGroupProfile 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 container group profiles in a subscription. - * - * Gets a list of all container group profiles under 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. - * @return the response of a ContainerGroupProfile list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List container group profiles in a subscription. - * - * Gets a list of all container group profiles under a 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 ContainerGroupProfile list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * List container group profiles in a subscription. - * - * Gets a list of all container group profiles under 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. - * @return the response of a ContainerGroupProfile list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * List container group profiles in a subscription. - * - * Gets a list of all container group profiles under a 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 ContainerGroupProfile list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * List container group profiles in a resource group. - * - * Gets a list of all container group profiles under a 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 ContainerGroupProfile list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName) { - 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"; - return FluxUtil - .withContext(context -> 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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List container group profiles in a resource group. - * - * Gets a list of all container group profiles under 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 ContainerGroupProfile list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @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)); - } - - /** - * List container group profiles in a resource group. - * - * Gets a list of all container group profiles under a 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 ContainerGroupProfile list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List container group profiles in a resource group. - * - * Gets a list of all container group profiles under 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 ContainerGroupProfile list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * List container group profiles in a resource group. - * - * Gets a list of all container group profiles under a 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 ContainerGroupProfile list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * List container group profiles in a resource group. - * - * Gets a list of all container group profiles under 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 ContainerGroupProfile list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * List container group profiles in a subscription. - * - * 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 ContainerGroupProfile list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(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.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())); - } - - /** - * List container group profiles in a subscription. - * - * 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 the response of a ContainerGroupProfile list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - 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"; - 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)); - } - - /** - * List container group profiles in a resource group. - * - * 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 ContainerGroupProfile list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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())); - } - - /** - * List container group profiles in a resource group. - * - * 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 the response of a ContainerGroupProfile list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - 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"; - 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)); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerGroupsClientImpl.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerGroupsClientImpl.java index 708d75c75cfa..cf3a5cd38197 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerGroupsClientImpl.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerGroupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.implementation; @@ -36,7 +36,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerinstance.fluent.ContainerGroupsClient; import com.azure.resourcemanager.containerinstance.fluent.models.ContainerGroupInner; -import com.azure.resourcemanager.containerinstance.implementation.models.ContainerGroupListResult; +import com.azure.resourcemanager.containerinstance.models.ContainerGroupListResult; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; @@ -49,7 +49,7 @@ * An instance of this class provides access to all the operations defined in ContainerGroupsClient. */ public final class ContainerGroupsClientImpl implements InnerSupportsGet, - InnerSupportsListing, InnerSupportsDelete, ContainerGroupsClient { + InnerSupportsListing, InnerSupportsDelete, ContainerGroupsClient { /** * The proxy service used to perform REST calls. */ @@ -75,108 +75,113 @@ public final class ContainerGroupsClientImpl implements InnerSupportsGet> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("containerGroupName") String containerGroupName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerGroupName") String containerGroupName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") ContainerGroupInner containerGroup, + @PathParam("containerGroupName") String containerGroupName, + @BodyParam("application/json") ContainerGroupInner containerGroup, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerGroupName") String containerGroupName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") Resource resource, Context context); + @PathParam("containerGroupName") String containerGroupName, + @BodyParam("application/json") Resource resource, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("containerGroupName") String containerGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/restart") @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restart(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> restart(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerGroupName") String containerGroupName, Context context); + @PathParam("containerGroupName") String containerGroupName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/stop") @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> stop(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> stop(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerGroupName") String containerGroupName, Context context); + @PathParam("containerGroupName") String containerGroupName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/start") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> start(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerGroupName") String containerGroupName, Context context); + @PathParam("containerGroupName") String containerGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/outboundNetworkDependenciesEndpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> getOutboundNetworkDependenciesEndpoints(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> getOutboundNetworkDependenciesEndpoints(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("containerGroupName") String containerGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") 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/Microsoft.ContainerInstance/containerGroups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") 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("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -184,10 +189,301 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Get a list of container groups in the specified subscription. + * + * Get a list of container groups in the specified subscription. This operation returns properties of each container + * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and + * volumes. + * + * @throws ManagementException 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 container groups in the specified subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + 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"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + 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())); + } + + /** + * Get a list of container groups in the specified subscription. + * + * Get a list of container groups in the specified subscription. This operation returns properties of each container + * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and + * volumes. + * + * @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 container groups in the specified subscription 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.getSubscriptionId(), this.client.getApiVersion(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get a list of container groups in the specified subscription. + * + * Get a list of container groups in the specified subscription. This operation returns properties of each container + * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and + * volumes. + * + * @throws ManagementException 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 container groups in the specified subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of container groups in the specified subscription. + * + * Get a list of container groups in the specified subscription. This operation returns properties of each container + * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and + * volumes. + * + * @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 container groups in the specified subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Get a list of container groups in the specified subscription. + * + * Get a list of container groups in the specified subscription. This operation returns properties of each container + * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and + * volumes. + * + * @throws ManagementException 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 container groups in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Get a list of container groups in the specified subscription. + * + * Get a list of container groups in the specified subscription. This operation returns properties of each container + * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and + * volumes. + * + * @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 container groups in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get a list of container groups in the specified subscription and resource group. + * + * Get a list of container groups in a specified subscription and resource group. This operation returns properties + * of each container group including containers, image registry credentials, restart policy, IP address type, OS + * type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 container groups in a specified subscription and resource group along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + 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"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), this.client.getApiVersion(), resourceGroupName, 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 container groups in the specified subscription and resource group. + * + * Get a list of container groups in a specified subscription and resource group. This operation returns properties + * of each container group including containers, image registry credentials, restart policy, IP address type, OS + * type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @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 container groups in a specified subscription and resource group along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @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.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get a list of container groups in the specified subscription and resource group. + * + * Get a list of container groups in a specified subscription and resource group. This operation returns properties + * of each container group including containers, image registry credentials, restart policy, IP address type, OS + * type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 container groups in a specified subscription and resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get a list of container groups in the specified subscription and resource group. + * + * Get a list of container groups in a specified subscription and resource group. This operation returns properties + * of each container group including containers, image registry credentials, restart policy, IP address type, OS + * type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @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 container groups in a specified subscription and resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Get a list of container groups in the specified subscription and resource group. + * + * Get a list of container groups in a specified subscription and resource group. This operation returns properties + * of each container group including containers, image registry credentials, restart policy, IP address type, OS + * type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 container groups in a specified subscription and resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Get a list of container groups in the specified subscription and resource group. + * + * Get a list of container groups in a specified subscription and resource group. This operation returns properties + * of each container group including containers, image registry credentials, restart policy, IP address type, OS + * type, state, and volumes. + * + * @param resourceGroupName The name of the resource group. + * @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 container groups in a specified subscription and resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + /** * Get the properties of the specified container group. * @@ -195,15 +491,13 @@ Mono> listByResourceGroupNext( * operation returns the properties of each container group including containers, image registry credentials, * restart policy, IP address type, OS type, state, and volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified container group. - * - * Gets the properties of the specified container group in the specified subscription and resource group along with - * {@link Response} on successful completion of {@link Mono}. + * @return the properties of the specified container group in the specified subscription and resource group along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, @@ -226,8 +520,9 @@ public Mono> getByResourceGroupWithResponseAsync(S } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupName, accept, context)) + .withContext( + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, containerGroupName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -238,16 +533,14 @@ public Mono> getByResourceGroupWithResponseAsync(S * operation returns the properties of each container group including containers, image registry credentials, * restart policy, IP address type, OS type, state, and volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @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 properties of the specified container group. - * - * Gets the properties of the specified container group in the specified subscription and resource group along with - * {@link Response} on successful completion of {@link Mono}. + * @return the properties of the specified container group in the specified subscription and resource group along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, @@ -270,8 +563,8 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupName, accept, context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, containerGroupName, accept, context); } /** @@ -281,14 +574,12 @@ private Mono> getByResourceGroupWithResponseAsync( * operation returns the properties of each container group including containers, image registry credentials, * restart policy, IP address type, OS type, state, and volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified container group. - * - * Gets the properties of the specified container group in the specified subscription and resource group on + * @return the properties of the specified container group in the specified subscription and resource group on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -304,16 +595,14 @@ public Mono getByResourceGroupAsync(String resourceGroupNam * operation returns the properties of each container group including containers, image registry credentials, * restart policy, IP address type, OS type, state, and volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @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 properties of the specified container group. - * - * Gets the properties of the specified container group in the specified subscription and resource group along with - * {@link Response}. + * @return the properties of the specified container group in the specified subscription and resource group along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, @@ -328,14 +617,12 @@ public Response getByResourceGroupWithResponse(String resou * operation returns the properties of each container group including containers, image registry credentials, * restart policy, IP address type, OS type, state, and volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified container group. - * - * Gets the properties of the specified container group in the specified subscription and resource group. + * @return the properties of the specified container group in the specified subscription and resource group. */ @ServiceMethod(returns = ReturnType.SINGLE) public ContainerGroupInner getByResourceGroup(String resourceGroupName, String containerGroupName) { @@ -347,7 +634,7 @@ public ContainerGroupInner getByResourceGroup(String resourceGroupName, String c * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -379,12 +666,10 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { containerGroup.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupName, contentType, accept, - containerGroup, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, containerGroupName, containerGroup, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -393,7 +678,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @param context The context to associate with this operation. @@ -426,12 +711,10 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { containerGroup.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupName, contentType, accept, containerGroup, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, containerGroupName, containerGroup, accept, context); } /** @@ -439,7 +722,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -461,7 +744,7 @@ public PollerFlux, ContainerGroupInner> beginCre * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @param context The context to associate with this operation. @@ -485,7 +768,7 @@ private PollerFlux, ContainerGroupInner> beginCr * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -504,7 +787,7 @@ private PollerFlux, ContainerGroupInner> beginCr * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @param context The context to associate with this operation. @@ -525,7 +808,7 @@ public SyncPoller, ContainerGroupInner> beginCre * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -545,7 +828,7 @@ public Mono createOrUpdateAsync(String resourceGroupName, S * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @param context The context to associate with this operation. @@ -566,7 +849,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -585,7 +868,7 @@ public ContainerGroupInner createOrUpdate(String resourceGroupName, String conta * * Create or update container groups with specified configurations. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @param context The context to associate with this operation. @@ -605,7 +888,7 @@ public ContainerGroupInner createOrUpdate(String resourceGroupName, String conta * * Updates container group tags with specified values. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param resource The container group resource with just the tags to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -635,12 +918,10 @@ public Mono> updateWithResponseAsync(String resour if (resource == null) { return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupName, contentType, accept, resource, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, containerGroupName, resource, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -649,7 +930,7 @@ public Mono> updateWithResponseAsync(String resour * * Updates container group tags with specified values. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param resource The container group resource with just the tags to be updated. * @param context The context to associate with this operation. @@ -680,11 +961,10 @@ private Mono> updateWithResponseAsync(String resou if (resource == null) { return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, containerGroupName, contentType, accept, resource, context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), + resourceGroupName, containerGroupName, resource, accept, context); } /** @@ -692,7 +972,7 @@ private Mono> updateWithResponseAsync(String resou * * Updates container group tags with specified values. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param resource The container group resource with just the tags to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -712,7 +992,7 @@ public Mono updateAsync(String resourceGroupName, String co * * Updates container group tags with specified values. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param resource The container group resource with just the tags to be updated. * @param context The context to associate with this operation. @@ -732,7 +1012,7 @@ public Response updateWithResponse(String resourceGroupName * * Updates container group tags with specified values. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param resource The container group resource with just the tags to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -751,7 +1031,7 @@ public ContainerGroupInner update(String resourceGroupName, String containerGrou * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -779,8 +1059,8 @@ public Mono>> deleteWithResponseAsync(String resourceG } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, containerGroupName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -790,7 +1070,7 @@ public Mono>> deleteWithResponseAsync(String resourceG * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -819,7 +1099,7 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), resourceGroupName, containerGroupName, accept, context); } @@ -829,7 +1109,7 @@ private Mono>> deleteWithResponseAsync(String resource * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -837,10 +1117,11 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link PollerFlux} for polling of a container group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String containerGroupName) { + public PollerFlux, ContainerGroupInner> beginDeleteAsync(String resourceGroupName, + String containerGroupName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerGroupName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ContainerGroupInner.class, ContainerGroupInner.class, this.client.getContext()); } /** @@ -849,7 +1130,7 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -858,12 +1139,12 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN * @return the {@link PollerFlux} for polling of a container group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String containerGroupName, - Context context) { + private PollerFlux, ContainerGroupInner> beginDeleteAsync(String resourceGroupName, + String containerGroupName, Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerGroupName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ContainerGroupInner.class, ContainerGroupInner.class, context); } /** @@ -872,7 +1153,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -880,7 +1161,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link SyncPoller} for polling of a container group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String containerGroupName) { + public SyncPoller, ContainerGroupInner> beginDelete(String resourceGroupName, + String containerGroupName) { return this.beginDeleteAsync(resourceGroupName, containerGroupName).getSyncPoller(); } @@ -890,7 +1172,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -899,8 +1181,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of a container group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String containerGroupName, - Context context) { + public SyncPoller, ContainerGroupInner> beginDelete(String resourceGroupName, + String containerGroupName, Context context) { return this.beginDeleteAsync(resourceGroupName, containerGroupName, context).getSyncPoller(); } @@ -910,7 +1192,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -918,7 +1200,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return a container group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String containerGroupName) { + public Mono deleteAsync(String resourceGroupName, String containerGroupName) { return beginDeleteAsync(resourceGroupName, containerGroupName).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -929,7 +1211,7 @@ public Mono deleteAsync(String resourceGroupName, String containerGroupNam * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -938,7 +1220,8 @@ public Mono deleteAsync(String resourceGroupName, String containerGroupNam * @return a container group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String containerGroupName, Context context) { + private Mono deleteAsync(String resourceGroupName, String containerGroupName, + Context context) { return beginDeleteAsync(resourceGroupName, containerGroupName, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -949,15 +1232,16 @@ private Mono deleteAsync(String resourceGroupName, String containerGroupNa * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a container group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String containerGroupName) { - deleteAsync(resourceGroupName, containerGroupName).block(); + public ContainerGroupInner delete(String resourceGroupName, String containerGroupName) { + return deleteAsync(resourceGroupName, containerGroupName).block(); } /** @@ -966,16 +1250,17 @@ public void delete(String resourceGroupName, String containerGroupName) { * Delete the specified container group in the specified subscription and resource group. The operation does not * delete other resources provided by the user, such as volumes. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @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 container group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String containerGroupName, Context context) { - deleteAsync(resourceGroupName, containerGroupName, context).block(); + public ContainerGroupInner delete(String resourceGroupName, String containerGroupName, Context context) { + return deleteAsync(resourceGroupName, containerGroupName, context).block(); } /** @@ -984,7 +1269,7 @@ public void delete(String resourceGroupName, String containerGroupName, Context * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1010,9 +1295,10 @@ public Mono>> restartWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupName, context)) + .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, containerGroupName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1022,7 +1308,7 @@ public Mono>> restartWithResponseAsync(String resource * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1049,9 +1335,10 @@ private Mono>> restartWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); - return service.restart(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, containerGroupName, context); + return service.restart(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), + resourceGroupName, containerGroupName, accept, context); } /** @@ -1060,7 +1347,7 @@ private Mono>> restartWithResponseAsync(String resourc * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1080,7 +1367,7 @@ public PollerFlux, Void> beginRestartAsync(String resourceGroup * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1104,7 +1391,7 @@ private PollerFlux, Void> beginRestartAsync(String resourceGrou * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1122,7 +1409,7 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1142,7 +1429,7 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1161,7 +1448,7 @@ public Mono restartAsync(String resourceGroupName, String containerGroupNa * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1181,7 +1468,7 @@ private Mono restartAsync(String resourceGroupName, String containerGroupN * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1198,7 +1485,7 @@ public void restart(String resourceGroupName, String containerGroupName) { * Restarts all containers in a container group in place. If container image has updates, new image will be * downloaded. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1215,7 +1502,7 @@ public void restart(String resourceGroupName, String containerGroupName, Context * * Stops all containers in a container group. Compute resources will be deallocated and billing will stop. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1240,9 +1527,10 @@ public Mono> stopWithResponseAsync(String resourceGroupName, Stri return Mono .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupName, context)) + .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, containerGroupName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1251,7 +1539,7 @@ public Mono> stopWithResponseAsync(String resourceGroupName, Stri * * Stops all containers in a container group. Compute resources will be deallocated and billing will stop. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1278,9 +1566,10 @@ private Mono> stopWithResponseAsync(String resourceGroupName, Str return Mono .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); - return service.stop(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, containerGroupName, context); + return service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), + resourceGroupName, containerGroupName, accept, context); } /** @@ -1288,7 +1577,7 @@ private Mono> stopWithResponseAsync(String resourceGroupName, Str * * Stops all containers in a container group. Compute resources will be deallocated and billing will stop. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1305,7 +1594,7 @@ public Mono stopAsync(String resourceGroupName, String containerGroupName) * * Stops all containers in a container group. Compute resources will be deallocated and billing will stop. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1323,7 +1612,7 @@ public Response stopWithResponse(String resourceGroupName, String containe * * Stops all containers in a container group. Compute resources will be deallocated and billing will stop. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1339,7 +1628,7 @@ public void stop(String resourceGroupName, String containerGroupName) { * * Starts all containers in a container group. Compute resources will be allocated and billing will start. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1365,9 +1654,10 @@ public Mono>> startWithResponseAsync(String resourceGr return Mono .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupName, context)) + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, containerGroupName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1376,7 +1666,7 @@ public Mono>> startWithResponseAsync(String resourceGr * * Starts all containers in a container group. Compute resources will be allocated and billing will start. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1403,9 +1693,10 @@ private Mono>> startWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); - return service.start(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, containerGroupName, context); + return service.start(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), + resourceGroupName, containerGroupName, accept, context); } /** @@ -1413,7 +1704,7 @@ private Mono>> startWithResponseAsync(String resourceG * * Starts all containers in a container group. Compute resources will be allocated and billing will start. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1432,7 +1723,7 @@ public PollerFlux, Void> beginStartAsync(String resourceGroupNa * * Starts all containers in a container group. Compute resources will be allocated and billing will start. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1452,426 +1743,126 @@ private PollerFlux, Void> beginStartAsync(String resourceGroupN /** * Starts all containers in a container group. * - * Starts all containers in a container group. Compute resources will be allocated and billing will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupName The name of the container group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginStart(String resourceGroupName, String containerGroupName) { - return this.beginStartAsync(resourceGroupName, containerGroupName).getSyncPoller(); - } - - /** - * Starts all containers in a container group. - * - * Starts all containers in a container group. Compute resources will be allocated and billing will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupName The name of the container group. - * @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> beginStart(String resourceGroupName, String containerGroupName, - Context context) { - return this.beginStartAsync(resourceGroupName, containerGroupName, context).getSyncPoller(); - } - - /** - * Starts all containers in a container group. - * - * Starts all containers in a container group. Compute resources will be allocated and billing will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupName The name of the container group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 startAsync(String resourceGroupName, String containerGroupName) { - return beginStartAsync(resourceGroupName, containerGroupName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Starts all containers in a container group. - * - * Starts all containers in a container group. Compute resources will be allocated and billing will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupName The name of the container group. - * @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 startAsync(String resourceGroupName, String containerGroupName, Context context) { - return beginStartAsync(resourceGroupName, containerGroupName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Starts all containers in a container group. - * - * Starts all containers in a container group. Compute resources will be allocated and billing will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupName The name of the container group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 start(String resourceGroupName, String containerGroupName) { - startAsync(resourceGroupName, containerGroupName).block(); - } - - /** - * Starts all containers in a container group. - * - * Starts all containers in a container group. Compute resources will be allocated and billing will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupName The name of the container group. - * @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 start(String resourceGroupName, String containerGroupName, Context context) { - startAsync(resourceGroupName, containerGroupName, context).block(); - } - - /** - * Get all network dependencies for container group. - * - * Gets all the network dependencies for this container group to allow complete control of network setting and - * configuration. For container groups, this will always be an empty list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupName The name of the container group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 network dependencies for container group. - * - * Gets all the network dependencies for this container group to allow complete control of network setting and - * configuration along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> - getOutboundNetworkDependenciesEndpointsWithResponseAsync(String resourceGroupName, String containerGroupName) { - 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 (containerGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, containerGroupName, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all network dependencies for container group. - * - * Gets all the network dependencies for this container group to allow complete control of network setting and - * configuration. For container groups, this will always be an empty list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupName The name of the container group. - * @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 all network dependencies for container group. - * - * Gets all the network dependencies for this container group to allow complete control of network setting and - * configuration along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getOutboundNetworkDependenciesEndpointsWithResponseAsync( - String resourceGroupName, String containerGroupName, 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 (containerGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupName, accept, context); - } - - /** - * Get all network dependencies for container group. - * - * Gets all the network dependencies for this container group to allow complete control of network setting and - * configuration. For container groups, this will always be an empty list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupName The name of the container group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 network dependencies for container group. - * - * Gets all the network dependencies for this container group to allow complete control of network setting and - * configuration on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, - String containerGroupName) { - return getOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, containerGroupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get all network dependencies for container group. - * - * Gets all the network dependencies for this container group to allow complete control of network setting and - * configuration. For container groups, this will always be an empty list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupName The name of the container group. - * @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 all network dependencies for container group. - * - * Gets all the network dependencies for this container group to allow complete control of network setting and - * configuration along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response> getOutboundNetworkDependenciesEndpointsWithResponse(String resourceGroupName, - String containerGroupName, Context context) { - return getOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, containerGroupName, context) - .block(); - } - - /** - * Get all network dependencies for container group. - * - * Gets all the network dependencies for this container group to allow complete control of network setting and - * configuration. For container groups, this will always be an empty list. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerGroupName The name of the container group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 network dependencies for container group. - * - * Gets all the network dependencies for this container group to allow complete control of network setting and - * configuration. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List getOutboundNetworkDependenciesEndpoints(String resourceGroupName, String containerGroupName) { - return getOutboundNetworkDependenciesEndpointsWithResponse(resourceGroupName, containerGroupName, Context.NONE) - .getValue(); - } - - /** - * Get a list of container groups in the specified subscription. - * - * Get a list of container groups in the specified subscription. This operation returns properties of each container - * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and - * volumes. - * + * Starts all containers in a container group. Compute resources will be allocated and billing will start. + * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 container groups in the specified subscription. - * - * Get a list of container groups in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - 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"; - return FluxUtil - .withContext(context -> 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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStart(String resourceGroupName, String containerGroupName) { + return this.beginStartAsync(resourceGroupName, containerGroupName).getSyncPoller(); } /** - * Get a list of container groups in the specified subscription. + * Starts all containers in a container group. * - * Get a list of container groups in the specified subscription. This operation returns properties of each container - * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and - * volumes. + * Starts all containers in a container group. Compute resources will be allocated and billing will start. * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. * @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 container groups in the specified subscription. - * - * Get a list of container groups in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @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)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStart(String resourceGroupName, String containerGroupName, + Context context) { + return this.beginStartAsync(resourceGroupName, containerGroupName, context).getSyncPoller(); } /** - * Get a list of container groups in the specified subscription. + * Starts all containers in a container group. * - * Get a list of container groups in the specified subscription. This operation returns properties of each container - * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and - * volumes. + * Starts all containers in a container group. Compute resources will be allocated and billing will start. * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 container groups in the specified subscription. - * - * Get a list of container groups in the specified subscription as paginated response with {@link PagedFlux}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono startAsync(String resourceGroupName, String containerGroupName) { + return beginStartAsync(resourceGroupName, containerGroupName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get a list of container groups in the specified subscription. + * Starts all containers in a container group. * - * Get a list of container groups in the specified subscription. This operation returns properties of each container - * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and - * volumes. + * Starts all containers in a container group. Compute resources will be allocated and billing will start. * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. * @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 container groups in the specified subscription. - * - * Get a list of container groups in the specified subscription as paginated response with {@link PagedFlux}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startAsync(String resourceGroupName, String containerGroupName, Context context) { + return beginStartAsync(resourceGroupName, containerGroupName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get a list of container groups in the specified subscription. + * Starts all containers in a container group. * - * Get a list of container groups in the specified subscription. This operation returns properties of each container - * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and - * volumes. + * Starts all containers in a container group. Compute resources will be allocated and billing will start. * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 container groups in the specified subscription. - * - * Get a list of container groups in the specified subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void start(String resourceGroupName, String containerGroupName) { + startAsync(resourceGroupName, containerGroupName).block(); } /** - * Get a list of container groups in the specified subscription. + * Starts all containers in a container group. * - * Get a list of container groups in the specified subscription. This operation returns properties of each container - * group including containers, image registry credentials, restart policy, IP address type, OS type, state, and - * volumes. + * Starts all containers in a container group. Compute resources will be allocated and billing will start. * + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. * @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 container groups in the specified subscription. - * - * Get a list of container groups in the specified subscription as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void start(String resourceGroupName, String containerGroupName, Context context) { + startAsync(resourceGroupName, containerGroupName, context).block(); } /** - * Get a list of container groups in the specified subscription and resource group. + * Get all network dependencies for container group. * - * Get a list of container groups in a specified subscription and resource group. This operation returns properties - * of each container group including containers, image registry credentials, restart policy, IP address type, OS - * type, state, and volumes. + * Gets all the network dependencies for this container group to allow complete control of network setting and + * configuration. For container groups, this will always be an empty list. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 container groups in the specified subscription and resource group. - * - * Get a list of container groups in a specified subscription and resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return all the network dependencies for this container group to allow complete control of network setting and + * configuration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + public Mono>> + getOutboundNetworkDependenciesEndpointsWithResponseAsync(String resourceGroupName, String containerGroupName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1884,35 +1875,36 @@ private Mono> listByResourceGroupSinglePageAs return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> 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)) + .withContext(context -> service.getOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), + this.client.getSubscriptionId(), this.client.getApiVersion(), resourceGroupName, containerGroupName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a list of container groups in the specified subscription and resource group. + * Get all network dependencies for container group. * - * Get a list of container groups in a specified subscription and resource group. This operation returns properties - * of each container group including containers, image registry credentials, restart policy, IP address type, OS - * type, state, and volumes. + * Gets all the network dependencies for this container group to allow complete control of network setting and + * configuration. For container groups, this will always be an empty list. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. * @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 container groups in the specified subscription and resource group. - * - * Get a list of container groups in a specified subscription and resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return all the network dependencies for this container group to allow complete control of network setting and + * configuration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { + private Mono>> getOutboundNetworkDependenciesEndpointsWithResponseAsync( + String resourceGroupName, String containerGroupName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1925,116 +1917,89 @@ private Mono> listByResourceGroupSinglePageAs return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (containerGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerGroupName 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)); + return service.getOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), + this.client.getSubscriptionId(), this.client.getApiVersion(), resourceGroupName, containerGroupName, accept, + context); } /** - * Get a list of container groups in the specified subscription and resource group. + * Get all network dependencies for container group. * - * Get a list of container groups in a specified subscription and resource group. This operation returns properties - * of each container group including containers, image registry credentials, restart policy, IP address type, OS - * type, state, and volumes. + * Gets all the network dependencies for this container group to allow complete control of network setting and + * configuration. For container groups, this will always be an empty list. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 container groups in the specified subscription and resource group. - * - * Get a list of container groups in a specified subscription and resource group as paginated response with - * {@link PagedFlux}. + * @return all the network dependencies for this container group to allow complete control of network setting and + * configuration on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, + String containerGroupName) { + return getOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, containerGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a list of container groups in the specified subscription and resource group. + * Get all network dependencies for container group. * - * Get a list of container groups in a specified subscription and resource group. This operation returns properties - * of each container group including containers, image registry credentials, restart policy, IP address type, OS - * type, state, and volumes. + * Gets all the network dependencies for this container group to allow complete control of network setting and + * configuration. For container groups, this will always be an empty list. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. * @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 container groups in the specified subscription and resource group. - * - * Get a list of container groups in a specified subscription and resource group as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Get a list of container groups in the specified subscription and resource group. - * - * Get a list of container groups in a specified subscription and resource group. This operation returns properties - * of each container group including containers, image registry credentials, restart policy, IP address type, OS - * type, state, and volumes. - * - * @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 a list of container groups in the specified subscription and resource group. - * - * Get a list of container groups in a specified subscription and resource group as paginated response with - * {@link PagedIterable}. + * @return all the network dependencies for this container group to allow complete control of network setting and + * configuration along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> getOutboundNetworkDependenciesEndpointsWithResponse(String resourceGroupName, + String containerGroupName, Context context) { + return getOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, containerGroupName, context) + .block(); } /** - * Get a list of container groups in the specified subscription and resource group. + * Get all network dependencies for container group. * - * Get a list of container groups in a specified subscription and resource group. This operation returns properties - * of each container group including containers, image registry credentials, restart policy, IP address type, OS - * type, state, and volumes. + * Gets all the network dependencies for this container group to allow complete control of network setting and + * configuration. For container groups, this will always be an empty list. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. + * @param containerGroupName The name of the container group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 container groups in the specified subscription and resource group. - * - * Get a list of container groups in a specified subscription and resource group as paginated response with - * {@link PagedIterable}. + * @return all the network dependencies for this container group to allow complete control of network setting and + * configuration. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public List getOutboundNetworkDependenciesEndpoints(String resourceGroupName, String containerGroupName) { + return getOutboundNetworkDependenciesEndpointsWithResponse(resourceGroupName, containerGroupName, Context.NONE) + .getValue(); } /** - * Get a list of container groups in the specified subscription. - * * 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 container groups in the specified subscription. - * - * Get a list of container groups in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the container group list response that contains the container group properties along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2053,8 +2018,6 @@ private Mono> listNextSinglePageAsync(String } /** - * Get a list of container groups in the specified subscription. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2062,10 +2025,8 @@ 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 a list of container groups in the specified subscription. - * - * Get a list of container groups in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the container group list response that contains the container group properties along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -2084,18 +2045,14 @@ private Mono> listNextSinglePageAsync(String } /** - * Get a list of container groups in the specified subscription and resource group. - * * 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 container groups in the specified subscription and resource group. - * - * Get a list of container groups in a specified subscription and resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the container group list response that contains the container group properties along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -2116,8 +2073,6 @@ private Mono> listByResourceGroupNextSinglePa } /** - * Get a list of container groups in the specified subscription and resource group. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2125,10 +2080,8 @@ private Mono> listByResourceGroupNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 container groups in the specified subscription and resource group. - * - * Get a list of container groups in a specified subscription and resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the container group list response that contains the container group properties along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerInstanceManagementClientBuilder.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerInstanceManagementClientBuilder.java index 9e48ec466a78..d03ffc2dbf19 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerInstanceManagementClientBuilder.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerInstanceManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.implementation; @@ -20,34 +20,36 @@ @ServiceClientBuilder(serviceClients = { ContainerInstanceManagementClientImpl.class }) public final class ContainerInstanceManagementClientBuilder { /* - * Service host + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of + * the URI for every service call. */ - private String endpoint; + private String subscriptionId; /** - * Sets Service host. + * Sets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the ContainerInstanceManagementClientBuilder. */ - public ContainerInstanceManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public ContainerInstanceManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } /* - * The ID of the target subscription. The value must be an UUID. + * server parameter */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets server parameter. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the ContainerInstanceManagementClientBuilder. */ - public ContainerInstanceManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public ContainerInstanceManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } @@ -132,7 +134,7 @@ public ContainerInstanceManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); ContainerInstanceManagementClientImpl client = new ContainerInstanceManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerInstanceManagementClientImpl.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerInstanceManagementClientImpl.java index ceb524cd09d2..c290151a8760 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerInstanceManagementClientImpl.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerInstanceManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.implementation; @@ -8,13 +8,10 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.management.AzureEnvironment; import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.resourcemanager.containerinstance.fluent.CGProfilesClient; -import com.azure.resourcemanager.containerinstance.fluent.CGProfilesOperationsClient; import com.azure.resourcemanager.containerinstance.fluent.ContainerGroupsClient; import com.azure.resourcemanager.containerinstance.fluent.ContainerInstanceManagementClient; import com.azure.resourcemanager.containerinstance.fluent.ContainersClient; import com.azure.resourcemanager.containerinstance.fluent.LocationsClient; -import com.azure.resourcemanager.containerinstance.fluent.NGroupsClient; import com.azure.resourcemanager.containerinstance.fluent.OperationsClient; import com.azure.resourcemanager.containerinstance.fluent.SubnetServiceAssociationLinksClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; @@ -27,45 +24,47 @@ public final class ContainerInstanceManagementClientImpl extends AzureServiceClient implements ContainerInstanceManagementClient { /** - * Service host. + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of + * the URI for every service call. */ - private final String endpoint; + private final String subscriptionId; /** - * Gets Service host. + * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. * - * @return the endpoint value. + * @return the subscriptionId value. */ - public String getEndpoint() { - return this.endpoint; + public String getSubscriptionId() { + return this.subscriptionId; } /** - * Version parameter. + * server parameter. */ - private final String apiVersion; + private final String endpoint; /** - * Gets Version parameter. + * Gets server parameter. * - * @return the apiVersion value. + * @return the endpoint value. */ - public String getApiVersion() { - return this.apiVersion; + public String getEndpoint() { + return this.endpoint; } /** - * The ID of the target subscription. The value must be an UUID. + * Api Version. */ - private final String subscriptionId; + private final String apiVersion; /** - * Gets The ID of the target subscription. The value must be an UUID. + * Gets Api Version. * - * @return the subscriptionId value. + * @return the apiVersion value. */ - public String getSubscriptionId() { - return this.subscriptionId; + public String getApiVersion() { + return this.apiVersion; } /** @@ -110,20 +109,6 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - /** * The ContainerGroupsClient object to access its operations. */ @@ -139,31 +124,31 @@ public ContainerGroupsClient getContainerGroups() { } /** - * The NGroupsClient object to access its operations. + * The OperationsClient object to access its operations. */ - private final NGroupsClient nGroups; + private final OperationsClient operations; /** - * Gets the NGroupsClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the NGroupsClient object. + * @return the OperationsClient object. */ - public NGroupsClient getNGroups() { - return this.nGroups; + public OperationsClient getOperations() { + return this.operations; } /** - * The CGProfilesClient object to access its operations. + * The LocationsClient object to access its operations. */ - private final CGProfilesClient cGProfiles; + private final LocationsClient locations; /** - * Gets the CGProfilesClient object to access its operations. + * Gets the LocationsClient object to access its operations. * - * @return the CGProfilesClient object. + * @return the LocationsClient object. */ - public CGProfilesClient getCGProfiles() { - return this.cGProfiles; + public LocationsClient getLocations() { + return this.locations; } /** @@ -180,34 +165,6 @@ public ContainersClient getContainers() { return this.containers; } - /** - * The CGProfilesOperationsClient object to access its operations. - */ - private final CGProfilesOperationsClient cGProfilesOperations; - - /** - * Gets the CGProfilesOperationsClient object to access its operations. - * - * @return the CGProfilesOperationsClient object. - */ - public CGProfilesOperationsClient getCGProfilesOperations() { - return this.cGProfilesOperations; - } - - /** - * The LocationsClient object to access its operations. - */ - private final LocationsClient locations; - - /** - * Gets the LocationsClient object to access its operations. - * - * @return the LocationsClient object. - */ - public LocationsClient getLocations() { - return this.locations; - } - /** * The SubnetServiceAssociationLinksClient object to access its operations. */ @@ -229,25 +186,23 @@ public SubnetServiceAssociationLinksClient getSubnetServiceAssociationLinks() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param endpoint Service host. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. + * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure subscription. The + * subscription ID forms part of the URI for every service call. + * @param endpoint server parameter. */ ContainerInstanceManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { super(httpPipeline, serializerAdapter, environment); this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2025-09-01"; - this.operations = new OperationsClientImpl(this); + this.endpoint = endpoint; + this.apiVersion = "2023-05-01"; this.containerGroups = new ContainerGroupsClientImpl(this); - this.nGroups = new NGroupsClientImpl(this); - this.cGProfiles = new CGProfilesClientImpl(this); - this.containers = new ContainersClientImpl(this); - this.cGProfilesOperations = new CGProfilesOperationsClientImpl(this); + this.operations = new OperationsClientImpl(this); this.locations = new LocationsClientImpl(this); + this.containers = new ContainersClientImpl(this); this.subnetServiceAssociationLinks = new SubnetServiceAssociationLinksClientImpl(this); } } diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainersClientImpl.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainersClientImpl.java index cc0dd8552e40..be7b1ed2a25c 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainersClientImpl.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.implementation; @@ -59,37 +59,38 @@ public final class ContainersClientImpl implements ContainersClient { * The interface defining all the services for ContainerInstanceManagementClientContainers to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerInstanceManagementClientContainers") + @Host("{$host}") + @ServiceInterface(name = "ContainerInstanceMan") public interface ContainersService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/logs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listLogs(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listLogs(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("containerGroupName") String containerGroupName, @PathParam("containerName") String containerName, @QueryParam("tail") Integer tail, @QueryParam("timestamps") Boolean timestamps, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/exec") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> executeCommand(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> executeCommand(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("containerGroupName") String containerGroupName, - @PathParam("containerName") String containerName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") ContainerExecRequest containerExecRequest, Context context); + @PathParam("containerName") String containerName, + @BodyParam("application/json") ContainerExecRequest containerExecRequest, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/attach") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> attach(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> attach(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("containerGroupName") String containerGroupName, @PathParam("containerName") String containerName, @HeaderParam("Accept") String accept, Context context); @@ -100,7 +101,7 @@ Mono> attach(@HostParam("endpoint") Strin * * Get the logs for a specified container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param tail The number of lines to show from the tail of the container instance log. If not provided, all @@ -110,9 +111,7 @@ Mono> attach(@HostParam("endpoint") 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 the logs for a specified container instance. - * - * Get the logs for a specified container instance in a specified resource group and container group along with + * @return the logs for a specified container instance in a specified resource group and container group along with * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -139,8 +138,8 @@ public Mono> listLogsWithResponseAsync(String resourceGroupN } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listLogs(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupName, containerName, tail, timestamps, + .withContext(context -> service.listLogs(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, containerGroupName, containerName, tail, timestamps, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -150,7 +149,7 @@ public Mono> listLogsWithResponseAsync(String resourceGroupN * * Get the logs for a specified container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param tail The number of lines to show from the tail of the container instance log. If not provided, all @@ -161,9 +160,7 @@ public Mono> listLogsWithResponseAsync(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 the logs for a specified container instance. - * - * Get the logs for a specified container instance in a specified resource group and container group along with + * @return the logs for a specified container instance in a specified resource group and container group along with * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -190,7 +187,7 @@ private Mono> listLogsWithResponseAsync(String resourceGroup } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listLogs(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + return service.listLogs(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), resourceGroupName, containerGroupName, containerName, tail, timestamps, accept, context); } @@ -199,16 +196,14 @@ private Mono> listLogsWithResponseAsync(String resourceGroup * * Get the logs for a specified container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the logs for a specified container instance. - * - * Get the logs for a specified container instance in a specified resource group and container group on successful - * completion of {@link Mono}. + * @return the logs for a specified container instance in a specified resource group and container group on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono listLogsAsync(String resourceGroupName, String containerGroupName, String containerName) { @@ -223,7 +218,7 @@ public Mono listLogsAsync(String resourceGroupName, String containerG * * Get the logs for a specified container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param tail The number of lines to show from the tail of the container instance log. If not provided, all @@ -234,9 +229,7 @@ public Mono listLogsAsync(String resourceGroupName, String containerG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the logs for a specified container instance. - * - * Get the logs for a specified container instance in a specified resource group and container group along with + * @return the logs for a specified container instance in a specified resource group and container group along with * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -251,15 +244,13 @@ public Response listLogsWithResponse(String resourceGroupName, String * * Get the logs for a specified container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the logs for a specified container instance. - * - * Get the logs for a specified container instance in a specified resource group and container group. + * @return the logs for a specified container instance in a specified resource group and container group. */ @ServiceMethod(returns = ReturnType.SINGLE) public LogsInner listLogs(String resourceGroupName, String containerGroupName, String containerName) { @@ -274,7 +265,7 @@ public LogsInner listLogs(String resourceGroupName, String containerGroupName, S * * Executes a command for a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param containerExecRequest The request for the exec command. @@ -312,12 +303,11 @@ public Mono> executeCommandWithResponseAsyn } else { containerExecRequest.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.executeCommand(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupName, containerName, contentType, - accept, containerExecRequest, context)) + .withContext(context -> service.executeCommand(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, containerGroupName, containerName, containerExecRequest, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -326,7 +316,7 @@ public Mono> executeCommandWithResponseAsyn * * Executes a command for a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param containerExecRequest The request for the exec command. @@ -365,12 +355,11 @@ private Mono> executeCommandWithResponseAsy } else { containerExecRequest.validate(); } - final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.executeCommand(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupName, containerName, contentType, accept, - containerExecRequest, context); + return service.executeCommand(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, containerGroupName, containerName, containerExecRequest, + accept, context); } /** @@ -378,7 +367,7 @@ private Mono> executeCommandWithResponseAsy * * Executes a command for a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param containerExecRequest The request for the exec command. @@ -399,7 +388,7 @@ public Mono executeCommandAsync(String resourceGroup * * Executes a command for a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param containerExecRequest The request for the exec command. @@ -421,7 +410,7 @@ public Response executeCommandWithResponse(String re * * Executes a command for a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param containerExecRequest The request for the exec command. @@ -442,7 +431,7 @@ public ContainerExecResponseInner executeCommand(String resourceGroupName, Strin * * Attach to the output stream of a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -475,8 +464,8 @@ public Mono> attachWithResponseAsync(Stri } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.attach(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerGroupName, containerName, accept, context)) + .withContext(context -> service.attach(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, containerGroupName, containerName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -485,7 +474,7 @@ public Mono> attachWithResponseAsync(Stri * * Attach to the output stream of a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param context The context to associate with this operation. @@ -519,7 +508,7 @@ private Mono> attachWithResponseAsync(Str } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.attach(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + return service.attach(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), resourceGroupName, containerGroupName, containerName, accept, context); } @@ -528,7 +517,7 @@ private Mono> attachWithResponseAsync(Str * * Attach to the output stream of a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -548,7 +537,7 @@ public Mono attachAsync(String resourceGroupName, * * Attach to the output stream of a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param context The context to associate with this operation. @@ -568,7 +557,7 @@ public Response attachWithResponse(String resource * * Attach to the output stream of a specific container instance in a specified resource group and container group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/LocationsClientImpl.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/LocationsClientImpl.java index e4c441161484..c482dae41cb9 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/LocationsClientImpl.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/LocationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.implementation; @@ -27,11 +27,11 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.containerinstance.fluent.LocationsClient; import com.azure.resourcemanager.containerinstance.fluent.models.UsageInner; -import com.azure.resourcemanager.containerinstance.implementation.models.CachedImagesListResult; -import com.azure.resourcemanager.containerinstance.implementation.models.CapabilitiesListResult; -import com.azure.resourcemanager.containerinstance.implementation.models.UsageListResult; import com.azure.resourcemanager.containerinstance.models.CachedImages; +import com.azure.resourcemanager.containerinstance.models.CachedImagesListResult; import com.azure.resourcemanager.containerinstance.models.Capabilities; +import com.azure.resourcemanager.containerinstance.models.CapabilitiesListResult; +import com.azure.resourcemanager.containerinstance.models.UsageListResult; import reactor.core.publisher.Mono; /** @@ -63,46 +63,39 @@ public final class LocationsClientImpl implements LocationsClient { * The interface defining all the services for ContainerInstanceManagementClientLocations to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerInstanceManagementClientLocations") + @Host("{$host}") + @ServiceInterface(name = "ContainerInstanceMan") public interface LocationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/usages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listUsage(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + Mono> listUsage(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/cachedImages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listCachedImages(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + Mono> listCachedImages(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/capabilities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listCapabilities(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listUsageNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + Mono> listCapabilities(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listCachedImagesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -110,14 +103,14 @@ Mono> listCachedImagesNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listCapabilitiesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Get the usage for a subscription. * - * @param location The location name. + * @param location The identifier for the physical azure 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. @@ -138,17 +131,17 @@ private Mono> listUsageSinglePageAsync(String location } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listUsage(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) + .withContext(context -> service.listUsage(this.client.getEndpoint(), this.client.getSubscriptionId(), + location, this.client.getApiVersion(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the usage for a subscription. * - * @param location The location name. + * @param location The identifier for the physical azure 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. @@ -171,16 +164,16 @@ private Mono> listUsageSinglePageAsync(String location final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listUsage(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, accept, context) + .listUsage(this.client.getEndpoint(), this.client.getSubscriptionId(), location, + this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + res.getValue().value(), null, null)); } /** * Get the usage for a subscription. * - * @param location The location name. + * @param location The identifier for the physical azure 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. @@ -188,14 +181,13 @@ private Mono> listUsageSinglePageAsync(String location */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listUsageAsync(String location) { - return new PagedFlux<>(() -> listUsageSinglePageAsync(location), - nextLink -> listUsageNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listUsageSinglePageAsync(location)); } /** * Get the usage for a subscription. * - * @param location The location name. + * @param location The identifier for the physical azure 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. @@ -204,14 +196,13 @@ public PagedFlux listUsageAsync(String location) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listUsageAsync(String location, Context context) { - return new PagedFlux<>(() -> listUsageSinglePageAsync(location, context), - nextLink -> listUsageNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listUsageSinglePageAsync(location, context)); } /** * Get the usage for a subscription. * - * @param location The location name. + * @param location The identifier for the physical azure 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. @@ -225,7 +216,7 @@ public PagedIterable listUsage(String location) { /** * Get the usage for a subscription. * - * @param location The location name. + * @param location The identifier for the physical azure 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. @@ -242,14 +233,12 @@ public PagedIterable listUsage(String location, Context context) { * * Get the list of cached images on specific OS type for a subscription in a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of cached images. - * - * Get the list of cached images on specific OS type for a subscription in a region along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return the list of cached images on specific OS type for a subscription in a region along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listCachedImagesSinglePageAsync(String location) { @@ -266,8 +255,8 @@ private Mono> listCachedImagesSinglePageAsync(String } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listCachedImages(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) + .withContext(context -> service.listCachedImages(this.client.getEndpoint(), this.client.getSubscriptionId(), + location, 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())); @@ -278,15 +267,13 @@ private Mono> listCachedImagesSinglePageAsync(String * * Get the list of cached images on specific OS type for a subscription in a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of cached images. - * - * Get the list of cached images on specific OS type for a subscription in a region along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return the list of cached images on specific OS type for a subscription in a region along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listCachedImagesSinglePageAsync(String location, Context context) { @@ -304,8 +291,8 @@ private Mono> listCachedImagesSinglePageAsync(String final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listCachedImages(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, accept, context) + .listCachedImages(this.client.getEndpoint(), this.client.getSubscriptionId(), location, + this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -315,13 +302,11 @@ private Mono> listCachedImagesSinglePageAsync(String * * Get the list of cached images on specific OS type for a subscription in a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of cached images. - * - * Get the list of cached images on specific OS type for a subscription in a region as paginated response with + * @return the list of cached images on specific OS type for a subscription in a region as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -335,14 +320,12 @@ public PagedFlux listCachedImagesAsync(String location) { * * Get the list of cached images on specific OS type for a subscription in a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of cached images. - * - * Get the list of cached images on specific OS type for a subscription in a region as paginated response with + * @return the list of cached images on specific OS type for a subscription in a region as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -356,13 +339,11 @@ private PagedFlux listCachedImagesAsync(String location, Context c * * Get the list of cached images on specific OS type for a subscription in a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of cached images. - * - * Get the list of cached images on specific OS type for a subscription in a region as paginated response with + * @return the list of cached images on specific OS type for a subscription in a region as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -375,14 +356,12 @@ public PagedIterable listCachedImages(String location) { * * Get the list of cached images on specific OS type for a subscription in a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of cached images. - * - * Get the list of cached images on specific OS type for a subscription in a region as paginated response with + * @return the list of cached images on specific OS type for a subscription in a region as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -395,14 +374,12 @@ public PagedIterable listCachedImages(String location, Context con * * Get the list of CPU/memory/GPU capabilities of a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of capabilities of the location. - * - * Get the list of CPU/memory/GPU capabilities of a region along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the list of CPU/memory/GPU capabilities of a region along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listCapabilitiesSinglePageAsync(String location) { @@ -419,8 +396,8 @@ private Mono> listCapabilitiesSinglePageAsync(String } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listCapabilities(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) + .withContext(context -> service.listCapabilities(this.client.getEndpoint(), this.client.getSubscriptionId(), + location, 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())); @@ -431,15 +408,13 @@ private Mono> listCapabilitiesSinglePageAsync(String * * Get the list of CPU/memory/GPU capabilities of a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of capabilities of the location. - * - * Get the list of CPU/memory/GPU capabilities of a region along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the list of CPU/memory/GPU capabilities of a region along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listCapabilitiesSinglePageAsync(String location, Context context) { @@ -457,8 +432,8 @@ private Mono> listCapabilitiesSinglePageAsync(String final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listCapabilities(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, accept, context) + .listCapabilities(this.client.getEndpoint(), this.client.getSubscriptionId(), location, + this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -468,13 +443,11 @@ private Mono> listCapabilitiesSinglePageAsync(String * * Get the list of CPU/memory/GPU capabilities of a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of capabilities of the location. - * - * Get the list of CPU/memory/GPU capabilities of a region as paginated response with {@link PagedFlux}. + * @return the list of CPU/memory/GPU capabilities of a region as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listCapabilitiesAsync(String location) { @@ -487,14 +460,12 @@ public PagedFlux listCapabilitiesAsync(String location) { * * Get the list of CPU/memory/GPU capabilities of a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of capabilities of the location. - * - * Get the list of CPU/memory/GPU capabilities of a region as paginated response with {@link PagedFlux}. + * @return the list of CPU/memory/GPU capabilities of a region as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listCapabilitiesAsync(String location, Context context) { @@ -507,13 +478,11 @@ private PagedFlux listCapabilitiesAsync(String location, Context c * * Get the list of CPU/memory/GPU capabilities of a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of capabilities of the location. - * - * Get the list of CPU/memory/GPU capabilities of a region as paginated response with {@link PagedIterable}. + * @return the list of CPU/memory/GPU capabilities of a region as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listCapabilities(String location) { @@ -525,14 +494,12 @@ public PagedIterable listCapabilities(String location) { * * Get the list of CPU/memory/GPU capabilities of a region. * - * @param location The location name. + * @param location The identifier for the physical azure 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 the list of capabilities of the location. - * - * Get the list of CPU/memory/GPU capabilities of a region as paginated response with {@link PagedIterable}. + * @return the list of CPU/memory/GPU capabilities of a region as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listCapabilities(String location, Context context) { @@ -546,64 +513,8 @@ public PagedIterable listCapabilities(String location, Context con * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the usage for a subscription along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listUsageNextSinglePageAsync(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.listUsageNext(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. - * @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 usage for a subscription along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listUsageNextSinglePageAsync(String nextLink, Context context) { - 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"; - context = this.client.mergeContext(context); - return service.listUsageNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the list of cached images. - * - * 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 list of cached images. - * - * Get the list of cached images on specific OS type for a subscription in a region along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return the response containing cached images along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listCachedImagesNextSinglePageAsync(String nextLink) { @@ -623,8 +534,6 @@ private Mono> listCachedImagesNextSinglePageAsync(St } /** - * Get the list of cached images. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -632,10 +541,8 @@ private Mono> listCachedImagesNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cached images. - * - * Get the list of cached images on specific OS type for a subscription in a region along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return the response containing cached images along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listCachedImagesNextSinglePageAsync(String nextLink, Context context) { @@ -654,18 +561,14 @@ private Mono> listCachedImagesNextSinglePageAsync(St } /** - * Get the list of capabilities of the location. - * * 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 list of capabilities of the location. - * - * Get the list of CPU/memory/GPU capabilities of a region along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response containing list of capabilities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listCapabilitiesNextSinglePageAsync(String nextLink) { @@ -685,8 +588,6 @@ private Mono> listCapabilitiesNextSinglePageAsync(St } /** - * Get the list of capabilities of the location. - * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -694,10 +595,8 @@ private Mono> listCapabilitiesNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of capabilities of the location. - * - * Get the list of CPU/memory/GPU capabilities of a region along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response containing list of capabilities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listCapabilitiesNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/NGroupsClientImpl.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/NGroupsClientImpl.java deleted file mode 100644 index 592f16a6d68e..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/NGroupsClientImpl.java +++ /dev/null @@ -1,1991 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.containerinstance.fluent.NGroupsClient; -import com.azure.resourcemanager.containerinstance.fluent.models.NGroupInner; -import com.azure.resourcemanager.containerinstance.implementation.models.NGroupsListResult; -import com.azure.resourcemanager.containerinstance.models.NGroupPatch; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; -import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; -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 NGroupsClient. - */ -public final class NGroupsClientImpl implements InnerSupportsGet, InnerSupportsListing, - InnerSupportsDelete, NGroupsClient { - /** - * The proxy service used to perform REST calls. - */ - private final NGroupsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerInstanceManagementClientImpl client; - - /** - * Initializes an instance of NGroupsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - NGroupsClientImpl(ContainerInstanceManagementClientImpl client) { - this.service = RestProxy.create(NGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerInstanceManagementClientNGroups to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerInstanceManagementClientNGroups") - public interface NGroupsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups/{ngroupsName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ngroupsName") String ngroupsName, - @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups/{ngroupsName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ngroupsName") String ngroupsName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") NGroupInner nGroup, Context context); - - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups/{ngroupsName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ngroupsName") String ngroupsName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") NGroupPatch nGroup, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups/{ngroupsName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ngroupsName") String ngroupsName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") 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}/providers/Microsoft.ContainerInstance/ngroups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups/{ngroupsName}/start") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ngroupsName") String ngroupsName, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups/{ngroupsName}/stop") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> stop(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ngroupsName") String ngroupsName, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ngroups/{ngroupsName}/restart") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restart(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("ngroupsName") String ngroupsName, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") 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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * NGroups GET REST API - * - * Get the properties of the specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String ngroupsName) { - 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 (ngroupsName == null) { - return Mono.error(new IllegalArgumentException("Parameter ngroupsName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ngroupsName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * NGroups GET REST API - * - * Get the properties of the specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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 describes the NGroups resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String ngroupsName, 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 (ngroupsName == null) { - return Mono.error(new IllegalArgumentException("Parameter ngroupsName 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, ngroupsName, accept, context); - } - - /** - * NGroups GET REST API - * - * Get the properties of the specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String ngroupsName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, ngroupsName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * NGroups GET REST API - * - * Get the properties of the specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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 describes the NGroups resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String ngroupsName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, ngroupsName, context).block(); - } - - /** - * NGroups GET REST API - * - * Get the properties of the specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NGroupInner getByResourceGroup(String resourceGroupName, String ngroupsName) { - return getByResourceGroupWithResponse(resourceGroupName, ngroupsName, Context.NONE).getValue(); - } - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String ngroupsName, NGroupInner nGroup) { - 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 (ngroupsName == null) { - return Mono.error(new IllegalArgumentException("Parameter ngroupsName is required and cannot be null.")); - } - if (nGroup == null) { - return Mono.error(new IllegalArgumentException("Parameter nGroup is required and cannot be null.")); - } else { - nGroup.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ngroupsName, contentType, accept, nGroup, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @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 describes the NGroups resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String ngroupsName, NGroupInner nGroup, 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 (ngroupsName == null) { - return Mono.error(new IllegalArgumentException("Parameter ngroupsName is required and cannot be null.")); - } - if (nGroup == null) { - return Mono.error(new IllegalArgumentException("Parameter nGroup is required and cannot be null.")); - } else { - nGroup.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ngroupsName, contentType, accept, nGroup, context); - } - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, NGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, - String ngroupsName, NGroupInner nGroup) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, ngroupsName, nGroup); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NGroupInner.class, NGroupInner.class, this.client.getContext()); - } - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, - String ngroupsName, NGroupInner nGroup, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, ngroupsName, nGroup, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NGroupInner.class, NGroupInner.class, context); - } - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NGroupInner> beginCreateOrUpdate(String resourceGroupName, - String ngroupsName, NGroupInner nGroup) { - return this.beginCreateOrUpdateAsync(resourceGroupName, ngroupsName, nGroup).getSyncPoller(); - } - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NGroupInner> beginCreateOrUpdate(String resourceGroupName, - String ngroupsName, NGroupInner nGroup, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, ngroupsName, nGroup, context).getSyncPoller(); - } - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String ngroupsName, NGroupInner nGroup) { - return beginCreateOrUpdateAsync(resourceGroupName, ngroupsName, nGroup).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @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 describes the NGroups resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String ngroupsName, NGroupInner nGroup, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, ngroupsName, nGroup, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NGroupInner createOrUpdate(String resourceGroupName, String ngroupsName, NGroupInner nGroup) { - return createOrUpdateAsync(resourceGroupName, ngroupsName, nGroup).block(); - } - - /** - * NGroup PUT REST API - * - * Create or update a NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NGroupInner createOrUpdate(String resourceGroupName, String ngroupsName, NGroupInner nGroup, - Context context) { - return createOrUpdateAsync(resourceGroupName, ngroupsName, nGroup, context).block(); - } - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String ngroupsName, - NGroupPatch nGroup) { - 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 (ngroupsName == null) { - return Mono.error(new IllegalArgumentException("Parameter ngroupsName is required and cannot be null.")); - } - if (nGroup == null) { - return Mono.error(new IllegalArgumentException("Parameter nGroup is required and cannot be null.")); - } else { - nGroup.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ngroupsName, contentType, accept, nGroup, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @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 describes the NGroups resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String ngroupsName, - NGroupPatch nGroup, 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 (ngroupsName == null) { - return Mono.error(new IllegalArgumentException("Parameter ngroupsName is required and cannot be null.")); - } - if (nGroup == null) { - return Mono.error(new IllegalArgumentException("Parameter nGroup is required and cannot be null.")); - } else { - nGroup.validate(); - } - final String contentType = "application/json"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, ngroupsName, contentType, accept, nGroup, context); - } - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, NGroupInner> beginUpdateAsync(String resourceGroupName, - String ngroupsName, NGroupPatch nGroup) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, ngroupsName, nGroup); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NGroupInner.class, NGroupInner.class, this.client.getContext()); - } - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NGroupInner> beginUpdateAsync(String resourceGroupName, - String ngroupsName, NGroupPatch nGroup, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, ngroupsName, nGroup, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NGroupInner.class, NGroupInner.class, context); - } - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NGroupInner> beginUpdate(String resourceGroupName, String ngroupsName, - NGroupPatch nGroup) { - return this.beginUpdateAsync(resourceGroupName, ngroupsName, nGroup).getSyncPoller(); - } - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NGroupInner> beginUpdate(String resourceGroupName, String ngroupsName, - NGroupPatch nGroup, Context context) { - return this.beginUpdateAsync(resourceGroupName, ngroupsName, nGroup, context).getSyncPoller(); - } - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String ngroupsName, NGroupPatch nGroup) { - return beginUpdateAsync(resourceGroupName, ngroupsName, nGroup).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @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 describes the NGroups resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String ngroupsName, NGroupPatch nGroup, - Context context) { - return beginUpdateAsync(resourceGroupName, ngroupsName, nGroup, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NGroupInner update(String resourceGroupName, String ngroupsName, NGroupPatch nGroup) { - return updateAsync(resourceGroupName, ngroupsName, nGroup).block(); - } - - /** - * NGroups PATCH REST API - * - * Update a specified NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @param nGroup The NGroup object. - * @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 describes the NGroups resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NGroupInner update(String resourceGroupName, String ngroupsName, NGroupPatch nGroup, Context context) { - return updateAsync(resourceGroupName, ngroupsName, nGroup, context).block(); - } - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 ngroupsName) { - 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 (ngroupsName == null) { - return Mono.error(new IllegalArgumentException("Parameter ngroupsName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ngroupsName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String ngroupsName, - 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 (ngroupsName == null) { - return Mono.error(new IllegalArgumentException("Parameter ngroupsName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, ngroupsName, context); - } - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 ngroupsName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, ngroupsName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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 ngroupsName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, ngroupsName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 ngroupsName) { - return this.beginDeleteAsync(resourceGroupName, ngroupsName).getSyncPoller(); - } - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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 ngroupsName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, ngroupsName, context).getSyncPoller(); - } - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 ngroupsName) { - return beginDeleteAsync(resourceGroupName, ngroupsName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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 ngroupsName, Context context) { - return beginDeleteAsync(resourceGroupName, ngroupsName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 ngroupsName) { - deleteAsync(resourceGroupName, ngroupsName).block(); - } - - /** - * NGroups Delete REST API - * - * Deletes the NGroups resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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 ngroupsName, Context context) { - deleteAsync(resourceGroupName, ngroupsName, context).block(); - } - - /** - * GET NGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under a 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 nGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under a resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - 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"; - return FluxUtil - .withContext(context -> 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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * GET NGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under a resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @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)); - } - - /** - * GET NGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under a 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 nGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * GET NGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * GET NGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under a 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 nGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * GET NGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * List NGroups in a subscription. - * - * Gets a list of all NGroups resources under 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. - * @return the response of a NGroups list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - 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"; - return FluxUtil - .withContext(context -> 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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List NGroups in a subscription. - * - * Gets a list of all NGroups resources under a 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 NGroups 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 NGroups in a subscription. - * - * Gets a list of all NGroups resources under 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. - * @return the response of a NGroups list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List NGroups in a subscription. - * - * Gets a list of all NGroups resources under a 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 NGroups list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List NGroups in a subscription. - * - * Gets a list of all NGroups resources under 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. - * @return the response of a NGroups list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * List NGroups in a subscription. - * - * Gets a list of all NGroups resources under a 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 NGroups list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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>> startWithResponseAsync(String resourceGroupName, String ngroupsName) { - 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 (ngroupsName == null) { - return Mono.error(new IllegalArgumentException("Parameter ngroupsName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ngroupsName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String resourceGroupName, String ngroupsName, - 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 (ngroupsName == null) { - return Mono.error(new IllegalArgumentException("Parameter ngroupsName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.start(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, ngroupsName, context); - } - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginStartAsync(String resourceGroupName, String ngroupsName) { - Mono>> mono = startWithResponseAsync(resourceGroupName, ngroupsName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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> beginStartAsync(String resourceGroupName, String ngroupsName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = startWithResponseAsync(resourceGroupName, ngroupsName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginStart(String resourceGroupName, String ngroupsName) { - return this.beginStartAsync(resourceGroupName, ngroupsName).getSyncPoller(); - } - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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> beginStart(String resourceGroupName, String ngroupsName, - Context context) { - return this.beginStartAsync(resourceGroupName, ngroupsName, context).getSyncPoller(); - } - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 startAsync(String resourceGroupName, String ngroupsName) { - return beginStartAsync(resourceGroupName, ngroupsName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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 startAsync(String resourceGroupName, String ngroupsName, Context context) { - return beginStartAsync(resourceGroupName, ngroupsName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 start(String resourceGroupName, String ngroupsName) { - startAsync(resourceGroupName, ngroupsName).block(); - } - - /** - * Starts all container groups in the specified NGroups resource. - * - * Starts all container groups in the specified NGroups resource. Compute resources will be allocated and billing - * will start. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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 start(String resourceGroupName, String ngroupsName, Context context) { - startAsync(resourceGroupName, ngroupsName, context).block(); - } - - /** - * Stops all container groups in the specified NGroups resource. - * - * Stops all container groups in the specified NGroups resource. Compute resources will be deallocated and billing - * will stop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> stopWithResponseAsync(String resourceGroupName, String ngroupsName) { - 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 (ngroupsName == null) { - return Mono.error(new IllegalArgumentException("Parameter ngroupsName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ngroupsName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Stops all container groups in the specified NGroups resource. - * - * Stops all container groups in the specified NGroups resource. Compute resources will be deallocated and billing - * will stop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> stopWithResponseAsync(String resourceGroupName, String ngroupsName, 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 (ngroupsName == null) { - return Mono.error(new IllegalArgumentException("Parameter ngroupsName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.stop(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, ngroupsName, context); - } - - /** - * Stops all container groups in the specified NGroups resource. - * - * Stops all container groups in the specified NGroups resource. Compute resources will be deallocated and billing - * will stop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 stopAsync(String resourceGroupName, String ngroupsName) { - return stopWithResponseAsync(resourceGroupName, ngroupsName).flatMap(ignored -> Mono.empty()); - } - - /** - * Stops all container groups in the specified NGroups resource. - * - * Stops all container groups in the specified NGroups resource. Compute resources will be deallocated and billing - * will stop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response stopWithResponse(String resourceGroupName, String ngroupsName, Context context) { - return stopWithResponseAsync(resourceGroupName, ngroupsName, context).block(); - } - - /** - * Stops all container groups in the specified NGroups resource. - * - * Stops all container groups in the specified NGroups resource. Compute resources will be deallocated and billing - * will stop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 stop(String resourceGroupName, String ngroupsName) { - stopWithResponse(resourceGroupName, ngroupsName, Context.NONE); - } - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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>> restartWithResponseAsync(String resourceGroupName, String ngroupsName) { - 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 (ngroupsName == null) { - return Mono.error(new IllegalArgumentException("Parameter ngroupsName is required and cannot be null.")); - } - return FluxUtil - .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ngroupsName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restartWithResponseAsync(String resourceGroupName, String ngroupsName, - 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 (ngroupsName == null) { - return Mono.error(new IllegalArgumentException("Parameter ngroupsName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.restart(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, ngroupsName, context); - } - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginRestartAsync(String resourceGroupName, String ngroupsName) { - Mono>> mono = restartWithResponseAsync(resourceGroupName, ngroupsName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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> beginRestartAsync(String resourceGroupName, String ngroupsName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = restartWithResponseAsync(resourceGroupName, ngroupsName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginRestart(String resourceGroupName, String ngroupsName) { - return this.beginRestartAsync(resourceGroupName, ngroupsName).getSyncPoller(); - } - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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> beginRestart(String resourceGroupName, String ngroupsName, - Context context) { - return this.beginRestartAsync(resourceGroupName, ngroupsName, context).getSyncPoller(); - } - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 restartAsync(String resourceGroupName, String ngroupsName) { - return beginRestartAsync(resourceGroupName, ngroupsName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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 restartAsync(String resourceGroupName, String ngroupsName, Context context) { - return beginRestartAsync(resourceGroupName, ngroupsName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 restart(String resourceGroupName, String ngroupsName) { - restartAsync(resourceGroupName, ngroupsName).block(); - } - - /** - * Restarts all container groups in the specified NGroups resource. - * - * Restarts all container groups in the specified NGroups resource in place. If container image has updates, new - * image will be downloaded. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ngroupsName The NGroups name. - * @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 restart(String resourceGroupName, String ngroupsName, Context context) { - restartAsync(resourceGroupName, ngroupsName, context).block(); - } - - /** - * GET NGroups under a resource group REST API. - * - * 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 nGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under a resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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 NGroups under a resource group REST API. - * - * 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 nGroups under a resource group REST API. - * - * Gets a list of all NGroups resources under a resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { - 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"; - 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)); - } - - /** - * List NGroups in a subscription. - * - * 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 NGroups list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(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.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())); - } - - /** - * List NGroups in a subscription. - * - * 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 the response of a NGroups list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - 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"; - 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)); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/OperationsClientImpl.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/OperationsClientImpl.java index f9b9ef47f92e..3c6617710b25 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/OperationsClientImpl.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.implementation; @@ -26,8 +26,8 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.containerinstance.fluent.OperationsClient; -import com.azure.resourcemanager.containerinstance.implementation.models.OperationListResult; import com.azure.resourcemanager.containerinstance.models.Operation; +import com.azure.resourcemanager.containerinstance.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -59,14 +59,14 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for ContainerInstanceManagementClientOperations to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerInstanceManagementClientOperations") + @Host("{$host}") + @ServiceInterface(name = "ContainerInstanceMan") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.ContainerInstance/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,16 +74,16 @@ Mono> list(@HostParam("endpoint") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List the operations for the provider. + * List the operations for Azure Container Instance service. * * @throws 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 Operation items along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the operation list response that contains all operations for Azure Container Instance service along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -101,14 +101,14 @@ private Mono> listSinglePageAsync() { } /** - * List the operations for the provider. + * List the operations for Azure Container Instance service. * * @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 paged collection of Operation items along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the operation list response that contains all operations for Azure Container Instance service along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -124,11 +124,12 @@ private Mono> listSinglePageAsync(Context context) { } /** - * List the operations for the provider. + * List the operations for Azure Container Instance service. * * @throws 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 Operation items as paginated response with {@link PagedFlux}. + * @return the operation list response that contains all operations for Azure Container Instance service as + * paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync() { @@ -136,13 +137,14 @@ public PagedFlux listAsync() { } /** - * List the operations for the provider. + * List the operations for Azure Container Instance service. * * @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 paged collection of Operation items as paginated response with {@link PagedFlux}. + * @return the operation list response that contains all operations for Azure Container Instance service as + * paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -151,11 +153,12 @@ private PagedFlux listAsync(Context context) { } /** - * List the operations for the provider. + * List the operations for Azure Container Instance service. * * @throws 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 Operation items as paginated response with {@link PagedIterable}. + * @return the operation list response that contains all operations for Azure Container Instance service as + * paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -163,13 +166,14 @@ public PagedIterable list() { } /** - * List the operations for the provider. + * List the operations for Azure Container Instance service. * * @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 paged collection of Operation items as paginated response with {@link PagedIterable}. + * @return the operation list response that contains all operations for Azure Container Instance service as + * paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -183,8 +187,8 @@ 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 paged collection of Operation items along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the operation list response that contains all operations for Azure Container Instance service along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -210,8 +214,8 @@ private Mono> listNextSinglePageAsync(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 paged collection of Operation items along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the operation list response that contains all operations for Azure Container Instance service along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/SubnetServiceAssociationLinksClientImpl.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/SubnetServiceAssociationLinksClientImpl.java index f26ec0149631..65e99ba896b4 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/SubnetServiceAssociationLinksClientImpl.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/SubnetServiceAssociationLinksClientImpl.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.implementation; 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; @@ -57,18 +58,18 @@ public final class SubnetServiceAssociationLinksClientImpl implements SubnetServ * The interface defining all the services for ContainerInstanceManagementClientSubnetServiceAssociationLinks to be * used by the proxy service to perform REST calls. */ - @Host("{endpoint}") - @ServiceInterface(name = "ContainerInstanceManagementClientSubnetServiceAssociationLinks") + @Host("{$host}") + @ServiceInterface(name = "ContainerInstanceMan") public interface SubnetServiceAssociationLinksService { - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/providers/Microsoft.ContainerInstance/serviceAssociationLinks/default") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("virtualNetworkName") String virtualNetworkName, @PathParam("subnetName") String subnetName, - Context context); + @HeaderParam("Accept") String accept, Context context); } /** @@ -77,7 +78,7 @@ Mono>> delete(@HostParam("endpoint") String endpoint, * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -107,9 +108,10 @@ public Mono>> deleteWithResponseAsync(String resourceG if (subnetName == null) { return Mono.error(new IllegalArgumentException("Parameter subnetName 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, virtualNetworkName, subnetName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, virtualNetworkName, subnetName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -119,7 +121,7 @@ public Mono>> deleteWithResponseAsync(String resourceG * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @param context The context to associate with this operation. @@ -150,9 +152,10 @@ private Mono>> deleteWithResponseAsync(String resource if (subnetName == null) { return Mono.error(new IllegalArgumentException("Parameter subnetName 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, virtualNetworkName, subnetName, context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), + resourceGroupName, virtualNetworkName, subnetName, accept, context); } /** @@ -161,7 +164,7 @@ private Mono>> deleteWithResponseAsync(String resource * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -184,7 +187,7 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @param context The context to associate with this operation. @@ -209,7 +212,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -229,7 +232,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @param context The context to associate with this operation. @@ -250,7 +253,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -270,7 +273,7 @@ public Mono deleteAsync(String resourceGroupName, String virtualNetworkNam * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @param context The context to associate with this operation. @@ -292,7 +295,7 @@ private Mono deleteAsync(String resourceGroupName, String virtualNetworkNa * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -310,7 +313,7 @@ public void delete(String resourceGroupName, String virtualNetworkName, String s * Delete container group virtual network association links. The operation does not delete other resources provided * by the user. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @param context The context to associate with this operation. diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/ContainerGroupProfileListResult.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/ContainerGroupProfileListResult.java deleted file mode 100644 index 8f3a7d51c088..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/ContainerGroupProfileListResult.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.implementation.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.containerinstance.fluent.models.ContainerGroupProfileInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a ContainerGroupProfile list operation. - */ -@Immutable -public final class ContainerGroupProfileListResult implements JsonSerializable { - /* - * The ContainerGroupProfile items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of ContainerGroupProfileListResult class. - */ - private ContainerGroupProfileListResult() { - } - - /** - * Get the value property: The ContainerGroupProfile items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ContainerGroupProfileListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerGroupProfileListResult.class); - - /** - * {@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 ContainerGroupProfileListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerGroupProfileListResult 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 ContainerGroupProfileListResult. - */ - public static ContainerGroupProfileListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerGroupProfileListResult deserializedContainerGroupProfileListResult - = new ContainerGroupProfileListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ContainerGroupProfileInner.fromJson(reader1)); - deserializedContainerGroupProfileListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedContainerGroupProfileListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerGroupProfileListResult; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/NGroupsListResult.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/NGroupsListResult.java deleted file mode 100644 index f18236dc3c79..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/NGroupsListResult.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.implementation.models; - -import com.azure.core.annotation.Immutable; -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 com.azure.resourcemanager.containerinstance.fluent.models.NGroupInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a NGroups list operation. - */ -@Immutable -public final class NGroupsListResult implements JsonSerializable { - /* - * The NGroup items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of NGroupsListResult class. - */ - private NGroupsListResult() { - } - - /** - * Get the value property: The NGroup items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @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) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model NGroupsListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NGroupsListResult.class); - - /** - * {@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 NGroupsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NGroupsListResult 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 NGroupsListResult. - */ - public static NGroupsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NGroupsListResult deserializedNGroupsListResult = new NGroupsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> NGroupInner.fromJson(reader1)); - deserializedNGroupsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedNGroupsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNGroupsListResult; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ApiEntityReference.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ApiEntityReference.java deleted file mode 100644 index 565b75a56286..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ApiEntityReference.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * The API entity reference. - */ -@Fluent -public final class ApiEntityReference implements JsonSerializable { - /* - * The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - */ - private String id; - - /** - * Creates an instance of ApiEntityReference class. - */ - public ApiEntityReference() { - } - - /** - * Get the id property: The ARM resource id in the form of - * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The ARM resource id in the form of - * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - * - * @param id the id value to set. - * @return the ApiEntityReference object itself. - */ - public ApiEntityReference withId(String id) { - this.id = id; - 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("id", this.id); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ApiEntityReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ApiEntityReference 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 ApiEntityReference. - */ - public static ApiEntityReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ApiEntityReference deserializedApiEntityReference = new ApiEntityReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedApiEntityReference.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedApiEntityReference; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ApplicationGateway.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ApplicationGateway.java deleted file mode 100644 index 185cd730d8fb..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ApplicationGateway.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * Application Gateway the CG profile will use to interact with CGs in a backend pool. - */ -@Fluent -public final class ApplicationGateway implements JsonSerializable { - /* - * The Application Gateway ARM resource Id. - */ - private String resource; - - /* - * List of Application Gateway Backend Address Pools. - */ - private List backendAddressPools; - - /** - * Creates an instance of ApplicationGateway class. - */ - public ApplicationGateway() { - } - - /** - * Get the resource property: The Application Gateway ARM resource Id. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource property: The Application Gateway ARM resource Id. - * - * @param resource the resource value to set. - * @return the ApplicationGateway object itself. - */ - public ApplicationGateway withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the backendAddressPools property: List of Application Gateway Backend Address Pools. - * - * @return the backendAddressPools value. - */ - public List backendAddressPools() { - return this.backendAddressPools; - } - - /** - * Set the backendAddressPools property: List of Application Gateway Backend Address Pools. - * - * @param backendAddressPools the backendAddressPools value to set. - * @return the ApplicationGateway object itself. - */ - public ApplicationGateway withBackendAddressPools(List backendAddressPools) { - this.backendAddressPools = backendAddressPools; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (backendAddressPools() != null) { - backendAddressPools().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resource", this.resource); - jsonWriter.writeArrayField("backendAddressPools", this.backendAddressPools, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ApplicationGateway from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ApplicationGateway 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 ApplicationGateway. - */ - public static ApplicationGateway fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ApplicationGateway deserializedApplicationGateway = new ApplicationGateway(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resource".equals(fieldName)) { - deserializedApplicationGateway.resource = reader.getString(); - } else if ("backendAddressPools".equals(fieldName)) { - List backendAddressPools - = reader.readArray(reader1 -> ApplicationGatewayBackendAddressPool.fromJson(reader1)); - deserializedApplicationGateway.backendAddressPools = backendAddressPools; - } else { - reader.skipChildren(); - } - } - - return deserializedApplicationGateway; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ApplicationGatewayBackendAddressPool.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ApplicationGatewayBackendAddressPool.java deleted file mode 100644 index 515e13b7aef9..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ApplicationGatewayBackendAddressPool.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * NGroups application gateway backend address pool. - */ -@Fluent -public final class ApplicationGatewayBackendAddressPool - implements JsonSerializable { - /* - * The application gateway backend address pool ARM resource Id. - */ - private String resource; - - /** - * Creates an instance of ApplicationGatewayBackendAddressPool class. - */ - public ApplicationGatewayBackendAddressPool() { - } - - /** - * Get the resource property: The application gateway backend address pool ARM resource Id. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource property: The application gateway backend address pool ARM resource Id. - * - * @param resource the resource value to set. - * @return the ApplicationGatewayBackendAddressPool object itself. - */ - public ApplicationGatewayBackendAddressPool withResource(String resource) { - this.resource = resource; - 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("resource", this.resource); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ApplicationGatewayBackendAddressPool from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ApplicationGatewayBackendAddressPool 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 ApplicationGatewayBackendAddressPool. - */ - public static ApplicationGatewayBackendAddressPool fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ApplicationGatewayBackendAddressPool deserializedApplicationGatewayBackendAddressPool - = new ApplicationGatewayBackendAddressPool(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resource".equals(fieldName)) { - deserializedApplicationGatewayBackendAddressPool.resource = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedApplicationGatewayBackendAddressPool; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileShareAccessTier.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileShareAccessTier.java deleted file mode 100644 index ac6fd8c27cf7..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileShareAccessTier.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.models; - -/** - * Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. - * FileStorage account can choose Premium. Learn more at: - * https://learn.microsoft.com/en-us/rest/api/storagerp/file-shares/create?tabs=HTTP#shareaccesstier. - */ -public enum AzureFileShareAccessTier { - /** - * Cool. - */ - COOL("Cool"), - - /** - * Hot. - */ - HOT("Hot"), - - /** - * Premium. - */ - PREMIUM("Premium"), - - /** - * TransactionOptimized. - */ - TRANSACTION_OPTIMIZED("TransactionOptimized"); - - /** - * The actual serialized value for a AzureFileShareAccessTier instance. - */ - private final String value; - - AzureFileShareAccessTier(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a AzureFileShareAccessTier instance. - * - * @param value the serialized value to parse. - * @return the parsed AzureFileShareAccessTier object, or null if unable to parse. - */ - public static AzureFileShareAccessTier fromString(String value) { - if (value == null) { - return null; - } - AzureFileShareAccessTier[] items = AzureFileShareAccessTier.values(); - for (AzureFileShareAccessTier item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileShareAccessType.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileShareAccessType.java deleted file mode 100644 index 919da665e27a..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileShareAccessType.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.models; - -/** - * Specifies how Container Groups can access the Azure file share i.e. all CG will share same Azure file share or going - * to have exclusive file share. - */ -public enum AzureFileShareAccessType { - /** - * Shared. - */ - SHARED("Shared"), - - /** - * Exclusive. - */ - EXCLUSIVE("Exclusive"); - - /** - * The actual serialized value for a AzureFileShareAccessType instance. - */ - private final String value; - - AzureFileShareAccessType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a AzureFileShareAccessType instance. - * - * @param value the serialized value to parse. - * @return the parsed AzureFileShareAccessType object, or null if unable to parse. - */ - public static AzureFileShareAccessType fromString(String value) { - if (value == null) { - return null; - } - AzureFileShareAccessType[] items = AzureFileShareAccessType.values(); - for (AzureFileShareAccessType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileVolume.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileVolume.java index a49561f4ba40..6874d5199eac 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileVolume.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileVolume.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -37,11 +37,6 @@ public final class AzureFileVolume implements JsonSerializable */ private String storageAccountKey; - /* - * The reference to the storage account access key used to access the Azure File share. - */ - private String storageAccountKeyReference; - /** * Creates an instance of AzureFileVolume class. */ @@ -128,28 +123,6 @@ public AzureFileVolume withStorageAccountKey(String storageAccountKey) { return this; } - /** - * Get the storageAccountKeyReference property: The reference to the storage account access key used to access the - * Azure File share. - * - * @return the storageAccountKeyReference value. - */ - public String storageAccountKeyReference() { - return this.storageAccountKeyReference; - } - - /** - * Set the storageAccountKeyReference property: The reference to the storage account access key used to access the - * Azure File share. - * - * @param storageAccountKeyReference the storageAccountKeyReference value to set. - * @return the AzureFileVolume object itself. - */ - public AzureFileVolume withStorageAccountKeyReference(String storageAccountKeyReference) { - this.storageAccountKeyReference = storageAccountKeyReference; - return this; - } - /** * Validates the instance. * @@ -179,7 +152,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("storageAccountName", this.storageAccountName); jsonWriter.writeBooleanField("readOnly", this.readOnly); jsonWriter.writeStringField("storageAccountKey", this.storageAccountKey); - jsonWriter.writeStringField("storageAccountKeyReference", this.storageAccountKeyReference); return jsonWriter.writeEndObject(); } @@ -207,8 +179,6 @@ public static AzureFileVolume fromJson(JsonReader jsonReader) throws IOException deserializedAzureFileVolume.readOnly = reader.getNullable(JsonReader::getBoolean); } else if ("storageAccountKey".equals(fieldName)) { deserializedAzureFileVolume.storageAccountKey = reader.getString(); - } else if ("storageAccountKeyReference".equals(fieldName)) { - deserializedAzureFileVolume.storageAccountKeyReference = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesCreateOrUpdateHeaders.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesCreateOrUpdateHeaders.java deleted file mode 100644 index 1aa4639b7654..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesCreateOrUpdateHeaders.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The CGProfilesCreateOrUpdateHeaders model. - */ -@Immutable -public final class CGProfilesCreateOrUpdateHeaders { - /* - * The x-ms-correlation-request-id property. - */ - private final String xMsCorrelationRequestId; - - private static final HttpHeaderName X_MS_CORRELATION_REQUEST_ID - = HttpHeaderName.fromString("x-ms-correlation-request-id"); - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of CGProfilesCreateOrUpdateHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public CGProfilesCreateOrUpdateHeaders(HttpHeaders rawHeaders) { - this.xMsCorrelationRequestId = rawHeaders.getValue(X_MS_CORRELATION_REQUEST_ID); - } - - /** - * Get the xMsCorrelationRequestId property: The x-ms-correlation-request-id property. - * - * @return the xMsCorrelationRequestId value. - */ - public String xMsCorrelationRequestId() { - return this.xMsCorrelationRequestId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesCreateOrUpdateResponse.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesCreateOrUpdateResponse.java deleted file mode 100644 index 411b70bf8738..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesCreateOrUpdateResponse.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.containerinstance.fluent.models.ContainerGroupProfileInner; - -/** - * Contains all response data for the createOrUpdate operation. - */ -public final class CGProfilesCreateOrUpdateResponse - extends ResponseBase { - /** - * Creates an instance of CGProfilesCreateOrUpdateResponse. - * - * @param request the request which resulted in this CGProfilesCreateOrUpdateResponse. - * @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 CGProfilesCreateOrUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - ContainerGroupProfileInner value, CGProfilesCreateOrUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public ContainerGroupProfileInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesUpdateHeaders.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesUpdateHeaders.java deleted file mode 100644 index 15fbfad39b19..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesUpdateHeaders.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The CGProfilesUpdateHeaders model. - */ -@Immutable -public final class CGProfilesUpdateHeaders { - /* - * The x-ms-correlation-request-id property. - */ - private final String xMsCorrelationRequestId; - - private static final HttpHeaderName X_MS_CORRELATION_REQUEST_ID - = HttpHeaderName.fromString("x-ms-correlation-request-id"); - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of CGProfilesUpdateHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public CGProfilesUpdateHeaders(HttpHeaders rawHeaders) { - this.xMsCorrelationRequestId = rawHeaders.getValue(X_MS_CORRELATION_REQUEST_ID); - } - - /** - * Get the xMsCorrelationRequestId property: The x-ms-correlation-request-id property. - * - * @return the xMsCorrelationRequestId value. - */ - public String xMsCorrelationRequestId() { - return this.xMsCorrelationRequestId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesUpdateResponse.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesUpdateResponse.java deleted file mode 100644 index 202bb36368f7..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesUpdateResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.containerinstance.fluent.models.ContainerGroupProfileInner; - -/** - * Contains all response data for the update operation. - */ -public final class CGProfilesUpdateResponse extends ResponseBase { - /** - * Creates an instance of CGProfilesUpdateResponse. - * - * @param request the request which resulted in this CGProfilesUpdateResponse. - * @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 CGProfilesUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - ContainerGroupProfileInner value, CGProfilesUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public ContainerGroupProfileInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CachedImages.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CachedImages.java index 3278d09bb233..144d98131c18 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CachedImages.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CachedImages.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -15,7 +15,7 @@ /** * The cached image and OS type. */ -@Immutable +@Fluent public final class CachedImages implements JsonSerializable { /* * The OS type of the cached image. @@ -30,7 +30,7 @@ public final class CachedImages implements JsonSerializable { /** * Creates an instance of CachedImages class. */ - private CachedImages() { + public CachedImages() { } /** @@ -42,6 +42,17 @@ public String osType() { return this.osType; } + /** + * Set the osType property: The OS type of the cached image. + * + * @param osType the osType value to set. + * @return the CachedImages object itself. + */ + public CachedImages withOsType(String osType) { + this.osType = osType; + return this; + } + /** * Get the image property: The cached image name. * @@ -51,6 +62,17 @@ public String image() { return this.image; } + /** + * Set the image property: The cached image name. + * + * @param image the image value to set. + * @return the CachedImages object itself. + */ + public CachedImages withImage(String image) { + this.image = image; + return this; + } + /** * Validates the instance. * diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/CachedImagesListResult.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CachedImagesListResult.java similarity index 72% rename from sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/CachedImagesListResult.java rename to sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CachedImagesListResult.java index 2248b4abc092..3025d0b7971b 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/CachedImagesListResult.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CachedImagesListResult.java @@ -1,41 +1,40 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.containerinstance.implementation.models; +package com.azure.resourcemanager.containerinstance.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.containerinstance.models.CachedImages; import java.io.IOException; import java.util.List; /** * The response containing cached images. */ -@Immutable +@Fluent public final class CachedImagesListResult implements JsonSerializable { /* - * The cached images. + * The list of cached images. */ private List value; /* - * The URL to get the next set of results. + * The URI to fetch the next page of cached images. */ private String nextLink; /** * Creates an instance of CachedImagesListResult class. */ - private CachedImagesListResult() { + public CachedImagesListResult() { } /** - * Get the value property: The cached images. + * Get the value property: The list of cached images. * * @return the value value. */ @@ -44,7 +43,18 @@ public List value() { } /** - * Get the nextLink property: The URL to get the next set of results. + * Set the value property: The list of cached images. + * + * @param value the value value to set. + * @return the CachedImagesListResult object itself. + */ + public CachedImagesListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URI to fetch the next page of cached images. * * @return the nextLink value. */ @@ -52,6 +62,17 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The URI to fetch the next page of cached images. + * + * @param nextLink the nextLink value to set. + * @return the CachedImagesListResult object itself. + */ + public CachedImagesListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Validates the instance. * diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Capabilities.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Capabilities.java index 645d67c7fc32..9faf9f665675 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Capabilities.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Capabilities.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -49,7 +49,7 @@ public final class Capabilities implements JsonSerializable { /** * Creates an instance of Capabilities class. */ - private Capabilities() { + public Capabilities() { } /** diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CapabilitiesCapabilities.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CapabilitiesCapabilities.java index 2f89e3bfce12..829630e51e69 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CapabilitiesCapabilities.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/CapabilitiesCapabilities.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -34,7 +34,7 @@ public final class CapabilitiesCapabilities implements JsonSerializable { /* * The list of capabilities. @@ -24,14 +23,14 @@ public final class CapabilitiesListResult implements JsonSerializable value; /* - * The URL to get the next set of results. + * The URI to fetch the next page of capabilities. */ private String nextLink; /** * Creates an instance of CapabilitiesListResult class. */ - private CapabilitiesListResult() { + public CapabilitiesListResult() { } /** @@ -44,7 +43,18 @@ public List value() { } /** - * Get the nextLink property: The URL to get the next set of results. + * Set the value property: The list of capabilities. + * + * @param value the value value to set. + * @return the CapabilitiesListResult object itself. + */ + public CapabilitiesListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URI to fetch the next page of capabilities. * * @return the nextLink value. */ @@ -52,6 +62,17 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The URI to fetch the next page of capabilities. + * + * @param nextLink the nextLink value to set. + * @return the CapabilitiesListResult object itself. + */ + public CapabilitiesListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Validates the instance. * diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ConfidentialComputeProperties.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ConfidentialComputeProperties.java index 2c37e2cc6ff7..0aeaf97cf4e1 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ConfidentialComputeProperties.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ConfidentialComputeProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ConfigMap.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ConfigMap.java deleted file mode 100644 index 3be9dcb905b1..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ConfigMap.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * The container config map. - */ -@Fluent -public final class ConfigMap implements JsonSerializable { - /* - * The key value pairs dictionary in the config map. - */ - private Map keyValuePairs; - - /** - * Creates an instance of ConfigMap class. - */ - public ConfigMap() { - } - - /** - * Get the keyValuePairs property: The key value pairs dictionary in the config map. - * - * @return the keyValuePairs value. - */ - public Map keyValuePairs() { - return this.keyValuePairs; - } - - /** - * Set the keyValuePairs property: The key value pairs dictionary in the config map. - * - * @param keyValuePairs the keyValuePairs value to set. - * @return the ConfigMap object itself. - */ - public ConfigMap withKeyValuePairs(Map keyValuePairs) { - this.keyValuePairs = keyValuePairs; - 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.writeMapField("keyValuePairs", this.keyValuePairs, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfigMap from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfigMap 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 ConfigMap. - */ - public static ConfigMap fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfigMap deserializedConfigMap = new ConfigMap(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("keyValuePairs".equals(fieldName)) { - Map keyValuePairs = reader.readMap(reader1 -> reader1.getString()); - deserializedConfigMap.keyValuePairs = keyValuePairs; - } else { - reader.skipChildren(); - } - } - - return deserializedConfigMap; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Container.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Container.java index 51617548e872..7c2c869c4f75 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Container.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Container.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -280,29 +280,6 @@ public Container withSecurityContext(SecurityContextDefinition securityContext) return this; } - /** - * Get the configMap property: The config map. - * - * @return the configMap value. - */ - public ConfigMap configMap() { - return this.innerProperties() == null ? null : this.innerProperties().configMap(); - } - - /** - * Set the configMap property: The config map. - * - * @param configMap the configMap value to set. - * @return the Container object itself. - */ - public Container withConfigMap(ConfigMap configMap) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerProperties(); - } - this.innerProperties().withConfigMap(configMap); - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExec.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExec.java index dd83228d8cac..6efd3302171a 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExec.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExec.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecRequest.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecRequest.java index 278c6b3af12c..28d0695424a5 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecRequest.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecRequestTerminalSize.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecRequestTerminalSize.java index 4bfb78081c91..96d5c5391129 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecRequestTerminalSize.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecRequestTerminalSize.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupDiagnostics.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupDiagnostics.java index b9efea3dcc74..23be2b290605 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupDiagnostics.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupDiagnostics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIdentity.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIdentity.java index 7575f83f0c69..d4bc404a9ba1 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIdentity.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIdentityUserAssignedIdentities.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIdentityUserAssignedIdentities.java index df5881212df1..6ad9a5eb0a33 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIdentityUserAssignedIdentities.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIdentityUserAssignedIdentities.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIpAddressType.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIpAddressType.java index 0d0285c92e00..c2405d34d9fd 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIpAddressType.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIpAddressType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -12,12 +12,12 @@ */ public final class ContainerGroupIpAddressType extends ExpandableStringEnum { /** - * Public. + * Static value Public for ContainerGroupIpAddressType. */ public static final ContainerGroupIpAddressType PUBLIC = fromString("Public"); /** - * Private. + * Static value Private for ContainerGroupIpAddressType. */ public static final ContainerGroupIpAddressType PRIVATE = fromString("Private"); diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/ContainerGroupListResult.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupListResult.java similarity index 70% rename from sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/ContainerGroupListResult.java rename to sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupListResult.java index 6e009d4edcaa..ad07063d2f61 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/ContainerGroupListResult.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupListResult.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.containerinstance.implementation.models; +package com.azure.resourcemanager.containerinstance.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,28 +14,28 @@ import java.util.List; /** - * The response of a container group list operation. + * The container group list response that contains the container group properties. */ -@Immutable +@Fluent public final class ContainerGroupListResult implements JsonSerializable { /* - * The ListResultContainerGroup items on this page + * The list of container groups. */ private List value; /* - * The link to the next page of items + * The URI to fetch the next page of container groups. */ private String nextLink; /** * Creates an instance of ContainerGroupListResult class. */ - private ContainerGroupListResult() { + public ContainerGroupListResult() { } /** - * Get the value property: The ListResultContainerGroup items on this page. + * Get the value property: The list of container groups. * * @return the value value. */ @@ -45,7 +44,18 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: The list of container groups. + * + * @param value the value value to set. + * @return the ContainerGroupListResult object itself. + */ + public ContainerGroupListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URI to fetch the next page of container groups. * * @return the nextLink value. */ @@ -53,22 +63,28 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The URI to fetch the next page of container groups. + * + * @param nextLink the nextLink value to set. + * @return the ContainerGroupListResult object itself. + */ + public ContainerGroupListResult 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model ContainerGroupListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(ContainerGroupListResult.class); - /** * {@inheritDoc} */ @@ -86,7 +102,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ContainerGroupListResult 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 ContainerGroupListResult. */ public static ContainerGroupListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupNetworkProtocol.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupNetworkProtocol.java index 9bc15cd6b2be..f39f3cfaf228 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupNetworkProtocol.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupNetworkProtocol.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -12,12 +12,12 @@ */ public final class ContainerGroupNetworkProtocol extends ExpandableStringEnum { /** - * TCP. + * Static value TCP for ContainerGroupNetworkProtocol. */ public static final ContainerGroupNetworkProtocol TCP = fromString("TCP"); /** - * UDP. + * Static value UDP for ContainerGroupNetworkProtocol. */ public static final ContainerGroupNetworkProtocol UDP = fromString("UDP"); diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupPriority.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupPriority.java index fe25ed718b0c..20cc60afa675 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupPriority.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupPriority.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -12,12 +12,12 @@ */ public final class ContainerGroupPriority extends ExpandableStringEnum { /** - * Regular. + * Static value Regular for ContainerGroupPriority. */ public static final ContainerGroupPriority REGULAR = fromString("Regular"); /** - * Spot. + * Static value Spot for ContainerGroupPriority. */ public static final ContainerGroupPriority SPOT = fromString("Spot"); diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupProfilePatch.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupProfilePatch.java deleted file mode 100644 index 4f0395034d63..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupProfilePatch.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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 of container group profile that need to be patched. - */ -@Fluent -public final class ContainerGroupProfilePatch implements JsonSerializable { - /* - * Resource tags. - */ - private Map tags; - - /** - * Creates an instance of ContainerGroupProfilePatch class. - */ - public ContainerGroupProfilePatch() { - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the ContainerGroupProfilePatch object itself. - */ - public ContainerGroupProfilePatch withTags(Map tags) { - this.tags = tags; - 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.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerGroupProfilePatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerGroupProfilePatch 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 ContainerGroupProfilePatch. - */ - public static ContainerGroupProfilePatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerGroupProfilePatch deserializedContainerGroupProfilePatch = new ContainerGroupProfilePatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedContainerGroupProfilePatch.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedContainerGroupProfilePatch; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupProfileReferenceDefinition.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupProfileReferenceDefinition.java deleted file mode 100644 index 48f342d44238..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupProfileReferenceDefinition.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * The container group profile reference. - */ -@Fluent -public final class ContainerGroupProfileReferenceDefinition - implements JsonSerializable { - /* - * The container group profile reference id.This will be an ARM resource id in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/ - * containerGroupProfiles/{containerGroupProfileName}'. - */ - private String id; - - /* - * The container group profile reference revision. - */ - private Integer revision; - - /** - * Creates an instance of ContainerGroupProfileReferenceDefinition class. - */ - public ContainerGroupProfileReferenceDefinition() { - } - - /** - * Get the id property: The container group profile reference id.This will be an ARM resource id in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}'. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The container group profile reference id.This will be an ARM resource id in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}'. - * - * @param id the id value to set. - * @return the ContainerGroupProfileReferenceDefinition object itself. - */ - public ContainerGroupProfileReferenceDefinition withId(String id) { - this.id = id; - return this; - } - - /** - * Get the revision property: The container group profile reference revision. - * - * @return the revision value. - */ - public Integer revision() { - return this.revision; - } - - /** - * Set the revision property: The container group profile reference revision. - * - * @param revision the revision value to set. - * @return the ContainerGroupProfileReferenceDefinition object itself. - */ - public ContainerGroupProfileReferenceDefinition withRevision(Integer revision) { - this.revision = revision; - 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("id", this.id); - jsonWriter.writeNumberField("revision", this.revision); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerGroupProfileReferenceDefinition from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerGroupProfileReferenceDefinition 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 ContainerGroupProfileReferenceDefinition. - */ - public static ContainerGroupProfileReferenceDefinition fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerGroupProfileReferenceDefinition deserializedContainerGroupProfileReferenceDefinition - = new ContainerGroupProfileReferenceDefinition(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedContainerGroupProfileReferenceDefinition.id = reader.getString(); - } else if ("revision".equals(fieldName)) { - deserializedContainerGroupProfileReferenceDefinition.revision - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerGroupProfileReferenceDefinition; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupProfileStub.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupProfileStub.java deleted file mode 100644 index bdce2abb09f4..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupProfileStub.java +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * The object that contains a reference to a Container Group Profile and it's other related properties. - */ -@Fluent -public final class ContainerGroupProfileStub implements JsonSerializable { - /* - * A reference to the container group profile ARM resource hosted in ACI RP. - */ - private ApiEntityReference resource; - - /* - * The revision of the CG profile is an optional property. If customer does not to provide a revision then NGroups - * will pickup the latest revision of CGProfile. - */ - private Integer revision; - - /* - * A network profile for network settings of a ContainerGroupProfile. - */ - private NetworkProfile networkProfile; - - /* - * Storage profile for storage related settings of a container group profile. - */ - private StorageProfile storageProfile; - - /* - * Container Group properties which can be set while creating or updating the NGroups. - */ - private NGroupContainerGroupProperties containerGroupProperties; - - /** - * Creates an instance of ContainerGroupProfileStub class. - */ - public ContainerGroupProfileStub() { - } - - /** - * Get the resource property: A reference to the container group profile ARM resource hosted in ACI RP. - * - * @return the resource value. - */ - public ApiEntityReference resource() { - return this.resource; - } - - /** - * Set the resource property: A reference to the container group profile ARM resource hosted in ACI RP. - * - * @param resource the resource value to set. - * @return the ContainerGroupProfileStub object itself. - */ - public ContainerGroupProfileStub withResource(ApiEntityReference resource) { - this.resource = resource; - return this; - } - - /** - * Get the revision property: The revision of the CG profile is an optional property. If customer does not to - * provide a revision then NGroups will pickup the latest revision of CGProfile. - * - * @return the revision value. - */ - public Integer revision() { - return this.revision; - } - - /** - * Set the revision property: The revision of the CG profile is an optional property. If customer does not to - * provide a revision then NGroups will pickup the latest revision of CGProfile. - * - * @param revision the revision value to set. - * @return the ContainerGroupProfileStub object itself. - */ - public ContainerGroupProfileStub withRevision(Integer revision) { - this.revision = revision; - return this; - } - - /** - * Get the networkProfile property: A network profile for network settings of a ContainerGroupProfile. - * - * @return the networkProfile value. - */ - public NetworkProfile networkProfile() { - return this.networkProfile; - } - - /** - * Set the networkProfile property: A network profile for network settings of a ContainerGroupProfile. - * - * @param networkProfile the networkProfile value to set. - * @return the ContainerGroupProfileStub object itself. - */ - public ContainerGroupProfileStub withNetworkProfile(NetworkProfile networkProfile) { - this.networkProfile = networkProfile; - return this; - } - - /** - * Get the storageProfile property: Storage profile for storage related settings of a container group profile. - * - * @return the storageProfile value. - */ - public StorageProfile storageProfile() { - return this.storageProfile; - } - - /** - * Set the storageProfile property: Storage profile for storage related settings of a container group profile. - * - * @param storageProfile the storageProfile value to set. - * @return the ContainerGroupProfileStub object itself. - */ - public ContainerGroupProfileStub withStorageProfile(StorageProfile storageProfile) { - this.storageProfile = storageProfile; - return this; - } - - /** - * Get the containerGroupProperties property: Container Group properties which can be set while creating or updating - * the NGroups. - * - * @return the containerGroupProperties value. - */ - public NGroupContainerGroupProperties containerGroupProperties() { - return this.containerGroupProperties; - } - - /** - * Set the containerGroupProperties property: Container Group properties which can be set while creating or updating - * the NGroups. - * - * @param containerGroupProperties the containerGroupProperties value to set. - * @return the ContainerGroupProfileStub object itself. - */ - public ContainerGroupProfileStub - withContainerGroupProperties(NGroupContainerGroupProperties containerGroupProperties) { - this.containerGroupProperties = containerGroupProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (resource() != null) { - resource().validate(); - } - if (networkProfile() != null) { - networkProfile().validate(); - } - if (storageProfile() != null) { - storageProfile().validate(); - } - if (containerGroupProperties() != null) { - containerGroupProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resource", this.resource); - jsonWriter.writeNumberField("revision", this.revision); - jsonWriter.writeJsonField("networkProfile", this.networkProfile); - jsonWriter.writeJsonField("storageProfile", this.storageProfile); - jsonWriter.writeJsonField("containerGroupProperties", this.containerGroupProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerGroupProfileStub from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerGroupProfileStub 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 ContainerGroupProfileStub. - */ - public static ContainerGroupProfileStub fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerGroupProfileStub deserializedContainerGroupProfileStub = new ContainerGroupProfileStub(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resource".equals(fieldName)) { - deserializedContainerGroupProfileStub.resource = ApiEntityReference.fromJson(reader); - } else if ("revision".equals(fieldName)) { - deserializedContainerGroupProfileStub.revision = reader.getNullable(JsonReader::getInt); - } else if ("networkProfile".equals(fieldName)) { - deserializedContainerGroupProfileStub.networkProfile = NetworkProfile.fromJson(reader); - } else if ("storageProfile".equals(fieldName)) { - deserializedContainerGroupProfileStub.storageProfile = StorageProfile.fromJson(reader); - } else if ("containerGroupProperties".equals(fieldName)) { - deserializedContainerGroupProfileStub.containerGroupProperties - = NGroupContainerGroupProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerGroupProfileStub; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupPropertiesInstanceView.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupPropertiesInstanceView.java index 426e12eca332..7e07355a3aee 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupPropertiesInstanceView.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupPropertiesInstanceView.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -31,7 +31,7 @@ public final class ContainerGroupPropertiesInstanceView /** * Creates an instance of ContainerGroupPropertiesInstanceView class. */ - private ContainerGroupPropertiesInstanceView() { + public ContainerGroupPropertiesInstanceView() { } /** diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupRestartPolicy.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupRestartPolicy.java index 16cded33ae00..19eac7f594ce 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupRestartPolicy.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupRestartPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -15,17 +15,17 @@ */ public final class ContainerGroupRestartPolicy extends ExpandableStringEnum { /** - * Always. + * Static value Always for ContainerGroupRestartPolicy. */ public static final ContainerGroupRestartPolicy ALWAYS = fromString("Always"); /** - * OnFailure. + * Static value OnFailure for ContainerGroupRestartPolicy. */ public static final ContainerGroupRestartPolicy ON_FAILURE = fromString("OnFailure"); /** - * Never. + * Static value Never for ContainerGroupRestartPolicy. */ public static final ContainerGroupRestartPolicy NEVER = fromString("Never"); diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupSku.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupSku.java index 3dbe0b1bfeba..a8a6d40615b9 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupSku.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupSku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -12,22 +12,17 @@ */ public final class ContainerGroupSku extends ExpandableStringEnum { /** - * NotSpecified. - */ - public static final ContainerGroupSku NOT_SPECIFIED = fromString("NotSpecified"); - - /** - * Standard. + * Static value Standard for ContainerGroupSku. */ public static final ContainerGroupSku STANDARD = fromString("Standard"); /** - * Dedicated. + * Static value Dedicated for ContainerGroupSku. */ public static final ContainerGroupSku DEDICATED = fromString("Dedicated"); /** - * Confidential. + * Static value Confidential for ContainerGroupSku. */ public static final ContainerGroupSku CONFIDENTIAL = fromString("Confidential"); diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupSubnetId.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupSubnetId.java index 0ad07bfd4bf0..f9e137bf2545 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupSubnetId.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupSubnetId.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerHttpGet.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerHttpGet.java index 157a5a63dd68..3f0ea0947c92 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerHttpGet.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerHttpGet.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerInstanceOperationsOrigin.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerInstanceOperationsOrigin.java index 2eb84a2a9c40..60e1ff53549a 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerInstanceOperationsOrigin.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerInstanceOperationsOrigin.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -12,12 +12,12 @@ */ public final class ContainerInstanceOperationsOrigin extends ExpandableStringEnum { /** - * User. + * Static value User for ContainerInstanceOperationsOrigin. */ public static final ContainerInstanceOperationsOrigin USER = fromString("User"); /** - * System. + * Static value System for ContainerInstanceOperationsOrigin. */ public static final ContainerInstanceOperationsOrigin SYSTEM = fromString("System"); diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerNetworkProtocol.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerNetworkProtocol.java index b4166c028013..1713db435ab9 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerNetworkProtocol.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerNetworkProtocol.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -12,12 +12,12 @@ */ public final class ContainerNetworkProtocol extends ExpandableStringEnum { /** - * TCP. + * Static value TCP for ContainerNetworkProtocol. */ public static final ContainerNetworkProtocol TCP = fromString("TCP"); /** - * UDP. + * Static value UDP for ContainerNetworkProtocol. */ public static final ContainerNetworkProtocol UDP = fromString("UDP"); diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerPort.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerPort.java index 5fc2068ea91b..1a7eea63c12d 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerPort.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerPort.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerProbe.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerProbe.java index dc8434b232a2..34b5df061cd2 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerProbe.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerProbe.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerPropertiesInstanceView.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerPropertiesInstanceView.java index 6847fc377e4e..1b8c940ceb01 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerPropertiesInstanceView.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerPropertiesInstanceView.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -40,7 +40,7 @@ public final class ContainerPropertiesInstanceView implements JsonSerializable { /** * Creates an instance of ContainerState class. */ - private ContainerState() { + public ContainerState() { } /** diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/DeploymentExtensionSpec.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/DeploymentExtensionSpec.java index d61612446775..13aeed29f536 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/DeploymentExtensionSpec.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/DeploymentExtensionSpec.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/DnsConfiguration.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/DnsConfiguration.java index 5d2ea7db6e62..97f95734cbe1 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/DnsConfiguration.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/DnsConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/DnsNameLabelReusePolicy.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/DnsNameLabelReusePolicy.java index 69f98e14645b..5ce365a7e6f0 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/DnsNameLabelReusePolicy.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/DnsNameLabelReusePolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -17,27 +17,27 @@ */ public final class DnsNameLabelReusePolicy extends ExpandableStringEnum { /** - * Unsecure. + * Static value Unsecure for DnsNameLabelReusePolicy. */ public static final DnsNameLabelReusePolicy UNSECURE = fromString("Unsecure"); /** - * TenantReuse. + * Static value TenantReuse for DnsNameLabelReusePolicy. */ public static final DnsNameLabelReusePolicy TENANT_REUSE = fromString("TenantReuse"); /** - * SubscriptionReuse. + * Static value SubscriptionReuse for DnsNameLabelReusePolicy. */ public static final DnsNameLabelReusePolicy SUBSCRIPTION_REUSE = fromString("SubscriptionReuse"); /** - * ResourceGroupReuse. + * Static value ResourceGroupReuse for DnsNameLabelReusePolicy. */ public static final DnsNameLabelReusePolicy RESOURCE_GROUP_REUSE = fromString("ResourceGroupReuse"); /** - * Noreuse. + * Static value Noreuse for DnsNameLabelReusePolicy. */ public static final DnsNameLabelReusePolicy NOREUSE = fromString("Noreuse"); diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ElasticProfile.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ElasticProfile.java deleted file mode 100644 index a8b00c3029f1..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ElasticProfile.java +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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 elastic profile of the NGroup. - */ -@Fluent -public final class ElasticProfile implements JsonSerializable { - /* - * The desiredCount property. - */ - private Integer desiredCount; - - /* - * Flag that indicates whether desiredCount should be maintained when customer deletes SPECIFIC container groups - * (CGs) from the NGroups. In this case, new CGs will be created by NGroup to compensate for the specific deleted - * ones. - */ - private Boolean maintainDesiredCount; - - /* - * Container Groups are named on a generic guid based naming scheme/policy. Customer can modify naming policy to add - * prefix to CG names during scale out operation. - */ - private ElasticProfileContainerGroupNamingPolicy containerGroupNamingPolicy; - - /** - * Creates an instance of ElasticProfile class. - */ - public ElasticProfile() { - } - - /** - * Get the desiredCount property: The desiredCount property. - * - * @return the desiredCount value. - */ - public Integer desiredCount() { - return this.desiredCount; - } - - /** - * Set the desiredCount property: The desiredCount property. - * - * @param desiredCount the desiredCount value to set. - * @return the ElasticProfile object itself. - */ - public ElasticProfile withDesiredCount(Integer desiredCount) { - this.desiredCount = desiredCount; - return this; - } - - /** - * Get the maintainDesiredCount property: Flag that indicates whether desiredCount should be maintained when - * customer deletes SPECIFIC container groups (CGs) from the NGroups. In this case, new CGs will be created by - * NGroup to compensate for the specific deleted ones. - * - * @return the maintainDesiredCount value. - */ - public Boolean maintainDesiredCount() { - return this.maintainDesiredCount; - } - - /** - * Set the maintainDesiredCount property: Flag that indicates whether desiredCount should be maintained when - * customer deletes SPECIFIC container groups (CGs) from the NGroups. In this case, new CGs will be created by - * NGroup to compensate for the specific deleted ones. - * - * @param maintainDesiredCount the maintainDesiredCount value to set. - * @return the ElasticProfile object itself. - */ - public ElasticProfile withMaintainDesiredCount(Boolean maintainDesiredCount) { - this.maintainDesiredCount = maintainDesiredCount; - return this; - } - - /** - * Get the containerGroupNamingPolicy property: Container Groups are named on a generic guid based naming - * scheme/policy. Customer can modify naming policy to add prefix to CG names during scale out operation. - * - * @return the containerGroupNamingPolicy value. - */ - public ElasticProfileContainerGroupNamingPolicy containerGroupNamingPolicy() { - return this.containerGroupNamingPolicy; - } - - /** - * Set the containerGroupNamingPolicy property: Container Groups are named on a generic guid based naming - * scheme/policy. Customer can modify naming policy to add prefix to CG names during scale out operation. - * - * @param containerGroupNamingPolicy the containerGroupNamingPolicy value to set. - * @return the ElasticProfile object itself. - */ - public ElasticProfile - withContainerGroupNamingPolicy(ElasticProfileContainerGroupNamingPolicy containerGroupNamingPolicy) { - this.containerGroupNamingPolicy = containerGroupNamingPolicy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (containerGroupNamingPolicy() != null) { - containerGroupNamingPolicy().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("desiredCount", this.desiredCount); - jsonWriter.writeBooleanField("maintainDesiredCount", this.maintainDesiredCount); - jsonWriter.writeJsonField("containerGroupNamingPolicy", this.containerGroupNamingPolicy); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ElasticProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ElasticProfile 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 ElasticProfile. - */ - public static ElasticProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ElasticProfile deserializedElasticProfile = new ElasticProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("desiredCount".equals(fieldName)) { - deserializedElasticProfile.desiredCount = reader.getNullable(JsonReader::getInt); - } else if ("maintainDesiredCount".equals(fieldName)) { - deserializedElasticProfile.maintainDesiredCount = reader.getNullable(JsonReader::getBoolean); - } else if ("containerGroupNamingPolicy".equals(fieldName)) { - deserializedElasticProfile.containerGroupNamingPolicy - = ElasticProfileContainerGroupNamingPolicy.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedElasticProfile; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ElasticProfileContainerGroupNamingPolicy.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ElasticProfileContainerGroupNamingPolicy.java deleted file mode 100644 index ed08e60a9441..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ElasticProfileContainerGroupNamingPolicy.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * Container Groups are named on a generic guid based naming scheme/policy. Customer can modify naming policy to add - * prefix to CG names during scale out operation. - */ -@Fluent -public final class ElasticProfileContainerGroupNamingPolicy - implements JsonSerializable { - /* - * The guidNamingPolicy property. - */ - private ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy guidNamingPolicy; - - /** - * Creates an instance of ElasticProfileContainerGroupNamingPolicy class. - */ - public ElasticProfileContainerGroupNamingPolicy() { - } - - /** - * Get the guidNamingPolicy property: The guidNamingPolicy property. - * - * @return the guidNamingPolicy value. - */ - public ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy guidNamingPolicy() { - return this.guidNamingPolicy; - } - - /** - * Set the guidNamingPolicy property: The guidNamingPolicy property. - * - * @param guidNamingPolicy the guidNamingPolicy value to set. - * @return the ElasticProfileContainerGroupNamingPolicy object itself. - */ - public ElasticProfileContainerGroupNamingPolicy - withGuidNamingPolicy(ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy guidNamingPolicy) { - this.guidNamingPolicy = guidNamingPolicy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (guidNamingPolicy() != null) { - guidNamingPolicy().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("guidNamingPolicy", this.guidNamingPolicy); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ElasticProfileContainerGroupNamingPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ElasticProfileContainerGroupNamingPolicy 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 ElasticProfileContainerGroupNamingPolicy. - */ - public static ElasticProfileContainerGroupNamingPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ElasticProfileContainerGroupNamingPolicy deserializedElasticProfileContainerGroupNamingPolicy - = new ElasticProfileContainerGroupNamingPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("guidNamingPolicy".equals(fieldName)) { - deserializedElasticProfileContainerGroupNamingPolicy.guidNamingPolicy - = ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedElasticProfileContainerGroupNamingPolicy; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy.java deleted file mode 100644 index d921fdc1f085..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * The ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy model. - */ -@Fluent -public final class ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy - implements JsonSerializable { - /* - * The prefix can be used when there are tooling limitations (e.g. on the Azure portal where CGs from multiple - * NGroups exist in the same RG). The prefix with the suffixed resource name must still follow Azure resource naming - * guidelines. - */ - private String prefix; - - /** - * Creates an instance of ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy class. - */ - public ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy() { - } - - /** - * Get the prefix property: The prefix can be used when there are tooling limitations (e.g. on the Azure portal - * where CGs from multiple NGroups exist in the same RG). The prefix with the suffixed resource name must still - * follow Azure resource naming guidelines. - * - * @return the prefix value. - */ - public String prefix() { - return this.prefix; - } - - /** - * Set the prefix property: The prefix can be used when there are tooling limitations (e.g. on the Azure portal - * where CGs from multiple NGroups exist in the same RG). The prefix with the suffixed resource name must still - * follow Azure resource naming guidelines. - * - * @param prefix the prefix value to set. - * @return the ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy object itself. - */ - public ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy withPrefix(String prefix) { - this.prefix = prefix; - 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("prefix", this.prefix); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy 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 - * ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy. - */ - public static ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy deserializedElasticProfileContainerGroupNamingPolicyGuidNamingPolicy - = new ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("prefix".equals(fieldName)) { - deserializedElasticProfileContainerGroupNamingPolicyGuidNamingPolicy.prefix = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedElasticProfileContainerGroupNamingPolicyGuidNamingPolicy; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/EncryptionProperties.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/EncryptionProperties.java index dc32c38e9bdc..a0b21c671c89 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/EncryptionProperties.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/EncryptionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/EnvironmentVariable.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/EnvironmentVariable.java index 20f4435b66e8..ecf95297cbe0 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/EnvironmentVariable.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/EnvironmentVariable.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -32,11 +32,6 @@ public final class EnvironmentVariable implements JsonSerializable { /** * Creates an instance of Event class. */ - private Event() { + public Event() { } /** diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/FileShare.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/FileShare.java deleted file mode 100644 index 73c360014236..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/FileShare.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * File shares that can be mounted on container groups. - */ -@Fluent -public final class FileShare implements JsonSerializable { - /* - * The name property. - */ - private String name; - - /* - * The resourceGroupName property. - */ - private String resourceGroupName; - - /* - * The storageAccountName property. - */ - private String storageAccountName; - - /* - * The properties property. - */ - private FileShareProperties properties; - - /** - * Creates an instance of FileShare class. - */ - public FileShare() { - } - - /** - * Get the name property: The name property. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name property. - * - * @param name the name value to set. - * @return the FileShare object itself. - */ - public FileShare withName(String name) { - this.name = name; - return this; - } - - /** - * Get the resourceGroupName property: The resourceGroupName property. - * - * @return the resourceGroupName value. - */ - public String resourceGroupName() { - return this.resourceGroupName; - } - - /** - * Set the resourceGroupName property: The resourceGroupName property. - * - * @param resourceGroupName the resourceGroupName value to set. - * @return the FileShare object itself. - */ - public FileShare withResourceGroupName(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - /** - * Get the storageAccountName property: The storageAccountName property. - * - * @return the storageAccountName value. - */ - public String storageAccountName() { - return this.storageAccountName; - } - - /** - * Set the storageAccountName property: The storageAccountName property. - * - * @param storageAccountName the storageAccountName value to set. - * @return the FileShare object itself. - */ - public FileShare withStorageAccountName(String storageAccountName) { - this.storageAccountName = storageAccountName; - return this; - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public FileShareProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the FileShare object itself. - */ - public FileShare withProperties(FileShareProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("resourceGroupName", this.resourceGroupName); - jsonWriter.writeStringField("storageAccountName", this.storageAccountName); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FileShare from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FileShare 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 FileShare. - */ - public static FileShare fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FileShare deserializedFileShare = new FileShare(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedFileShare.name = reader.getString(); - } else if ("resourceGroupName".equals(fieldName)) { - deserializedFileShare.resourceGroupName = reader.getString(); - } else if ("storageAccountName".equals(fieldName)) { - deserializedFileShare.storageAccountName = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedFileShare.properties = FileShareProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFileShare; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/FileShareProperties.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/FileShareProperties.java deleted file mode 100644 index 6dfa9d17b0f1..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/FileShareProperties.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * The FileShareProperties model. - */ -@Fluent -public final class FileShareProperties implements JsonSerializable { - /* - * Specifies how Container Groups can access the Azure file share i.e. all CG will share same Azure file share or - * going to have exclusive file share. - */ - private AzureFileShareAccessType shareAccessType; - - /* - * Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. - * FileStorage account can choose Premium. Learn more at: - * https://learn.microsoft.com/en-us/rest/api/storagerp/file-shares/create?tabs=HTTP#shareaccesstier - */ - private AzureFileShareAccessTier shareAccessTier; - - /** - * Creates an instance of FileShareProperties class. - */ - public FileShareProperties() { - } - - /** - * Get the shareAccessType property: Specifies how Container Groups can access the Azure file share i.e. all CG will - * share same Azure file share or going to have exclusive file share. - * - * @return the shareAccessType value. - */ - public AzureFileShareAccessType shareAccessType() { - return this.shareAccessType; - } - - /** - * Set the shareAccessType property: Specifies how Container Groups can access the Azure file share i.e. all CG will - * share same Azure file share or going to have exclusive file share. - * - * @param shareAccessType the shareAccessType value to set. - * @return the FileShareProperties object itself. - */ - public FileShareProperties withShareAccessType(AzureFileShareAccessType shareAccessType) { - this.shareAccessType = shareAccessType; - return this; - } - - /** - * Get the shareAccessTier property: Access tier for specific share. GpV2 account can choose between - * TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. Learn more at: - * https://learn.microsoft.com/en-us/rest/api/storagerp/file-shares/create?tabs=HTTP#shareaccesstier. - * - * @return the shareAccessTier value. - */ - public AzureFileShareAccessTier shareAccessTier() { - return this.shareAccessTier; - } - - /** - * Set the shareAccessTier property: Access tier for specific share. GpV2 account can choose between - * TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. Learn more at: - * https://learn.microsoft.com/en-us/rest/api/storagerp/file-shares/create?tabs=HTTP#shareaccesstier. - * - * @param shareAccessTier the shareAccessTier value to set. - * @return the FileShareProperties object itself. - */ - public FileShareProperties withShareAccessTier(AzureFileShareAccessTier shareAccessTier) { - this.shareAccessTier = shareAccessTier; - 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("shareAccessType", - this.shareAccessType == null ? null : this.shareAccessType.toString()); - jsonWriter.writeStringField("shareAccessTier", - this.shareAccessTier == null ? null : this.shareAccessTier.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FileShareProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FileShareProperties 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 FileShareProperties. - */ - public static FileShareProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FileShareProperties deserializedFileShareProperties = new FileShareProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("shareAccessType".equals(fieldName)) { - deserializedFileShareProperties.shareAccessType - = AzureFileShareAccessType.fromString(reader.getString()); - } else if ("shareAccessTier".equals(fieldName)) { - deserializedFileShareProperties.shareAccessTier - = AzureFileShareAccessTier.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedFileShareProperties; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/GitRepoVolume.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/GitRepoVolume.java index 683a5a38dc68..c5a8eb2f46c3 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/GitRepoVolume.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/GitRepoVolume.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/GpuResource.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/GpuResource.java index abeb8db19b7c..95b6b1f56f86 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/GpuResource.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/GpuResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/GpuSku.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/GpuSku.java index 50b1ce0bba60..bf89674884d0 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/GpuSku.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/GpuSku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -12,17 +12,17 @@ */ public final class GpuSku extends ExpandableStringEnum { /** - * K80. + * Static value K80 for GpuSku. */ public static final GpuSku K80 = fromString("K80"); /** - * P100. + * Static value P100 for GpuSku. */ public static final GpuSku P100 = fromString("P100"); /** - * V100. + * Static value V100 for GpuSku. */ public static final GpuSku V100 = fromString("V100"); diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/HttpHeader.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/HttpHeader.java index 83a22e37b6bf..5837c49c687c 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/HttpHeader.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/HttpHeader.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/IdentityAccessControl.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/IdentityAccessControl.java deleted file mode 100644 index 946b314c1e49..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/IdentityAccessControl.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * The access control for an identity. - */ -@Fluent -public final class IdentityAccessControl implements JsonSerializable { - /* - * The access level of the identity. - */ - private IdentityAccessLevel access; - - /* - * An identity. - */ - private String identity; - - /** - * Creates an instance of IdentityAccessControl class. - */ - public IdentityAccessControl() { - } - - /** - * Get the access property: The access level of the identity. - * - * @return the access value. - */ - public IdentityAccessLevel access() { - return this.access; - } - - /** - * Set the access property: The access level of the identity. - * - * @param access the access value to set. - * @return the IdentityAccessControl object itself. - */ - public IdentityAccessControl withAccess(IdentityAccessLevel access) { - this.access = access; - return this; - } - - /** - * Get the identity property: An identity. - * - * @return the identity value. - */ - public String identity() { - return this.identity; - } - - /** - * Set the identity property: An identity. - * - * @param identity the identity value to set. - * @return the IdentityAccessControl object itself. - */ - public IdentityAccessControl withIdentity(String identity) { - this.identity = identity; - 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("access", this.access == null ? null : this.access.toString()); - jsonWriter.writeStringField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdentityAccessControl from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdentityAccessControl 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 IdentityAccessControl. - */ - public static IdentityAccessControl fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdentityAccessControl deserializedIdentityAccessControl = new IdentityAccessControl(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("access".equals(fieldName)) { - deserializedIdentityAccessControl.access = IdentityAccessLevel.fromString(reader.getString()); - } else if ("identity".equals(fieldName)) { - deserializedIdentityAccessControl.identity = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIdentityAccessControl; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/IdentityAccessLevel.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/IdentityAccessLevel.java deleted file mode 100644 index 00878fcab03a..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/IdentityAccessLevel.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The access level of an identity. - */ -public final class IdentityAccessLevel extends ExpandableStringEnum { - /** - * All. - */ - public static final IdentityAccessLevel ALL = fromString("All"); - - /** - * System. - */ - public static final IdentityAccessLevel SYSTEM = fromString("System"); - - /** - * User. - */ - public static final IdentityAccessLevel USER = fromString("User"); - - /** - * Creates a new instance of IdentityAccessLevel value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IdentityAccessLevel() { - } - - /** - * Creates or finds a IdentityAccessLevel from its string representation. - * - * @param name a name to look for. - * @return the corresponding IdentityAccessLevel. - */ - public static IdentityAccessLevel fromString(String name) { - return fromString(name, IdentityAccessLevel.class); - } - - /** - * Gets known IdentityAccessLevel values. - * - * @return known IdentityAccessLevel values. - */ - public static Collection values() { - return values(IdentityAccessLevel.class); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/IdentityAcls.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/IdentityAcls.java deleted file mode 100644 index 2ca0ba822cd2..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/IdentityAcls.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * The access control levels of the identities. - */ -@Fluent -public final class IdentityAcls implements JsonSerializable { - /* - * The default access level. - */ - private IdentityAccessLevel defaultAccess; - - /* - * The access control levels for each identity. - */ - private List acls; - - /** - * Creates an instance of IdentityAcls class. - */ - public IdentityAcls() { - } - - /** - * Get the defaultAccess property: The default access level. - * - * @return the defaultAccess value. - */ - public IdentityAccessLevel defaultAccess() { - return this.defaultAccess; - } - - /** - * Set the defaultAccess property: The default access level. - * - * @param defaultAccess the defaultAccess value to set. - * @return the IdentityAcls object itself. - */ - public IdentityAcls withDefaultAccess(IdentityAccessLevel defaultAccess) { - this.defaultAccess = defaultAccess; - return this; - } - - /** - * Get the acls property: The access control levels for each identity. - * - * @return the acls value. - */ - public List acls() { - return this.acls; - } - - /** - * Set the acls property: The access control levels for each identity. - * - * @param acls the acls value to set. - * @return the IdentityAcls object itself. - */ - public IdentityAcls withAcls(List acls) { - this.acls = acls; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (acls() != null) { - acls().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("defaultAccess", this.defaultAccess == null ? null : this.defaultAccess.toString()); - jsonWriter.writeArrayField("acls", this.acls, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdentityAcls from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdentityAcls 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 IdentityAcls. - */ - public static IdentityAcls fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdentityAcls deserializedIdentityAcls = new IdentityAcls(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("defaultAccess".equals(fieldName)) { - deserializedIdentityAcls.defaultAccess = IdentityAccessLevel.fromString(reader.getString()); - } else if ("acls".equals(fieldName)) { - List acls - = reader.readArray(reader1 -> IdentityAccessControl.fromJson(reader1)); - deserializedIdentityAcls.acls = acls; - } else { - reader.skipChildren(); - } - } - - return deserializedIdentityAcls; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ImageRegistryCredential.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ImageRegistryCredential.java index b6fd99169fea..029a37d9dde0 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ImageRegistryCredential.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ImageRegistryCredential.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -32,11 +32,6 @@ public final class ImageRegistryCredential implements JsonSerializable { - /* - * List of Load Balancer Backend Address Pools. - */ - private List backendAddressPools; - - /** - * Creates an instance of LoadBalancer class. - */ - public LoadBalancer() { - } - - /** - * Get the backendAddressPools property: List of Load Balancer Backend Address Pools. - * - * @return the backendAddressPools value. - */ - public List backendAddressPools() { - return this.backendAddressPools; - } - - /** - * Set the backendAddressPools property: List of Load Balancer Backend Address Pools. - * - * @param backendAddressPools the backendAddressPools value to set. - * @return the LoadBalancer object itself. - */ - public LoadBalancer withBackendAddressPools(List backendAddressPools) { - this.backendAddressPools = backendAddressPools; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (backendAddressPools() != null) { - backendAddressPools().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("backendAddressPools", this.backendAddressPools, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LoadBalancer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LoadBalancer 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 LoadBalancer. - */ - public static LoadBalancer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LoadBalancer deserializedLoadBalancer = new LoadBalancer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("backendAddressPools".equals(fieldName)) { - List backendAddressPools - = reader.readArray(reader1 -> LoadBalancerBackendAddressPool.fromJson(reader1)); - deserializedLoadBalancer.backendAddressPools = backendAddressPools; - } else { - reader.skipChildren(); - } - } - - return deserializedLoadBalancer; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/LoadBalancerBackendAddressPool.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/LoadBalancerBackendAddressPool.java deleted file mode 100644 index 38aef15fc50e..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/LoadBalancerBackendAddressPool.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * NGroups load balancer backend address pool. - */ -@Fluent -public final class LoadBalancerBackendAddressPool implements JsonSerializable { - /* - * The Load Balancer backend address pool ARM resource Id. - */ - private String resource; - - /** - * Creates an instance of LoadBalancerBackendAddressPool class. - */ - public LoadBalancerBackendAddressPool() { - } - - /** - * Get the resource property: The Load Balancer backend address pool ARM resource Id. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource property: The Load Balancer backend address pool ARM resource Id. - * - * @param resource the resource value to set. - * @return the LoadBalancerBackendAddressPool object itself. - */ - public LoadBalancerBackendAddressPool withResource(String resource) { - this.resource = resource; - 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("resource", this.resource); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LoadBalancerBackendAddressPool from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LoadBalancerBackendAddressPool 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 LoadBalancerBackendAddressPool. - */ - public static LoadBalancerBackendAddressPool fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LoadBalancerBackendAddressPool deserializedLoadBalancerBackendAddressPool - = new LoadBalancerBackendAddressPool(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("resource".equals(fieldName)) { - deserializedLoadBalancerBackendAddressPool.resource = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedLoadBalancerBackendAddressPool; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/LogAnalytics.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/LogAnalytics.java index d7c1be7c8225..192e31140211 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/LogAnalytics.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/LogAnalytics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/LogAnalyticsLogType.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/LogAnalyticsLogType.java index 2b8db3161603..f24b5c7d7118 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/LogAnalyticsLogType.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/LogAnalyticsLogType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -12,12 +12,12 @@ */ public final class LogAnalyticsLogType extends ExpandableStringEnum { /** - * ContainerInsights. + * Static value ContainerInsights for LogAnalyticsLogType. */ public static final LogAnalyticsLogType CONTAINER_INSIGHTS = fromString("ContainerInsights"); /** - * ContainerInstanceLogs. + * Static value ContainerInstanceLogs for LogAnalyticsLogType. */ public static final LogAnalyticsLogType CONTAINER_INSTANCE_LOGS = fromString("ContainerInstanceLogs"); diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupCGPropertyContainer.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupCGPropertyContainer.java deleted file mode 100644 index ab65dab586f2..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupCGPropertyContainer.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * Container properties that can be provided with NGroups object. - */ -@Fluent -public final class NGroupCGPropertyContainer implements JsonSerializable { - /* - * container name - */ - private String name; - - /* - * container properties - */ - private NGroupCGPropertyContainerProperties properties; - - /** - * Creates an instance of NGroupCGPropertyContainer class. - */ - public NGroupCGPropertyContainer() { - } - - /** - * Get the name property: container name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: container name. - * - * @param name the name value to set. - * @return the NGroupCGPropertyContainer object itself. - */ - public NGroupCGPropertyContainer withName(String name) { - this.name = name; - return this; - } - - /** - * Get the properties property: container properties. - * - * @return the properties value. - */ - public NGroupCGPropertyContainerProperties properties() { - return this.properties; - } - - /** - * Set the properties property: container properties. - * - * @param properties the properties value to set. - * @return the NGroupCGPropertyContainer object itself. - */ - public NGroupCGPropertyContainer withProperties(NGroupCGPropertyContainerProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NGroupCGPropertyContainer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NGroupCGPropertyContainer 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 NGroupCGPropertyContainer. - */ - public static NGroupCGPropertyContainer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NGroupCGPropertyContainer deserializedNGroupCGPropertyContainer = new NGroupCGPropertyContainer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedNGroupCGPropertyContainer.name = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedNGroupCGPropertyContainer.properties - = NGroupCGPropertyContainerProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNGroupCGPropertyContainer; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupCGPropertyContainerProperties.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupCGPropertyContainerProperties.java deleted file mode 100644 index 4d2a8ed0dd20..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupCGPropertyContainerProperties.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * container properties. - */ -@Fluent -public final class NGroupCGPropertyContainerProperties - implements JsonSerializable { - /* - * The volumeMounts property. - */ - private List volumeMounts; - - /** - * Creates an instance of NGroupCGPropertyContainerProperties class. - */ - public NGroupCGPropertyContainerProperties() { - } - - /** - * Get the volumeMounts property: The volumeMounts property. - * - * @return the volumeMounts value. - */ - public List volumeMounts() { - return this.volumeMounts; - } - - /** - * Set the volumeMounts property: The volumeMounts property. - * - * @param volumeMounts the volumeMounts value to set. - * @return the NGroupCGPropertyContainerProperties object itself. - */ - public NGroupCGPropertyContainerProperties withVolumeMounts(List volumeMounts) { - this.volumeMounts = volumeMounts; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (volumeMounts() != null) { - volumeMounts().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("volumeMounts", this.volumeMounts, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NGroupCGPropertyContainerProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NGroupCGPropertyContainerProperties 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 NGroupCGPropertyContainerProperties. - */ - public static NGroupCGPropertyContainerProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NGroupCGPropertyContainerProperties deserializedNGroupCGPropertyContainerProperties - = new NGroupCGPropertyContainerProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("volumeMounts".equals(fieldName)) { - List volumeMounts = reader.readArray(reader1 -> VolumeMount.fromJson(reader1)); - deserializedNGroupCGPropertyContainerProperties.volumeMounts = volumeMounts; - } else { - reader.skipChildren(); - } - } - - return deserializedNGroupCGPropertyContainerProperties; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupCGPropertyVolume.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupCGPropertyVolume.java deleted file mode 100644 index 05317d06299b..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupCGPropertyVolume.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * Contains information about the volumes that can be mounted by Containers in the Container Groups. - */ -@Fluent -public final class NGroupCGPropertyVolume implements JsonSerializable { - /* - * The name of the volume. - */ - private String name; - - /* - * The Azure File volume. - */ - private AzureFileVolume azureFile; - - /** - * Creates an instance of NGroupCGPropertyVolume class. - */ - public NGroupCGPropertyVolume() { - } - - /** - * Get the name property: The name of the volume. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the volume. - * - * @param name the name value to set. - * @return the NGroupCGPropertyVolume object itself. - */ - public NGroupCGPropertyVolume withName(String name) { - this.name = name; - return this; - } - - /** - * Get the azureFile property: The Azure File volume. - * - * @return the azureFile value. - */ - public AzureFileVolume azureFile() { - return this.azureFile; - } - - /** - * Set the azureFile property: The Azure File volume. - * - * @param azureFile the azureFile value to set. - * @return the NGroupCGPropertyVolume object itself. - */ - public NGroupCGPropertyVolume withAzureFile(AzureFileVolume azureFile) { - this.azureFile = azureFile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model NGroupCGPropertyVolume")); - } - if (azureFile() != null) { - azureFile().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NGroupCGPropertyVolume.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("azureFile", this.azureFile); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NGroupCGPropertyVolume from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NGroupCGPropertyVolume 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 NGroupCGPropertyVolume. - */ - public static NGroupCGPropertyVolume fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NGroupCGPropertyVolume deserializedNGroupCGPropertyVolume = new NGroupCGPropertyVolume(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedNGroupCGPropertyVolume.name = reader.getString(); - } else if ("azureFile".equals(fieldName)) { - deserializedNGroupCGPropertyVolume.azureFile = AzureFileVolume.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNGroupCGPropertyVolume; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupContainerGroupProperties.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupContainerGroupProperties.java deleted file mode 100644 index 1728a656d011..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupContainerGroupProperties.java +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * Container Group properties which can be set while creating or updating the NGroups. - */ -@Fluent -public final class NGroupContainerGroupProperties implements JsonSerializable { - /* - * Contains information about Virtual Network Subnet ARM Resource - */ - private List subnetIds; - - /* - * Contains information about the volumes that can be mounted by Containers in the Container Groups. - */ - private List volumes; - - /* - * Contains information about Container which can be set while creating or updating the NGroups. - */ - private List containers; - - /** - * Creates an instance of NGroupContainerGroupProperties class. - */ - public NGroupContainerGroupProperties() { - } - - /** - * Get the subnetIds property: Contains information about Virtual Network Subnet ARM Resource. - * - * @return the subnetIds value. - */ - public List subnetIds() { - return this.subnetIds; - } - - /** - * Set the subnetIds property: Contains information about Virtual Network Subnet ARM Resource. - * - * @param subnetIds the subnetIds value to set. - * @return the NGroupContainerGroupProperties object itself. - */ - public NGroupContainerGroupProperties withSubnetIds(List subnetIds) { - this.subnetIds = subnetIds; - return this; - } - - /** - * Get the volumes property: Contains information about the volumes that can be mounted by Containers in the - * Container Groups. - * - * @return the volumes value. - */ - public List volumes() { - return this.volumes; - } - - /** - * Set the volumes property: Contains information about the volumes that can be mounted by Containers in the - * Container Groups. - * - * @param volumes the volumes value to set. - * @return the NGroupContainerGroupProperties object itself. - */ - public NGroupContainerGroupProperties withVolumes(List volumes) { - this.volumes = volumes; - return this; - } - - /** - * Get the containers property: Contains information about Container which can be set while creating or updating the - * NGroups. - * - * @return the containers value. - */ - public List containers() { - return this.containers; - } - - /** - * Set the containers property: Contains information about Container which can be set while creating or updating the - * NGroups. - * - * @param containers the containers value to set. - * @return the NGroupContainerGroupProperties object itself. - */ - public NGroupContainerGroupProperties withContainers(List containers) { - this.containers = containers; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (subnetIds() != null) { - subnetIds().forEach(e -> e.validate()); - } - if (volumes() != null) { - volumes().forEach(e -> e.validate()); - } - if (containers() != null) { - containers().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("subnetIds", this.subnetIds, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("volumes", this.volumes, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("containers", this.containers, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NGroupContainerGroupProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NGroupContainerGroupProperties 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 NGroupContainerGroupProperties. - */ - public static NGroupContainerGroupProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NGroupContainerGroupProperties deserializedNGroupContainerGroupProperties - = new NGroupContainerGroupProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("subnetIds".equals(fieldName)) { - List subnetIds - = reader.readArray(reader1 -> ContainerGroupSubnetId.fromJson(reader1)); - deserializedNGroupContainerGroupProperties.subnetIds = subnetIds; - } else if ("volumes".equals(fieldName)) { - List volumes - = reader.readArray(reader1 -> NGroupCGPropertyVolume.fromJson(reader1)); - deserializedNGroupContainerGroupProperties.volumes = volumes; - } else if ("containers".equals(fieldName)) { - List containers - = reader.readArray(reader1 -> NGroupCGPropertyContainer.fromJson(reader1)); - deserializedNGroupContainerGroupProperties.containers = containers; - } else { - reader.skipChildren(); - } - } - - return deserializedNGroupContainerGroupProperties; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupIdentity.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupIdentity.java deleted file mode 100644 index 45a1a225f4f2..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupIdentity.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * Identity for the NGroup. - */ -@Fluent -public final class NGroupIdentity implements JsonSerializable { - /* - * The principal id of the NGroup identity. This property will only be provided for a system assigned identity. - */ - private String principalId; - - /* - * The tenant id associated with the NGroup. This property will only be provided for a system assigned identity. - */ - private String tenantId; - - /* - * The type of identity used for the NGroup. The type 'SystemAssigned, UserAssigned' includes both an implicitly - * created identity and a set of user assigned identities. The type 'None' will remove any identities from the - * NGroup. - */ - private ResourceIdentityType type; - - /* - * The list of user identities associated with the NGroup. - */ - private Map userAssignedIdentities; - - /** - * Creates an instance of NGroupIdentity class. - */ - public NGroupIdentity() { - } - - /** - * Get the principalId property: The principal id of the NGroup identity. This property will only be provided for a - * system assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant id associated with the NGroup. This property will only be provided for a - * system assigned identity. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the type property: The type of identity used for the NGroup. The type 'SystemAssigned, UserAssigned' includes - * both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any - * identities from the NGroup. - * - * @return the type value. - */ - public ResourceIdentityType type() { - return this.type; - } - - /** - * Set the type property: The type of identity used for the NGroup. The type 'SystemAssigned, UserAssigned' includes - * both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any - * identities from the NGroup. - * - * @param type the type value to set. - * @return the NGroupIdentity object itself. - */ - public NGroupIdentity withType(ResourceIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: The list of user identities associated with the NGroup. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The list of user identities associated with the NGroup. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the NGroupIdentity object itself. - */ - public NGroupIdentity - withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userAssignedIdentities() != null) { - userAssignedIdentities().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NGroupIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NGroupIdentity 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 NGroupIdentity. - */ - public static NGroupIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NGroupIdentity deserializedNGroupIdentity = new NGroupIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalId".equals(fieldName)) { - deserializedNGroupIdentity.principalId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedNGroupIdentity.tenantId = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedNGroupIdentity.type = ResourceIdentityType.fromString(reader.getString()); - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities - = reader.readMap(reader1 -> ContainerGroupIdentityUserAssignedIdentities.fromJson(reader1)); - deserializedNGroupIdentity.userAssignedIdentities = userAssignedIdentities; - } else { - reader.skipChildren(); - } - } - - return deserializedNGroupIdentity; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupPatch.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupPatch.java deleted file mode 100644 index ec558e5762e1..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupPatch.java +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.containerinstance.fluent.models.NGroupProperties; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Describes the NGroups resource. - */ -@Fluent -public final class NGroupPatch implements JsonSerializable { - /* - * Metadata pertaining to creation and last modification of the resource. - */ - private SystemData systemData; - - /* - * Describes the properties of the NGroups resource. - */ - private NGroupProperties innerProperties; - - /* - * The identity of the NGroup, if configured. - */ - private NGroupIdentity identity; - - /* - * The resource tags. - */ - private Map tags; - - /* - * The zones for the NGroup. - */ - private List zones; - - /** - * Creates an instance of NGroupPatch class. - */ - public NGroupPatch() { - } - - /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the innerProperties property: Describes the properties of the NGroups resource. - * - * @return the innerProperties value. - */ - private NGroupProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the identity property: The identity of the NGroup, if configured. - * - * @return the identity value. - */ - public NGroupIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the NGroup, if configured. - * - * @param identity the identity value to set. - * @return the NGroupPatch object itself. - */ - public NGroupPatch withIdentity(NGroupIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the tags property: The resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The resource tags. - * - * @param tags the tags value to set. - * @return the NGroupPatch object itself. - */ - public NGroupPatch withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the zones property: The zones for the NGroup. - * - * @return the zones value. - */ - public List zones() { - return this.zones; - } - - /** - * Set the zones property: The zones for the NGroup. - * - * @param zones the zones value to set. - * @return the NGroupPatch object itself. - */ - public NGroupPatch withZones(List zones) { - this.zones = zones; - return this; - } - - /** - * Get the elasticProfile property: The elastic profile. - * - * @return the elasticProfile value. - */ - public ElasticProfile elasticProfile() { - return this.innerProperties() == null ? null : this.innerProperties().elasticProfile(); - } - - /** - * Set the elasticProfile property: The elastic profile. - * - * @param elasticProfile the elasticProfile value to set. - * @return the NGroupPatch object itself. - */ - public NGroupPatch withElasticProfile(ElasticProfile elasticProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new NGroupProperties(); - } - this.innerProperties().withElasticProfile(elasticProfile); - return this; - } - - /** - * Get the placementProfile property: Provides options w.r.t allocation and management w.r.t certain placement - * policies. These utilize capabilities provided by the underlying Azure infrastructure. They are typically used for - * high availability scenarios. E.g., distributing CGs across fault domains. - * - * @return the placementProfile value. - */ - public PlacementProfile placementProfile() { - return this.innerProperties() == null ? null : this.innerProperties().placementProfile(); - } - - /** - * Set the placementProfile property: Provides options w.r.t allocation and management w.r.t certain placement - * policies. These utilize capabilities provided by the underlying Azure infrastructure. They are typically used for - * high availability scenarios. E.g., distributing CGs across fault domains. - * - * @param placementProfile the placementProfile value to set. - * @return the NGroupPatch object itself. - */ - public NGroupPatch withPlacementProfile(PlacementProfile placementProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new NGroupProperties(); - } - this.innerProperties().withPlacementProfile(placementProfile); - return this; - } - - /** - * Get the containerGroupProfiles property: The Container Group Profiles that could be used in the NGroups resource. - * - * @return the containerGroupProfiles value. - */ - public List containerGroupProfiles() { - return this.innerProperties() == null ? null : this.innerProperties().containerGroupProfiles(); - } - - /** - * Set the containerGroupProfiles property: The Container Group Profiles that could be used in the NGroups resource. - * - * @param containerGroupProfiles the containerGroupProfiles value to set. - * @return the NGroupPatch object itself. - */ - public NGroupPatch withContainerGroupProfiles(List containerGroupProfiles) { - if (this.innerProperties() == null) { - this.innerProperties = new NGroupProperties(); - } - this.innerProperties().withContainerGroupProfiles(containerGroupProfiles); - return this; - } - - /** - * Get the provisioningState property: The provisioning state, which only appears in the response. - * - * @return the provisioningState value. - */ - public NGroupProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the updateProfile property: Used by the customer to specify the way to update the Container Groups in NGroup. - * - * @return the updateProfile value. - */ - public UpdateProfile updateProfile() { - return this.innerProperties() == null ? null : this.innerProperties().updateProfile(); - } - - /** - * Set the updateProfile property: Used by the customer to specify the way to update the Container Groups in NGroup. - * - * @param updateProfile the updateProfile value to set. - * @return the NGroupPatch object itself. - */ - public NGroupPatch withUpdateProfile(UpdateProfile updateProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new NGroupProperties(); - } - this.innerProperties().withUpdateProfile(updateProfile); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (identity() != null) { - identity().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NGroupPatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NGroupPatch 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 NGroupPatch. - */ - public static NGroupPatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NGroupPatch deserializedNGroupPatch = new NGroupPatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("systemData".equals(fieldName)) { - deserializedNGroupPatch.systemData = SystemData.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedNGroupPatch.innerProperties = NGroupProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedNGroupPatch.identity = NGroupIdentity.fromJson(reader); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedNGroupPatch.tags = tags; - } else if ("zones".equals(fieldName)) { - List zones = reader.readArray(reader1 -> reader1.getString()); - deserializedNGroupPatch.zones = zones; - } else { - reader.skipChildren(); - } - } - - return deserializedNGroupPatch; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupProvisioningState.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupProvisioningState.java deleted file mode 100644 index 7f8d10bc5537..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupProvisioningState.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The provisioning state, which only appears in the response. - */ -public final class NGroupProvisioningState extends ExpandableStringEnum { - /** - * Creating. - */ - public static final NGroupProvisioningState CREATING = fromString("Creating"); - - /** - * Updating. - */ - public static final NGroupProvisioningState UPDATING = fromString("Updating"); - - /** - * Failed. - */ - public static final NGroupProvisioningState FAILED = fromString("Failed"); - - /** - * Succeeded. - */ - public static final NGroupProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Canceled. - */ - public static final NGroupProvisioningState CANCELED = fromString("Canceled"); - - /** - * Deleting. - */ - public static final NGroupProvisioningState DELETING = fromString("Deleting"); - - /** - * Migrating. - */ - public static final NGroupProvisioningState MIGRATING = fromString("Migrating"); - - /** - * Creates a new instance of NGroupProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NGroupProvisioningState() { - } - - /** - * Creates or finds a NGroupProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding NGroupProvisioningState. - */ - public static NGroupProvisioningState fromString(String name) { - return fromString(name, NGroupProvisioningState.class); - } - - /** - * Gets known NGroupProvisioningState values. - * - * @return known NGroupProvisioningState values. - */ - public static Collection values() { - return values(NGroupProvisioningState.class); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupUpdateMode.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupUpdateMode.java deleted file mode 100644 index 5e62936b0bde..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupUpdateMode.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for NGroupUpdateMode. - */ -public final class NGroupUpdateMode extends ExpandableStringEnum { - /** - * Manual. - */ - public static final NGroupUpdateMode MANUAL = fromString("Manual"); - - /** - * Rolling. - */ - public static final NGroupUpdateMode ROLLING = fromString("Rolling"); - - /** - * Creates a new instance of NGroupUpdateMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NGroupUpdateMode() { - } - - /** - * Creates or finds a NGroupUpdateMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding NGroupUpdateMode. - */ - public static NGroupUpdateMode fromString(String name) { - return fromString(name, NGroupUpdateMode.class); - } - - /** - * Gets known NGroupUpdateMode values. - * - * @return known NGroupUpdateMode values. - */ - public static Collection values() { - return values(NGroupUpdateMode.class); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NetworkProfile.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NetworkProfile.java deleted file mode 100644 index 84c75cbc8943..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/NetworkProfile.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * A network profile for network settings of a ContainerGroupProfile. Used to manage load balancer and application - * gateway backend pools, specifically updating the IP addresses of CGs within the backend pool. - */ -@Fluent -public final class NetworkProfile implements JsonSerializable { - /* - * LoadBalancer the CG profile will use to interact with CGs in a backend pool - */ - private LoadBalancer loadBalancer; - - /* - * Application Gateway the CG profile will use to interact with CGs in a backend pool - */ - private ApplicationGateway applicationGateway; - - /** - * Creates an instance of NetworkProfile class. - */ - public NetworkProfile() { - } - - /** - * Get the loadBalancer property: LoadBalancer the CG profile will use to interact with CGs in a backend pool. - * - * @return the loadBalancer value. - */ - public LoadBalancer loadBalancer() { - return this.loadBalancer; - } - - /** - * Set the loadBalancer property: LoadBalancer the CG profile will use to interact with CGs in a backend pool. - * - * @param loadBalancer the loadBalancer value to set. - * @return the NetworkProfile object itself. - */ - public NetworkProfile withLoadBalancer(LoadBalancer loadBalancer) { - this.loadBalancer = loadBalancer; - return this; - } - - /** - * Get the applicationGateway property: Application Gateway the CG profile will use to interact with CGs in a - * backend pool. - * - * @return the applicationGateway value. - */ - public ApplicationGateway applicationGateway() { - return this.applicationGateway; - } - - /** - * Set the applicationGateway property: Application Gateway the CG profile will use to interact with CGs in a - * backend pool. - * - * @param applicationGateway the applicationGateway value to set. - * @return the NetworkProfile object itself. - */ - public NetworkProfile withApplicationGateway(ApplicationGateway applicationGateway) { - this.applicationGateway = applicationGateway; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (loadBalancer() != null) { - loadBalancer().validate(); - } - if (applicationGateway() != null) { - applicationGateway().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("loadBalancer", this.loadBalancer); - jsonWriter.writeJsonField("applicationGateway", this.applicationGateway); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NetworkProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NetworkProfile 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 NetworkProfile. - */ - public static NetworkProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NetworkProfile deserializedNetworkProfile = new NetworkProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("loadBalancer".equals(fieldName)) { - deserializedNetworkProfile.loadBalancer = LoadBalancer.fromJson(reader); - } else if ("applicationGateway".equals(fieldName)) { - deserializedNetworkProfile.applicationGateway = ApplicationGateway.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNetworkProfile; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/OperatingSystemTypes.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/OperatingSystemTypes.java index 2ccec5156335..7742d0753494 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/OperatingSystemTypes.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/OperatingSystemTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -12,12 +12,12 @@ */ public final class OperatingSystemTypes extends ExpandableStringEnum { /** - * Windows. + * Static value Windows for OperatingSystemTypes. */ public static final OperatingSystemTypes WINDOWS = fromString("Windows"); /** - * Linux. + * Static value Linux for OperatingSystemTypes. */ public static final OperatingSystemTypes LINUX = fromString("Linux"); diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Operation.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Operation.java index 6748b0acae6b..b3a700b4a594 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Operation.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Operation.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -15,7 +15,7 @@ /** * An operation for Azure Container Instance service. */ -@Immutable +@Fluent public final class Operation implements JsonSerializable { /* * The name of the operation. @@ -40,7 +40,7 @@ public final class Operation implements JsonSerializable { /** * Creates an instance of Operation class. */ - private Operation() { + public Operation() { } /** @@ -52,6 +52,17 @@ public String name() { return this.name; } + /** + * Set the name property: The name of the operation. + * + * @param name the name value to set. + * @return the Operation object itself. + */ + public Operation withName(String name) { + this.name = name; + return this; + } + /** * Get the display property: The display information of the operation. * @@ -61,6 +72,17 @@ public OperationDisplay display() { return this.display; } + /** + * Set the display property: The display information of the operation. + * + * @param display the display value to set. + * @return the Operation object itself. + */ + public Operation withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + /** * Get the properties property: The additional properties. * @@ -70,6 +92,17 @@ public Object properties() { return this.properties; } + /** + * Set the properties property: The additional properties. + * + * @param properties the properties value to set. + * @return the Operation object itself. + */ + public Operation withProperties(Object properties) { + this.properties = properties; + return this; + } + /** * Get the origin property: The intended executor of the operation. * @@ -79,6 +112,17 @@ public ContainerInstanceOperationsOrigin origin() { return this.origin; } + /** + * Set the origin property: The intended executor of the operation. + * + * @param origin the origin value to set. + * @return the Operation object itself. + */ + public Operation withOrigin(ContainerInstanceOperationsOrigin origin) { + this.origin = origin; + return this; + } + /** * Validates the instance. * @@ -107,9 +151,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("name", this.name); jsonWriter.writeJsonField("display", this.display); - if (this.properties != null) { - jsonWriter.writeUntypedField("properties", this.properties); - } + jsonWriter.writeUntypedField("properties", this.properties); jsonWriter.writeStringField("origin", this.origin == null ? null : this.origin.toString()); return jsonWriter.writeEndObject(); } diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/OperationDisplay.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/OperationDisplay.java index ec08d0a6748f..7c484df4e581 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/OperationDisplay.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/OperationDisplay.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.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,7 +14,7 @@ /** * The display information of the operation. */ -@Immutable +@Fluent public final class OperationDisplay implements JsonSerializable { /* * The name of the provider of the operation. @@ -39,7 +39,7 @@ public final class OperationDisplay implements JsonSerializable { /* - * The Operation items on this page + * The list of operations. */ private List value; /* - * The link to the next page of items + * The URI to fetch the next page of operations. */ private String nextLink; /** * Creates an instance of OperationListResult class. */ - private OperationListResult() { + public OperationListResult() { } /** - * Get the value property: The Operation items on this page. + * Get the value property: The list of operations. * * @return the value value. */ @@ -45,7 +43,18 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: The list of operations. + * + * @param value the value value to set. + * @return the OperationListResult object itself. + */ + public OperationListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URI to fetch the next page of operations. * * @return the nextLink value. */ @@ -53,22 +62,28 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The URI to fetch the next page of operations. + * + * @param nextLink the nextLink value to set. + * @return the OperationListResult object itself. + */ + public OperationListResult 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model OperationListResult")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(OperationListResult.class); - /** * {@inheritDoc} */ @@ -86,7 +101,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 * 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 OperationListResult. */ public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/PlacementProfile.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/PlacementProfile.java deleted file mode 100644 index e5799264872e..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/PlacementProfile.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * Provides options w.r.t allocation and management w.r.t certain placement policies. These utilize capabilities - * provided by the underlying Azure infrastructure. They are typically used for high availability scenarios. E.g., - * distributing CGs across fault domains. - */ -@Fluent -public final class PlacementProfile implements JsonSerializable { - /* - * The number of fault domains to be used to spread CGs in the NGroups resource. This can only be specified during - * NGroup creation and is immutable after that. - */ - private Integer faultDomainCount; - - /** - * Creates an instance of PlacementProfile class. - */ - public PlacementProfile() { - } - - /** - * Get the faultDomainCount property: The number of fault domains to be used to spread CGs in the NGroups resource. - * This can only be specified during NGroup creation and is immutable after that. - * - * @return the faultDomainCount value. - */ - public Integer faultDomainCount() { - return this.faultDomainCount; - } - - /** - * Set the faultDomainCount property: The number of fault domains to be used to spread CGs in the NGroups resource. - * This can only be specified during NGroup creation and is immutable after that. - * - * @param faultDomainCount the faultDomainCount value to set. - * @return the PlacementProfile object itself. - */ - public PlacementProfile withFaultDomainCount(Integer faultDomainCount) { - this.faultDomainCount = faultDomainCount; - 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.writeNumberField("faultDomainCount", this.faultDomainCount); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PlacementProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PlacementProfile 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 PlacementProfile. - */ - public static PlacementProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PlacementProfile deserializedPlacementProfile = new PlacementProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("faultDomainCount".equals(fieldName)) { - deserializedPlacementProfile.faultDomainCount = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedPlacementProfile; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Port.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Port.java index 393841cd6b4f..aa75e1381403 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Port.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Port.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceIdentityType.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceIdentityType.java index 94368ab5562d..7cf3d31e595f 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceIdentityType.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -11,22 +11,22 @@ */ public enum ResourceIdentityType { /** - * SystemAssigned. + * Enum value SystemAssigned. */ SYSTEM_ASSIGNED("SystemAssigned"), /** - * UserAssigned. + * Enum value UserAssigned. */ USER_ASSIGNED("UserAssigned"), /** - * SystemAssigned, UserAssigned. + * Enum value SystemAssigned, UserAssigned. */ SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned, UserAssigned"), /** - * None. + * Enum value None. */ NONE("None"); diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceLimits.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceLimits.java index 04cc1f00c129..3da711d9598e 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceLimits.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceLimits.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceRequests.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceRequests.java index 97582b35e6b3..02f075f6a33b 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceRequests.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceRequests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceRequirements.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceRequirements.java index 5acdd52725ac..c53f223dbf60 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceRequirements.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceRequirements.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Scheme.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Scheme.java index a77990dd3d46..79c1ad9e1e83 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Scheme.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Scheme.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -12,12 +12,12 @@ */ public final class Scheme extends ExpandableStringEnum { /** - * http. + * Static value http for Scheme. */ public static final Scheme HTTP = fromString("http"); /** - * https. + * Static value https for Scheme. */ public static final Scheme HTTPS = fromString("https"); diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/SecretReference.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/SecretReference.java deleted file mode 100644 index 4e8584c53ecf..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/SecretReference.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * A secret reference. - */ -@Fluent -public final class SecretReference implements JsonSerializable { - /* - * The identifier of the secret reference - */ - private String name; - - /* - * The ARM resource id of the managed identity that has access to the secret in the key vault - */ - private String identity; - - /* - * The URI to the secret in key vault - */ - private String secretReferenceUri; - - /** - * Creates an instance of SecretReference class. - */ - public SecretReference() { - } - - /** - * Get the name property: The identifier of the secret reference. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The identifier of the secret reference. - * - * @param name the name value to set. - * @return the SecretReference object itself. - */ - public SecretReference withName(String name) { - this.name = name; - return this; - } - - /** - * Get the identity property: The ARM resource id of the managed identity that has access to the secret in the key - * vault. - * - * @return the identity value. - */ - public String identity() { - return this.identity; - } - - /** - * Set the identity property: The ARM resource id of the managed identity that has access to the secret in the key - * vault. - * - * @param identity the identity value to set. - * @return the SecretReference object itself. - */ - public SecretReference withIdentity(String identity) { - this.identity = identity; - return this; - } - - /** - * Get the secretReferenceUri property: The URI to the secret in key vault. - * - * @return the secretReferenceUri value. - */ - public String secretReferenceUri() { - return this.secretReferenceUri; - } - - /** - * Set the secretReferenceUri property: The URI to the secret in key vault. - * - * @param secretReferenceUri the secretReferenceUri value to set. - * @return the SecretReference object itself. - */ - public SecretReference withSecretReferenceUri(String secretReferenceUri) { - this.secretReferenceUri = secretReferenceUri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model SecretReference")); - } - if (identity() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property identity in model SecretReference")); - } - if (secretReferenceUri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property secretReferenceUri in model SecretReference")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SecretReference.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("identity", this.identity); - jsonWriter.writeStringField("secretReferenceUri", this.secretReferenceUri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SecretReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SecretReference 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 SecretReference. - */ - public static SecretReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SecretReference deserializedSecretReference = new SecretReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedSecretReference.name = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedSecretReference.identity = reader.getString(); - } else if ("secretReferenceUri".equals(fieldName)) { - deserializedSecretReference.secretReferenceUri = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSecretReference; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/SecurityContextCapabilitiesDefinition.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/SecurityContextCapabilitiesDefinition.java index d7704b03dda1..168473f5bd9e 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/SecurityContextCapabilitiesDefinition.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/SecurityContextCapabilitiesDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/SecurityContextDefinition.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/SecurityContextDefinition.java index 11d76dd03139..f572eea09344 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/SecurityContextDefinition.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/SecurityContextDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/StandbyPoolProfileDefinition.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/StandbyPoolProfileDefinition.java deleted file mode 100644 index 8ec261cb5990..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/StandbyPoolProfileDefinition.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * The standby pool profile reference. - */ -@Fluent -public final class StandbyPoolProfileDefinition implements JsonSerializable { - /* - * The standby pool profile reference id.This will be an ARM resource id in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/ - * standbyContainerGroupPools/{standbyPoolName}'. - */ - private String id; - - /* - * The flag to determine whether ACI should fail the create request if the container group can not be obtained from - * standby pool. - */ - private Boolean failContainerGroupCreateOnReuseFailure; - - /** - * Creates an instance of StandbyPoolProfileDefinition class. - */ - public StandbyPoolProfileDefinition() { - } - - /** - * Get the id property: The standby pool profile reference id.This will be an ARM resource id in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyPoolName}'. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The standby pool profile reference id.This will be an ARM resource id in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyPoolName}'. - * - * @param id the id value to set. - * @return the StandbyPoolProfileDefinition object itself. - */ - public StandbyPoolProfileDefinition withId(String id) { - this.id = id; - return this; - } - - /** - * Get the failContainerGroupCreateOnReuseFailure property: The flag to determine whether ACI should fail the create - * request if the container group can not be obtained from standby pool. - * - * @return the failContainerGroupCreateOnReuseFailure value. - */ - public Boolean failContainerGroupCreateOnReuseFailure() { - return this.failContainerGroupCreateOnReuseFailure; - } - - /** - * Set the failContainerGroupCreateOnReuseFailure property: The flag to determine whether ACI should fail the create - * request if the container group can not be obtained from standby pool. - * - * @param failContainerGroupCreateOnReuseFailure the failContainerGroupCreateOnReuseFailure value to set. - * @return the StandbyPoolProfileDefinition object itself. - */ - public StandbyPoolProfileDefinition - withFailContainerGroupCreateOnReuseFailure(Boolean failContainerGroupCreateOnReuseFailure) { - this.failContainerGroupCreateOnReuseFailure = failContainerGroupCreateOnReuseFailure; - 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("id", this.id); - jsonWriter.writeBooleanField("failContainerGroupCreateOnReuseFailure", - this.failContainerGroupCreateOnReuseFailure); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StandbyPoolProfileDefinition from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StandbyPoolProfileDefinition 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 StandbyPoolProfileDefinition. - */ - public static StandbyPoolProfileDefinition fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StandbyPoolProfileDefinition deserializedStandbyPoolProfileDefinition = new StandbyPoolProfileDefinition(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedStandbyPoolProfileDefinition.id = reader.getString(); - } else if ("failContainerGroupCreateOnReuseFailure".equals(fieldName)) { - deserializedStandbyPoolProfileDefinition.failContainerGroupCreateOnReuseFailure - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedStandbyPoolProfileDefinition; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/StorageProfile.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/StorageProfile.java deleted file mode 100644 index 01dfb9826a3e..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/StorageProfile.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * Storage profile for storage related settings of a container group profile. - */ -@Fluent -public final class StorageProfile implements JsonSerializable { - /* - * The fileShares property. - */ - private List fileShares; - - /** - * Creates an instance of StorageProfile class. - */ - public StorageProfile() { - } - - /** - * Get the fileShares property: The fileShares property. - * - * @return the fileShares value. - */ - public List fileShares() { - return this.fileShares; - } - - /** - * Set the fileShares property: The fileShares property. - * - * @param fileShares the fileShares value to set. - * @return the StorageProfile object itself. - */ - public StorageProfile withFileShares(List fileShares) { - this.fileShares = fileShares; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (fileShares() != null) { - fileShares().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("fileShares", this.fileShares, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StorageProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StorageProfile 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 StorageProfile. - */ - public static StorageProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - StorageProfile deserializedStorageProfile = new StorageProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fileShares".equals(fieldName)) { - List fileShares = reader.readArray(reader1 -> FileShare.fromJson(reader1)); - deserializedStorageProfile.fileShares = fileShares; - } else { - reader.skipChildren(); - } - } - - return deserializedStorageProfile; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/UpdateProfile.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/UpdateProfile.java deleted file mode 100644 index 3fc595556415..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/UpdateProfile.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * Used by the customer to specify the way to update the Container Groups in NGroup. - */ -@Fluent -public final class UpdateProfile implements JsonSerializable { - /* - * The updateMode property. - */ - private NGroupUpdateMode updateMode; - - /* - * This profile allows the customers to customize the rolling update. - */ - private UpdateProfileRollingUpdateProfile rollingUpdateProfile; - - /** - * Creates an instance of UpdateProfile class. - */ - public UpdateProfile() { - } - - /** - * Get the updateMode property: The updateMode property. - * - * @return the updateMode value. - */ - public NGroupUpdateMode updateMode() { - return this.updateMode; - } - - /** - * Set the updateMode property: The updateMode property. - * - * @param updateMode the updateMode value to set. - * @return the UpdateProfile object itself. - */ - public UpdateProfile withUpdateMode(NGroupUpdateMode updateMode) { - this.updateMode = updateMode; - return this; - } - - /** - * Get the rollingUpdateProfile property: This profile allows the customers to customize the rolling update. - * - * @return the rollingUpdateProfile value. - */ - public UpdateProfileRollingUpdateProfile rollingUpdateProfile() { - return this.rollingUpdateProfile; - } - - /** - * Set the rollingUpdateProfile property: This profile allows the customers to customize the rolling update. - * - * @param rollingUpdateProfile the rollingUpdateProfile value to set. - * @return the UpdateProfile object itself. - */ - public UpdateProfile withRollingUpdateProfile(UpdateProfileRollingUpdateProfile rollingUpdateProfile) { - this.rollingUpdateProfile = rollingUpdateProfile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (rollingUpdateProfile() != null) { - rollingUpdateProfile().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("updateMode", this.updateMode == null ? null : this.updateMode.toString()); - jsonWriter.writeJsonField("rollingUpdateProfile", this.rollingUpdateProfile); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateProfile 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 UpdateProfile. - */ - public static UpdateProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateProfile deserializedUpdateProfile = new UpdateProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("updateMode".equals(fieldName)) { - deserializedUpdateProfile.updateMode = NGroupUpdateMode.fromString(reader.getString()); - } else if ("rollingUpdateProfile".equals(fieldName)) { - deserializedUpdateProfile.rollingUpdateProfile = UpdateProfileRollingUpdateProfile.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateProfile; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/UpdateProfileRollingUpdateProfile.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/UpdateProfileRollingUpdateProfile.java deleted file mode 100644 index 392a8ccbb47e..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/UpdateProfileRollingUpdateProfile.java +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.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; - -/** - * This profile allows the customers to customize the rolling update. - */ -@Fluent -public final class UpdateProfileRollingUpdateProfile implements JsonSerializable { - /* - * Maximum percentage of total Container Groups which can be updated simultaneously by rolling update in one batch. - */ - private Integer maxBatchPercent; - - /* - * Maximum percentage of the updated Container Groups which can be in unhealthy state after each batch is updated. - */ - private Integer maxUnhealthyPercent; - - /* - * The wait time between batches after completing the one batch of the rolling update and starting the next batch. - * The time duration should be specified in ISO 8601 format for duration. - */ - private String pauseTimeBetweenBatches; - - /* - * Default is false. If set to true, the CGs will be updated in-place instead of creating new CG and deleting old - * ones. - */ - private Boolean inPlaceUpdate; - - /** - * Creates an instance of UpdateProfileRollingUpdateProfile class. - */ - public UpdateProfileRollingUpdateProfile() { - } - - /** - * Get the maxBatchPercent property: Maximum percentage of total Container Groups which can be updated - * simultaneously by rolling update in one batch. - * - * @return the maxBatchPercent value. - */ - public Integer maxBatchPercent() { - return this.maxBatchPercent; - } - - /** - * Set the maxBatchPercent property: Maximum percentage of total Container Groups which can be updated - * simultaneously by rolling update in one batch. - * - * @param maxBatchPercent the maxBatchPercent value to set. - * @return the UpdateProfileRollingUpdateProfile object itself. - */ - public UpdateProfileRollingUpdateProfile withMaxBatchPercent(Integer maxBatchPercent) { - this.maxBatchPercent = maxBatchPercent; - return this; - } - - /** - * Get the maxUnhealthyPercent property: Maximum percentage of the updated Container Groups which can be in - * unhealthy state after each batch is updated. - * - * @return the maxUnhealthyPercent value. - */ - public Integer maxUnhealthyPercent() { - return this.maxUnhealthyPercent; - } - - /** - * Set the maxUnhealthyPercent property: Maximum percentage of the updated Container Groups which can be in - * unhealthy state after each batch is updated. - * - * @param maxUnhealthyPercent the maxUnhealthyPercent value to set. - * @return the UpdateProfileRollingUpdateProfile object itself. - */ - public UpdateProfileRollingUpdateProfile withMaxUnhealthyPercent(Integer maxUnhealthyPercent) { - this.maxUnhealthyPercent = maxUnhealthyPercent; - return this; - } - - /** - * Get the pauseTimeBetweenBatches property: The wait time between batches after completing the one batch of the - * rolling update and starting the next batch. The time duration should be specified in ISO 8601 format for - * duration. - * - * @return the pauseTimeBetweenBatches value. - */ - public String pauseTimeBetweenBatches() { - return this.pauseTimeBetweenBatches; - } - - /** - * Set the pauseTimeBetweenBatches property: The wait time between batches after completing the one batch of the - * rolling update and starting the next batch. The time duration should be specified in ISO 8601 format for - * duration. - * - * @param pauseTimeBetweenBatches the pauseTimeBetweenBatches value to set. - * @return the UpdateProfileRollingUpdateProfile object itself. - */ - public UpdateProfileRollingUpdateProfile withPauseTimeBetweenBatches(String pauseTimeBetweenBatches) { - this.pauseTimeBetweenBatches = pauseTimeBetweenBatches; - return this; - } - - /** - * Get the inPlaceUpdate property: Default is false. If set to true, the CGs will be updated in-place instead of - * creating new CG and deleting old ones. - * - * @return the inPlaceUpdate value. - */ - public Boolean inPlaceUpdate() { - return this.inPlaceUpdate; - } - - /** - * Set the inPlaceUpdate property: Default is false. If set to true, the CGs will be updated in-place instead of - * creating new CG and deleting old ones. - * - * @param inPlaceUpdate the inPlaceUpdate value to set. - * @return the UpdateProfileRollingUpdateProfile object itself. - */ - public UpdateProfileRollingUpdateProfile withInPlaceUpdate(Boolean inPlaceUpdate) { - this.inPlaceUpdate = inPlaceUpdate; - 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.writeNumberField("maxBatchPercent", this.maxBatchPercent); - jsonWriter.writeNumberField("maxUnhealthyPercent", this.maxUnhealthyPercent); - jsonWriter.writeStringField("pauseTimeBetweenBatches", this.pauseTimeBetweenBatches); - jsonWriter.writeBooleanField("inPlaceUpdate", this.inPlaceUpdate); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateProfileRollingUpdateProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateProfileRollingUpdateProfile 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 UpdateProfileRollingUpdateProfile. - */ - public static UpdateProfileRollingUpdateProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateProfileRollingUpdateProfile deserializedUpdateProfileRollingUpdateProfile - = new UpdateProfileRollingUpdateProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxBatchPercent".equals(fieldName)) { - deserializedUpdateProfileRollingUpdateProfile.maxBatchPercent - = reader.getNullable(JsonReader::getInt); - } else if ("maxUnhealthyPercent".equals(fieldName)) { - deserializedUpdateProfileRollingUpdateProfile.maxUnhealthyPercent - = reader.getNullable(JsonReader::getInt); - } else if ("pauseTimeBetweenBatches".equals(fieldName)) { - deserializedUpdateProfileRollingUpdateProfile.pauseTimeBetweenBatches = reader.getString(); - } else if ("inPlaceUpdate".equals(fieldName)) { - deserializedUpdateProfileRollingUpdateProfile.inPlaceUpdate - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateProfileRollingUpdateProfile; - }); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/UsageListResult.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/UsageListResult.java similarity index 78% rename from sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/UsageListResult.java rename to sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/UsageListResult.java index 5e605d1636e7..932dfc59de31 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/UsageListResult.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/UsageListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.containerinstance.implementation.models; +package com.azure.resourcemanager.containerinstance.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -23,15 +23,10 @@ public final class UsageListResult implements JsonSerializable */ private List value; - /* - * The URL to get the next set of results. - */ - private String nextLink; - /** * Creates an instance of UsageListResult class. */ - private UsageListResult() { + public UsageListResult() { } /** @@ -43,15 +38,6 @@ public List value() { return this.value; } - /** - * Get the nextLink property: The URL to get the next set of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - /** * Validates the instance. * @@ -69,7 +55,6 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -91,8 +76,6 @@ public static UsageListResult fromJson(JsonReader jsonReader) throws IOException if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> UsageInner.fromJson(reader1)); deserializedUsageListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedUsageListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/UsageName.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/UsageName.java index bee1e25940b9..fd602be7d7e0 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/UsageName.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/UsageName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -29,7 +29,7 @@ public final class UsageName implements JsonSerializable { /** * Creates an instance of UsageName class. */ - private UsageName() { + public UsageName() { } /** diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Volume.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Volume.java index 572e8ec15a17..04678ff66c9e 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Volume.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/Volume.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; @@ -38,11 +38,6 @@ public final class Volume implements JsonSerializable { */ private Map secret; - /* - * The secret reference volume. - */ - private Map secretReference; - /* * The git repo volume. */ @@ -134,26 +129,6 @@ public Volume withSecret(Map secret) { return this; } - /** - * Get the secretReference property: The secret reference volume. - * - * @return the secretReference value. - */ - public Map secretReference() { - return this.secretReference; - } - - /** - * Set the secretReference property: The secret reference volume. - * - * @param secretReference the secretReference value to set. - * @return the Volume object itself. - */ - public Volume withSecretReference(Map secretReference) { - this.secretReference = secretReference; - return this; - } - /** * Get the gitRepo property: The git repo volume. * @@ -201,12 +176,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("name", this.name); jsonWriter.writeJsonField("azureFile", this.azureFile); - if (this.emptyDir != null) { - jsonWriter.writeUntypedField("emptyDir", this.emptyDir); - } + jsonWriter.writeUntypedField("emptyDir", this.emptyDir); jsonWriter.writeMapField("secret", this.secret, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("secretReference", this.secretReference, - (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("gitRepo", this.gitRepo); return jsonWriter.writeEndObject(); } @@ -236,9 +207,6 @@ public static Volume fromJson(JsonReader jsonReader) throws IOException { } else if ("secret".equals(fieldName)) { Map secret = reader.readMap(reader1 -> reader1.getString()); deserializedVolume.secret = secret; - } else if ("secretReference".equals(fieldName)) { - Map secretReference = reader.readMap(reader1 -> reader1.getString()); - deserializedVolume.secretReference = secretReference; } else if ("gitRepo".equals(fieldName)) { deserializedVolume.gitRepo = GitRepoVolume.fromJson(reader); } else { diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/VolumeMount.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/VolumeMount.java index b707a9c5d63e..8cc8d943ac23 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/VolumeMount.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/VolumeMount.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/package-info.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/package-info.java index d99225e5a68b..043f9561bb6b 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/package-info.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for ContainerInstance. - * ContainerInstance. + * Package containing the data models for ContainerInstanceManagementClient. + * null. */ package com.azure.resourcemanager.containerinstance.models; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/package-info.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/package-info.java index 6b7dc7741fdb..51c4c8de9d0b 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/package-info.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/com/azure/resourcemanager/containerinstance/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the classes for ContainerInstance. - * ContainerInstance. + * Package containing the classes for ContainerInstanceManagementClient. + * null. */ package com.azure.resourcemanager.containerinstance; diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/module-info.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/module-info.java index 81ef1088742b..16ef4a40d580 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/module-info.java +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/java/module-info.java @@ -16,6 +16,5 @@ // open packages specifically for azure core opens com.azure.resourcemanager.containerinstance.fluent.models to com.azure.core; - opens com.azure.resourcemanager.containerinstance.implementation.models to com.azure.core; opens com.azure.resourcemanager.containerinstance.models to com.azure.core; } diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/resources/META-INF/azure-resourcemanager-containerinstance_metadata.json b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/resources/META-INF/azure-resourcemanager-containerinstance_metadata.json deleted file mode 100644 index 345d81226685..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/resources/META-INF/azure-resourcemanager-containerinstance_metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"flavor":"azure","apiVersions":{"Microsoft.ContainerInstance":"2025-09-01"},"generatedFiles":["src/main/java/com/azure/resourcemanager/containerinstance/fluent/CGProfilesClient.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/CGProfilesOperationsClient.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerGroupsClient.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainerInstanceManagementClient.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/ContainersClient.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/LocationsClient.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/NGroupsClient.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/SubnetServiceAssociationLinksClient.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerAttachResponseInner.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerExecResponseInner.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerGroupInner.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerGroupProfileInner.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerGroupProfileProperties.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerGroupProperties.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/ContainerProperties.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/DeploymentExtensionSpecProperties.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/InitContainerPropertiesDefinition.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/LogsInner.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/NGroupInner.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/NGroupProperties.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/UsageInner.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/containerinstance/fluent/package-info.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/CGProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/CGProfilesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerInstanceManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainerInstanceManagementClientImpl.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/ContainersClientImpl.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/LocationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/NGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/SubnetServiceAssociationLinksClientImpl.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/CachedImagesListResult.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/CapabilitiesListResult.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/ContainerGroupListResult.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/ContainerGroupProfileListResult.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/NGroupsListResult.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/containerinstance/implementation/models/UsageListResult.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ApiEntityReference.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ApplicationGateway.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ApplicationGatewayBackendAddressPool.java","src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileShareAccessTier.java","src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileShareAccessType.java","src/main/java/com/azure/resourcemanager/containerinstance/models/AzureFileVolume.java","src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesCreateOrUpdateHeaders.java","src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesCreateOrUpdateResponse.java","src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesUpdateHeaders.java","src/main/java/com/azure/resourcemanager/containerinstance/models/CGProfilesUpdateResponse.java","src/main/java/com/azure/resourcemanager/containerinstance/models/CachedImages.java","src/main/java/com/azure/resourcemanager/containerinstance/models/Capabilities.java","src/main/java/com/azure/resourcemanager/containerinstance/models/CapabilitiesCapabilities.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ConfidentialComputeProperties.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ConfigMap.java","src/main/java/com/azure/resourcemanager/containerinstance/models/Container.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExec.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecRequest.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerExecRequestTerminalSize.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupDiagnostics.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIdentity.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIdentityUserAssignedIdentities.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupIpAddressType.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupNetworkProtocol.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupPriority.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupProfilePatch.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupProfileReferenceDefinition.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupProfileStub.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupPropertiesInstanceView.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupRestartPolicy.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupSku.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerGroupSubnetId.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerHttpGet.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerInstanceOperationsOrigin.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerNetworkProtocol.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerPort.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerProbe.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerPropertiesInstanceView.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ContainerState.java","src/main/java/com/azure/resourcemanager/containerinstance/models/DeploymentExtensionSpec.java","src/main/java/com/azure/resourcemanager/containerinstance/models/DnsConfiguration.java","src/main/java/com/azure/resourcemanager/containerinstance/models/DnsNameLabelReusePolicy.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ElasticProfile.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ElasticProfileContainerGroupNamingPolicy.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ElasticProfileContainerGroupNamingPolicyGuidNamingPolicy.java","src/main/java/com/azure/resourcemanager/containerinstance/models/EncryptionProperties.java","src/main/java/com/azure/resourcemanager/containerinstance/models/EnvironmentVariable.java","src/main/java/com/azure/resourcemanager/containerinstance/models/Event.java","src/main/java/com/azure/resourcemanager/containerinstance/models/FileShare.java","src/main/java/com/azure/resourcemanager/containerinstance/models/FileShareProperties.java","src/main/java/com/azure/resourcemanager/containerinstance/models/GitRepoVolume.java","src/main/java/com/azure/resourcemanager/containerinstance/models/GpuResource.java","src/main/java/com/azure/resourcemanager/containerinstance/models/GpuSku.java","src/main/java/com/azure/resourcemanager/containerinstance/models/HttpHeader.java","src/main/java/com/azure/resourcemanager/containerinstance/models/IdentityAccessControl.java","src/main/java/com/azure/resourcemanager/containerinstance/models/IdentityAccessLevel.java","src/main/java/com/azure/resourcemanager/containerinstance/models/IdentityAcls.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ImageRegistryCredential.java","src/main/java/com/azure/resourcemanager/containerinstance/models/InitContainerDefinition.java","src/main/java/com/azure/resourcemanager/containerinstance/models/InitContainerPropertiesDefinitionInstanceView.java","src/main/java/com/azure/resourcemanager/containerinstance/models/IpAddress.java","src/main/java/com/azure/resourcemanager/containerinstance/models/LoadBalancer.java","src/main/java/com/azure/resourcemanager/containerinstance/models/LoadBalancerBackendAddressPool.java","src/main/java/com/azure/resourcemanager/containerinstance/models/LogAnalytics.java","src/main/java/com/azure/resourcemanager/containerinstance/models/LogAnalyticsLogType.java","src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupCGPropertyContainer.java","src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupCGPropertyContainerProperties.java","src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupCGPropertyVolume.java","src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupContainerGroupProperties.java","src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupIdentity.java","src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupPatch.java","src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupProvisioningState.java","src/main/java/com/azure/resourcemanager/containerinstance/models/NGroupUpdateMode.java","src/main/java/com/azure/resourcemanager/containerinstance/models/NetworkProfile.java","src/main/java/com/azure/resourcemanager/containerinstance/models/OperatingSystemTypes.java","src/main/java/com/azure/resourcemanager/containerinstance/models/Operation.java","src/main/java/com/azure/resourcemanager/containerinstance/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/containerinstance/models/PlacementProfile.java","src/main/java/com/azure/resourcemanager/containerinstance/models/Port.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceLimits.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceRequests.java","src/main/java/com/azure/resourcemanager/containerinstance/models/ResourceRequirements.java","src/main/java/com/azure/resourcemanager/containerinstance/models/Scheme.java","src/main/java/com/azure/resourcemanager/containerinstance/models/SecretReference.java","src/main/java/com/azure/resourcemanager/containerinstance/models/SecurityContextCapabilitiesDefinition.java","src/main/java/com/azure/resourcemanager/containerinstance/models/SecurityContextDefinition.java","src/main/java/com/azure/resourcemanager/containerinstance/models/StandbyPoolProfileDefinition.java","src/main/java/com/azure/resourcemanager/containerinstance/models/StorageProfile.java","src/main/java/com/azure/resourcemanager/containerinstance/models/UpdateProfile.java","src/main/java/com/azure/resourcemanager/containerinstance/models/UpdateProfileRollingUpdateProfile.java","src/main/java/com/azure/resourcemanager/containerinstance/models/UsageName.java","src/main/java/com/azure/resourcemanager/containerinstance/models/Volume.java","src/main/java/com/azure/resourcemanager/containerinstance/models/VolumeMount.java","src/main/java/com/azure/resourcemanager/containerinstance/models/package-info.java","src/main/java/com/azure/resourcemanager/containerinstance/package-info.java"]} \ No newline at end of file diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerinstance/proxy-config.json b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerinstance/proxy-config.json index 026789a5584a..88068be31dad 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerinstance/proxy-config.json +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerinstance/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.containerinstance.implementation.CGProfilesClientImpl$CGProfilesService"],["com.azure.resourcemanager.containerinstance.implementation.CGProfilesOperationsClientImpl$CGProfilesOperationsService"],["com.azure.resourcemanager.containerinstance.implementation.ContainerGroupsClientImpl$ContainerGroupsService"],["com.azure.resourcemanager.containerinstance.implementation.ContainersClientImpl$ContainersService"],["com.azure.resourcemanager.containerinstance.implementation.LocationsClientImpl$LocationsService"],["com.azure.resourcemanager.containerinstance.implementation.NGroupsClientImpl$NGroupsService"],["com.azure.resourcemanager.containerinstance.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerinstance.implementation.SubnetServiceAssociationLinksClientImpl$SubnetServiceAssociationLinksService"]] \ No newline at end of file +[["com.azure.resourcemanager.containerinstance.implementation.ContainerGroupsClientImpl$ContainerGroupsService"],["com.azure.resourcemanager.containerinstance.implementation.ContainersClientImpl$ContainersService"],["com.azure.resourcemanager.containerinstance.implementation.LocationsClientImpl$LocationsService"],["com.azure.resourcemanager.containerinstance.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerinstance.implementation.SubnetServiceAssociationLinksClientImpl$SubnetServiceAssociationLinksService"]] \ No newline at end of file diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileCreateOrUpdateSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileCreateOrUpdateSamples.java deleted file mode 100644 index 9c3503e33ece..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileCreateOrUpdateSamples.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.containerinstance.fluent.models.ContainerGroupProfileInner; -import com.azure.resourcemanager.containerinstance.models.AzureFileVolume; -import com.azure.resourcemanager.containerinstance.models.ConfidentialComputeProperties; -import com.azure.resourcemanager.containerinstance.models.Container; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupDiagnostics; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupIpAddressType; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupNetworkProtocol; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupSku; -import com.azure.resourcemanager.containerinstance.models.ContainerPort; -import com.azure.resourcemanager.containerinstance.models.DeploymentExtensionSpec; -import com.azure.resourcemanager.containerinstance.models.EncryptionProperties; -import com.azure.resourcemanager.containerinstance.models.GpuResource; -import com.azure.resourcemanager.containerinstance.models.GpuSku; -import com.azure.resourcemanager.containerinstance.models.IpAddress; -import com.azure.resourcemanager.containerinstance.models.LogAnalytics; -import com.azure.resourcemanager.containerinstance.models.LogAnalyticsLogType; -import com.azure.resourcemanager.containerinstance.models.OperatingSystemTypes; -import com.azure.resourcemanager.containerinstance.models.Port; -import com.azure.resourcemanager.containerinstance.models.ResourceRequests; -import com.azure.resourcemanager.containerinstance.models.ResourceRequirements; -import com.azure.resourcemanager.containerinstance.models.SecurityContextCapabilitiesDefinition; -import com.azure.resourcemanager.containerinstance.models.SecurityContextDefinition; -import com.azure.resourcemanager.containerinstance.models.Volume; -import com.azure.resourcemanager.containerinstance.models.VolumeMount; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for CGProfile CreateOrUpdate. - */ -public final class CGProfileCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupProfileCreateOrUpdate_CreateConfidential.json - */ - /** - * Sample code: ConfidentialContainerGroupProfile. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void confidentialContainerGroupProfile( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getCGProfiles() - .createOrUpdateWithResponse("demo", "demo1", - new ContainerGroupProfileInner().withLocation("westeurope") - .withZones(Arrays.asList("1")) - .withSku(ContainerGroupSku.CONFIDENTIAL) - .withContainers( - Arrays.asList(new Container().withName("accdemo") - .withImage("confiimage") - .withCommand(Arrays.asList()) - .withPorts(Arrays.asList(new ContainerPort().withPort(8000))) - .withEnvironmentVariables(Arrays.asList()) - .withResources(new ResourceRequirements() - .withRequests(new ResourceRequests().withMemoryInGB(1.5).withCpu(1.0))) - .withSecurityContext(new SecurityContextDefinition().withPrivileged(false) - .withCapabilities(new SecurityContextCapabilitiesDefinition() - .withAdd(Arrays.asList("CAP_NET_ADMIN")))))) - .withImageRegistryCredentials(Arrays.asList()) - .withIpAddress(new IpAddress() - .withPorts( - Arrays.asList(new Port().withProtocol(ContainerGroupNetworkProtocol.TCP).withPort(8000))) - .withType(ContainerGroupIpAddressType.PUBLIC)) - .withOsType(OperatingSystemTypes.LINUX) - .withConfidentialComputeProperties(new ConfidentialComputeProperties().withCcePolicy( - "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-09-01/ContainerGroupProfileCreateOrUpdate_EncryptionProperties.json - */ - /** - * Sample code: ContainerGroupProfileWithEncryptionProperties. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerGroupProfileWithEncryptionProperties( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getCGProfiles() - .createOrUpdateWithResponse("demo", "demo1", new ContainerGroupProfileInner().withLocation("eastus2") - .withZones(Arrays.asList("1")) - .withEncryptionProperties(new EncryptionProperties() - .withVaultBaseUrl("https://testkeyvault.vault.azure.net") - .withKeyName("fakeTokenPlaceholder") - .withKeyVersion("fakeTokenPlaceholder") - .withIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity")) - .withContainers(Arrays.asList(new Container().withName("demo1") - .withImage("nginx") - .withCommand(Arrays.asList()) - .withPorts(Arrays.asList(new ContainerPort().withPort(80))) - .withEnvironmentVariables(Arrays.asList()) - .withResources(new ResourceRequirements() - .withRequests(new ResourceRequests().withMemoryInGB(1.5).withCpu(1.0))))) - .withImageRegistryCredentials(Arrays.asList()) - .withIpAddress(new IpAddress() - .withPorts(Arrays.asList(new Port().withProtocol(ContainerGroupNetworkProtocol.TCP).withPort(80))) - .withType(ContainerGroupIpAddressType.PUBLIC)) - .withOsType(OperatingSystemTypes.LINUX), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-09-01/ContainerGroupProfileCreateOrUpdate_Extensions.json - */ - /** - * Sample code: ContainerGroupProfileCreateWithExtensions. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerGroupProfileCreateWithExtensions( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) throws IOException { - manager.serviceClient() - .getCGProfiles() - .createOrUpdateWithResponse("demo", "demo1", new ContainerGroupProfileInner().withLocation("eastus2") - .withZones(Arrays.asList("1")) - .withContainers(Arrays.asList(new Container().withName("demo1") - .withImage("nginx") - .withCommand(Arrays.asList()) - .withPorts(Arrays.asList(new ContainerPort().withPort(80))) - .withEnvironmentVariables(Arrays.asList()) - .withResources(new ResourceRequirements() - .withRequests(new ResourceRequests().withMemoryInGB(1.5).withCpu(1.0))))) - .withExtensions(Arrays.asList( - new DeploymentExtensionSpec().withName("kube-proxy") - .withExtensionType("kube-proxy") - .withVersion("1.0") - .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"clusterCidr\":\"10.240.0.0/16\",\"kubeVersion\":\"v1.9.10\"}", - Object.class, SerializerEncoding.JSON)) - .withProtectedSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"kubeConfig\":\"\"}", Object.class, - SerializerEncoding.JSON)), - new DeploymentExtensionSpec().withName("vk-realtime-metrics") - .withExtensionType("realtime-metrics") - .withVersion("1.0"))) - .withImageRegistryCredentials(Arrays.asList()) - .withIpAddress(new IpAddress() - .withPorts(Arrays.asList(new Port().withProtocol(ContainerGroupNetworkProtocol.TCP).withPort(80))) - .withType(ContainerGroupIpAddressType.PRIVATE)) - .withOsType(OperatingSystemTypes.LINUX), com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-09-01/ContainerGroupProfilesCreateOrUpdate.json - */ - /** - * Sample code: ContainerGroupProfilesCreateOrUpdate. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerGroupProfilesCreateOrUpdate( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) throws IOException { - manager.serviceClient() - .getCGProfiles() - .createOrUpdateWithResponse("demo", "demo1", new ContainerGroupProfileInner().withLocation("west us") - .withZones(Arrays.asList("1")) - .withContainers(Arrays.asList(new Container().withName("demo1") - .withImage("nginx") - .withCommand(Arrays.asList()) - .withPorts(Arrays.asList(new ContainerPort().withPort(80))) - .withEnvironmentVariables(Arrays.asList()) - .withResources(new ResourceRequirements().withRequests(new ResourceRequests().withMemoryInGB(1.5) - .withCpu(1.0) - .withGpu(new GpuResource().withCount(1).withSku(GpuSku.K80)))) - .withVolumeMounts(Arrays.asList( - new VolumeMount().withName("volume1").withMountPath("/mnt/volume1").withReadOnly(false), - new VolumeMount().withName("volume2").withMountPath("/mnt/volume2").withReadOnly(false), - new VolumeMount().withName("volume3").withMountPath("/mnt/volume3").withReadOnly(true))))) - .withImageRegistryCredentials(Arrays.asList()) - .withIpAddress(new IpAddress() - .withPorts(Arrays.asList(new Port().withProtocol(ContainerGroupNetworkProtocol.TCP).withPort(80))) - .withType(ContainerGroupIpAddressType.PUBLIC)) - .withOsType(OperatingSystemTypes.LINUX) - .withVolumes(Arrays.asList( - new Volume().withName("volume1") - .withAzureFile(new AzureFileVolume().withShareName("shareName") - .withStorageAccountName("accountName") - .withStorageAccountKey("fakeTokenPlaceholder")), - new Volume().withName("volume2") - .withEmptyDir(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)), - new Volume().withName("volume3") - .withSecret(mapOf("secretKey1", "fakeTokenPlaceholder", "secretKey2", "fakeTokenPlaceholder")))) - .withDiagnostics(new ContainerGroupDiagnostics().withLogAnalytics(new LogAnalytics() - .withWorkspaceId("workspaceid") - .withWorkspaceKey("fakeTokenPlaceholder") - .withLogType(LogAnalyticsLogType.CONTAINER_INSIGHTS) - .withMetadata(mapOf("pod-uuid", "test-metadata-value")) - .withWorkspaceResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/microsoft.operationalinsights/workspaces/workspace"))), - 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; - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileDeleteSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileDeleteSamples.java deleted file mode 100644 index c0925bda3dfe..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for CGProfile Delete. - */ -public final class CGProfileDeleteSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupProfilesDelete.json - */ - /** - * Sample code: ContainerGroupProfilesDelete. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void - containerGroupProfilesDelete(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient().getCGProfiles().deleteWithResponse("demo", "demo1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileGetByResourceGroupSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileGetByResourceGroupSamples.java deleted file mode 100644 index ba45dc698e9b..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileGetByResourceGroupSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for CGProfile GetByResourceGroup. - */ -public final class CGProfileGetByResourceGroupSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupProfilesGet.json - */ - /** - * Sample code: ContainerGroupProfilesGet_Succeeded. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerGroupProfilesGetSucceeded( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getCGProfiles() - .getByResourceGroupWithResponse("demo", "demo1", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-09-01/ContainerGroupProfilesGetPriority.json - */ - /** - * Sample code: ContainerGroupProfilesGetWithPriority. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerGroupProfilesGetWithPriority( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getCGProfiles() - .getByResourceGroupWithResponse("demo", "demo1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileGetByRevisionNumberSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileGetByRevisionNumberSamples.java deleted file mode 100644 index b4854fbf6105..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileGetByRevisionNumberSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for CGProfile GetByRevisionNumber. - */ -public final class CGProfileGetByRevisionNumberSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupProfileGetByRevisionNumber.json - */ - /** - * Sample code: ContainerGroupProfileGetByRevisionNumber. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerGroupProfileGetByRevisionNumber( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getCGProfiles() - .getByRevisionNumberWithResponse("demo", "demo1", "1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileListAllRevisionsSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileListAllRevisionsSamples.java deleted file mode 100644 index b6ef60538a98..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileListAllRevisionsSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for CGProfile ListAllRevisions. - */ -public final class CGProfileListAllRevisionsSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupProfileListAllRevisions.json - */ - /** - * Sample code: ContainerGroupProfileListAllRevisions. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerGroupProfileListAllRevisions( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient().getCGProfiles().listAllRevisions("demo", "demo1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileUpdateSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileUpdateSamples.java deleted file mode 100644 index a9a5b1ffaa30..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfileUpdateSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -import com.azure.resourcemanager.containerinstance.models.ContainerGroupProfilePatch; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for CGProfile Update. - */ -public final class CGProfileUpdateSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupProfilesPatch.json - */ - /** - * Sample code: ContainerGroupProfilesPatch. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void - containerGroupProfilesPatch(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getCGProfiles() - .updateWithResponse("demoResource", "demo1", - new ContainerGroupProfilePatch() - .withTags(mapOf("tag1key", "fakeTokenPlaceholder", "tag2key", "fakeTokenPlaceholder")), - 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; - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfilesOperationListByResourceGroupSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfilesOperationListByResourceGroupSamples.java deleted file mode 100644 index e608651f33e6..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfilesOperationListByResourceGroupSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for CGProfilesOperation ListByResourceGroup. - */ -public final class CGProfilesOperationListByResourceGroupSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupProfilesListByResourceGroup.json - */ - /** - * Sample code: ContainerGroupProfilesListByResourceGroup. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerGroupProfilesListByResourceGroup( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient().getCGProfilesOperations().listByResourceGroup("demo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfilesOperationListSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfilesOperationListSamples.java deleted file mode 100644 index 3e5a1d23b27e..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/CGProfilesOperationListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for CGProfilesOperation List. - */ -public final class CGProfilesOperationListSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupProfilesList.json - */ - /** - * Sample code: ContainerGroupProfilesList. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void - containerGroupProfilesList(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient().getCGProfilesOperations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsCreateOrUpdateSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsCreateOrUpdateSamples.java deleted file mode 100644 index 369e4e436e19..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsCreateOrUpdateSamples.java +++ /dev/null @@ -1,377 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.containerinstance.fluent.models.ContainerGroupInner; -import com.azure.resourcemanager.containerinstance.models.AzureFileVolume; -import com.azure.resourcemanager.containerinstance.models.ConfidentialComputeProperties; -import com.azure.resourcemanager.containerinstance.models.ConfigMap; -import com.azure.resourcemanager.containerinstance.models.Container; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupDiagnostics; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupIdentity; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupIdentityUserAssignedIdentities; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupIpAddressType; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupNetworkProtocol; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupPriority; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupProfileReferenceDefinition; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupRestartPolicy; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupSku; -import com.azure.resourcemanager.containerinstance.models.ContainerGroupSubnetId; -import com.azure.resourcemanager.containerinstance.models.ContainerPort; -import com.azure.resourcemanager.containerinstance.models.DeploymentExtensionSpec; -import com.azure.resourcemanager.containerinstance.models.DnsConfiguration; -import com.azure.resourcemanager.containerinstance.models.DnsNameLabelReusePolicy; -import com.azure.resourcemanager.containerinstance.models.EncryptionProperties; -import com.azure.resourcemanager.containerinstance.models.EnvironmentVariable; -import com.azure.resourcemanager.containerinstance.models.GpuResource; -import com.azure.resourcemanager.containerinstance.models.GpuSku; -import com.azure.resourcemanager.containerinstance.models.ImageRegistryCredential; -import com.azure.resourcemanager.containerinstance.models.IpAddress; -import com.azure.resourcemanager.containerinstance.models.LogAnalytics; -import com.azure.resourcemanager.containerinstance.models.LogAnalyticsLogType; -import com.azure.resourcemanager.containerinstance.models.OperatingSystemTypes; -import com.azure.resourcemanager.containerinstance.models.Port; -import com.azure.resourcemanager.containerinstance.models.ResourceIdentityType; -import com.azure.resourcemanager.containerinstance.models.ResourceRequests; -import com.azure.resourcemanager.containerinstance.models.ResourceRequirements; -import com.azure.resourcemanager.containerinstance.models.SecretReference; -import com.azure.resourcemanager.containerinstance.models.SecurityContextCapabilitiesDefinition; -import com.azure.resourcemanager.containerinstance.models.SecurityContextDefinition; -import com.azure.resourcemanager.containerinstance.models.StandbyPoolProfileDefinition; -import com.azure.resourcemanager.containerinstance.models.Volume; -import com.azure.resourcemanager.containerinstance.models.VolumeMount; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ContainerGroups CreateOrUpdate. - */ -public final class ContainerGroupsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupCreateOrUpdateStandbyPool.json - */ - /** - * Sample code: ContainerGroupCreateOrUpdateWithStandbyPool. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerGroupCreateOrUpdateWithStandbyPool( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getContainerGroups() - .createOrUpdate("demo", "demo1", new ContainerGroupInner().withLocation("west us") - .withContainers(Arrays.asList(new Container().withName("demo1") - .withConfigMap(new ConfigMap().withKeyValuePairs(mapOf("Newkey", "fakeTokenPlaceholder"))))) - .withContainerGroupProfile(new ContainerGroupProfileReferenceDefinition().withId( - "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroupProfiles/democgp") - .withRevision(1)) - .withStandbyPoolProfile(new StandbyPoolProfileDefinition().withId( - "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.StandbyPool/standbyContainerGroupPools/demopool")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-09-01/ContainerGroupExtensions.json - */ - /** - * Sample code: ContainerGroupCreateWithExtensions. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerGroupCreateWithExtensions( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) throws IOException { - manager.serviceClient() - .getContainerGroups() - .createOrUpdate("demo", "demo1", new ContainerGroupInner().withLocation("eastus2") - .withContainers(Arrays.asList(new Container().withName("demo1") - .withImage("nginx") - .withCommand(Arrays.asList()) - .withPorts(Arrays.asList(new ContainerPort().withPort(80))) - .withEnvironmentVariables(Arrays.asList()) - .withResources(new ResourceRequirements() - .withRequests(new ResourceRequests().withMemoryInGB(1.5).withCpu(1.0))))) - .withImageRegistryCredentials(Arrays.asList()) - .withIpAddress(new IpAddress() - .withPorts(Arrays.asList(new Port().withProtocol(ContainerGroupNetworkProtocol.TCP).withPort(80))) - .withType(ContainerGroupIpAddressType.PRIVATE)) - .withOsType(OperatingSystemTypes.LINUX) - .withSubnetIds(Arrays.asList(new ContainerGroupSubnetId().withId( - "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-rg-vnet/subnets/test-subnet"))) - .withExtensions(Arrays.asList( - new DeploymentExtensionSpec().withName("kube-proxy") - .withExtensionType("kube-proxy") - .withVersion("1.0") - .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"clusterCidr\":\"10.240.0.0/16\",\"kubeVersion\":\"v1.9.10\"}", - Object.class, SerializerEncoding.JSON)) - .withProtectedSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"kubeConfig\":\"\"}", Object.class, - SerializerEncoding.JSON)), - new DeploymentExtensionSpec().withName("vk-realtime-metrics") - .withExtensionType("realtime-metrics") - .withVersion("1.0"))), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-09-01/ContainerGroupEncryptionProperties.json - */ - /** - * Sample code: ContainerGroupWithEncryptionProperties. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerGroupWithEncryptionProperties( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getContainerGroups() - .createOrUpdate("demo", "demo1", new ContainerGroupInner().withLocation("eastus2") - .withIdentity(new ContainerGroupIdentity().withType(ResourceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity", - new ContainerGroupIdentityUserAssignedIdentities()))) - .withContainers(Arrays.asList(new Container().withName("demo1") - .withImage("nginx") - .withCommand(Arrays.asList()) - .withPorts(Arrays.asList(new ContainerPort().withPort(80))) - .withEnvironmentVariables(Arrays.asList()) - .withResources(new ResourceRequirements() - .withRequests(new ResourceRequests().withMemoryInGB(1.5).withCpu(1.0))))) - .withImageRegistryCredentials(Arrays.asList()) - .withIpAddress(new IpAddress() - .withPorts(Arrays.asList(new Port().withProtocol(ContainerGroupNetworkProtocol.TCP).withPort(80))) - .withType(ContainerGroupIpAddressType.PUBLIC)) - .withOsType(OperatingSystemTypes.LINUX) - .withEncryptionProperties(new EncryptionProperties() - .withVaultBaseUrl("https://testkeyvault.vault.azure.net") - .withKeyName("fakeTokenPlaceholder") - .withKeyVersion("fakeTokenPlaceholder") - .withIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/container-group-identity")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-09-01/ContainerGroupsCreateOrUpdateSecretReference.json - */ - /** - * Sample code: ContainerGroupsCreateOrUpdateSecretReference. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerGroupsCreateOrUpdateSecretReference( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) throws IOException { - manager.serviceClient() - .getContainerGroups() - .createOrUpdate("demo", "demo1", new ContainerGroupInner().withLocation("west us") - .withIdentity(new ContainerGroupIdentity().withType(ResourceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", - new ContainerGroupIdentityUserAssignedIdentities()))) - .withSecretReferences(Arrays.asList(new SecretReference().withName("envSecretRef") - .withIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name") - .withSecretReferenceUri("fakeTokenPlaceholder"), - new SecretReference().withName("accountKeyRef") - .withIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name") - .withSecretReferenceUri("fakeTokenPlaceholder"), - new SecretReference().withName("volumeSecretRef") - .withIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name") - .withSecretReferenceUri("fakeTokenPlaceholder"), - new SecretReference().withName("privateRegistryKeyRef") - .withIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name") - .withSecretReferenceUri("fakeTokenPlaceholder"))) - .withContainers(Arrays.asList(new Container().withName("demo1") - .withImage("privateRegistryImage") - .withCommand(Arrays.asList()) - .withPorts(Arrays.asList(new ContainerPort().withPort(80))) - .withEnvironmentVariables(Arrays.asList( - new EnvironmentVariable().withName("envSecret").withSecureValueReference("envSecretRef"))) - .withResources(new ResourceRequirements().withRequests(new ResourceRequests().withMemoryInGB(1.5) - .withCpu(1.0) - .withGpu(new GpuResource().withCount(1).withSku(GpuSku.K80)))) - .withVolumeMounts(Arrays.asList( - new VolumeMount().withName("volume1").withMountPath("/mnt/volume1").withReadOnly(false), - new VolumeMount().withName("volume2").withMountPath("/mnt/volume2").withReadOnly(false), - new VolumeMount().withName("volume3").withMountPath("/mnt/volume3").withReadOnly(true))))) - .withImageRegistryCredentials( - Arrays.asList(new ImageRegistryCredential().withServer("demoregistry.azurecr.io") - .withUsername("registryUserName") - .withPasswordReference("fakeTokenPlaceholder"))) - .withIpAddress(new IpAddress() - .withPorts(Arrays.asList(new Port().withProtocol(ContainerGroupNetworkProtocol.TCP).withPort(80))) - .withType(ContainerGroupIpAddressType.PUBLIC) - .withDnsNameLabel("dnsnamelabel1") - .withAutoGeneratedDomainNameLabelScope(DnsNameLabelReusePolicy.UNSECURE)) - .withOsType(OperatingSystemTypes.LINUX) - .withVolumes(Arrays.asList( - new Volume().withName("volume1") - .withAzureFile(new AzureFileVolume().withShareName("shareName") - .withStorageAccountName("accountName") - .withStorageAccountKeyReference("fakeTokenPlaceholder")), - new Volume().withName("volume2") - .withEmptyDir(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)), - new Volume().withName("volume3") - .withSecret(mapOf("secretKey1", "fakeTokenPlaceholder")) - .withSecretReference(mapOf("secretKey2", "fakeTokenPlaceholder")))) - .withDiagnostics(new ContainerGroupDiagnostics().withLogAnalytics(new LogAnalytics() - .withWorkspaceId("workspaceid") - .withWorkspaceKey("fakeTokenPlaceholder") - .withLogType(LogAnalyticsLogType.CONTAINER_INSIGHTS) - .withMetadata(mapOf("test-key", "fakeTokenPlaceholder")) - .withWorkspaceResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/microsoft.operationalinsights/workspaces/workspace"))) - .withSubnetIds(Arrays.asList(new ContainerGroupSubnetId().withId( - "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnetName'))]"))) - .withDnsConfig(new DnsConfiguration().withNameServers(Arrays.asList("1.1.1.1")) - .withSearchDomains("cluster.local svc.cluster.local") - .withOptions("ndots:2")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-09-01/ContainerGroupCreateConfidential.json - */ - /** - * Sample code: ConfidentialContainerGroup. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void - confidentialContainerGroup(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getContainerGroups() - .createOrUpdate("demo", "demo1", - new ContainerGroupInner().withLocation("westeurope") - .withContainers( - Arrays.asList(new Container().withName("accdemo") - .withImage("confiimage") - .withCommand(Arrays.asList()) - .withPorts(Arrays.asList(new ContainerPort().withPort(8000))) - .withEnvironmentVariables(Arrays.asList()) - .withResources(new ResourceRequirements() - .withRequests(new ResourceRequests().withMemoryInGB(1.5).withCpu(1.0))) - .withSecurityContext(new SecurityContextDefinition().withPrivileged(false) - .withCapabilities(new SecurityContextCapabilitiesDefinition() - .withAdd(Arrays.asList("CAP_NET_ADMIN")))))) - .withImageRegistryCredentials(Arrays.asList()) - .withIpAddress(new IpAddress() - .withPorts( - Arrays.asList(new Port().withProtocol(ContainerGroupNetworkProtocol.TCP).withPort(8000))) - .withType(ContainerGroupIpAddressType.PUBLIC)) - .withOsType(OperatingSystemTypes.LINUX) - .withSku(ContainerGroupSku.CONFIDENTIAL) - .withConfidentialComputeProperties(new ConfidentialComputeProperties().withCcePolicy( - "eyJhbGxvd19hbGwiOiB0cnVlLCAiY29udGFpbmVycyI6IHsibGVuZ3RoIjogMCwgImVsZW1lbnRzIjogbnVsbH19")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-09-01/ContainerGroupsCreateOrUpdate.json - */ - /** - * Sample code: ContainerGroupsCreateOrUpdate. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerGroupsCreateOrUpdate( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) throws IOException { - manager.serviceClient() - .getContainerGroups() - .createOrUpdate("demo", "demo1", new ContainerGroupInner().withLocation("west us") - .withIdentity(new ContainerGroupIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name", - new ContainerGroupIdentityUserAssignedIdentities()))) - .withContainers(Arrays.asList(new Container().withName("demo1") - .withImage("nginx") - .withCommand(Arrays.asList()) - .withPorts(Arrays.asList(new ContainerPort().withPort(80))) - .withEnvironmentVariables(Arrays.asList()) - .withResources(new ResourceRequirements().withRequests(new ResourceRequests().withMemoryInGB(1.5) - .withCpu(1.0) - .withGpu(new GpuResource().withCount(1).withSku(GpuSku.K80)))) - .withVolumeMounts(Arrays.asList( - new VolumeMount().withName("volume1").withMountPath("/mnt/volume1").withReadOnly(false), - new VolumeMount().withName("volume2").withMountPath("/mnt/volume2").withReadOnly(false), - new VolumeMount().withName("volume3").withMountPath("/mnt/volume3").withReadOnly(true))))) - .withImageRegistryCredentials(Arrays.asList()) - .withIpAddress(new IpAddress() - .withPorts(Arrays.asList(new Port().withProtocol(ContainerGroupNetworkProtocol.TCP).withPort(80))) - .withType(ContainerGroupIpAddressType.PUBLIC) - .withDnsNameLabel("dnsnamelabel1") - .withAutoGeneratedDomainNameLabelScope(DnsNameLabelReusePolicy.UNSECURE)) - .withOsType(OperatingSystemTypes.LINUX) - .withVolumes(Arrays.asList( - new Volume().withName("volume1") - .withAzureFile(new AzureFileVolume().withShareName("shareName") - .withStorageAccountName("accountName") - .withStorageAccountKey("fakeTokenPlaceholder")), - new Volume().withName("volume2") - .withEmptyDir(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)), - new Volume().withName("volume3") - .withSecret(mapOf("secretKey1", "fakeTokenPlaceholder", "secretKey2", "fakeTokenPlaceholder")))) - .withDiagnostics(new ContainerGroupDiagnostics().withLogAnalytics(new LogAnalytics() - .withWorkspaceId("workspaceid") - .withWorkspaceKey("fakeTokenPlaceholder") - .withLogType(LogAnalyticsLogType.CONTAINER_INSIGHTS) - .withMetadata(mapOf("test-key", "fakeTokenPlaceholder")) - .withWorkspaceResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/microsoft.operationalinsights/workspaces/workspace"))) - .withSubnetIds(Arrays.asList(new ContainerGroupSubnetId().withId( - "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnetName'))]"))) - .withDnsConfig(new DnsConfiguration().withNameServers(Arrays.asList("1.1.1.1")) - .withSearchDomains("cluster.local svc.cluster.local") - .withOptions("ndots:2")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-09-01/ContainerGroupsCreatePriority.json - */ - /** - * Sample code: ContainerGroupsCreateWithPriority. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerGroupsCreateWithPriority( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getContainerGroups() - .createOrUpdate("demo", "demo1", - new ContainerGroupInner().withLocation("eastus") - .withContainers(Arrays.asList(new Container().withName("test-container-001") - .withImage("alpine:latest") - .withCommand(Arrays.asList("/bin/sh", "-c", "sleep 10")) - .withResources(new ResourceRequirements() - .withRequests(new ResourceRequests().withMemoryInGB(1.0).withCpu(1.0))))) - .withRestartPolicy(ContainerGroupRestartPolicy.NEVER) - .withOsType(OperatingSystemTypes.LINUX) - .withSku(ContainerGroupSku.STANDARD) - .withPriority(ContainerGroupPriority.SPOT), - 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; - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsDeleteSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsDeleteSamples.java deleted file mode 100644 index f5466abac09b..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for ContainerGroups Delete. - */ -public final class ContainerGroupsDeleteSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupsDelete.json - */ - /** - * Sample code: ContainerGroupsDelete. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void - containerGroupsDelete(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient().getContainerGroups().delete("demo", "demo1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsGetByResourceGroupSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsGetByResourceGroupSamples.java deleted file mode 100644 index 4e601653037f..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsGetByResourceGroupSamples.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for ContainerGroups GetByResourceGroup. - */ -public final class ContainerGroupsGetByResourceGroupSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupsGetPriority.json - */ - /** - * Sample code: ContainerGroupsGetWithPriority. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void - containerGroupsGetWithPriority(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getContainerGroups() - .getByResourceGroupWithResponse("demo", "demo1", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-09-01/ContainerGroupsGet_Succeeded.json - */ - /** - * Sample code: ContainerGroupsGet_Succeeded. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void - containerGroupsGetSucceeded(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getContainerGroups() - .getByResourceGroupWithResponse("demo", "demo1", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2025-09-01/ContainerGroupsGet_Failed.json - */ - /** - * Sample code: ContainerGroupsGet_Failed. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void - containerGroupsGetFailed(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getContainerGroups() - .getByResourceGroupWithResponse("demo", "demo1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsListByResourceGroupSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsListByResourceGroupSamples.java deleted file mode 100644 index 7243b97d674a..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsListByResourceGroupSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for ContainerGroups ListByResourceGroup. - */ -public final class ContainerGroupsListByResourceGroupSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupsListByResourceGroup.json - */ - /** - * Sample code: ContainerGroupsListByResourceGroup. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerGroupsListByResourceGroup( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient().getContainerGroups().listByResourceGroup("demo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsListSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsListSamples.java deleted file mode 100644 index 79faf8e92433..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for ContainerGroups List. - */ -public final class ContainerGroupsListSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupsList.json - */ - /** - * Sample code: ContainerGroupsList. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void - containerGroupsList(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient().getContainerGroups().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsRestartSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsRestartSamples.java deleted file mode 100644 index a49b689fefc3..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsRestartSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for ContainerGroups Restart. - */ -public final class ContainerGroupsRestartSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupsRestart.json - */ - /** - * Sample code: ContainerRestart. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerRestart(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient().getContainerGroups().restart("demo", "demo1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsStartSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsStartSamples.java deleted file mode 100644 index bb04e8929ad1..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsStartSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for ContainerGroups Start. - */ -public final class ContainerGroupsStartSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupsStart.json - */ - /** - * Sample code: ContainerStart. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerStart(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient().getContainerGroups().start("demo", "demo1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsStopSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsStopSamples.java deleted file mode 100644 index 75fc97189d0f..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsStopSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for ContainerGroups Stop. - */ -public final class ContainerGroupsStopSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupsStop.json - */ - /** - * Sample code: ContainerStop. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerStop(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getContainerGroups() - .stopWithResponse("demo", "demo1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsUpdateSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsUpdateSamples.java deleted file mode 100644 index b60aa87ed8e4..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainerGroupsUpdateSamples.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -import com.azure.core.management.Resource; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ContainerGroups Update. - */ -public final class ContainerGroupsUpdateSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupsUpdate.json - */ - /** - * Sample code: ContainerGroupsUpdate. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void - containerGroupsUpdate(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getContainerGroups() - .updateWithResponse("demoResource", "demo1", - new Resource().withTags(mapOf("tag1key", "fakeTokenPlaceholder", "tag2key", "fakeTokenPlaceholder")), - 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; - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainersAttachSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainersAttachSamples.java deleted file mode 100644 index 5108743ee795..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainersAttachSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for Containers Attach. - */ -public final class ContainersAttachSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerAttach.json - */ - /** - * Sample code: ContainerAttach. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerAttach(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getContainers() - .attachWithResponse("demo", "demo1", "container1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainersExecuteCommandSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainersExecuteCommandSamples.java deleted file mode 100644 index b785622eacd9..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainersExecuteCommandSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -import com.azure.resourcemanager.containerinstance.models.ContainerExecRequest; -import com.azure.resourcemanager.containerinstance.models.ContainerExecRequestTerminalSize; - -/** - * Samples for Containers ExecuteCommand. - */ -public final class ContainersExecuteCommandSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerExec.json - */ - /** - * Sample code: ContainerExec. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerExec(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getContainers() - .executeCommandWithResponse("demo", "demo1", "container1", - new ContainerExecRequest().withCommand("/bin/bash") - .withTerminalSize(new ContainerExecRequestTerminalSize().withRows(12).withCols(12)), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainersListLogsSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainersListLogsSamples.java deleted file mode 100644 index 01e58842f113..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/ContainersListLogsSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for Containers ListLogs. - */ -public final class ContainersListLogsSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerListLogs.json - */ - /** - * Sample code: ContainerListLogs. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerListLogs(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getContainers() - .listLogsWithResponse("demo", "demo1", "container1", 10, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/LocationListCachedImagesSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/LocationListCachedImagesSamples.java deleted file mode 100644 index 3a9cd172a1a0..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/LocationListCachedImagesSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for Location ListCachedImages. - */ -public final class LocationListCachedImagesSamples { - /* - * x-ms-original-file: 2025-09-01/CachedImagesList.json - */ - /** - * Sample code: CachedImages. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void cachedImages(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient().getLocations().listCachedImages("westcentralus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/LocationListCapabilitiesSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/LocationListCapabilitiesSamples.java deleted file mode 100644 index 3d15606e18b2..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/LocationListCapabilitiesSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for Location ListCapabilities. - */ -public final class LocationListCapabilitiesSamples { - /* - * x-ms-original-file: 2025-09-01/CapabilitiesList.json - */ - /** - * Sample code: GetCapabilities. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void getCapabilities(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient().getLocations().listCapabilities("westus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/LocationListUsageSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/LocationListUsageSamples.java deleted file mode 100644 index 6f9994a3729a..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/LocationListUsageSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for Location ListUsage. - */ -public final class LocationListUsageSamples { - /* - * x-ms-original-file: 2025-09-01/ContainerGroupUsage.json - */ - /** - * Sample code: ContainerUsage. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void containerUsage(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient().getLocations().listUsage("westcentralus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/OperationsListSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/OperationsListSamples.java deleted file mode 100644 index 2850740b16d7..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/OperationsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: 2025-09-01/OperationsList.json - */ - /** - * Sample code: OperationsList. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void operationsList(com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient().getOperations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/SubnetServiceAssociationLinkDeleteSamples.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/SubnetServiceAssociationLinkDeleteSamples.java deleted file mode 100644 index 249443e48d22..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/samples/java/com/azure/resourcemanager/containerinstance/generated/SubnetServiceAssociationLinkDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.containerinstance.generated; - -/** - * Samples for SubnetServiceAssociationLink Delete. - */ -public final class SubnetServiceAssociationLinkDeleteSamples { - /* - * x-ms-original-file: 2025-09-01/SubnetServiceAssociationLinkDelete.json - */ - /** - * Sample code: SubnetServiceAssociationLinkDelete. - * - * @param manager Entry point to ContainerInstanceManager. - */ - public static void subnetServiceAssociationLinkDelete( - com.azure.resourcemanager.containerinstance.ContainerInstanceManager manager) { - manager.serviceClient() - .getSubnetServiceAssociationLinks() - .delete("demo", "demo2", "demo3", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/tsp-location.yaml b/sdk/containerinstance/azure-resourcemanager-containerinstance/tsp-location.yaml deleted file mode 100644 index f9defe2a97a5..000000000000 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/tsp-location.yaml +++ /dev/null @@ -1,4 +0,0 @@ -directory: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/ContainerInstance -commit: c20c198ed29fb0b4b8f5022ef8a07cca22905656 -repo: Azure/azure-rest-api-specs -additionalDirectories: From dd342af9b90f34cf06b15b55a6b38ec55b031ba6 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 2 Jun 2026 04:06:14 +0000 Subject: [PATCH 15/16] Prepare azure-resourcemanager-containerinstance for 2.53.11 patch release. --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 14 ++++++++++++++ .../pom.xml | 14 +++++++------- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index c234f72f6510..38bd7b44d42c 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -282,7 +282,7 @@ com.azure.resourcemanager:azure-resourcemanager-appservice;2.55.2;2.55.3 com.azure.resourcemanager:azure-resourcemanager-authorization;2.53.9;2.54.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-cdn;2.53.8;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-compute;2.57.1;2.57.2 -com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.53.10;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.53.10;2.53.11 com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.55.2;2.56.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-containerservice;2.60.0;2.61.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-cosmos;2.54.3;2.55.0-beta.1 diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md b/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md index ffe6862c1521..403794b6ff81 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md @@ -1,5 +1,19 @@ # Release History +## 2.53.11 (2026-06-02) + +### Other Changes + +#### Dependency Updates + +- Upgraded `azure-resourcemanager-storage` from `2.55.4` to version `2.56.0`. +- Upgraded `azure-resourcemanager-resources` from `2.54.0` to version `2.54.1`. +- Upgraded `azure-resourcemanager-network` from `2.58.1` to version `2.58.2`. +- Upgraded `azure-storage-file-share` from `12.29.2` to version `12.30.0`. +- Upgraded `azure-resourcemanager-authorization` from `2.53.8` to version `2.53.9`. +- Upgraded `azure-resourcemanager-msi` from `2.53.7` to version `2.53.8`. + + ## 2.53.10 (2026-05-05) ### Other Changes diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml b/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml index 5ed3b2d8385c..3d7deb13984c 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml @@ -10,7 +10,7 @@ com.azure.resourcemanager azure-resourcemanager-containerinstance - 2.53.10 + 2.53.11 jar Microsoft Azure SDK for Container Instance Management @@ -60,32 +60,32 @@ com.azure.resourcemanager azure-resourcemanager-resources - 2.54.0 + 2.54.1 com.azure.resourcemanager azure-resourcemanager-storage - 2.55.4 + 2.56.0 com.azure.resourcemanager azure-resourcemanager-authorization - 2.53.8 + 2.53.9 com.azure.resourcemanager azure-resourcemanager-msi - 2.53.7 + 2.53.8 com.azure.resourcemanager azure-resourcemanager-network - 2.58.1 + 2.58.2 com.azure azure-storage-file-share - 12.29.2 + 12.30.0 com.azure From 0947f3ef04bab34c58211a0ac68558503156e7b8 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 2 Jun 2026 04:06:19 +0000 Subject: [PATCH 16/16] Patch release preparation 20260602 --- sdk/appservice/azure-resourcemanager-appservice/README.md | 2 +- sdk/compute/azure-resourcemanager-compute/README.md | 2 +- .../azure-resourcemanager-containerinstance/README.md | 2 +- .../azure-messaging-eventhubs-checkpointstore-blob/README.md | 2 +- sdk/eventhubs/azure-resourcemanager-eventhubs/README.md | 2 +- sdk/keyvault/azure-resourcemanager-keyvault/README.md | 2 +- sdk/resourcemanager/README.md | 2 +- sdk/sql/azure-resourcemanager-sql/README.md | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sdk/appservice/azure-resourcemanager-appservice/README.md b/sdk/appservice/azure-resourcemanager-appservice/README.md index af2f269f4128..865995a0c6d8 100644 --- a/sdk/appservice/azure-resourcemanager-appservice/README.md +++ b/sdk/appservice/azure-resourcemanager-appservice/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-appservice - 2.55.2 + 2.55.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/compute/azure-resourcemanager-compute/README.md b/sdk/compute/azure-resourcemanager-compute/README.md index eacd404a92c9..7911c5ebec0c 100644 --- a/sdk/compute/azure-resourcemanager-compute/README.md +++ b/sdk/compute/azure-resourcemanager-compute/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-compute - 2.57.1 + 2.57.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/README.md b/sdk/containerinstance/azure-resourcemanager-containerinstance/README.md index 71f56f7f0bcd..f3f114b623ea 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/README.md +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-containerinstance - 2.53.10 + 2.53.11 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md index 8625398f814a..2c2f7d48ac81 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md +++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/README.md @@ -60,7 +60,7 @@ add the direct dependency to your project as follows. com.azure azure-messaging-eventhubs-checkpointstore-blob - 1.21.6 + 1.21.7 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/README.md b/sdk/eventhubs/azure-resourcemanager-eventhubs/README.md index 10fe92aaf345..4eea36caebe8 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/README.md +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-eventhubs - 2.53.8 + 2.53.9 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/README.md b/sdk/keyvault/azure-resourcemanager-keyvault/README.md index 4024811c7d3d..2a5b1fabdf9f 100644 --- a/sdk/keyvault/azure-resourcemanager-keyvault/README.md +++ b/sdk/keyvault/azure-resourcemanager-keyvault/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-keyvault - 2.55.2 + 2.55.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/resourcemanager/README.md b/sdk/resourcemanager/README.md index a043196407d5..00b4e5e95bf7 100644 --- a/sdk/resourcemanager/README.md +++ b/sdk/resourcemanager/README.md @@ -330,7 +330,7 @@ For example, here is sample maven dependency for Compute package. com.azure.resourcemanager azure-resourcemanager-compute - 2.56.2 + 2.57.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/sql/azure-resourcemanager-sql/README.md b/sdk/sql/azure-resourcemanager-sql/README.md index aa7c8c55dd01..d9d973863752 100644 --- a/sdk/sql/azure-resourcemanager-sql/README.md +++ b/sdk/sql/azure-resourcemanager-sql/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-sql - 2.53.8 + 2.53.9 ``` [//]: # ({x-version-update-end})